diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2005-11-21 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2005-11-21 08:01:00 -0800 |
commit | 08d2b31046bfccdfe1239344eb5114ea01301f06 (patch) | |
tree | 99b2bd61fb70e0ecae0fd0292541eedf7d0cb8a4 /src/base/abci | |
parent | 69643dfe9285efae78ba94ff6b75a362c9150d8a (diff) | |
download | abc-08d2b31046bfccdfe1239344eb5114ea01301f06.tar.gz abc-08d2b31046bfccdfe1239344eb5114ea01301f06.tar.bz2 abc-08d2b31046bfccdfe1239344eb5114ea01301f06.zip |
Version abc51121
Diffstat (limited to 'src/base/abci')
-rw-r--r-- | src/base/abci/abc.c | 52 | ||||
-rw-r--r-- | src/base/abci/abcCut.c | 11 |
2 files changed, 39 insertions, 24 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 8c939083..f7e7f763 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -901,7 +901,7 @@ int Abc_CommandPrintKMap( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( !Abc_NtkIsBddLogic(pNtk) ) { - fprintf( pErr, "Visualizing BDDs can only be done for logic BDD networks (run \"bdd\").\n" ); + fprintf( pErr, "Visualizing Karnaugh map works for BDD logic networks (run \"bdd\").\n" ); return 1; } if ( argc > util_optind + 1 ) @@ -1388,6 +1388,11 @@ int Abc_CommandBalance( Abc_Frame_t * pAbc, int argc, char ** argv ) fprintf( pErr, "Empty network.\n" ); return 1; } + if ( Abc_NtkIsSeq(pNtk) ) + { + fprintf( pErr, "Balancing cannot be applied to a sequential AIG.\n" ); + return 1; + } // get the new network if ( Abc_NtkIsStrash(pNtk) ) @@ -2731,7 +2736,7 @@ int Abc_CommandExtSeqDcs( Abc_Frame_t * pAbc, int argc, char ** argv ) } if ( !Abc_NtkIsStrash(pNtk) ) { - fprintf( stdout, "This command works only for AIGs (run \"strash\").\n" ); + fprintf( stdout, "Extracting sequential don't-cares works only for AIGs (run \"strash\").\n" ); return 0; } if ( !Abc_NtkExtractSequentialDcs( pNtk, fVerbose ) ) @@ -4279,7 +4284,7 @@ int Abc_CommandSuperChoice( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( !Abc_NtkIsStrash(pNtk) ) { - fprintf( pErr, "Works only for the AIG representation (run \"strash\").\n" ); + fprintf( pErr, "Superchoicing works only for the AIG representation (run \"strash\").\n" ); return 1; } @@ -4736,7 +4741,7 @@ int Abc_CommandSeq( Abc_Frame_t * pAbc, int argc, char ** argv ) { FILE * pOut, * pErr; Abc_Ntk_t * pNtk, * pNtkRes; - int c; + int c, nLoops; pNtk = Abc_FrameReadNet(pAbc); pOut = Abc_FrameReadOut(pAbc); @@ -4769,14 +4774,14 @@ int Abc_CommandSeq( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( !Abc_NtkIsStrash(pNtk) ) { - fprintf( pErr, "Works only for AIG (run \"strash\").\n" ); + fprintf( pErr, "Conversion to sequential AIG works only for combinational AIGs (run \"strash\").\n" ); return 1; } - if ( Abc_NtkCountSelfFeedLatches(pNtk) ) + if ( nLoops = Abc_NtkCountSelfFeedLatches(pNtk) ) { - fprintf( pErr, "Sequential AIG cannot be created for designs with self-feeding latches.\n" ); - return 1; + fprintf( pErr, "Cannot create sequential AIG because the network contains %d self-feeding latches.\n", nLoops ); + return 0; } // get the new network @@ -4844,7 +4849,7 @@ int Abc_CommandUnseq( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( !Abc_NtkIsSeq(pNtk) ) { - fprintf( pErr, "Works only for sequential AIG (run \"seq\").\n" ); + fprintf( pErr, "Conversion to combinational AIG works only for sequential AIG (run \"seq\").\n" ); return 1; } @@ -4891,6 +4896,7 @@ int Abc_CommandRetime( Abc_Frame_t * pAbc, int argc, char ** argv ) int fBackward; int fInitial; int fVerbose; + int nLoops; pNtk = Abc_FrameReadNet(pAbc); pOut = Abc_FrameReadOut(pAbc); @@ -4933,8 +4939,14 @@ int Abc_CommandRetime( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( !Abc_NtkIsSeq(pNtk) ) { - fprintf( pErr, "Works only for sequential AIG (run \"seq\").\n" ); - return 1; + fprintf( pErr, "Retiming works only for sequential AIG (run \"seq\").\n" ); + return 0; + } + + if ( nLoops = Abc_NtkCountSelfFeedLatches(pNtk) ) + { + fprintf( pErr, "Cannot retime because the network contains %d self-feeding latches.\n", nLoops ); + return 0; } // get the new network @@ -4979,7 +4991,7 @@ int Abc_CommandSeqFpga( Abc_Frame_t * pAbc, int argc, char ** argv ) pErr = Abc_FrameReadErr(pAbc); // set defaults - fVerbose = 1; + fVerbose = 0; util_getopt_reset(); while ( ( c = util_getopt( argc, argv, "vh" ) ) != EOF ) { @@ -5003,20 +5015,16 @@ int Abc_CommandSeqFpga( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( !Abc_NtkIsSeq(pNtk) ) { - fprintf( pErr, "Works only for sequential AIG (run \"seq\").\n" ); - return 1; + fprintf( pErr, "Sequential FPGA mapping works only for sequential AIG (run \"seq\").\n" ); + return 0; } -// printf( "This command is not yet implemented.\n" ); -// return 0; - - // get the new network pNtkRes = Seq_NtkFpgaMapRetime( pNtk, fVerbose ); if ( pNtkRes == NULL ) { fprintf( pErr, "Sequential FPGA mapping has failed.\n" ); - return 1; + return 0; } // replace the current network Abc_FrameReplaceCurrentNetwork( pAbc, pNtkRes ); @@ -5078,7 +5086,7 @@ int Abc_CommandSeqMap( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( !Abc_NtkIsSeq(pNtk) ) { - fprintf( pErr, "Works only for sequential AIG (run \"seq\").\n" ); + fprintf( pErr, "Sequential standard cell mapping works only for sequential AIG (run \"seq\").\n" ); return 1; } @@ -5178,7 +5186,7 @@ int Abc_CommandSeqSweep( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( Abc_NtkIsSeq(pNtk) ) { - fprintf( pErr, "Works only for combinational networks (run \"unseq\").\n" ); + fprintf( pErr, "Sequential sweep works only for combinational networks (run \"unseq\").\n" ); return 1; } @@ -5190,7 +5198,7 @@ int Abc_CommandSeqSweep( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( !Abc_NtkIsStrash(pNtk) ) { - fprintf( pErr, "Works only for structurally hashed networks (run \"strash\").\n" ); + fprintf( pErr, "Sequential sweep works only for structurally hashed networks (run \"strash\").\n" ); return 1; } diff --git a/src/base/abci/abcCut.c b/src/base/abci/abcCut.c index 8bc2c9b4..f285495c 100644 --- a/src/base/abci/abcCut.c +++ b/src/base/abci/abcCut.c @@ -20,6 +20,7 @@ #include "abc.h" #include "cut.h" +#include "seqInt.h" //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// @@ -196,7 +197,10 @@ Cut_Man_t * Abc_NtkSeqCuts( Abc_Ntk_t * pNtk, Cut_Params_t * pParams ) pParams->nCutSet = Abc_NtkCutSetNodeNum( pNtk ); p = Cut_ManStart( pParams ); - // set cuts for PIs + // set cuts for the constant node and the PIs + pObj = Abc_NtkConst1(pNtk); + if ( Abc_ObjFanoutNum(pObj) > 0 ) + Cut_NodeSetTriv( p, pObj->Id ); Abc_NtkForEachPi( pNtk, pObj, i ) Cut_NodeSetTriv( p, pObj->Id ); // label the cutset nodes and set their number in the array @@ -240,8 +244,11 @@ Cut_Man_t * Abc_NtkSeqCuts( Abc_Ntk_t * pNtk, Cut_Params_t * pParams ) // unlabel the cutset nodes Abc_SeqForEachCutsetNode( pNtk, pObj, i ) pObj->fMarkC = 0; +if ( pParams->fVerbose ) +{ PRT( "Total", clock() - clk ); printf( "Converged after %d iterations.\n", nIters ); +} //Abc_NtkPrintCuts( p, pNtk, 1 ); return p; } @@ -306,7 +313,7 @@ void Abc_NodeGetCutsSeq( void * p, Abc_Obj_t * pObj, int fTriv ) fTriv = pObj->fMarkC ? 0 : fTriv; CutSetNum = pObj->fMarkC ? (int)pObj->pCopy : -1; Cut_NodeComputeCutsSeq( p, pObj->Id, Abc_ObjFaninId0(pObj), Abc_ObjFaninId1(pObj), - Abc_ObjFaninC0(pObj), Abc_ObjFaninC1(pObj), Abc_ObjFaninL0(pObj), Abc_ObjFaninL1(pObj), fTriv, CutSetNum ); + Abc_ObjFaninC0(pObj), Abc_ObjFaninC1(pObj), Seq_ObjFaninL0(pObj), Seq_ObjFaninL1(pObj), fTriv, CutSetNum ); } /**Function************************************************************* |