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/abci/abcFxu.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/abci/abcFxu.c')
-rw-r--r-- | src/base/abci/abcFxu.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/base/abci/abcFxu.c b/src/base/abci/abcFxu.c index 6109870e..bd030609 100644 --- a/src/base/abci/abcFxu.c +++ b/src/base/abci/abcFxu.c @@ -21,11 +21,14 @@ #include "abc.h" #include "fxu.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// -static bool Abc_NtkFxuCheck( Abc_Ntk_t * pNtk ); +static int Abc_NtkFxuCheck( Abc_Ntk_t * pNtk ); static void Abc_NtkFxuCollectInfo( Abc_Ntk_t * pNtk, Fxu_Data_t * p ); static void Abc_NtkFxuReconstruct( Abc_Ntk_t * pNtk, Fxu_Data_t * p ); @@ -50,7 +53,7 @@ static void Abc_NtkFxuReconstruct( Abc_Ntk_t * pNtk, Fxu_Data_t * p ); SeeAlso [] ***********************************************************************/ -bool Abc_NtkFastExtract( Abc_Ntk_t * pNtk, Fxu_Data_t * p ) +int Abc_NtkFastExtract( Abc_Ntk_t * pNtk, Fxu_Data_t * p ) { assert( Abc_NtkIsLogic(pNtk) ); // if the network is already in the SOP form, it may come from BLIF file @@ -103,7 +106,7 @@ bool Abc_NtkFastExtract( Abc_Ntk_t * pNtk, Fxu_Data_t * p ) SeeAlso [] ***********************************************************************/ -bool Abc_NtkFxuCheck( Abc_Ntk_t * pNtk ) +int Abc_NtkFxuCheck( Abc_Ntk_t * pNtk ) { Abc_Obj_t * pNode, * pFanin1, * pFanin2; int n, i, k; @@ -141,7 +144,7 @@ void Abc_NtkFxuCollectInfo( Abc_Ntk_t * pNtk, Fxu_Data_t * p ) Abc_Obj_t * pNode; int i; // add information to the manager - p->pManSop = pNtk->pManFunc; + p->pManSop = (Extra_MmFlex_t *)pNtk->pManFunc; p->vSops = Vec_PtrAlloc(0); p->vFanins = Vec_PtrAlloc(0); p->vSopsNew = Vec_PtrAlloc(0); @@ -153,9 +156,9 @@ void Abc_NtkFxuCollectInfo( Abc_Ntk_t * pNtk, Fxu_Data_t * p ) // add SOPs and fanin array Abc_NtkForEachNode( pNtk, pNode, i ) { - if ( Abc_SopGetVarNum(pNode->pData) < 2 ) + if ( Abc_SopGetVarNum((char *)pNode->pData) < 2 ) continue; - if ( Abc_SopGetCubeNum(pNode->pData) < 1 ) + if ( Abc_SopGetCubeNum((char *)pNode->pData) < 1 ) continue; p->vSops->pArray[i] = pNode->pData; p->vFanins->pArray[i] = &pNode->vFanins; @@ -181,7 +184,7 @@ void Abc_NtkFxuFreeInfo( Fxu_Data_t * p ) if ( p->vFaninsNew ) for ( i = 0; i < p->vFaninsNew->nSize; i++ ) if ( p->vFaninsNew->pArray[i] ) - Vec_IntFree( p->vFaninsNew->pArray[i] ); + Vec_IntFree( (Vec_Int_t *)p->vFaninsNew->pArray[i] ); // free the arrays if ( p->vSops ) Vec_PtrFree( p->vSops ); if ( p->vSopsNew ) Vec_PtrFree( p->vSopsNew ); @@ -219,14 +222,14 @@ void Abc_NtkFxuReconstruct( Abc_Ntk_t * pNtk, Fxu_Data_t * p ) for ( i = 0; i < p->vFanins->nSize; i++ ) { // the new array of fanins - vFanins = p->vFaninsNew->pArray[i]; + vFanins = (Vec_Int_t *)p->vFaninsNew->pArray[i]; if ( vFanins == NULL ) continue; // remove old fanins pNode = Abc_NtkObj( pNtk, i ); Abc_ObjRemoveFanins( pNode ); // add new fanins - vFanins = p->vFaninsNew->pArray[i]; + vFanins = (Vec_Int_t *)p->vFaninsNew->pArray[i]; for ( k = 0; k < vFanins->nSize; k++ ) { pFanin = Abc_NtkObj( pNtk, vFanins->pArray[k] ); @@ -241,7 +244,7 @@ void Abc_NtkFxuReconstruct( Abc_Ntk_t * pNtk, Fxu_Data_t * p ) // get the new node pNode = Abc_NtkObj( pNtk, i ); // add the fanins - vFanins = p->vFaninsNew->pArray[i]; + vFanins = (Vec_Int_t *)p->vFaninsNew->pArray[i]; for ( k = 0; k < vFanins->nSize; k++ ) { pFanin = Abc_NtkObj( pNtk, vFanins->pArray[k] ); @@ -258,3 +261,5 @@ void Abc_NtkFxuReconstruct( Abc_Ntk_t * pNtk, Fxu_Data_t * p ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + |