diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2019-07-18 12:03:56 +0200 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2019-07-18 12:03:56 +0200 |
commit | 0ca7e355f457363bc78de8468df1e66e61b5e8b0 (patch) | |
tree | 367f3c2022895e4b403adae845b81243c1bf877f | |
parent | 2de35735c550cd70f707aea7418edc78f68bda50 (diff) | |
download | abc-0ca7e355f457363bc78de8468df1e66e61b5e8b0.tar.gz abc-0ca7e355f457363bc78de8468df1e66e61b5e8b0.tar.bz2 abc-0ca7e355f457363bc78de8468df1e66e61b5e8b0.zip |
Adding handling of objects without fanout in %retime.
-rw-r--r-- | src/base/wln/wlnRetime.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/base/wln/wlnRetime.c b/src/base/wln/wlnRetime.c index e7678c5d..1ba2d50f 100644 --- a/src/base/wln/wlnRetime.c +++ b/src/base/wln/wlnRetime.c @@ -148,11 +148,23 @@ int Wln_RetComputeFfClasses( Wln_Ntk_t * pNtk, Vec_Int_t * vClasses ) } Wln_Ret_t * Wln_RetAlloc( Wln_Ntk_t * pNtk ) { - Wln_Ret_t * p; int k, iObj, iFanin; + Wln_Ret_t * p; int k, iObj, iFanin, fFirst = 1; Vec_Int_t * vRefsCopy = Vec_IntAlloc(0); p = ABC_CALLOC( Wln_Ret_t, 1 ); p->pNtk = pNtk; Wln_NtkCreateRefs( pNtk ); + // print objects without fanout + Wln_NtkForEachObj( pNtk, iObj ) + if ( Wln_ObjRefs(pNtk, iObj) == 0 && !Wln_ObjIsCio(pNtk, iObj) ) + { + if ( fFirst ) + { + fFirst = 0; + printf( "Objects without fanout:\n" ); + } + Wln_ObjPrint(pNtk, iObj); + } + // start fanin/fanout maps Wln_NtkStartFaninMap( pNtk, &p->vFanins, 2 ); Wln_NtkStartFanoutMap( pNtk, &p->vFanouts, &pNtk->vRefs, 2 ); ABC_SWAP( Vec_Int_t, *vRefsCopy, pNtk->vRefs ); @@ -372,6 +384,8 @@ int Wln_RetCheckForward( Wln_Ret_t * p, Vec_Int_t * vSet ) static inline int Wln_RetCheckBackwardOne( Wln_Ret_t * p, int iObj ) { int k, iFanin, * pLink, iFlop, Class = -1; + if ( Wln_ObjRefs(p->pNtk, iObj) == 0 ) + return 0; Wln_RetForEachFanout( p, iObj, iFanin, pLink, k ) { if ( !pLink[0] ) |