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
cac32a32
Commit
cac32a32
authored
May 09, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabled switch 'fx -N <num>' to extract a fixed number of divisors.
parent
964c5cd5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
src/base/abci/abc.c
+2
-2
src/base/abci/abcFx.c
+7
-6
No files found.
src/base/abci/abc.c
View file @
cac32a32
...
@@ -3531,7 +3531,7 @@ usage:
...
@@ -3531,7 +3531,7 @@ usage:
***********************************************************************/
***********************************************************************/
int
Abc_CommandFastExtract
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandFastExtract
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
extern
int
Abc_NtkFxPerform
(
Abc_Ntk_t
*
pNtk
,
int
fVerbose
);
extern
int
Abc_NtkFxPerform
(
Abc_Ntk_t
*
pNtk
,
int
nNewNodesMax
,
int
fVerbose
);
Abc_Ntk_t
*
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
Abc_Ntk_t
*
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
Fxu_Data_t
Params
,
*
p
=
&
Params
;
Fxu_Data_t
Params
,
*
p
=
&
Params
;
int
c
,
fNewAlgo
=
1
;
int
c
,
fNewAlgo
=
1
;
...
@@ -3634,7 +3634,7 @@ int Abc_CommandFastExtract( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -3634,7 +3634,7 @@ int Abc_CommandFastExtract( Abc_Frame_t * pAbc, int argc, char ** argv )
// the nodes to be merged are linked into the special linked list
// the nodes to be merged are linked into the special linked list
if
(
fNewAlgo
)
if
(
fNewAlgo
)
Abc_NtkFxPerform
(
pNtk
,
p
->
fVerbose
);
Abc_NtkFxPerform
(
pNtk
,
p
->
nNodesExt
,
p
->
fVerbose
);
else
else
Abc_NtkFastExtract
(
pNtk
,
p
);
Abc_NtkFastExtract
(
pNtk
,
p
);
Abc_NtkFxuFreeInfo
(
p
);
Abc_NtkFxuFreeInfo
(
p
);
...
...
src/base/abci/abcFx.c
View file @
cac32a32
...
@@ -298,9 +298,9 @@ int Abc_NtkFxCheck( Abc_Ntk_t * pNtk )
...
@@ -298,9 +298,9 @@ int Abc_NtkFxCheck( Abc_Ntk_t * pNtk )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Abc_NtkFxPerform
(
Abc_Ntk_t
*
pNtk
,
int
fVerbose
)
int
Abc_NtkFxPerform
(
Abc_Ntk_t
*
pNtk
,
int
nNewNodesMax
,
int
fVerbose
)
{
{
extern
int
Fx_FastExtract
(
Vec_Wec_t
*
vCubes
,
int
ObjIdMax
,
int
fVerbose
);
extern
int
Fx_FastExtract
(
Vec_Wec_t
*
vCubes
,
int
ObjIdMax
,
int
nNewNodesMax
,
int
fVerbose
);
Vec_Wec_t
*
vCubes
;
Vec_Wec_t
*
vCubes
;
assert
(
Abc_NtkIsSopLogic
(
pNtk
)
);
assert
(
Abc_NtkIsSopLogic
(
pNtk
)
);
// check unique fanins
// check unique fanins
...
@@ -315,7 +315,7 @@ int Abc_NtkFxPerform( Abc_Ntk_t * pNtk, int fVerbose )
...
@@ -315,7 +315,7 @@ int Abc_NtkFxPerform( Abc_Ntk_t * pNtk, int fVerbose )
// collect information about the covers
// collect information about the covers
vCubes
=
Abc_NtkFxRetrieve
(
pNtk
);
vCubes
=
Abc_NtkFxRetrieve
(
pNtk
);
// call the fast extract procedure
// call the fast extract procedure
if
(
Fx_FastExtract
(
vCubes
,
Abc_NtkObjNumMax
(
pNtk
),
fVerbose
)
>
0
)
if
(
Fx_FastExtract
(
vCubes
,
Abc_NtkObjNumMax
(
pNtk
),
nNewNodesMax
,
fVerbose
)
>
0
)
{
{
// update the network
// update the network
Abc_NtkFxInsert
(
pNtk
,
vCubes
);
Abc_NtkFxInsert
(
pNtk
,
vCubes
);
...
@@ -1095,9 +1095,10 @@ void Fx_ManUpdate( Fx_Man_t * p, int iDiv )
...
@@ -1095,9 +1095,10 @@ void Fx_ManUpdate( Fx_Man_t * p, int iDiv )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Fx_FastExtract
(
Vec_Wec_t
*
vCubes
,
int
ObjIdMax
,
int
fVerbose
)
int
Fx_FastExtract
(
Vec_Wec_t
*
vCubes
,
int
ObjIdMax
,
int
nNewNodesMax
,
int
fVerbose
)
{
{
int
fVeryVerbose
=
0
;
int
fVeryVerbose
=
0
;
int
i
,
iDiv
;
Fx_Man_t
*
p
;
Fx_Man_t
*
p
;
clock_t
clk
=
clock
();
clock_t
clk
=
clock
();
// initialize the data-structure
// initialize the data-structure
...
@@ -1110,9 +1111,9 @@ int Fx_FastExtract( Vec_Wec_t * vCubes, int ObjIdMax, int fVerbose )
...
@@ -1110,9 +1111,9 @@ int Fx_FastExtract( Vec_Wec_t * vCubes, int ObjIdMax, int fVerbose )
Fx_PrintStats
(
p
,
clock
()
-
clk
);
Fx_PrintStats
(
p
,
clock
()
-
clk
);
// perform extraction
// perform extraction
p
->
timeStart
=
clock
();
p
->
timeStart
=
clock
();
while
(
Vec_QueTopCost
(
p
->
vPrio
)
>
0
.
0
)
for
(
i
=
0
;
i
<
nNewNodesMax
&&
Vec_QueTopCost
(
p
->
vPrio
)
>
0
.
0
;
i
++
)
{
{
i
nt
i
Div
=
Vec_QuePop
(
p
->
vPrio
);
iDiv
=
Vec_QuePop
(
p
->
vPrio
);
if
(
fVerbose
)
if
(
fVerbose
)
Fx_PrintDiv
(
p
,
iDiv
);
Fx_PrintDiv
(
p
,
iDiv
);
Fx_ManUpdate
(
p
,
iDiv
);
Fx_ManUpdate
(
p
,
iDiv
);
...
...
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