diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2005-09-12 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2005-09-12 08:01:00 -0700 |
commit | c065b2c5daea65cb98659aa1bb56a138ca7cc290 (patch) | |
tree | 8a13866910599fe7fe347fa4fbefe8bfd5693550 /src/base/abci | |
parent | 798bbfc5a9b6f7dd5b47425c8c7026762451b0ba (diff) | |
download | abc-c065b2c5daea65cb98659aa1bb56a138ca7cc290.tar.gz abc-c065b2c5daea65cb98659aa1bb56a138ca7cc290.tar.bz2 abc-c065b2c5daea65cb98659aa1bb56a138ca7cc290.zip |
Version abc50912
Diffstat (limited to 'src/base/abci')
-rw-r--r-- | src/base/abci/abc.c | 17 | ||||
-rw-r--r-- | src/base/abci/abcFraig.c | 5 | ||||
-rw-r--r-- | src/base/abci/abcPrint.c | 1 |
3 files changed, 15 insertions, 8 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index f2cfaaf1..4745273e 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -25,6 +25,7 @@ #include "fpga.h" #include "pga.h" #include "cut.h" +#include "abcs.h" //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// @@ -3981,6 +3982,7 @@ int Abc_CommandRetime( Abc_Frame_t * pAbc, int argc, char ** argv ) int c; int fForward; int fBackward; + int fInitial; extern Abc_Ntk_t * Abc_NtkSuperChoice( Abc_Ntk_t * pNtk ); @@ -3989,10 +3991,11 @@ int Abc_CommandRetime( Abc_Frame_t * pAbc, int argc, char ** argv ) pErr = Abc_FrameReadErr(pAbc); // set defaults - fForward = 0; + fForward = 0; fBackward = 0; + fInitial = 0; util_getopt_reset(); - while ( ( c = util_getopt( argc, argv, "fbh" ) ) != EOF ) + while ( ( c = util_getopt( argc, argv, "fbih" ) ) != EOF ) { switch ( c ) { @@ -4002,6 +4005,9 @@ int Abc_CommandRetime( Abc_Frame_t * pAbc, int argc, char ** argv ) case 'b': fBackward ^= 1; break; + case 'i': + fInitial ^= 1; + break; case 'h': goto usage; default: @@ -4030,15 +4036,18 @@ int Abc_CommandRetime( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_NtkSeqRetimeForward( pNtk ); else if ( fBackward ) Abc_NtkSeqRetimeBackward( pNtk ); + else if ( fInitial ) + Abc_NtkSeqRetimeInitial( pNtk ); else Abc_NtkSeqRetimeDelay( pNtk ); return 0; usage: - fprintf( pErr, "usage: retime [-fbh]\n" ); - fprintf( pErr, "\t retimes sequential AIG (default is Pan's algorithm)\n" ); + fprintf( pErr, "usage: retime [-fbih]\n" ); + fprintf( pErr, "\t retimes sequential AIG (default is Pan's delay-optimal retiming)\n" ); fprintf( pErr, "\t-f : toggle forward retiming [default = %s]\n", fForward? "yes": "no" ); fprintf( pErr, "\t-b : toggle backward retiming [default = %s]\n", fBackward? "yes": "no" ); + fprintf( pErr, "\t-i : toggle retiming for initial state [default = %s]\n", fInitial? "yes": "no" ); fprintf( pErr, "\t-h : print the command usage\n"); return 1; } diff --git a/src/base/abci/abcFraig.c b/src/base/abci/abcFraig.c index 7a8eed5d..fe4f0511 100644 --- a/src/base/abci/abcFraig.c +++ b/src/base/abci/abcFraig.c @@ -88,7 +88,7 @@ void * Abc_NtkToFraig( Abc_Ntk_t * pNtk, void * pParams, int fAllNodes ) ProgressBar * pProgress; Fraig_Node_t * pNodeFraig; Vec_Ptr_t * vNodes; - Abc_Obj_t * pNode, * pConst1, * pReset; + Abc_Obj_t * pNode, * pConst1; int fInternal = ((Fraig_Params_t *)pParams)->fInternal; int i; @@ -102,7 +102,6 @@ void * Abc_NtkToFraig( Abc_Ntk_t * pNtk, void * pParams, int fAllNodes ) Abc_NtkForEachCi( pNtk, pNode, i ) pNode->pCopy = (Abc_Obj_t *)Fraig_ManReadIthVar(pMan, i); pConst1 = Abc_AigConst1( pNtk->pManFunc ); - pReset = Abc_AigReset( pNtk->pManFunc ); // perform strashing vNodes = Abc_AigDfs( pNtk, fAllNodes, 0 ); @@ -114,8 +113,6 @@ void * Abc_NtkToFraig( Abc_Ntk_t * pNtk, void * pParams, int fAllNodes ) Extra_ProgressBarUpdate( pProgress, i, NULL ); if ( pNode == pConst1 ) pNodeFraig = Fraig_ManReadConst1(pMan); - else if ( pNode == pReset ) - continue; else pNodeFraig = Fraig_NodeAnd( pMan, Fraig_NotCond( Abc_ObjFanin0(pNode)->pCopy, Abc_ObjFaninC0(pNode) ), diff --git a/src/base/abci/abcPrint.c b/src/base/abci/abcPrint.c index e4af8e12..26ce3665 100644 --- a/src/base/abci/abcPrint.c +++ b/src/base/abci/abcPrint.c @@ -20,6 +20,7 @@ #include "abc.h" #include "dec.h" +#include "abcs.h" //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// |