Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
8f485489
Commit
8f485489
authored
Feb 28, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes to LUT mappers.
parent
3d6eac52
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
57 deletions
+57
-57
src/base/main/mainFrame.c
+1
-1
src/map/if/ifDsd.c
+56
-56
No files found.
src/base/main/mainFrame.c
View file @
8f485489
...
@@ -87,7 +87,7 @@ void Abc_FrameSetFlag( char * pFlag, char * pValue ) { Cmd_FlagUpdateVal
...
@@ -87,7 +87,7 @@ void Abc_FrameSetFlag( char * pFlag, char * pValue ) { Cmd_FlagUpdateVal
void
Abc_FrameSetCex
(
Abc_Cex_t
*
pCex
)
{
ABC_FREE
(
s_GlobalFrame
->
pCex
);
s_GlobalFrame
->
pCex
=
pCex
;
}
void
Abc_FrameSetCex
(
Abc_Cex_t
*
pCex
)
{
ABC_FREE
(
s_GlobalFrame
->
pCex
);
s_GlobalFrame
->
pCex
=
pCex
;
}
void
Abc_FrameSetNFrames
(
int
nFrames
)
{
ABC_FREE
(
s_GlobalFrame
->
pCex
);
s_GlobalFrame
->
nFrames
=
nFrames
;
}
void
Abc_FrameSetNFrames
(
int
nFrames
)
{
ABC_FREE
(
s_GlobalFrame
->
pCex
);
s_GlobalFrame
->
nFrames
=
nFrames
;
}
void
Abc_FrameSetStatus
(
int
Status
)
{
ABC_FREE
(
s_GlobalFrame
->
pCex
);
s_GlobalFrame
->
Status
=
Status
;
}
void
Abc_FrameSetStatus
(
int
Status
)
{
ABC_FREE
(
s_GlobalFrame
->
pCex
);
s_GlobalFrame
->
Status
=
Status
;
}
void
Abc_FrameSetManDsd
(
void
*
pMan
)
{
if
(
s_GlobalFrame
->
pManDsd
)
If_DsdManFree
((
If_DsdMan_t
*
)
s_GlobalFrame
->
pManDsd
,
0
);
s_GlobalFrame
->
pManDsd
=
pMan
;
}
void
Abc_FrameSetManDsd
(
void
*
pMan
)
{
if
(
s_GlobalFrame
->
pManDsd
&&
s_GlobalFrame
->
pManDsd
!=
pMan
)
If_DsdManFree
((
If_DsdMan_t
*
)
s_GlobalFrame
->
pManDsd
,
0
);
s_GlobalFrame
->
pManDsd
=
pMan
;
}
int
Abc_FrameIsBatchMode
()
{
return
s_GlobalFrame
?
s_GlobalFrame
->
fBatchMode
:
0
;
}
int
Abc_FrameIsBatchMode
()
{
return
s_GlobalFrame
?
s_GlobalFrame
->
fBatchMode
:
0
;
}
...
...
src/map/if/ifDsd.c
View file @
8f485489
...
@@ -383,6 +383,61 @@ void If_DsdManPrint( If_DsdMan_t * p, char * pFileName, int fVerbose )
...
@@ -383,6 +383,61 @@ void If_DsdManPrint( If_DsdMan_t * p, char * pFileName, int fVerbose )
if
(
pFileName
)
if
(
pFileName
)
fclose
(
pFile
);
fclose
(
pFile
);
}
}
/**Function*************************************************************
Synopsis [Sorting DSD literals.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
If_DsdObjCompare
(
Vec_Ptr_t
*
p
,
int
iLit0
,
int
iLit1
)
{
If_DsdObj_t
*
p0
=
If_DsdVecObj
(
p
,
Abc_Lit2Var
(
iLit0
));
If_DsdObj_t
*
p1
=
If_DsdVecObj
(
p
,
Abc_Lit2Var
(
iLit1
));
int
i
,
Res
;
if
(
If_DsdObjType
(
p0
)
<
If_DsdObjType
(
p1
)
)
return
-
1
;
if
(
If_DsdObjType
(
p0
)
>
If_DsdObjType
(
p1
)
)
return
1
;
if
(
If_DsdObjType
(
p0
)
<
IF_DSD_AND
)
return
0
;
if
(
If_DsdObjFaninNum
(
p0
)
<
If_DsdObjFaninNum
(
p1
)
)
return
-
1
;
if
(
If_DsdObjFaninNum
(
p0
)
>
If_DsdObjFaninNum
(
p1
)
)
return
1
;
for
(
i
=
0
;
i
<
If_DsdObjFaninNum
(
p0
);
i
++
)
{
Res
=
If_DsdObjCompare
(
p
,
If_DsdObjFaninLit
(
p0
,
i
),
If_DsdObjFaninLit
(
p1
,
i
)
);
if
(
Res
!=
0
)
return
Res
;
}
if
(
Abc_LitIsCompl
(
iLit0
)
<
Abc_LitIsCompl
(
iLit1
)
)
return
-
1
;
if
(
Abc_LitIsCompl
(
iLit0
)
>
Abc_LitIsCompl
(
iLit1
)
)
return
1
;
return
0
;
}
void
If_DsdObjSort
(
Vec_Ptr_t
*
p
,
int
*
pLits
,
int
nLits
,
int
*
pPerm
)
{
int
i
,
j
,
best_i
;
for
(
i
=
0
;
i
<
nLits
-
1
;
i
++
)
{
best_i
=
i
;
for
(
j
=
i
+
1
;
j
<
nLits
;
j
++
)
if
(
If_DsdObjCompare
(
p
,
pLits
[
best_i
],
pLits
[
j
])
==
1
)
best_i
=
j
;
if
(
i
==
best_i
)
continue
;
ABC_SWAP
(
int
,
pLits
[
i
],
pLits
[
best_i
]
);
if
(
pPerm
)
ABC_SWAP
(
int
,
pPerm
[
i
],
pPerm
[
best_i
]
);
}
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -470,7 +525,7 @@ int If_DsdObjFindOrAdd( If_DsdMan_t * p, int Type, int * pLits, int nLits, word
...
@@ -470,7 +525,7 @@ int If_DsdObjFindOrAdd( If_DsdMan_t * p, int Type, int * pLits, int nLits, word
unsigned
*
pSpot
=
If_DsdObjHashLookup
(
p
,
Type
,
pLits
,
nLits
,
truthId
);
unsigned
*
pSpot
=
If_DsdObjHashLookup
(
p
,
Type
,
pLits
,
nLits
,
truthId
);
abctime
clk
;
abctime
clk
;
if
(
*
pSpot
)
if
(
*
pSpot
)
return
*
pSpot
;
return
(
int
)
*
pSpot
;
clk
=
Abc_Clock
();
clk
=
Abc_Clock
();
if
(
truthId
>=
0
&&
truthId
==
Vec_PtrSize
(
p
->
vTtDecs
)
)
if
(
truthId
>=
0
&&
truthId
==
Vec_PtrSize
(
p
->
vTtDecs
)
)
{
{
...
@@ -709,61 +764,6 @@ word * If_DsdManComputeTruth( If_DsdMan_t * p, int iDsd, unsigned char * pPermLi
...
@@ -709,61 +764,6 @@ word * If_DsdManComputeTruth( If_DsdMan_t * p, int iDsd, unsigned char * pPermLi
assert
(
nSupp
==
If_DsdVecObjSuppSize
(
p
->
vObjs
,
Abc_Lit2Var
(
iDsd
))
);
assert
(
nSupp
==
If_DsdVecObjSuppSize
(
p
->
vObjs
,
Abc_Lit2Var
(
iDsd
))
);
return
pRes
;
return
pRes
;
}
}
/**Function*************************************************************
Synopsis [Sorting DSD literals.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
If_DsdObjCompare
(
Vec_Ptr_t
*
p
,
int
iLit0
,
int
iLit1
)
{
If_DsdObj_t
*
p0
=
If_DsdVecObj
(
p
,
Abc_Lit2Var
(
iLit0
));
If_DsdObj_t
*
p1
=
If_DsdVecObj
(
p
,
Abc_Lit2Var
(
iLit1
));
int
i
,
Res
;
if
(
If_DsdObjType
(
p0
)
<
If_DsdObjType
(
p1
)
)
return
-
1
;
if
(
If_DsdObjType
(
p0
)
>
If_DsdObjType
(
p1
)
)
return
1
;
if
(
If_DsdObjType
(
p0
)
<
IF_DSD_AND
)
return
0
;
if
(
If_DsdObjFaninNum
(
p0
)
<
If_DsdObjFaninNum
(
p1
)
)
return
-
1
;
if
(
If_DsdObjFaninNum
(
p0
)
>
If_DsdObjFaninNum
(
p1
)
)
return
1
;
for
(
i
=
0
;
i
<
If_DsdObjFaninNum
(
p0
);
i
++
)
{
Res
=
If_DsdObjCompare
(
p
,
If_DsdObjFaninLit
(
p0
,
i
),
If_DsdObjFaninLit
(
p1
,
i
)
);
if
(
Res
!=
0
)
return
Res
;
}
if
(
Abc_LitIsCompl
(
iLit0
)
<
Abc_LitIsCompl
(
iLit1
)
)
return
-
1
;
if
(
Abc_LitIsCompl
(
iLit0
)
>
Abc_LitIsCompl
(
iLit1
)
)
return
1
;
return
0
;
}
void
If_DsdObjSort
(
Vec_Ptr_t
*
p
,
int
*
pLits
,
int
nLits
,
int
*
pPerm
)
{
int
i
,
j
,
best_i
;
for
(
i
=
0
;
i
<
nLits
-
1
;
i
++
)
{
best_i
=
i
;
for
(
j
=
i
+
1
;
j
<
nLits
;
j
++
)
if
(
If_DsdObjCompare
(
p
,
pLits
[
best_i
],
pLits
[
j
])
==
1
)
best_i
=
j
;
if
(
i
==
best_i
)
continue
;
ABC_SWAP
(
int
,
pLits
[
i
],
pLits
[
best_i
]
);
if
(
pPerm
)
ABC_SWAP
(
int
,
pPerm
[
i
],
pPerm
[
best_i
]
);
}
}
/**Function*************************************************************
/**Function*************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment