diff options
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/abc/abcCheck.c | 2 | ||||
-rw-r--r-- | src/base/abci/abc.c | 6 | ||||
-rw-r--r-- | src/base/abci/abcNtbdd.c | 2 | ||||
-rw-r--r-- | src/base/seq/seqAigIter.c | 11 | ||||
-rw-r--r-- | src/base/seq/seqFpgaCore.c | 3 | ||||
-rw-r--r-- | src/base/seq/seqInt.h | 2 | ||||
-rw-r--r-- | src/base/seq/seqMapCore.c | 5 | ||||
-rw-r--r-- | src/base/seq/seqMapIter.c | 12 | ||||
-rw-r--r-- | src/base/seq/seqRetCore.c | 2 | ||||
-rw-r--r-- | src/base/seq/seqRetIter.c | 10 |
10 files changed, 29 insertions, 26 deletions
diff --git a/src/base/abc/abcCheck.c b/src/base/abc/abcCheck.c index 2e596d12..080164bd 100644 --- a/src/base/abc/abcCheck.c +++ b/src/base/abc/abcCheck.c @@ -54,7 +54,7 @@ static bool Abc_NtkCompareLatches( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int fCo ***********************************************************************/ bool Abc_NtkCheck( Abc_Ntk_t * pNtk ) -{ +{ return !Abc_FrameIsFlagEnabled( "check" ) || Abc_NtkDoCheck( pNtk ); } diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 9abb75e8..14c00d75 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -2062,7 +2062,7 @@ int Abc_CommandRewrite( Abc_Frame_t * pAbc, int argc, char ** argv ) pErr = Abc_FrameReadErr(pAbc); // set defaults - fUpdateLevel = 0; + fUpdateLevel = 1; fPrecompute = 0; fUseZeros = 0; fVerbose = 0; @@ -5257,7 +5257,7 @@ int Abc_CommandSeqFpga( Abc_Frame_t * pAbc, int argc, char ** argv ) pNtkRes = Seq_NtkFpgaMapRetime( pNtkNew, nMaxIters, fVerbose ); if ( pNtkRes == NULL ) { - fprintf( pErr, "Sequential FPGA mapping has failed.\n" ); +// fprintf( pErr, "Sequential FPGA mapping has failed.\n" ); Abc_NtkDelete( pNtkNew ); return 0; } @@ -5381,7 +5381,7 @@ int Abc_CommandSeqMap( Abc_Frame_t * pAbc, int argc, char ** argv ) pNtkRes = Seq_MapRetime( pNtkNew, nMaxIters, fVerbose ); if ( pNtkRes == NULL ) { - fprintf( pErr, "Sequential FPGA mapping has failed.\n" ); +// fprintf( pErr, "Sequential FPGA mapping has failed.\n" ); Abc_NtkDelete( pNtkNew ); return 0; } diff --git a/src/base/abci/abcNtbdd.c b/src/base/abci/abcNtbdd.c index 783585af..6257bd08 100644 --- a/src/base/abci/abcNtbdd.c +++ b/src/base/abci/abcNtbdd.c @@ -343,7 +343,7 @@ DdNode * Abc_NodeGlobalBdds_rec( DdManager * dd, Abc_Obj_t * pNode ) { DdNode * bFunc, * bFunc0, * bFunc1; assert( !Abc_ObjIsComplement(pNode) ); - if ( Cudd_ReadKeys(dd) > 500000 ) + if ( Cudd_ReadKeys(dd) > 5000000 ) return NULL; // if the result is available return if ( pNode->pCopy ) diff --git a/src/base/seq/seqAigIter.c b/src/base/seq/seqAigIter.c index 683c0093..392638b8 100644 --- a/src/base/seq/seqAigIter.c +++ b/src/base/seq/seqAigIter.c @@ -48,7 +48,7 @@ int Seq_AigRetimeDelayLags( Abc_Ntk_t * pNtk, int fVerbose ) { Abc_Seq_t * p = pNtk->pManFunc; Abc_Obj_t * pNode; - int i, FiMax, FiBest, RetValue, clk, clkIter; + int i, FiMax, RetValue, clk, clkIter; char NodeLag; assert( Abc_NtkIsSeq( pNtk ) ); @@ -68,11 +68,11 @@ int Seq_AigRetimeDelayLags( Abc_Ntk_t * pNtk, int fVerbose ) // search for the optimal clock period between 0 and nLevelMax clk = clock(); - FiBest = Seq_RetimeSearch_rec( pNtk, 0, FiMax, fVerbose ); + p->FiBestInt = Seq_RetimeSearch_rec( pNtk, 0, FiMax, fVerbose ); clkIter = clock() - clk; // recompute the best l-values - RetValue = Seq_RetimeForPeriod( pNtk, FiBest, fVerbose ); + RetValue = Seq_RetimeForPeriod( pNtk, p->FiBestInt, fVerbose ); assert( RetValue ); // fix the problem with non-converged delays @@ -84,13 +84,14 @@ clkIter = clock() - clk; Vec_StrFill( p->vLags, p->nSize, 0 ); Abc_AigForEachAnd( pNtk, pNode, i ) { - NodeLag = Seq_NodeComputeLag( Seq_NodeGetLValue(pNode), FiBest ); + NodeLag = Seq_NodeComputeLag( Seq_NodeGetLValue(pNode), p->FiBestInt ); Seq_NodeSetLag( pNode, NodeLag ); } // print the result if ( fVerbose ) - printf( "The best clock period is %3d.\n", FiBest ); + printf( "The best clock period is %3d.\n", p->FiBestInt ); + /* printf( "lvalues and lags : " ); Abc_AigForEachAnd( pNtk, pNode, i ) diff --git a/src/base/seq/seqFpgaCore.c b/src/base/seq/seqFpgaCore.c index 2afb5332..6d0c8c97 100644 --- a/src/base/seq/seqFpgaCore.c +++ b/src/base/seq/seqFpgaCore.c @@ -66,7 +66,8 @@ Abc_Ntk_t * Seq_NtkFpgaMapRetime( Abc_Ntk_t * pNtk, int nMaxIters, int fVerbose return NULL; if ( RetValue = Abc_NtkGetChoiceNum(pNtk) ) { - printf( "The network has %d choices. Deriving the resulting network is skipped.\n", RetValue ); + printf( "The network has %d choices. The resulting network is not derived (this is temporary).\n", RetValue ); + printf( "The mininum clock period computed is %d.\n", p->FiBestInt ); return NULL; } diff --git a/src/base/seq/seqInt.h b/src/base/seq/seqInt.h index e571272c..3d3d0804 100644 --- a/src/base/seq/seqInt.h +++ b/src/base/seq/seqInt.h @@ -59,6 +59,8 @@ struct Abc_Seq_t_ float fEpsilon; // the accuracy for delay computation int fStandCells; // the flag denoting standard cell mapping int nMaxIters; // the max number of iterations + int FiBestInt; // the best clock period + float FiBestFloat; // the best clock period // K-feasible cuts int nVarsMax; // the max cut size Cut_Man_t * pCutMan; // cut manager diff --git a/src/base/seq/seqMapCore.c b/src/base/seq/seqMapCore.c index fee31287..cb50cdfe 100644 --- a/src/base/seq/seqMapCore.c +++ b/src/base/seq/seqMapCore.c @@ -78,10 +78,11 @@ Abc_Ntk_t * Seq_MapRetime( Abc_Ntk_t * pNtk, int nMaxIters, int fVerbose ) return NULL; if ( RetValue = Abc_NtkGetChoiceNum(pNtk) ) { - printf( "The network has %d choices. Deriving the resulting network is skipped.\n", RetValue ); + printf( "The network has %d choices. The resulting network is not derived (this is temporary).\n", RetValue ); + printf( "The mininum clock period computed is %5.2f.\n", p->FiBestFloat ); return NULL; } - return NULL; + printf( "The resulting network is derived as BDD logic network (this is temporary).\n" ); // duplicate the nodes contained in multiple cuts pNtkNew = Seq_NtkMapDup( pNtk ); diff --git a/src/base/seq/seqMapIter.c b/src/base/seq/seqMapIter.c index 1ff8effd..67ac4a7d 100644 --- a/src/base/seq/seqMapIter.c +++ b/src/base/seq/seqMapIter.c @@ -53,7 +53,7 @@ int Seq_MapRetimeDelayLags( Abc_Ntk_t * pNtk, int fVerbose ) Abc_Seq_t * p = pNtk->pManFunc; Cut_Params_t Params, * pParams = &Params; Abc_Obj_t * pObj; - float TotalArea, FiBest; + float TotalArea; int i, clk; // set defaults for cut computation @@ -80,8 +80,8 @@ p->timeCuts = clock() - clk; // compute the delays clk = clock(); - FiBest = Seq_MapRetimeDelayLagsInternal( pNtk, fVerbose ); - if ( FiBest == 0.0 ) + p->FiBestFloat = Seq_MapRetimeDelayLagsInternal( pNtk, fVerbose ); + if ( p->FiBestFloat == 0.0 ) return 0; p->timeDelay = clock() - clk; /* @@ -89,7 +89,7 @@ p->timeDelay = clock() - clk; FILE * pTable; pTable = fopen( "stats.txt", "a+" ); fprintf( pTable, "%s ", pNtk->pName ); - fprintf( pTable, "%.2f ", FiBest ); + fprintf( pTable, "%.2f ", p->FiBestFloat ); fprintf( pTable, "%.2f ", (float)(p->timeCuts)/(float)(CLOCKS_PER_SEC) ); fprintf( pTable, "%.2f ", (float)(p->timeDelay)/(float)(CLOCKS_PER_SEC) ); fprintf( pTable, "\n" ); @@ -105,7 +105,7 @@ p->timeDelay = clock() - clk; p->vMapCuts = Vec_VecAlloc( 1000 ); TotalArea = 0.0; Abc_NtkForEachPo( pNtk, pObj, i ) - TotalArea += Seq_MapCollectNode_rec( Abc_ObjChild0(pObj), FiBest, p->vMapAnds, p->vMapCuts ); + TotalArea += Seq_MapCollectNode_rec( Abc_ObjChild0(pObj), p->FiBestFloat, p->vMapAnds, p->vMapCuts ); // clean the marks Abc_NtkForEachObj( pNtk, pObj, i ) @@ -202,7 +202,7 @@ float Seq_MapRetimeDelayLagsInternal( Abc_Ntk_t * pNtk, int fVerbose ) //printf( "\n\n" ); // print the result -// if ( fVerbose ) + if ( fVerbose ) printf( "The best clock period after mapping/retiming is %6.2f.\n", FiBest ); return FiBest; } diff --git a/src/base/seq/seqRetCore.c b/src/base/seq/seqRetCore.c index 08da5b39..b4795039 100644 --- a/src/base/seq/seqRetCore.c +++ b/src/base/seq/seqRetCore.c @@ -62,8 +62,6 @@ Abc_Ntk_t * Seq_NtkRetime( Abc_Ntk_t * pNtk, int nMaxIters, int fInitial, int fV // find the best mapping and retiming if ( !Seq_NtkRetimeDelayLags( pNtk, pNtkSeq, fVerbose ) ) return NULL; - return NULL; - // implement the retiming RetValue = Seq_NtkImplementRetiming( pNtkSeq, p->vLags, fVerbose ); diff --git a/src/base/seq/seqRetIter.c b/src/base/seq/seqRetIter.c index 9c28c097..512a521e 100644 --- a/src/base/seq/seqRetIter.c +++ b/src/base/seq/seqRetIter.c @@ -53,7 +53,7 @@ int Seq_NtkRetimeDelayLags( Abc_Ntk_t * pNtkOld, Abc_Ntk_t * pNtk, int fVerbose { Abc_Seq_t * p = pNtk->pManFunc; Abc_Obj_t * pNode; - float FiMax, FiBest, Delta; + float FiMax, Delta; int i, RetValue; char NodeLag; @@ -99,10 +99,10 @@ int Seq_NtkRetimeDelayLags( Abc_Ntk_t * pNtkOld, Abc_Ntk_t * pNtk, int fVerbose } // search for the optimal clock period between 0 and nLevelMax - FiBest = Seq_NtkMappingSearch_rec( pNtk, 0.0, FiMax, Delta, fVerbose ); + p->FiBestFloat = Seq_NtkMappingSearch_rec( pNtk, 0.0, FiMax, Delta, fVerbose ); // recompute the best l-values - RetValue = Seq_NtkMappingForPeriod( pNtk, FiBest, fVerbose ); + RetValue = Seq_NtkMappingForPeriod( pNtk, p->FiBestFloat, fVerbose ); assert( RetValue ); // fix the problem with non-converged delays @@ -127,7 +127,7 @@ int Seq_NtkRetimeDelayLags( Abc_Ntk_t * pNtkOld, Abc_Ntk_t * pNtk, int fVerbose Seq_NodeSetLag( pNode, 0 ); continue; } - NodeLag = Seq_NodeComputeLagFloat( Seq_NodeGetLValueP(pNode), FiBest ); + NodeLag = Seq_NodeComputeLagFloat( Seq_NodeGetLValueP(pNode), p->FiBestFloat ); Seq_NodeRetimeSetLag_rec( pNode, NodeLag ); } // unmark the nodes @@ -136,7 +136,7 @@ int Seq_NtkRetimeDelayLags( Abc_Ntk_t * pNtkOld, Abc_Ntk_t * pNtk, int fVerbose // print the result if ( fVerbose ) - printf( "The best clock period is %6.2f.\n", FiBest ); + printf( "The best clock period is %6.2f.\n", p->FiBestFloat ); /* { FILE * pTable; |