From bf795e57cf427d74d002d7cc80c4000447f5543c Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Wed, 13 Mar 2013 11:47:17 +0100 Subject: Handling special case in 'fold' when the network is combinational. --- src/base/abci/abc.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/base/abci/abc.c') diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 79f92b08..3a6c8b1b 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -21967,11 +21967,6 @@ int Abc_CommandConstr( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( -1, "Empty network.\n" ); return 1; } - if ( Abc_NtkIsComb(pNtk) ) - { - Abc_Print( -1, "The network is combinational.\n" ); - return 0; - } if ( !Abc_NtkIsStrash(pNtk) ) { Abc_Print( -1, "Currently only works for structurally hashed circuits.\n" ); @@ -22007,6 +22002,8 @@ int Abc_CommandConstr( Abc_Frame_t * pAbc, int argc, char ** argv ) // consider the case of manual constraint definition if ( nConstrs > 0 ) { + if ( Abc_NtkIsComb(pNtk) ) + Abc_Print( -1, "The network is combinational.\n" ); if ( Abc_NtkConstrNum(pNtk) > 0 ) { Abc_Print( -1, "The network already has constraints.\n" ); @@ -22021,6 +22018,11 @@ int Abc_CommandConstr( Abc_Frame_t * pAbc, int argc, char ** argv ) pNtk->nConstrs = nConstrs; return 0; } + if ( Abc_NtkIsComb(pNtk) ) + { + Abc_Print( -1, "The network is combinational.\n" ); + return 0; + } // detect constraints using functional/structural methods Abc_NtkDarConstr( pNtk, nFrames, nConfs, nProps, fStruct, fOldAlgo, fVerbose ); return 0; @@ -22217,11 +22219,6 @@ int Abc_CommandFold( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( -1, "Empty network.\n" ); return 1; } - if ( Abc_NtkIsComb(pNtk) ) - { - Abc_Print( -1, "The network is combinational.\n" ); - return 0; - } if ( !Abc_NtkIsStrash(pNtk) ) { Abc_Print( -1, "Currently only works for structurally hashed circuits.\n" ); @@ -22232,6 +22229,8 @@ int Abc_CommandFold( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( -1, "The network has no constraints.\n" ); return 0; } + if ( Abc_NtkIsComb(pNtk) ) + Abc_Print( 0, "The network is combinational.\n" ); // modify the current network pNtkRes = Abc_NtkDarFold( pNtk, fCompl, fVerbose ); if ( pNtkRes == NULL ) -- cgit v1.2.3