diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2021-04-07 21:32:52 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2021-04-07 21:32:52 -0700 |
commit | 796c29039a4983e92bf12051d73326758127162e (patch) | |
tree | 10fb7d2d1372a1f1658fcc769a19b40d302f0b09 | |
parent | 9145a5c20d5fe85523364d7fe2727b8d83c90aaa (diff) | |
download | abc-796c29039a4983e92bf12051d73326758127162e.tar.gz abc-796c29039a4983e92bf12051d73326758127162e.tar.bz2 abc-796c29039a4983e92bf12051d73326758127162e.zip |
Making default value (-M 0) work correctly in &mfs.
-rw-r--r-- | src/opt/sfm/sfmWin.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/opt/sfm/sfmWin.c b/src/opt/sfm/sfmWin.c index 63750407..53f9a71e 100644 --- a/src/opt/sfm/sfmWin.c +++ b/src/opt/sfm/sfmWin.c @@ -365,15 +365,15 @@ int Sfm_NtkCreateWindow( Sfm_Ntk_t * p, int iNode, int fVerbose ) Vec_IntAppend( p->vDivs, p->vNodes ); Vec_IntPop( p->vDivs ); // add non-topological divisors - if ( Vec_IntSize(p->vDivs) < p->pPars->nWinSizeMax + 0 ) + if ( !p->pPars->nWinSizeMax || Vec_IntSize(p->vDivs) < p->pPars->nWinSizeMax + 0 ) { Sfm_NtkIncrementTravId2( p ); Vec_IntForEachEntry( p->vDivs, iTemp, i ) - if ( Vec_IntSize(p->vDivs) < p->pPars->nWinSizeMax + 0 ) + if ( !p->pPars->nWinSizeMax || Vec_IntSize(p->vDivs) < p->pPars->nWinSizeMax + 0 ) // Sfm_NtkAddDivisors( p, iTemp, Sfm_ObjLevel(p, iNode) - 1 ); Sfm_NtkAddDivisors( p, iTemp, p->nLevelMax - Sfm_ObjLevelR(p, iNode) ); } - if ( Vec_IntSize(p->vDivs) > p->pPars->nWinSizeMax ) + if ( p->pPars->nWinSizeMax && Vec_IntSize(p->vDivs) > p->pPars->nWinSizeMax ) { /* k = 0; @@ -383,8 +383,8 @@ int Sfm_NtkCreateWindow( Sfm_Ntk_t * p, int iNode, int fVerbose ) */ Vec_IntShrink( p->vDivs, p->pPars->nWinSizeMax ); } - assert( Vec_IntSize(p->vDivs) <= p->pPars->nWinSizeMax ); - p->nMaxDivs += (int)(Vec_IntSize(p->vDivs) == p->pPars->nWinSizeMax); + assert( !p->pPars->nWinSizeMax || Vec_IntSize(p->vDivs) <= p->pPars->nWinSizeMax ); + p->nMaxDivs += (int)(p->pPars->nWinSizeMax && Vec_IntSize(p->vDivs) == p->pPars->nWinSizeMax); // remove node/fanins from divisors // mark fanins Sfm_NtkIncrementTravId2( p ); @@ -397,7 +397,7 @@ int Sfm_NtkCreateWindow( Sfm_Ntk_t * p, int iNode, int fVerbose ) if ( !Sfm_ObjIsTravIdCurrent2(p, iTemp) && Sfm_ObjIsUseful(p, iTemp) ) Vec_IntWriteEntry( p->vDivs, k++, iTemp ); Vec_IntShrink( p->vDivs, k ); - assert( Vec_IntSize(p->vDivs) <= p->pPars->nWinSizeMax ); + assert( !p->pPars->nWinSizeMax || Vec_IntSize(p->vDivs) <= p->pPars->nWinSizeMax ); clkDiv = Abc_Clock() - clkDiv; p->timeDiv += clkDiv; p->nTotalDivs += Vec_IntSize(p->vDivs); |