From 6130e39b18b5f53902e4eab14f6d5cdde5219563 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 1 Nov 2010 01:35:04 -0700 Subject: initial commit of public abc --- src/base/seq/seq.h | 18 +++++++++++------- src/base/seq/seqAigCore.c | 34 +++++++++++++++++++--------------- src/base/seq/seqAigIter.c | 5 +++++ src/base/seq/seqCreate.c | 13 +++++++++---- src/base/seq/seqFpgaCore.c | 37 +++++++++++++++++++++---------------- src/base/seq/seqFpgaIter.c | 5 +++++ src/base/seq/seqInt.h | 16 ++++++++++------ src/base/seq/seqLatch.c | 5 +++++ src/base/seq/seqMan.c | 7 ++++++- src/base/seq/seqMapCore.c | 37 +++++++++++++++++++++---------------- src/base/seq/seqMapIter.c | 5 +++++ src/base/seq/seqMaxMeanCycle.c | 7 ++++++- src/base/seq/seqRetCore.c | 15 ++++++++++----- src/base/seq/seqRetIter.c | 23 ++++++++++++++--------- src/base/seq/seqShare.c | 17 +++++++++++------ src/base/seq/seqUtil.c | 5 +++++ 16 files changed, 163 insertions(+), 86 deletions(-) (limited to 'src/base/seq') diff --git a/src/base/seq/seq.h b/src/base/seq/seq.h index 3faca29e..7faefe19 100644 --- a/src/base/seq/seq.h +++ b/src/base/seq/seq.h @@ -21,6 +21,7 @@ #ifndef __SEQ_H__ #define __SEQ_H__ + //////////////////////////////////////////////////////////////////////// /// INCLUDES /// //////////////////////////////////////////////////////////////////////// @@ -29,9 +30,10 @@ /// PARAMETERS /// //////////////////////////////////////////////////////////////////////// -#ifdef __cplusplus -extern "C" { -#endif + + +ABC_NAMESPACE_HEADER_START + //////////////////////////////////////////////////////////////////////// /// BASIC TYPES /// @@ -70,7 +72,7 @@ extern void Seq_NtkSkewForward( Abc_Ntk_t * pNtk, float period, int f /*=== abcSeq.c ===============================================================*/ extern Abc_Ntk_t * Abc_NtkAigToSeq( Abc_Ntk_t * pNtk ); extern Abc_Ntk_t * Abc_NtkSeqToLogicSop( Abc_Ntk_t * pNtk ); -extern bool Abc_NtkSeqCheck( Abc_Ntk_t * pNtk ); +extern int Abc_NtkSeqCheck( Abc_Ntk_t * pNtk ); /*=== seqShare.c =============================================================*/ extern void Seq_NtkShareFanouts( Abc_Ntk_t * pNtk ); extern void Seq_NtkShareLatches( Abc_Ntk_t * pNtkNew, Abc_Ntk_t * pNtk ); @@ -89,9 +91,11 @@ extern int Seq_MapComputeAreaFlows( Abc_Ntk_t * pNtk, int fVerbose ) extern Vec_Ptr_t * Seq_NtkReachNodes( Abc_Ntk_t * pNtk, int fFromPos ); extern int Seq_NtkCleanup( Abc_Ntk_t * pNtk, int fVerbose ); -#ifdef __cplusplus -} -#endif + + +ABC_NAMESPACE_HEADER_END + + #endif diff --git a/src/base/seq/seqAigCore.c b/src/base/seq/seqAigCore.c index 42fa14a2..ce4563f9 100644 --- a/src/base/seq/seqAigCore.c +++ b/src/base/seq/seqAigCore.c @@ -20,6 +20,9 @@ #include "seqInt.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -43,8 +46,8 @@ static int Abc_ObjRetimeBackward( Abc_Obj_t * pObj, Abc_Ntk_t * pNtk, st static void Abc_ObjRetimeBackwardUpdateEdge( Abc_Obj_t * pObj, int Edge, stmm_table * tTable ); static void Abc_NtkRetimeSetInitialValues( Abc_Ntk_t * pNtk, stmm_table * tTable, int * pModel ); -static Vec_Ptr_t * Abc_NtkUtilRetimingTry( Abc_Ntk_t * pNtk, bool fForward ); -static Vec_Ptr_t * Abc_NtkUtilRetimingGetMoves( Abc_Ntk_t * pNtk, Vec_Int_t * vSteps, bool fForward ); +static Vec_Ptr_t * Abc_NtkUtilRetimingTry( Abc_Ntk_t * pNtk, int fForward ); +static Vec_Ptr_t * Abc_NtkUtilRetimingGetMoves( Abc_Ntk_t * pNtk, Vec_Int_t * vSteps, int fForward ); static Vec_Int_t * Abc_NtkUtilRetimingSplit( Vec_Str_t * vLags, int fForward ); static void Abc_ObjRetimeForwardTry( Abc_Obj_t * pObj, int nLatches ); static void Abc_ObjRetimeBackwardTry( Abc_Obj_t * pObj, int nLatches ); @@ -102,7 +105,7 @@ void Seq_NtkSeqRetimeForward( Abc_Ntk_t * pNtk, int fInitial, int fVerbose ) // get the forward moves vMoves = Abc_NtkUtilRetimingTry( pNtk, 1 ); // undo the forward moves - Vec_PtrForEachEntryReverse( vMoves, pNode, i ) + Vec_PtrForEachEntryReverse( Abc_Obj_t *, vMoves, pNode, i ) Abc_ObjRetimeBackwardTry( pNode, 1 ); // implement this forward retiming Seq_NtkImplementRetimingForward( pNtk, vMoves ); @@ -130,7 +133,7 @@ void Seq_NtkSeqRetimeBackward( Abc_Ntk_t * pNtk, int fInitial, int fVerbose ) // get the backward moves vMoves = Abc_NtkUtilRetimingTry( pNtk, 0 ); // undo the backward moves - Vec_PtrForEachEntryReverse( vMoves, pNode, i ) + Vec_PtrForEachEntryReverse( Abc_Obj_t *, vMoves, pNode, i ) Abc_ObjRetimeForwardTry( pNode, 1 ); // implement this backward retiming RetValue = Seq_NtkImplementRetimingBackward( pNtk, vMoves, fVerbose ); @@ -202,7 +205,7 @@ void Seq_NtkImplementRetimingForward( Abc_Ntk_t * pNtk, Vec_Ptr_t * vMoves ) { Abc_Obj_t * pNode; int i; - Vec_PtrForEachEntry( vMoves, pNode, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vMoves, pNode, i ) Abc_ObjRetimeForward( pNode ); } @@ -309,7 +312,7 @@ int Seq_NtkImplementRetimingBackward( Abc_Ntk_t * pNtk, Vec_Ptr_t * vMoves, int // perform the backward moves and build the network for initial state computation RetValue = 0; - Vec_PtrForEachEntry( vMoves, pNode, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vMoves, pNode, i ) RetValue |= Abc_ObjRetimeBackward( pNode, pNtkProb, tTable, vValues ); // add the PIs corresponding to the white spots @@ -319,7 +322,6 @@ int Seq_NtkImplementRetimingBackward( Abc_Ntk_t * pNtk, Vec_Ptr_t * vMoves, int // add the PI/PO names Abc_NtkAddDummyPiNames( pNtkProb ); Abc_NtkAddDummyPoNames( pNtkProb ); - Abc_NtkAddDummyAssertNames( pNtkProb ); // make sure everything is okay with the network structure if ( !Abc_NtkDoCheck( pNtkProb ) ) @@ -468,7 +470,7 @@ int Abc_ObjRetimeBackward( Abc_Obj_t * pObj, Abc_Ntk_t * pNtkNew, stmm_table * t // add new AND-gate to the network pNodeNew = Abc_NtkCreateNode( pNtkNew ); - pNodeNew->pData = Abc_SopCreateAnd2( pNtkNew->pManFunc, Abc_ObjFaninC0(pObj), Abc_ObjFaninC1(pObj) ); + pNodeNew->pData = Abc_SopCreateAnd2( (Extra_MmFlex_t *)pNtkNew->pManFunc, Abc_ObjFaninC0(pObj), Abc_ObjFaninC1(pObj) ); // add PO fanouts if any if ( fMet0 ) @@ -536,7 +538,7 @@ int Abc_ObjRetimeBackward( Abc_Obj_t * pObj, Abc_Ntk_t * pNtkNew, stmm_table * t // add the buffer pBuffer = Abc_NtkCreateNode( pNtkNew ); - pBuffer->pData = Abc_SopCreateBuf( pNtkNew->pManFunc ); + pBuffer->pData = Abc_SopCreateBuf( (Extra_MmFlex_t *)pNtkNew->pManFunc ); Abc_ObjAddFanin( pNodeNew, pBuffer ); // point to it from the table RetEdge.iNode = pObj->Id; @@ -547,7 +549,7 @@ int Abc_ObjRetimeBackward( Abc_Obj_t * pObj, Abc_Ntk_t * pNtkNew, stmm_table * t // add the buffer pBuffer = Abc_NtkCreateNode( pNtkNew ); - pBuffer->pData = Abc_SopCreateBuf( pNtkNew->pManFunc ); + pBuffer->pData = Abc_SopCreateBuf( (Extra_MmFlex_t *)pNtkNew->pManFunc ); Abc_ObjAddFanin( pNodeNew, pBuffer ); // point to it from the table RetEdge.iNode = pObj->Id; @@ -641,7 +643,7 @@ void Abc_NtkRetimeSetInitialValues( Abc_Ntk_t * pNtk, stmm_table * tTable, int * SeeAlso [] ***********************************************************************/ -Vec_Ptr_t * Abc_NtkUtilRetimingTry( Abc_Ntk_t * pNtk, bool fForward ) +Vec_Ptr_t * Abc_NtkUtilRetimingTry( Abc_Ntk_t * pNtk, int fForward ) { Vec_Ptr_t * vNodes, * vMoves; Abc_Obj_t * pNode, * pFanout, * pFanin; @@ -656,7 +658,7 @@ Vec_Ptr_t * Abc_NtkUtilRetimingTry( Abc_Ntk_t * pNtk, bool fForward ) } // process the nodes vMoves = Vec_PtrAlloc( 100 ); - Vec_PtrForEachEntry( vNodes, pNode, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i ) { // printf( "(%d,%d) ", Seq_ObjFaninL0(pNode), Seq_ObjFaninL0(pNode) ); // unmark the node as processed @@ -723,7 +725,7 @@ Vec_Ptr_t * Abc_NtkUtilRetimingTry( Abc_Ntk_t * pNtk, bool fForward ) SeeAlso [] ***********************************************************************/ -Vec_Ptr_t * Abc_NtkUtilRetimingGetMoves( Abc_Ntk_t * pNtk, Vec_Int_t * vSteps, bool fForward ) +Vec_Ptr_t * Abc_NtkUtilRetimingGetMoves( Abc_Ntk_t * pNtk, Vec_Int_t * vSteps, int fForward ) { Seq_RetStep_t RetStep; Vec_Ptr_t * vMoves; @@ -833,12 +835,12 @@ Vec_Ptr_t * Abc_NtkUtilRetimingGetMoves( Abc_Ntk_t * pNtk, Vec_Int_t * vSteps, b // undo the tentative retiming if ( fForward ) { - Vec_PtrForEachEntryReverse( vMoves, pNode, i ) + Vec_PtrForEachEntryReverse( Abc_Obj_t *, vMoves, pNode, i ) Abc_ObjRetimeBackwardTry( pNode, 1 ); } else { - Vec_PtrForEachEntryReverse( vMoves, pNode, i ) + Vec_PtrForEachEntryReverse( Abc_Obj_t *, vMoves, pNode, i ) Abc_ObjRetimeForwardTry( pNode, 1 ); } return vMoves; @@ -975,3 +977,5 @@ void Abc_ObjRetimeBackwardTry( Abc_Obj_t * pObj, int nLatches ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/base/seq/seqAigIter.c b/src/base/seq/seqAigIter.c index 392638b8..b71312f7 100644 --- a/src/base/seq/seqAigIter.c +++ b/src/base/seq/seqAigIter.c @@ -20,6 +20,9 @@ #include "seqInt.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -266,3 +269,5 @@ int Seq_RetimeNodeUpdateLValue( Abc_Obj_t * pObj, int Fi ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/base/seq/seqCreate.c b/src/base/seq/seqCreate.c index 16c7cc92..ec4fa6aa 100644 --- a/src/base/seq/seqCreate.c +++ b/src/base/seq/seqCreate.c @@ -20,6 +20,9 @@ #include "seqInt.h" +ABC_NAMESPACE_IMPL_START + + /* A sequential network is similar to AIG in that it contains only AND gates. However, the AND-gates are currently not hashed. @@ -269,7 +272,7 @@ Abc_Ntk_t * Abc_NtkSeqToLogicSop( Abc_Ntk_t * pNtk ) Abc_AigForEachAnd( pNtk, pObj, i ) { Abc_NtkDupObj(pNtkNew, pObj, 0); - pObj->pCopy->pData = Abc_SopCreateAnd2( pNtkNew->pManFunc, Abc_ObjFaninC0(pObj), Abc_ObjFaninC1(pObj) ); + pObj->pCopy->pData = Abc_SopCreateAnd2( (Extra_MmFlex_t *)pNtkNew->pManFunc, Abc_ObjFaninC0(pObj), Abc_ObjFaninC1(pObj) ); } // share and create the latches Seq_NtkShareLatches( pNtkNew, pNtk ); @@ -344,10 +347,10 @@ Abc_Ntk_t * Abc_NtkSeqToLogicSop_old( Abc_Ntk_t * pNtk ) if ( Abc_ObjFaninNum(pObj) == 1 ) { assert( !Abc_ObjFaninC0(pObj) ); - pObj->pCopy->pData = Abc_SopCreateBuf( pNtkNew->pManFunc ); + pObj->pCopy->pData = Abc_SopCreateBuf( (Extra_MmFlex_t *)pNtkNew->pManFunc ); continue; } - pObj->pCopy->pData = Abc_SopCreateAnd2( pNtkNew->pManFunc, Abc_ObjFaninC0(pObj), Abc_ObjFaninC1(pObj) ); + pObj->pCopy->pData = Abc_SopCreateAnd2( (Extra_MmFlex_t *)pNtkNew->pManFunc, Abc_ObjFaninC0(pObj), Abc_ObjFaninC1(pObj) ); } // connect the objects Abc_NtkForEachObj( pNtk, pObj, i ) @@ -419,7 +422,7 @@ Abc_Obj_t * Abc_NodeSeqToLogic( Abc_Ntk_t * pNtkNew, Abc_Obj_t * pFanin, Seq_Lat SeeAlso [] ***********************************************************************/ -bool Abc_NtkSeqCheck( Abc_Ntk_t * pNtk ) +int Abc_NtkSeqCheck( Abc_Ntk_t * pNtk ) { Abc_Obj_t * pObj; int i, nFanins; @@ -480,3 +483,5 @@ bool Abc_NtkSeqCheck( Abc_Ntk_t * pNtk ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/base/seq/seqFpgaCore.c b/src/base/seq/seqFpgaCore.c index b106ded2..8ab97b43 100644 --- a/src/base/seq/seqFpgaCore.c +++ b/src/base/seq/seqFpgaCore.c @@ -20,6 +20,9 @@ #include "seqInt.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -125,11 +128,11 @@ Abc_Ntk_t * Seq_NtkFpgaDup( Abc_Ntk_t * pNtk ) Seq_Resize( pNtkNew->pManFunc, nObjsNew ); // duplicate the nodes in the mapping - Vec_PtrForEachEntry( p->vMapAnds, pObj, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, p->vMapAnds, pObj, i ) Abc_NtkDupObj( pNtkNew, pObj, 0 ); // recursively construct the internals of each node - Vec_PtrForEachEntry( p->vMapAnds, pObj, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, p->vMapAnds, pObj, i ) { vLeaves = Vec_VecEntry( p->vMapCuts, i ); Seq_FpgaMappingBuild_rec( pNtkNew, pNtk, pObj->Id << 8, 1, Seq_NodeGetLag(pObj), vLeaves ); @@ -143,12 +146,12 @@ Abc_Ntk_t * Seq_NtkFpgaDup( Abc_Ntk_t * pNtk ) Seq_NodeDupLats( pObj->pCopy, pObj, 0 ); // transfer the mapping info to the new manager - Vec_PtrForEachEntry( p->vMapAnds, pObj, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, p->vMapAnds, pObj, i ) { // get the leaves of the cut vLeaves = Vec_VecEntry( p->vMapCuts, i ); // convert the leaf nodes - Vec_PtrForEachEntry( vLeaves, pLeaf, k ) + Vec_PtrForEachEntry( Abc_Obj_t *, vLeaves, pLeaf, k ) { SeqEdge = (unsigned)pLeaf; pLeaf = Abc_NtkObj( pNtk, SeqEdge >> 8 ); @@ -198,7 +201,7 @@ int Seq_NtkFpgaInitCompatible( Abc_Ntk_t * pNtk, int fVerbose ) vTotalEdges = Vec_VecStart( p->nVarsMax ); // go through all the nodes (cuts) used in the mapping - Vec_PtrForEachEntry( p->vMapAnds, pAnd, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, p->vMapAnds, pAnd, i ) { // printf( "*** Node %d.\n", pAnd->Id ); @@ -210,7 +213,7 @@ int Seq_NtkFpgaInitCompatible( Abc_Ntk_t * pNtk, int fVerbose ) Seq_FpgaMappingEdges_rec( pNtk, pAnd->Id << 8, NULL, vLeaves, vTotalEdges ); // for each leaf, consider its edges - Vec_PtrForEachEntry( vLeaves, pLeaf, k ) + Vec_PtrForEachEntry( Abc_Obj_t *, vLeaves, pLeaf, k ) { SeqEdge = (unsigned)pLeaf; pLeaf = Abc_NtkObj( pNtk, SeqEdge >> 8 ); @@ -221,7 +224,7 @@ int Seq_NtkFpgaInitCompatible( Abc_Ntk_t * pNtk, int fVerbose ) // go through the edges vEdges = Vec_VecEntry( vTotalEdges, k ); pFanout0 = NULL; - Vec_PtrForEachEntry( vEdges, pFanout1, m ) + Vec_PtrForEachEntry( Abc_Obj_t *, vEdges, pFanout1, m ) { Edge1 = Abc_ObjIsComplement(pFanout1); pFanout1 = Abc_ObjRegular(pFanout1); @@ -290,14 +293,14 @@ Abc_Ntk_t * Seq_NtkSeqFpgaMapped( Abc_Ntk_t * pNtk ) pNtkMap = Abc_NtkStartFrom( pNtk, ABC_NTK_LOGIC, ABC_FUNC_BDD ); // duplicate the nodes used in the mapping - Vec_PtrForEachEntry( p->vMapAnds, pObj, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, p->vMapAnds, pObj, i ) pObj->pCopy = Abc_NtkCreateNode( pNtkMap ); // create and share the latches Seq_NtkShareLatchesMapping( pNtkMap, pNtk, p->vMapAnds, 1 ); // connect the nodes - Vec_PtrForEachEntry( p->vMapAnds, pObj, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, p->vMapAnds, pObj, i ) { // get the leaves of this gate vLeaves = Vec_VecEntry( p->vMapCuts, i ); @@ -350,7 +353,7 @@ int Seq_FpgaMappingCount( Abc_Ntk_t * pNtk ) Vec_Ptr_t * vLeaves; Abc_Obj_t * pAnd; int i, Counter = 0; - Vec_PtrForEachEntry( p->vMapAnds, pAnd, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, p->vMapAnds, pAnd, i ) { vLeaves = Vec_VecEntry( p->vMapCuts, i ); Counter += Seq_FpgaMappingCount_rec( pNtk, pAnd->Id << 8, vLeaves ); @@ -378,7 +381,7 @@ int Seq_FpgaMappingCount_rec( Abc_Ntk_t * pNtk, unsigned SeqEdge, Vec_Ptr_t * vL pObj = Abc_NtkObj( pNtk, SeqEdge >> 8 ); Lag = SeqEdge & 255; // if the node is the fanin of the cut, return - Vec_PtrForEachEntry( vLeaves, pLeaf, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vLeaves, pLeaf, i ) if ( SeqEdge == (unsigned)pLeaf ) return 0; // continue unfolding @@ -413,7 +416,7 @@ Abc_Obj_t * Seq_FpgaMappingBuild_rec( Abc_Ntk_t * pNtkNew, Abc_Ntk_t * pNtk, uns pObj = Abc_NtkObj( pNtk, SeqEdge >> 8 ); Lag = SeqEdge & 255; // if the node is the fanin of the cut, return - Vec_PtrForEachEntry( vLeaves, pLeaf, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vLeaves, pLeaf, i ) if ( SeqEdge == (unsigned)pLeaf ) return pObj->pCopy; // continue unfolding @@ -460,7 +463,7 @@ DdNode * Seq_FpgaMappingBdd_rec( DdManager * dd, Abc_Ntk_t * pNtk, unsigned SeqE pObj = Abc_NtkObj( pNtk, SeqEdge >> 8 ); Lag = SeqEdge & 255; // if the node is the fanin of the cut, return - Vec_PtrForEachEntry( vLeaves, pLeaf, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vLeaves, pLeaf, i ) if ( SeqEdge == (unsigned)pLeaf ) return Cudd_bddIthVar( dd, i ); // continue unfolding @@ -504,7 +507,7 @@ void Seq_FpgaMappingEdges_rec( Abc_Ntk_t * pNtk, unsigned SeqEdge, Abc_Obj_t * p pObj = Abc_NtkObj( pNtk, SeqEdge >> 8 ); Lag = SeqEdge & 255; // if the node is the fanin of the cut, return - Vec_PtrForEachEntry( vLeaves, pLeaf, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vLeaves, pLeaf, i ) { if ( SeqEdge == (unsigned)pLeaf ) { @@ -546,7 +549,7 @@ void Seq_FpgaMappingConnect_rec( Abc_Ntk_t * pNtk, unsigned SeqEdge, Abc_Obj_t * pObj = Abc_NtkObj( pNtk, SeqEdge >> 8 ); Lag = SeqEdge & 255; // if the node is the fanin of the cut, add the connection and return - Vec_PtrForEachEntry( vLeaves, pLeaf, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vLeaves, pLeaf, i ) { if ( SeqEdge == (unsigned)pLeaf ) { @@ -598,7 +601,7 @@ DdNode * Seq_FpgaMappingConnectBdd_rec( Abc_Ntk_t * pNtk, unsigned SeqEdge, Abc_ pObj = Abc_NtkObj( pNtk, SeqEdge >> 8 ); Lag = SeqEdge & 255; // if the node is the fanin of the cut, add the connection and return - Vec_PtrForEachEntry( vLeaves, pLeaf, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vLeaves, pLeaf, i ) { if ( SeqEdge == (unsigned)pLeaf ) { @@ -641,3 +644,5 @@ DdNode * Seq_FpgaMappingConnectBdd_rec( Abc_Ntk_t * pNtk, unsigned SeqEdge, Abc_ //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/base/seq/seqFpgaIter.c b/src/base/seq/seqFpgaIter.c index a300b362..c4551a73 100644 --- a/src/base/seq/seqFpgaIter.c +++ b/src/base/seq/seqFpgaIter.c @@ -22,6 +22,9 @@ #include "main.h" #include "fpga.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -268,3 +271,5 @@ int Seq_FpgaNodeUpdateLValue( Abc_Obj_t * pObj, int Fi ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/base/seq/seqInt.h b/src/base/seq/seqInt.h index daa2ab38..89ce6843 100644 --- a/src/base/seq/seqInt.h +++ b/src/base/seq/seqInt.h @@ -21,6 +21,7 @@ #ifndef __SEQ_INT_H__ #define __SEQ_INT_H__ + //////////////////////////////////////////////////////////////////////// /// INCLUDES /// //////////////////////////////////////////////////////////////////////// @@ -37,9 +38,10 @@ /// PARAMETERS /// //////////////////////////////////////////////////////////////////////// -#ifdef __cplusplus -extern "C" { -#endif + + +ABC_NAMESPACE_HEADER_START + #define SEQ_FULL_MASK 0xFFFFFFFF @@ -244,9 +246,11 @@ extern int Seq_ObjFanoutLMin( Abc_Obj_t * pObj ); extern int Seq_ObjFanoutLSum( Abc_Obj_t * pObj ); extern int Seq_ObjFaninLSum( Abc_Obj_t * pObj ); -#ifdef __cplusplus -} -#endif + + +ABC_NAMESPACE_HEADER_END + + #endif diff --git a/src/base/seq/seqLatch.c b/src/base/seq/seqLatch.c index cb3e1e36..f6384fcb 100644 --- a/src/base/seq/seqLatch.c +++ b/src/base/seq/seqLatch.c @@ -20,6 +20,9 @@ #include "seqInt.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -221,3 +224,5 @@ int Seq_NodeCompareLats( Abc_Obj_t * pObj1, int Edge1, Abc_Obj_t * pObj2, int Ed //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/base/seq/seqMan.c b/src/base/seq/seqMan.c index bdfb2630..d0697b36 100644 --- a/src/base/seq/seqMan.c +++ b/src/base/seq/seqMan.c @@ -20,6 +20,9 @@ #include "seqInt.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -107,7 +110,7 @@ void Seq_Delete( Abc_Seq_t * p ) if ( p->fStandCells && p->vMapAnds ) { void * pVoid; int i; - Vec_PtrForEachEntry( p->vMapAnds, pVoid, i ) + Vec_PtrForEachEntry( void *, p->vMapAnds, pVoid, i ) free( pVoid ); } if ( p->vMapDelays ) Vec_VecFree( p->vMapDelays ); // the nodes used in the mapping @@ -131,3 +134,5 @@ void Seq_Delete( Abc_Seq_t * p ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/base/seq/seqMapCore.c b/src/base/seq/seqMapCore.c index c465f31f..cd1db3a7 100644 --- a/src/base/seq/seqMapCore.c +++ b/src/base/seq/seqMapCore.c @@ -23,6 +23,9 @@ #include "mio.h" #include "mapper.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -137,7 +140,7 @@ Abc_Ntk_t * Seq_NtkMapDup( Abc_Ntk_t * pNtk ) Seq_Resize( pNtkNew->pManFunc, nObjsNew ); // duplicate the nodes in the mapping - Vec_PtrForEachEntry( p->vMapAnds, pMatch, i ) + Vec_PtrForEachEntry( Seq_Match_t *, p->vMapAnds, pMatch, i ) { // Abc_NtkDupObj( pNtkNew, pMatch->pAnd ); if ( !pMatch->fCompl ) @@ -147,13 +150,13 @@ Abc_Ntk_t * Seq_NtkMapDup( Abc_Ntk_t * pNtk ) } // compute the real phase assignment - Vec_PtrForEachEntry( p->vMapAnds, pMatch, i ) + Vec_PtrForEachEntry( Seq_Match_t *, p->vMapAnds, pMatch, i ) { pMatch->uPhaseR = 0; // get the leaves of the cut vLeaves = Vec_VecEntry( p->vMapCuts, i ); // convert the leaf nodes - Vec_PtrForEachEntry( vLeaves, pLeaf, k ) + Vec_PtrForEachEntry( Abc_Obj_t *, vLeaves, pLeaf, k ) { SeqEdge = (unsigned)pLeaf; pLeaf = Abc_NtkObj( pNtk, SeqEdge >> 8 ); @@ -178,7 +181,7 @@ Abc_Ntk_t * Seq_NtkMapDup( Abc_Ntk_t * pNtk ) // recursively construct the internals of each node - Vec_PtrForEachEntry( p->vMapAnds, pMatch, i ) + Vec_PtrForEachEntry( Seq_Match_t *, p->vMapAnds, pMatch, i ) { // if ( pMatch->pSuper == NULL ) // { @@ -210,12 +213,12 @@ Abc_Ntk_t * Seq_NtkMapDup( Abc_Ntk_t * pNtk ) Seq_NodeDupLats( pObj->pCopy, pObj, 0 ); // transfer the mapping info to the new manager - Vec_PtrForEachEntry( p->vMapAnds, pMatch, i ) + Vec_PtrForEachEntry( Seq_Match_t *, p->vMapAnds, pMatch, i ) { // get the leaves of the cut vLeaves = Vec_VecEntry( p->vMapCuts, i ); // convert the leaf nodes - Vec_PtrForEachEntry( vLeaves, pLeaf, k ) + Vec_PtrForEachEntry( Abc_Obj_t *, vLeaves, pLeaf, k ) { SeqEdge = (unsigned)pLeaf; pLeaf = Abc_NtkObj( pNtk, SeqEdge >> 8 ); @@ -286,7 +289,7 @@ int Seq_NtkMapInitCompatible( Abc_Ntk_t * pNtk, int fVerbose ) vTotalEdges = Vec_VecStart( p->nVarsMax ); // go through all the nodes (cuts) used in the mapping - Vec_PtrForEachEntry( p->vMapAnds, pMatch, i ) + Vec_PtrForEachEntry( Seq_Match_t *, p->vMapAnds, pMatch, i ) { pAnd = pMatch->pAnd; // printf( "*** Node %d.\n", pAnd->Id ); @@ -299,7 +302,7 @@ int Seq_NtkMapInitCompatible( Abc_Ntk_t * pNtk, int fVerbose ) Seq_MapMappingEdges_rec( pNtk, pAnd->Id << 8, NULL, vLeaves, vTotalEdges ); // for each leaf, consider its edges - Vec_PtrForEachEntry( vLeaves, pLeaf, k ) + Vec_PtrForEachEntry( Abc_Obj_t *, vLeaves, pLeaf, k ) { SeqEdge = (unsigned)pLeaf; pLeaf = Abc_NtkObj( pNtk, SeqEdge >> 8 ); @@ -310,7 +313,7 @@ int Seq_NtkMapInitCompatible( Abc_Ntk_t * pNtk, int fVerbose ) // go through the edges vEdges = Vec_VecEntry( vTotalEdges, k ); pFanout0 = NULL; - Vec_PtrForEachEntry( vEdges, pFanout1, m ) + Vec_PtrForEachEntry( Abc_Obj_t *, vEdges, pFanout1, m ) { Edge1 = Abc_ObjIsComplement(pFanout1); pFanout1 = Abc_ObjRegular(pFanout1); @@ -380,14 +383,14 @@ Abc_Ntk_t * Seq_NtkSeqMapMapped( Abc_Ntk_t * pNtk ) pNtkMap = Abc_NtkStartFrom( pNtk, ABC_NTK_LOGIC, ABC_FUNC_BDD ); // duplicate the nodes used in the mapping - Vec_PtrForEachEntry( p->vMapAnds, pMatch, i ) + Vec_PtrForEachEntry( Seq_Match_t *, p->vMapAnds, pMatch, i ) pMatch->pAnd->pCopy = Abc_NtkCreateNode( pNtkMap ); // create and share the latches Seq_NtkShareLatchesMapping( pNtkMap, pNtk, p->vMapAnds, 0 ); // connect the nodes - Vec_PtrForEachEntry( p->vMapAnds, pMatch, i ) + Vec_PtrForEachEntry( Seq_Match_t *, p->vMapAnds, pMatch, i ) { pObj = pMatch->pAnd; // get the leaves of this gate @@ -442,7 +445,7 @@ int Seq_MapMappingCount( Abc_Ntk_t * pNtk ) Vec_Ptr_t * vLeaves; Seq_Match_t * pMatch; int i, Counter = 0; - Vec_PtrForEachEntry( p->vMapAnds, pMatch, i ) + Vec_PtrForEachEntry( Seq_Match_t *, p->vMapAnds, pMatch, i ) { vLeaves = Vec_VecEntry( p->vMapCuts, i ); Counter += Seq_MapMappingCount_rec( pNtk, pMatch->pAnd->Id << 8, vLeaves ); @@ -470,7 +473,7 @@ int Seq_MapMappingCount_rec( Abc_Ntk_t * pNtk, unsigned SeqEdge, Vec_Ptr_t * vLe pObj = Abc_NtkObj( pNtk, SeqEdge >> 8 ); Lag = SeqEdge & 255; // if the node is the fanin of the cut, return - Vec_PtrForEachEntry( vLeaves, pLeaf, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vLeaves, pLeaf, i ) if ( SeqEdge == (unsigned)pLeaf ) return 0; // continue unfolding @@ -505,7 +508,7 @@ Abc_Obj_t * Seq_MapMappingBuild_rec( Abc_Ntk_t * pNtkNew, Abc_Ntk_t * pNtk, unsi pObj = Abc_NtkObj( pNtk, SeqEdge >> 8 ); Lag = SeqEdge & 255; // if the node is the fanin of the cut, return - Vec_PtrForEachEntry( vLeaves, pLeaf, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vLeaves, pLeaf, i ) if ( SeqEdge == (unsigned)pLeaf ) { // if ( uPhase & (1 << i) ) // negative phase is required @@ -562,7 +565,7 @@ void Seq_MapMappingEdges_rec( Abc_Ntk_t * pNtk, unsigned SeqEdge, Abc_Obj_t * pP pObj = Abc_NtkObj( pNtk, SeqEdge >> 8 ); Lag = SeqEdge & 255; // if the node is the fanin of the cut, return - Vec_PtrForEachEntry( vLeaves, pLeaf, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vLeaves, pLeaf, i ) { if ( SeqEdge == (unsigned)pLeaf ) { @@ -606,7 +609,7 @@ DdNode * Seq_MapMappingConnectBdd_rec( Abc_Ntk_t * pNtk, unsigned SeqEdge, Abc_O pObj = Abc_NtkObj( pNtk, SeqEdge >> 8 ); Lag = SeqEdge & 255; // if the node is the fanin of the cut, add the connection and return - Vec_PtrForEachEntry( vLeaves, pLeaf, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vLeaves, pLeaf, i ) { if ( SeqEdge == (unsigned)pLeaf ) { @@ -650,3 +653,5 @@ DdNode * Seq_MapMappingConnectBdd_rec( Abc_Ntk_t * pNtk, unsigned SeqEdge, Abc_O //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/base/seq/seqMapIter.c b/src/base/seq/seqMapIter.c index 30333cea..bb762d62 100644 --- a/src/base/seq/seqMapIter.c +++ b/src/base/seq/seqMapIter.c @@ -23,6 +23,9 @@ #include "mio.h" #include "mapperInt.h" +ABC_NAMESPACE_IMPL_START + + // the internal procedures static float Seq_MapRetimeDelayLagsInternal( Abc_Ntk_t * pNtk, int fVerbose ); static float Seq_MapRetimeSearch_rec( Abc_Ntk_t * pNtk, float FiMin, float FiMax, float Delta, int fVerbose ); @@ -621,3 +624,5 @@ void Seq_MapCanonicizeTruthTables( Abc_Ntk_t * pNtk ) //////////////////////////////////////////////////////////////////////// /// END OF FILE /// //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/base/seq/seqMaxMeanCycle.c b/src/base/seq/seqMaxMeanCycle.c index 46d73cbd..b62e4b33 100644 --- a/src/base/seq/seqMaxMeanCycle.c +++ b/src/base/seq/seqMaxMeanCycle.c @@ -21,6 +21,9 @@ #include "seqInt.h" #include "hash.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -350,7 +353,7 @@ Hash_Ptr_t * Seq_NtkPathDelays( Abc_Ntk_t * pNtk, int fVerbose ) { Abc_NodeDelayTraceArrival( vNodes->pArray[i] ); // there is a path to each set of Co endpoints - Vec_PtrForEachEntry( vEndpoints, pObj, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vEndpoints, pObj, i ) { assert(pObj); assert( Abc_ObjIsCo( pObj ) ); @@ -565,3 +568,5 @@ void Seq_NtkSkewForward( Abc_Ntk_t * pNtk, float period, int fMinimize ) { //////////////////////////////////////////////////////////////////////// /// END OF FILE /// //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/base/seq/seqRetCore.c b/src/base/seq/seqRetCore.c index ddc92cc8..846a6707 100644 --- a/src/base/seq/seqRetCore.c +++ b/src/base/seq/seqRetCore.c @@ -21,6 +21,9 @@ #include "seqInt.h" #include "dec.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -136,7 +139,7 @@ Abc_Ntk_t * Seq_NtkRetimeDerive( Abc_Ntk_t * pNtk, int fVerbose ) // create one AND for each logic node in the topological order vMapAnds = Abc_NtkDfs( pNtk, 0 ); - Vec_PtrForEachEntry( vMapAnds, pObj, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vMapAnds, pObj, i ) { if ( pObj->Id == 0 ) { @@ -159,7 +162,7 @@ Abc_Ntk_t * Seq_NtkRetimeDerive( Abc_Ntk_t * pNtk, int fVerbose ) // create internal AND nodes w/o strashing for each logic node (including constants) vMapFanins = Vec_VecStart( Vec_PtrSize(vMapAnds) ); - Vec_PtrForEachEntry( vMapAnds, pObj, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vMapAnds, pObj, i ) { // get the SOP of the node if ( Abc_NtkHasMapping(pNtk) ) @@ -179,7 +182,7 @@ Abc_Ntk_t * Seq_NtkRetimeDerive( Abc_Ntk_t * pNtk, int fVerbose ) Seq_Resize( p, Abc_NtkObjNumMax(pNtkNew) ); // add the sequential edges - Vec_PtrForEachEntry( vMapAnds, pObj, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vMapAnds, pObj, i ) { vMirrors = Vec_VecEntry( vMapFanins, i ); Abc_ObjForEachFanin( pObj, pFanin, k ) @@ -206,7 +209,7 @@ Abc_Ntk_t * Seq_NtkRetimeDerive( Abc_Ntk_t * pNtk, int fVerbose ) p->vMapFanins = vMapFanins; p->vMapCuts = Vec_VecStart( Vec_PtrSize(p->vMapAnds) ); p->vMapDelays = Vec_VecStart( Vec_PtrSize(p->vMapAnds) ); - Vec_PtrForEachEntry( p->vMapAnds, pObj, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, p->vMapAnds, pObj, i ) { // change the node to be the new one Vec_PtrWriteEntry( p->vMapAnds, i, pObj->pCopy ); @@ -366,7 +369,7 @@ Abc_Ntk_t * Seq_NtkRetimeReconstruct( Abc_Ntk_t * pNtkOld, Abc_Ntk_t * pNtkSeq ) // connect the objects // Abc_NtkForEachNode( pNtkOld, pObj, i ) - Vec_PtrForEachEntry( p->vMapAnds, pObj, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, p->vMapAnds, pObj, i ) { // pObj is from pNtkSeq - transform to pNtkOld pObj = pObj->pNext; @@ -491,3 +494,5 @@ Abc_Obj_t * Seq_EdgeReconstructPO( Abc_Obj_t * pNode ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/base/seq/seqRetIter.c b/src/base/seq/seqRetIter.c index 99c50914..816e71a1 100644 --- a/src/base/seq/seqRetIter.c +++ b/src/base/seq/seqRetIter.c @@ -22,6 +22,9 @@ #include "main.h" #include "fpga.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -106,21 +109,21 @@ int Seq_NtkRetimeDelayLags( Abc_Ntk_t * pNtkOld, Abc_Ntk_t * pNtk, int fVerbose assert( RetValue ); // fix the problem with non-converged delays - Vec_PtrForEachEntry( p->vMapAnds, pNode, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, p->vMapAnds, pNode, i ) if ( Seq_NodeGetLValueP(pNode) < -ABC_INFINITY/2 ) Seq_NodeSetLValueP( pNode, 0 ); // experiment by adding an epsilon to all LValues -// Vec_PtrForEachEntry( p->vMapAnds, pNode, i ) +// Vec_PtrForEachEntry( Abc_Obj_t *, p->vMapAnds, pNode, i ) // Seq_NodeSetLValueP( pNode, Seq_NodeGetLValueP(pNode) - p->fEpsilon ); // save the retiming lags // mark the nodes - Vec_PtrForEachEntry( p->vMapAnds, pNode, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, p->vMapAnds, pNode, i ) pNode->fMarkA = 1; // process the nodes Vec_StrFill( p->vLags, p->nSize, 0 ); - Vec_PtrForEachEntry( p->vMapAnds, pNode, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, p->vMapAnds, pNode, i ) { if ( Vec_PtrSize( Vec_VecEntry(p->vMapCuts, i) ) == 0 ) { @@ -131,7 +134,7 @@ int Seq_NtkRetimeDelayLags( Abc_Ntk_t * pNtkOld, Abc_Ntk_t * pNtk, int fVerbose Seq_NodeRetimeSetLag_rec( pNode, NodeLag ); } // unmark the nodes - Vec_PtrForEachEntry( p->vMapAnds, pNode, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, p->vMapAnds, pNode, i ) pNode->fMarkA = 0; // print the result @@ -208,7 +211,7 @@ int Seq_NtkMappingForPeriod( Abc_Ntk_t * pNtk, float Fi, int fVerbose ) for ( c = 0; c < p->nMaxIters; c++ ) { fChange = 0; - Vec_PtrForEachEntry( p->vMapAnds, pObj, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, p->vMapAnds, pObj, i ) { Counter++; vLeaves = Vec_VecEntry( p->vMapCuts, i ); @@ -281,7 +284,7 @@ int Seq_NtkNodeUpdateLValue( Abc_Obj_t * pObj, float Fi, Vec_Ptr_t * vLeaves, Ve } // get the new arrival time of the cut output lValueNew = -ABC_INFINITY; - Vec_PtrForEachEntry( vLeaves, pLeaf, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vLeaves, pLeaf, i ) { SeqEdge = (unsigned)pLeaf; pLeaf = Abc_NtkObj( pObj->pNtk, SeqEdge >> 8 ); @@ -354,7 +357,7 @@ void Seq_NodePrintInfo( Abc_Obj_t * pNode ) pNode->Id, Seq_NodeGetLValueP(pNode), Seq_NodeGetLag(pNode) ); // find the number - Vec_PtrForEachEntry( p->vMapAnds, pObj, Number ) + Vec_PtrForEachEntry( Abc_Obj_t *, p->vMapAnds, pObj, Number ) if ( pObj == pNode ) break; @@ -362,7 +365,7 @@ void Seq_NodePrintInfo( Abc_Obj_t * pNode ) vLeaves = Vec_VecEntry( p->vMapCuts, Number ); // print the leaves - Vec_PtrForEachEntry( vLeaves, pLeaf, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vLeaves, pLeaf, i ) { SeqEdge = (unsigned)pLeaf; pFanin = Abc_NtkObj( pNode->pNtk, SeqEdge >> 8 ); @@ -401,3 +404,5 @@ void Seq_NodePrintInfoPlus( Abc_Obj_t * pNode ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/base/seq/seqShare.c b/src/base/seq/seqShare.c index 742de46b..bccfff80 100644 --- a/src/base/seq/seqShare.c +++ b/src/base/seq/seqShare.c @@ -20,6 +20,9 @@ #include "seqInt.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -156,7 +159,7 @@ void Seq_NodeShareOne( Abc_Obj_t * pNode, Abc_InitType_t Init, Vec_Ptr_t * vNode Seq_NodeInsertFirst( pBuffer, 0, InitNew ); // redirect the fanouts - Vec_PtrForEachEntry( vNodes, pFanout, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pFanout, i ) Abc_ObjPatchFanin( pFanout, pNode, pBuffer ); } @@ -279,7 +282,7 @@ void Seq_NtkShareLatches( Abc_Ntk_t * pNtkNew, Abc_Ntk_t * pNtk ) stmm_table * tLatchMap; int i; assert( Abc_NtkIsSeq( pNtk ) ); - tLatchMap = stmm_init_table( stmm_ptrcmp, stmm_ptrhash ); + tLatchMap = stmm_init_table( (int (*)(void))stmm_ptrcmp, (int (*)(void))stmm_ptrhash ); Abc_AigForEachAnd( pNtk, pObj, i ) { pFanin = Abc_ObjFanin0(pObj); @@ -315,7 +318,7 @@ void Seq_NtkShareLatchesMapping( Abc_Ntk_t * pNtkNew, Abc_Ntk_t * pNtk, Vec_Ptr_ assert( Abc_NtkIsSeq( pNtk ) ); // start the table - tLatchMap = stmm_init_table( stmm_ptrcmp, stmm_ptrhash ); + tLatchMap = stmm_init_table( (int (*)(void))stmm_ptrcmp, (int (*)(void))stmm_ptrhash ); // create the array of all nodes with sharable fanouts vNodes = Vec_PtrAlloc( 100 ); @@ -324,17 +327,17 @@ void Seq_NtkShareLatchesMapping( Abc_Ntk_t * pNtkNew, Abc_Ntk_t * pNtk, Vec_Ptr_ Vec_PtrPush( vNodes, pObj ); if ( fFpga ) { - Vec_PtrForEachEntry( vMapAnds, pObj, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vMapAnds, pObj, i ) Vec_PtrPush( vNodes, pObj ); } else { - Vec_PtrForEachEntry( vMapAnds, pMatch, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vMapAnds, pMatch, i ) Vec_PtrPush( vNodes, pMatch->pAnd ); } // process nodes used in the mapping - Vec_PtrForEachEntry( vNodes, pObj, i ) + Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pObj, i ) { // make sure the label is clean Abc_ObjForEachFanout( pObj, pFanout, k ) @@ -386,3 +389,5 @@ void Seq_NtkShareLatchesClean( Abc_Ntk_t * pNtk ) //////////////////////////////////////////////////////////////////////// /// END OF FILE /// //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + diff --git a/src/base/seq/seqUtil.c b/src/base/seq/seqUtil.c index 55b9df8e..137151e2 100644 --- a/src/base/seq/seqUtil.c +++ b/src/base/seq/seqUtil.c @@ -20,6 +20,9 @@ #include "seqInt.h" +ABC_NAMESPACE_IMPL_START + + //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -595,3 +598,5 @@ int Seq_NtkCleanup( Abc_Ntk_t * pNtk, int fVerbose ) //////////////////////////////////////////////////////////////////////// +ABC_NAMESPACE_IMPL_END + -- cgit v1.2.3