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
1d9d6814
Commit
1d9d6814
authored
Aug 04, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabling ISOP-based minimization in 'collapse' if EXDC is available.
parent
82aec90c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
src/base/abci/abcCollapse.c
+34
-1
src/base/abci/abcStrash.c
+1
-1
No files found.
src/base/abci/abcCollapse.c
View file @
1d9d6814
...
@@ -117,6 +117,40 @@ Abc_Ntk_t * Abc_NtkFromGlobalBdds( Abc_Ntk_t * pNtk )
...
@@ -117,6 +117,40 @@ Abc_Ntk_t * Abc_NtkFromGlobalBdds( Abc_Ntk_t * pNtk )
DdManager
*
dd
=
(
DdManager
*
)
Abc_NtkGlobalBddMan
(
pNtk
);
DdManager
*
dd
=
(
DdManager
*
)
Abc_NtkGlobalBddMan
(
pNtk
);
int
i
;
int
i
;
// extract don't-care and compute ISOP
if
(
pNtk
->
pExdc
)
{
DdManager
*
ddExdc
=
NULL
;
DdNode
*
bBddMin
,
*
bBddDc
,
*
bBddL
,
*
bBddU
;
assert
(
Abc_NtkIsStrash
(
pNtk
->
pExdc
)
);
assert
(
Abc_NtkCoNum
(
pNtk
->
pExdc
)
==
1
);
// compute the global BDDs
if
(
Abc_NtkBuildGlobalBdds
(
pNtk
->
pExdc
,
10000000
,
1
,
1
,
0
)
==
NULL
)
return
NULL
;
// transfer tot the same manager
ddExdc
=
(
DdManager
*
)
Abc_NtkGlobalBddMan
(
pNtk
->
pExdc
);
bBddDc
=
(
DdNode
*
)
Abc_ObjGlobalBdd
(
Abc_NtkCo
(
pNtk
->
pExdc
,
0
));
bBddDc
=
Cudd_bddTransfer
(
ddExdc
,
dd
,
bBddDc
);
Cudd_Ref
(
bBddDc
);
Abc_NtkFreeGlobalBdds
(
pNtk
->
pExdc
,
1
);
// minimize the output
Abc_NtkForEachCo
(
pNtk
,
pNode
,
i
)
{
bBddMin
=
(
DdNode
*
)
Abc_ObjGlobalBdd
(
pNode
);
// derive lower and uppwer bound
bBddL
=
Cudd_bddAnd
(
dd
,
bBddMin
,
Cudd_Not
(
bBddDc
)
);
Cudd_Ref
(
bBddL
);
bBddU
=
Cudd_bddAnd
(
dd
,
Cudd_Not
(
bBddMin
),
Cudd_Not
(
bBddDc
)
);
Cudd_Ref
(
bBddU
);
Cudd_RecursiveDeref
(
dd
,
bBddMin
);
// compute new one
bBddMin
=
Cudd_bddIsop
(
dd
,
bBddL
,
Cudd_Not
(
bBddU
)
);
Cudd_Ref
(
bBddMin
);
Cudd_RecursiveDeref
(
dd
,
bBddL
);
Cudd_RecursiveDeref
(
dd
,
bBddU
);
// update global BDD
Abc_ObjSetGlobalBdd
(
pNode
,
bBddMin
);
//Extra_bddPrint( dd, bBddMin ); printf( "\n" );
}
Cudd_RecursiveDeref
(
dd
,
bBddDc
);
}
// pReo = Extra_ReorderInit( Abc_NtkCiNum(pNtk), 1000 );
// pReo = Extra_ReorderInit( Abc_NtkCiNum(pNtk), 1000 );
// runtime1 = runtime2 = 0;
// runtime1 = runtime2 = 0;
...
@@ -176,7 +210,6 @@ Abc_Obj_t * Abc_NodeFromGlobalBdds( Abc_Ntk_t * pNtkNew, DdManager * dd, DdNode
...
@@ -176,7 +210,6 @@ Abc_Obj_t * Abc_NodeFromGlobalBdds( Abc_Ntk_t * pNtkNew, DdManager * dd, DdNode
return
pNodeNew
;
return
pNodeNew
;
}
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
...
src/base/abci/abcStrash.c
View file @
1d9d6814
...
@@ -293,7 +293,7 @@ Abc_Ntk_t * Abc_NtkStrash( Abc_Ntk_t * pNtk, int fAllNodes, int fCleanup, int fR
...
@@ -293,7 +293,7 @@ Abc_Ntk_t * Abc_NtkStrash( Abc_Ntk_t * pNtk, int fAllNodes, int fCleanup, int fR
// printf( "Warning: AIG cleanup removed %d nodes (this is not a bug).\n", nNodes );
// printf( "Warning: AIG cleanup removed %d nodes (this is not a bug).\n", nNodes );
// duplicate EXDC
// duplicate EXDC
if
(
pNtk
->
pExdc
)
if
(
pNtk
->
pExdc
)
pNtkAig
->
pExdc
=
Abc_Ntk
Dup
(
pNtk
->
pExdc
);
pNtkAig
->
pExdc
=
Abc_Ntk
Strash
(
pNtk
->
pExdc
,
fAllNodes
,
fCleanup
,
fRecord
);
// make sure everything is okay
// make sure everything is okay
if
(
!
Abc_NtkCheck
(
pNtkAig
)
)
if
(
!
Abc_NtkCheck
(
pNtkAig
)
)
{
{
...
...
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