From f1bc34689459b984f4b2bbb269a098d7016d7e99 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Wed, 23 Sep 2015 18:44:07 -0700 Subject: Several bug-fixed related to synthesis, library handling, and timimg info. --- src/base/abc/abcDfs.c | 2 +- src/base/abci/abcRefactor.c | 2 ++ src/map/mio/mioFunc.c | 6 ++++-- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/base/abc/abcDfs.c b/src/base/abc/abcDfs.c index e1b042b8..731d35f5 100644 --- a/src/base/abc/abcDfs.c +++ b/src/base/abc/abcDfs.c @@ -1456,7 +1456,7 @@ int Abc_NtkLevel( Abc_Ntk_t * pNtk ) pNode->Level = 0; else Abc_NtkForEachCi( pNtk, pNode, i ) - pNode->Level = (int)(Abc_NodeReadArrivalWorst(pNode) / pNtk->AndGateDelay); + pNode->Level = (int)(Abc_MaxFloat(0, Abc_NodeReadArrivalWorst(pNode)) / pNtk->AndGateDelay); // perform the traversal LevelsMax = 0; Abc_NtkIncrementTravId( pNtk ); diff --git a/src/base/abci/abcRefactor.c b/src/base/abci/abcRefactor.c index 4d0836f1..3cc6d793 100644 --- a/src/base/abci/abcRefactor.c +++ b/src/base/abci/abcRefactor.c @@ -169,6 +169,8 @@ Dec_Graph_t * Abc_NodeRefactor( Abc_ManRef_t * p, Abc_Obj_t * pNode, Vec_Ptr_t * clk = Abc_Clock(); pTruth = Abc_NodeConeTruth( p->vVars, p->vFuncs, nWordsMax, pNode, vFanins, p->vVisited ); p->timeTru += Abc_Clock() - clk; + if ( pTruth == NULL ) + return NULL; // always accept the case of constant node if ( Abc_NodeConeIsConst0(pTruth, nVars) || Abc_NodeConeIsConst1(pTruth, nVars) ) diff --git a/src/map/mio/mioFunc.c b/src/map/mio/mioFunc.c index 59df45f5..536f5496 100644 --- a/src/map/mio/mioFunc.c +++ b/src/map/mio/mioFunc.c @@ -75,12 +75,13 @@ char * Mio_SopRegister( Mem_Flex_t * pMan, char * pName ) ***********************************************************************/ int Mio_GateCollectNames( char * pFormula, char * pPinNames[] ) { - char Buffer[1000]; + char * Buffer; char * pTemp; int nPins, i; // save the formula as it was - strcpy( Buffer, pFormula ); + //strcpy( Buffer, pFormula ); + Buffer = Abc_UtilStrsav( pFormula ); // remove the non-name symbols for ( pTemp = Buffer; *pTemp; pTemp++ ) @@ -106,6 +107,7 @@ int Mio_GateCollectNames( char * pFormula, char * pPinNames[] ) // get the next name pTemp = strtok( NULL, " " ); } + ABC_FREE( Buffer ); return nPins; } -- cgit v1.2.3