diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-01-17 20:27:23 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-01-17 20:27:23 -0800 |
commit | 17610c039f79e30679b7950e7d91de166b34d2fa (patch) | |
tree | 3e9885c0fad76b1ca8f122323683fb11b87d290f /src/base/cba/cbaSimple.c | |
parent | 42cc56576b0ab244f0834fc8d80a3ced406576bd (diff) | |
download | abc-17610c039f79e30679b7950e7d91de166b34d2fa.tar.gz abc-17610c039f79e30679b7950e7d91de166b34d2fa.tar.bz2 abc-17610c039f79e30679b7950e7d91de166b34d2fa.zip |
Organizing commands for barbuf-aware flow.
Diffstat (limited to 'src/base/cba/cbaSimple.c')
-rw-r--r-- | src/base/cba/cbaSimple.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/base/cba/cbaSimple.c b/src/base/cba/cbaSimple.c index 7fe6cb0a..702fa2b0 100644 --- a/src/base/cba/cbaSimple.c +++ b/src/base/cba/cbaSimple.c @@ -481,11 +481,10 @@ Vec_Ptr_t * Ptr_CbaDeriveNode( Cba_Ntk_t * pNtk, int iObj ) } Vec_Ptr_t * Ptr_CbaDeriveNodes( Cba_Ntk_t * pNtk ) { - int Type, iObj; + int i; Vec_Ptr_t * vNodes = Vec_PtrAlloc( Cba_NtkNodeNum(pNtk) ); - Cba_NtkForEachObjType( pNtk, Type, iObj ) - if ( Type == CBA_OBJ_NODE ) - Vec_PtrPush( vNodes, Ptr_CbaDeriveNode(pNtk, iObj) ); + Cba_NtkForEachNode( pNtk, i ) + Vec_PtrPush( vNodes, Ptr_CbaDeriveNode(pNtk, i) ); assert( Ptr_CheckArray(vNodes) ); return vNodes; } @@ -515,11 +514,10 @@ Vec_Ptr_t * Ptr_CbaDeriveBox( Cba_Ntk_t * pNtk, int iObj ) } Vec_Ptr_t * Ptr_CbaDeriveBoxes( Cba_Ntk_t * pNtk ) { - int Type, iObj; + int i; Vec_Ptr_t * vBoxes = Vec_PtrAlloc( Cba_NtkBoxNum(pNtk) ); - Cba_NtkForEachObjType( pNtk, Type, iObj ) - if ( Type == CBA_OBJ_BOX ) - Vec_PtrPush( vBoxes, Ptr_CbaDeriveBox(pNtk, iObj) ); + Cba_NtkForEachBox( pNtk, i ) + Vec_PtrPush( vBoxes, Ptr_CbaDeriveBox(pNtk, i) ); assert( Ptr_CheckArray(vBoxes) ); return vBoxes; } @@ -620,7 +618,6 @@ void Cba_PrsReadModule( Cba_Man_t * p, Cba_Ntk_t * pNtk, Vec_Ptr_t * vNtk, Vec_I Cba_ManAllocArray( p, &pNtk->vFuncs, Vec_PtrSize(vNodes) + Vec_PtrSize(vBoxes) ); Cba_ManAllocArray( p, &pNtk->vInstIds, Vec_PtrSize(vNodes) + Vec_PtrSize(vBoxes) ); Cba_ManAllocArray( p, &pNtk->vFanins, Vec_PtrSize(vNodes) + Vec_PtrSize(vBoxes) ); - Cba_ManAllocArray( p, &pNtk->vBoxes, Vec_PtrSize(vBoxes) ); Cba_PrsReadList( p, vInputs, &pNtk->vInputs, -1, -1 ); Cba_PrsReadList( p, vOutputs, &pNtk->vOutputs, -1, -1 ); |