diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2020-01-10 17:44:48 +0200 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2020-01-10 17:44:48 +0200 |
commit | 1bb50384d1b89e701afdfff00d91ea3903d5fa92 (patch) | |
tree | 58853df3885ac2e3ba47a52d42e279a2587bbc3a /src/base | |
parent | 144c5be8246800d5bd36dc3e177364063e8d2e40 (diff) | |
download | abc-1bb50384d1b89e701afdfff00d91ea3903d5fa92.tar.gz abc-1bb50384d1b89e701afdfff00d91ea3903d5fa92.tar.bz2 abc-1bb50384d1b89e701afdfff00d91ea3903d5fa92.zip |
Improving performance of 'lutpack'.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/abc/abc.h | 2 | ||||
-rw-r--r-- | src/base/abc/abcRefs.c | 10 | ||||
-rw-r--r-- | src/base/abci/abc.c | 4 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/base/abc/abc.h b/src/base/abc/abc.h index dd189c6d..e85c74e8 100644 --- a/src/base/abc/abc.h +++ b/src/base/abc/abc.h @@ -870,7 +870,7 @@ extern ABC_DLL int Abc_NodeMffcSize( Abc_Obj_t * pNode ); extern ABC_DLL int Abc_NodeMffcSizeSupp( Abc_Obj_t * pNode ); extern ABC_DLL int Abc_NodeMffcSizeStop( Abc_Obj_t * pNode ); extern ABC_DLL int Abc_NodeMffcLabelAig( Abc_Obj_t * pNode ); -extern ABC_DLL int Abc_NodeMffcLabel( Abc_Obj_t * pNode ); +extern ABC_DLL int Abc_NodeMffcLabel( Abc_Obj_t * pNode, Vec_Ptr_t * vNodes ); extern ABC_DLL void Abc_NodeMffcConeSupp( Abc_Obj_t * pNode, Vec_Ptr_t * vCone, Vec_Ptr_t * vSupp ); extern ABC_DLL int Abc_NodeDeref_rec( Abc_Obj_t * pNode ); extern ABC_DLL int Abc_NodeRef_rec( Abc_Obj_t * pNode ); diff --git a/src/base/abc/abcRefs.c b/src/base/abc/abcRefs.c index 26ae55ab..4c5600c6 100644 --- a/src/base/abc/abcRefs.c +++ b/src/base/abc/abcRefs.c @@ -405,7 +405,7 @@ Vec_Ptr_t * Abc_NodeMffcInsideCollect( Abc_Obj_t * pNode ) SeeAlso [] ***********************************************************************/ -void Abc_NodeMffcLabel_rec( Abc_Obj_t * pNode, int fTopmost ) +void Abc_NodeMffcLabel_rec( Abc_Obj_t * pNode, int fTopmost, Vec_Ptr_t * vNodes ) { Abc_Obj_t * pFanin; int i; @@ -418,9 +418,11 @@ void Abc_NodeMffcLabel_rec( Abc_Obj_t * pNode, int fTopmost ) Abc_NodeSetTravIdCurrent(pNode); // recur on the children Abc_ObjForEachFanin( pNode, pFanin, i ) - Abc_NodeMffcLabel_rec( pFanin, 0 ); + Abc_NodeMffcLabel_rec( pFanin, 0, vNodes ); // collect the internal node // printf( "%d ", pNode->Id ); + if ( vNodes ) + Vec_PtrPush( vNodes, pNode ); } /**Function************************************************************* @@ -434,14 +436,14 @@ void Abc_NodeMffcLabel_rec( Abc_Obj_t * pNode, int fTopmost ) SeeAlso [] ***********************************************************************/ -int Abc_NodeMffcLabel( Abc_Obj_t * pNode ) +int Abc_NodeMffcLabel( Abc_Obj_t * pNode, Vec_Ptr_t * vNodes ) { int Count1, Count2; // dereference the node Count1 = Abc_NodeDeref_rec( pNode ); // collect the nodes inside the MFFC Abc_NtkIncrementTravId( pNode->pNtk ); - Abc_NodeMffcLabel_rec( pNode, 1 ); + Abc_NodeMffcLabel_rec( pNode, 1, vNodes ); // reference it back Count2 = Abc_NodeRef_rec( pNode ); assert( Count1 == Count2 ); diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 5df604cc..09b27b36 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -4898,7 +4898,7 @@ int Abc_CommandLutpack( Abc_Frame_t * pAbc, int argc, char ** argv ) } pPars->nLutsMax = atoi(argv[globalUtilOptind]); globalUtilOptind++; - if ( pPars->nLutsMax < 2 || pPars->nLutsMax > 8 ) + if ( pPars->nLutsMax < 2 || pPars->nLutsMax > 16 ) goto usage; break; case 'Q': @@ -4988,7 +4988,7 @@ usage: Abc_Print( -2, "\t performs \"rewriting\" for LUT network;\n" ); Abc_Print( -2, "\t determines LUT size as the max fanin count of a node;\n" ); Abc_Print( -2, "\t if the network is not LUT-mapped, packs it into 6-LUTs\n" ); - Abc_Print( -2, "\t (there is another command for resynthesis after LUT mapping, \"imfs\")\n" ); + Abc_Print( -2, "\t (there is another command for resynthesis after LUT mapping, \"mfs2\")\n" ); Abc_Print( -2, "\t-N <num> : the max number of LUTs in the structure (2 <= num) [default = %d]\n", pPars->nLutsMax ); Abc_Print( -2, "\t-Q <num> : the max number of LUTs not in MFFC (0 <= num) [default = %d]\n", pPars->nLutsOver ); Abc_Print( -2, "\t-S <num> : the max number of LUT inputs shared (0 <= num <= 3) [default = %d]\n", pPars->nVarsShared ); |