diff options
Diffstat (limited to 'src/opt')
-rw-r--r-- | src/opt/sfm/sfm.h | 3 | ||||
-rw-r--r-- | src/opt/sfm/sfmCore.c | 1 | ||||
-rw-r--r-- | src/opt/sfm/sfmWin.c | 8 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/opt/sfm/sfm.h b/src/opt/sfm/sfm.h index 571e389a..002778dc 100644 --- a/src/opt/sfm/sfm.h +++ b/src/opt/sfm/sfm.h @@ -67,6 +67,7 @@ struct Sfm_Par_t_ int fZeroCost; // enable zero-cost replacement int fUseSim; // enable simulation int fPrintDecs; // enable printing decompositions + int fAllBoxes; // enable preserving all boxes int fLibVerbose; // enable library stats int fDelayVerbose; // enable delay stats int fVerbose; // enable basic stats @@ -93,7 +94,7 @@ extern word * Sfm_NodeReadTruth( Sfm_Ntk_t * p, int i ); extern int Sfm_NodeReadFixed( Sfm_Ntk_t * p, int i ); extern int Sfm_NodeReadUsed( Sfm_Ntk_t * p, int i ); /*=== sfmWin.c ==========================================================*/ -extern Vec_Int_t * Sfm_NtkDfs( Sfm_Ntk_t * p, Vec_Wec_t * vGroups, Vec_Int_t * vGroupMap, Vec_Int_t * vBoxesLeft ); +extern Vec_Int_t * Sfm_NtkDfs( Sfm_Ntk_t * p, Vec_Wec_t * vGroups, Vec_Int_t * vGroupMap, Vec_Int_t * vBoxesLeft, int fAllBoxes ); ABC_NAMESPACE_HEADER_END diff --git a/src/opt/sfm/sfmCore.c b/src/opt/sfm/sfmCore.c index 11ace2d0..7d9db709 100644 --- a/src/opt/sfm/sfmCore.c +++ b/src/opt/sfm/sfmCore.c @@ -54,6 +54,7 @@ void Sfm_ParSetDefault( Sfm_Par_t * pPars ) pPars->fRrOnly = 0; // perform redundancy removal pPars->fArea = 0; // performs optimization for area pPars->fMoreEffort = 0; // performs high-affort minimization + pPars->fAllBoxes = 0; // enable preserving all boxes pPars->fVerbose = 0; // enable basic stats pPars->fVeryVerbose = 0; // enable detailed stats } diff --git a/src/opt/sfm/sfmWin.c b/src/opt/sfm/sfmWin.c index 6eab478e..63750407 100644 --- a/src/opt/sfm/sfmWin.c +++ b/src/opt/sfm/sfmWin.c @@ -163,13 +163,19 @@ void Sfm_NtkDfs_rec( Sfm_Ntk_t * p, int iNode, Vec_Int_t * vNodes, Vec_Wec_t * v Vec_IntPush( vNodes, iNode ); } } -Vec_Int_t * Sfm_NtkDfs( Sfm_Ntk_t * p, Vec_Wec_t * vGroups, Vec_Int_t * vGroupMap, Vec_Int_t * vBoxesLeft ) +Vec_Int_t * Sfm_NtkDfs( Sfm_Ntk_t * p, Vec_Wec_t * vGroups, Vec_Int_t * vGroupMap, Vec_Int_t * vBoxesLeft, int fAllBoxes ) { Vec_Int_t * vNodes; int i; Vec_IntClear( vBoxesLeft ); vNodes = Vec_IntAlloc( p->nObjs ); Sfm_NtkIncrementTravId( p ); + if ( fAllBoxes ) + { + Vec_Int_t * vGroup; + Vec_WecForEachLevel( vGroups, vGroup, i ) + Sfm_NtkDfs_rec( p, Vec_IntEntry(vGroup, 0), vNodes, vGroups, vGroupMap, vBoxesLeft ); + } Sfm_NtkForEachPo( p, i ) Sfm_NtkDfs_rec( p, Sfm_ObjFanin(p, i, 0), vNodes, vGroups, vGroupMap, vBoxesLeft ); return vNodes; |