diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2011-08-24 09:33:40 +0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2011-08-24 09:33:40 +0700 |
commit | c913fd8849a9ce150b21c640bdcda38d29b2d90e (patch) | |
tree | 64e7a41051c13c0e4394572b3d7dc6a0ef95f0e1 /src/base | |
parent | 19d6e1693a7d15099250f3b1fac47ba282cd4fdb (diff) | |
download | abc-c913fd8849a9ce150b21c640bdcda38d29b2d90e.tar.gz abc-c913fd8849a9ce150b21c640bdcda38d29b2d90e.tar.bz2 abc-c913fd8849a9ce150b21c640bdcda38d29b2d90e.zip |
Other changes to enable new features in the mapper (bug fix).
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/abci/abcIf.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/base/abci/abcIf.c b/src/base/abci/abcIf.c index b5228594..95ff6c4f 100644 --- a/src/base/abci/abcIf.c +++ b/src/base/abci/abcIf.c @@ -1066,6 +1066,34 @@ int Abc_NtkIfCheckTfi( Abc_Ntk_t * pNtk, Abc_Obj_t * pOld, Abc_Obj_t * pNew ) return Abc_NtkIfCheckTfi_rec( pNew, pOld ); } + +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +void Abc_NtkIfCheckRealNodes( Abc_Ntk_t * pNtk ) +{ + Abc_Obj_t * pObj; + int i, iNode; + for ( i = pNtk->nRealPos; i < Abc_NtkPoNum(pNtk); i += 5 ) + { + iNode = Vec_IntEntry( pNtk->vRealNodes, i+3 - pNtk->nRealPos ); + pObj = Abc_NtkObj( pNtk, iNode ); + assert( Abc_ObjFaninNum(pObj) == 2 ); + + iNode = Vec_IntEntry( pNtk->vRealNodes, i+4 - pNtk->nRealPos ); + pObj = Abc_NtkObj( pNtk, iNode ); + assert( Abc_ObjFaninNum(pObj) == 3 ); + } +} + /**Function************************************************************* Synopsis [Restores the structure.] @@ -1151,6 +1179,8 @@ void Abc_NtkRecreatePoDrivers( If_Man_t * p, Abc_Ntk_t * pNtkNew ) } Vec_PtrFree( vFanins ); + Abc_NtkIfCheckRealNodes( pNtkNew ); + // map internal nodes into PO numbers vNodeMap = Vec_IntStartFull( Abc_NtkObjNumMax(pNtkNew) ); Vec_VecForEachLevelInt( pNtkNew->vRealPos, vInfo, i ) @@ -1229,6 +1259,9 @@ void Abc_NtkRecreatePoDrivers( If_Man_t * p, Abc_Ntk_t * pNtkNew ) printf( "The number of real LUTs = %d. Real LUT area = %.2f.\n", nRealLuts, RealLutArea ); pNtkNew->nRealLuts = nRealLuts; pNtkNew->nRealArea = RealLutArea; + + Abc_NtkIfCheckRealNodes( pNtkNew ); + } //////////////////////////////////////////////////////////////////////// |