diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2010-11-01 01:35:04 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2010-11-01 01:35:04 -0700 |
commit | 6130e39b18b5f53902e4eab14f6d5cdde5219563 (patch) | |
tree | 0db0628479a1b750e9af1f66cb8379ebd0913d31 /src/base/abc/abcHie.c | |
parent | f0e77f6797c0504b0da25a56152b707d3357f386 (diff) | |
download | abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.gz abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.bz2 abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.zip |
initial commit of public abc
Diffstat (limited to 'src/base/abc/abcHie.c')
-rw-r--r-- | src/base/abc/abcHie.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/base/abc/abcHie.c b/src/base/abc/abcHie.c index 2addf289..1155731e 100644 --- a/src/base/abc/abcHie.c +++ b/src/base/abc/abcHie.c @@ -20,6 +20,9 @@ #include "abc.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -143,7 +146,7 @@ void Abc_NtkFlattenLogicHierarchy2_rec( Abc_Ntk_t * pNtkNew, Abc_Ntk_t * pNtk, i { if ( Abc_ObjIsLatch(pObj) ) continue; - pNtkModel = pObj->pData; + pNtkModel = (Abc_Ntk_t *)pObj->pData; // check the match between the number of actual and formal parameters assert( Abc_ObjFaninNum(pObj) == Abc_NtkPiNum(pNtkModel) ); assert( Abc_ObjFanoutNum(pObj) == Abc_NtkPoNum(pNtkModel) ); @@ -293,7 +296,7 @@ void Abc_NtkFlattenLogicHierarchy_rec( Abc_Ntk_t * pNtkNew, Abc_Ntk_t * pNtk, in { char Buffer[20]; sprintf( Buffer, "(%d)", *pCounter ); - Vec_StrAppend( vPref, Buffer ); + Vec_StrPrintStr( vPref, Buffer ); } Vec_StrPush( vPref, '|' ); Vec_StrPush( vPref, 0 ); @@ -369,7 +372,7 @@ void Abc_NtkFlattenLogicHierarchy_rec( Abc_Ntk_t * pNtkNew, Abc_Ntk_t * pNtk, in { if ( Abc_ObjIsLatch(pObj) ) continue; - pNtkModel = pObj->pData; + pNtkModel = (Abc_Ntk_t *)pObj->pData; // check the match between the number of actual and formal parameters assert( Abc_ObjFaninNum(pObj) == Abc_NtkPiNum(pNtkModel) ); assert( Abc_ObjFanoutNum(pObj) == Abc_NtkPoNum(pNtkModel) ); @@ -382,7 +385,7 @@ void Abc_NtkFlattenLogicHierarchy_rec( Abc_Ntk_t * pNtkNew, Abc_Ntk_t * pNtk, in Abc_ObjFanin0( Abc_NtkPo(pNtkModel, k) )->pCopy = Abc_ObjFanout0(pTerm)->pCopy; // create name Vec_StrShrink( vPref, Length ); - Vec_StrAppend( vPref, Abc_NtkName(pNtkModel) ); + Vec_StrPrintStr( vPref, Abc_NtkName(pNtkModel) ); // call recursively Abc_NtkFlattenLogicHierarchy_rec( pNtkNew, pNtkModel, pCounter, vPref ); } @@ -444,7 +447,7 @@ Abc_Ntk_t * Abc_NtkFlattenLogicHierarchy( Abc_Ntk_t * pNtk ) // recursively flatten hierarchy, create internal logic, add new PI/PO names if there are black boxes vPref = Vec_StrAlloc( 1000 ); - Vec_StrAppend( vPref, Abc_NtkName(pNtk) ); + Vec_StrPrintStr( vPref, Abc_NtkName(pNtk) ); Abc_NtkFlattenLogicHierarchy_rec( pNtkNew, pNtk, &Counter, vPref ); printf( "Hierarchy reader flattened %d instances of logic boxes and left %d black boxes.\n", Counter, Abc_NtkBlackboxNum(pNtkNew) ); @@ -734,3 +737,5 @@ Abc_Ntk_t * Abc_NtkInsertNewLogic( Abc_Ntk_t * pNtkH, Abc_Ntk_t * pNtkL ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + |