summaryrefslogtreecommitdiffstats
path: root/src/base/abci/abcDar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/abci/abcDar.c')
-rw-r--r--src/base/abci/abcDar.c36
1 files changed, 34 insertions, 2 deletions
diff --git a/src/base/abci/abcDar.c b/src/base/abci/abcDar.c
index 483f65b9..76c7cf54 100644
--- a/src/base/abci/abcDar.c
+++ b/src/base/abci/abcDar.c
@@ -658,6 +658,33 @@ Abc_Ntk_t * Abc_NtkFromAigPhase( Aig_Man_t * pMan )
}
+/**Function*************************************************************
+
+ Synopsis []
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+int Abc_NtkFromGiaCollapse( Gia_Man_t * pGia )
+{
+ Aig_Man_t * pMan = Gia_ManToAig( pGia, 0 ); int Res;
+ Abc_Ntk_t * pNtk = Abc_NtkFromAigPhase( pMan ), * pTemp;
+ //pNtk->pName = Extra_UtilStrsav(pGia->pName);
+ Aig_ManStop( pMan );
+ // collapse the network
+ pNtk = Abc_NtkCollapse( pTemp = pNtk, 10000, 0, 1, 0, 0, 0 );
+ Abc_NtkDelete( pTemp );
+ if ( pNtk == NULL )
+ return 0;
+ Res = Abc_NtkGetBddNodeNum( pNtk );
+ Abc_NtkDelete( pNtk );
+ return Res == 0;
+}
+
/**Function*************************************************************
@@ -1204,7 +1231,11 @@ Abc_Ntk_t * Abc_NtkFromDarChoices( Abc_Ntk_t * pNtkOld, Aig_Man_t * pMan )
Aig_ManForEachCo( pMan, pObj, i )
Abc_ObjAddFanin( Abc_NtkCo(pNtkNew, i), (Abc_Obj_t *)Aig_ObjChild0Copy(pObj) );
if ( !Abc_NtkCheck( pNtkNew ) )
- Abc_Print( 1, "Abc_NtkFromDar(): Network check has failed.\n" );
+ {
+ Abc_Print( 1, "Abc_NtkFromDar(): Network check has failed. Returning original network.\n" );
+ Abc_NtkDelete( pNtkNew );
+ pNtkNew = Abc_NtkDup( pNtkOld );
+ }
// verify topological order
if ( 0 )
@@ -2271,7 +2302,7 @@ Abc_Ntk_t * Abc_NtkDarLcorr( Abc_Ntk_t * pNtk, int nFramesP, int nConfMax, int f
SeeAlso []
***********************************************************************/
-Abc_Ntk_t * Abc_NtkDarLcorrNew( Abc_Ntk_t * pNtk, int nVarsMax, int nConfMax, int fVerbose )
+Abc_Ntk_t * Abc_NtkDarLcorrNew( Abc_Ntk_t * pNtk, int nVarsMax, int nConfMax, int nLimitMax, int fVerbose )
{
Ssw_Pars_t Pars, * pPars = &Pars;
Aig_Man_t * pMan, * pTemp;
@@ -2283,6 +2314,7 @@ Abc_Ntk_t * Abc_NtkDarLcorrNew( Abc_Ntk_t * pNtk, int nVarsMax, int nConfMax, in
pPars->fLatchCorrOpt = 1;
pPars->nBTLimit = nConfMax;
pPars->nSatVarMax = nVarsMax;
+ pPars->nLimitMax = nLimitMax;
pPars->fVerbose = fVerbose;
pMan = Ssw_SignalCorrespondence( pTemp = pMan, pPars );
Aig_ManStop( pTemp );