diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-05-26 16:12:44 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-05-26 16:12:44 -0700 |
commit | fb6eaaf5d9e26d7b0ac326fa17a8c7379b24df68 (patch) | |
tree | 4fa94aa0db2667caf76bd9fb605b5aedcf0d4aa8 /src/opt/sfm/sfmWin.c | |
parent | ed3d3dfc8ea16ac226bbce6cabbb207ee89ce474 (diff) | |
download | abc-fb6eaaf5d9e26d7b0ac326fa17a8c7379b24df68.tar.gz abc-fb6eaaf5d9e26d7b0ac326fa17a8c7379b24df68.tar.bz2 abc-fb6eaaf5d9e26d7b0ac326fa17a8c7379b24df68.zip |
New MFS package.
Diffstat (limited to 'src/opt/sfm/sfmWin.c')
-rw-r--r-- | src/opt/sfm/sfmWin.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/opt/sfm/sfmWin.c b/src/opt/sfm/sfmWin.c index 8ddd7865..3c30c480 100644 --- a/src/opt/sfm/sfmWin.c +++ b/src/opt/sfm/sfmWin.c @@ -190,9 +190,9 @@ void Sfm_NtkAddDivisors( Sfm_Ntk_t * p, int iNode, int nLevelMax ) { // skip some of the fanouts if the number is large if ( p->pPars->nFanoutMax && i > p->pPars->nFanoutMax ) - break; + return; // skip TFI nodes, PO nodes, or nodes with high logic level - if ( Sfm_ObjIsTravIdCurrent(p, iFanout) || Sfm_ObjIsPo(p, iFanout) || Sfm_ObjIsFixed(p, iFanout) || + if ( Sfm_ObjIsTravIdCurrent(p, iFanout) || Sfm_ObjIsPo(p, iFanout) || (p->pPars->fFixLevel && Sfm_ObjLevel(p, iFanout) >= nLevelMax) ) continue; // handle single-input nodes @@ -213,6 +213,28 @@ void Sfm_NtkAddDivisors( Sfm_Ntk_t * p, int iNode, int nLevelMax ) /**Function************************************************************* + Synopsis [Fixed object is useful when it has a non-fixed fanout.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +static inline int Sfm_ObjIsUseful( Sfm_Ntk_t * p, int iNode ) +{ + int i, iFanout; + if ( !Sfm_ObjIsFixed(p, iNode) ) + return 1; + Sfm_ObjForEachFanout( p, iNode, iFanout, i ) + if ( !Sfm_ObjIsFixed(p, iFanout) ) + return 1; + return 0; +} + +/**Function************************************************************* + Synopsis [Computes structural window.] Description [] @@ -309,7 +331,7 @@ int Sfm_NtkCreateWindow( Sfm_Ntk_t * p, int iNode, int fVerbose ) // compact divisors k = 0; Vec_IntForEachEntry( p->vDivs, iTemp, i ) - if ( !Sfm_ObjIsTravIdCurrent2( p, iTemp ) ) + 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 ); |