diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2016-10-07 18:05:20 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2016-10-07 18:05:20 -0700 |
commit | 50e324ce11c82742153e717334556bc60580f758 (patch) | |
tree | 88df831c8cddc39c591c01fd8dac61338645a443 /src/opt/sfm/sfmWin.c | |
parent | 659d288967f5940876aa94e351b67b2b709e0301 (diff) | |
download | abc-50e324ce11c82742153e717334556bc60580f758.tar.gz abc-50e324ce11c82742153e717334556bc60580f758.tar.bz2 abc-50e324ce11c82742153e717334556bc60580f758.zip |
Adding switch &mfs -b to preserve white boxes during optimization.
Diffstat (limited to 'src/opt/sfm/sfmWin.c')
-rw-r--r-- | src/opt/sfm/sfmWin.c | 8 |
1 files changed, 7 insertions, 1 deletions
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; |