diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2009-04-24 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2009-04-24 08:01:00 -0700 |
commit | d7a048d738381651b53340684e26f06b78b8a78c (patch) | |
tree | 82f7bea9d0750a388494e6fffceb61cfeff969b7 /src/base/abci/abcStrash.c | |
parent | 77fab468ad32d15de5c065c211f6f74371670940 (diff) | |
download | abc-d7a048d738381651b53340684e26f06b78b8a78c.tar.gz abc-d7a048d738381651b53340684e26f06b78b8a78c.tar.bz2 abc-d7a048d738381651b53340684e26f06b78b8a78c.zip |
Version abc90424
Diffstat (limited to 'src/base/abci/abcStrash.c')
-rw-r--r-- | src/base/abci/abcStrash.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/base/abci/abcStrash.c b/src/base/abci/abcStrash.c index 114288ba..bf082456 100644 --- a/src/base/abci/abcStrash.c +++ b/src/base/abci/abcStrash.c @@ -103,6 +103,7 @@ Abc_Ntk_t * Abc_NtkRestrashZero( Abc_Ntk_t * pNtk, bool fCleanup ) Abc_Ntk_t * pNtkAig; Abc_Obj_t * pObj; int i, nNodes;//, RetValue; + int Counter = 0; assert( Abc_NtkIsStrash(pNtk) ); //timeRetime = clock(); // print warning about choice nodes @@ -112,8 +113,14 @@ Abc_Ntk_t * Abc_NtkRestrashZero( Abc_Ntk_t * pNtk, bool fCleanup ) pNtkAig = Abc_NtkStartFrom( pNtk, ABC_NTK_STRASH, ABC_FUNC_AIG ); // complement the 1-values registers Abc_NtkForEachLatch( pNtk, pObj, i ) - if ( Abc_LatchIsInit1(pObj) ) + { + if ( Abc_LatchIsInitDc(pObj) ) + Counter++; + else if ( Abc_LatchIsInit1(pObj) ) Abc_ObjFanout0(pObj)->pCopy = Abc_ObjNot(Abc_ObjFanout0(pObj)->pCopy); + } + if ( Counter ) + printf( "Converting %d flops from don't-care to zero initial value.\n", Counter ); // restrash the nodes (assuming a topological order of the old network) Abc_NtkForEachNode( pNtk, pObj, i ) pObj->pCopy = Abc_AigAnd( pNtkAig->pManFunc, Abc_ObjChild0Copy(pObj), Abc_ObjChild1Copy(pObj) ); |