summaryrefslogtreecommitdiffstats
path: root/src/aig/dar/darScript.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/aig/dar/darScript.c')
-rw-r--r--src/aig/dar/darScript.c128
1 files changed, 30 insertions, 98 deletions
diff --git a/src/aig/dar/darScript.c b/src/aig/dar/darScript.c
index 8423a4e6..75076981 100644
--- a/src/aig/dar/darScript.c
+++ b/src/aig/dar/darScript.c
@@ -39,11 +39,10 @@
SeeAlso []
***********************************************************************/
-Aig_Man_t * Dar_ManCompress2_old( Aig_Man_t * pAig, int fVerbose )
+Aig_Man_t * Dar_ManCompress2( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, int fVerbose )
//alias compress2 "b -l; rw -l; rf -l; b -l; rw -l; rwz -l; b -l; rfz -l; rwz -l; b -l"
{
Aig_Man_t * pTemp;
- int fBalance = 0;
Dar_RwrPar_t ParsRwr, * pParsRwr = &ParsRwr;
Dar_RefPar_t ParsRef, * pParsRef = &ParsRef;
@@ -51,12 +50,18 @@ Aig_Man_t * Dar_ManCompress2_old( Aig_Man_t * pAig, int fVerbose )
Dar_ManDefaultRwrParams( pParsRwr );
Dar_ManDefaultRefParams( pParsRef );
+ pParsRwr->fUpdateLevel = fUpdateLevel;
+ pParsRef->fUpdateLevel = fUpdateLevel;
+
pParsRwr->fVerbose = fVerbose;
pParsRef->fVerbose = fVerbose;
// balance
- pAig = Dar_ManBalance( pTemp = pAig, fBalance );
- Aig_ManStop( pTemp );
+ if ( fBalance )
+ {
+// pAig = Dar_ManBalance( pTemp = pAig, fUpdateLevel );
+// Aig_ManStop( pTemp );
+ }
// rewrite
Dar_ManRewrite( pAig, pParsRwr );
@@ -69,8 +74,11 @@ Aig_Man_t * Dar_ManCompress2_old( Aig_Man_t * pAig, int fVerbose )
Aig_ManStop( pTemp );
// balance
- pAig = Dar_ManBalance( pTemp = pAig, fBalance );
+// if ( fBalance )
+ {
+ pAig = Dar_ManBalance( pTemp = pAig, fUpdateLevel );
Aig_ManStop( pTemp );
+ }
// rewrite
Dar_ManRewrite( pAig, pParsRwr );
@@ -86,8 +94,11 @@ Aig_Man_t * Dar_ManCompress2_old( Aig_Man_t * pAig, int fVerbose )
Aig_ManStop( pTemp );
// balance
- pAig = Dar_ManBalance( pTemp = pAig, fBalance );
+ if ( fBalance )
+ {
+ pAig = Dar_ManBalance( pTemp = pAig, fUpdateLevel );
Aig_ManStop( pTemp );
+ }
// refactor
Dar_ManRefactor( pAig, pParsRef );
@@ -100,8 +111,11 @@ Aig_Man_t * Dar_ManCompress2_old( Aig_Man_t * pAig, int fVerbose )
Aig_ManStop( pTemp );
// balance
- pAig = Dar_ManBalance( pTemp = pAig, fBalance );
+ if ( fBalance )
+ {
+ pAig = Dar_ManBalance( pTemp = pAig, fUpdateLevel );
Aig_ManStop( pTemp );
+ }
return pAig;
}
@@ -116,11 +130,10 @@ Aig_Man_t * Dar_ManCompress2_old( Aig_Man_t * pAig, int fVerbose )
SeeAlso []
***********************************************************************/
-Aig_Man_t * Dar_ManCompress2_no_z( Aig_Man_t * pAig, int fVerbose )
-//alias compress2 "b -l; rw -l; rf -l; b -l; rw -l; rwz -l; b -l; rfz -l; rwz -l; b -l"
+Aig_Man_t * Dar_ManRwsat( Aig_Man_t * pAig, int fBalance, int fVerbose )
+//alias rwsat "st; rw -l; b -l; rw -l; rf -l"
{
Aig_Man_t * pTemp;
- int fBalance = 0;
Dar_RwrPar_t ParsRwr, * pParsRwr = &ParsRwr;
Dar_RefPar_t ParsRef, * pParsRef = &ParsRef;
@@ -128,71 +141,8 @@ Aig_Man_t * Dar_ManCompress2_no_z( Aig_Man_t * pAig, int fVerbose )
Dar_ManDefaultRwrParams( pParsRwr );
Dar_ManDefaultRefParams( pParsRef );
- pParsRwr->fVerbose = fVerbose;
- pParsRef->fVerbose = fVerbose;
-
- // rewrite
- Dar_ManRewrite( pAig, pParsRwr );
- pAig = Aig_ManDup( pTemp = pAig, 0 );
- Aig_ManStop( pTemp );
-
- // refactor
- Dar_ManRefactor( pAig, pParsRef );
- pAig = Aig_ManDup( pTemp = pAig, 0 );
- Aig_ManStop( pTemp );
-
- // balance
- pAig = Dar_ManBalance( pTemp = pAig, fBalance );
- Aig_ManStop( pTemp );
-
- // rewrite
- Dar_ManRewrite( pAig, pParsRwr );
- pAig = Aig_ManDup( pTemp = pAig, 0 );
- Aig_ManStop( pTemp );
-
- // refactor
- Dar_ManRefactor( pAig, pParsRef );
- pAig = Aig_ManDup( pTemp = pAig, 0 );
- Aig_ManStop( pTemp );
-
- // balance
- pAig = Dar_ManBalance( pTemp = pAig, fBalance );
- Aig_ManStop( pTemp );
-
- // rewrite
- Dar_ManRewrite( pAig, pParsRwr );
- pAig = Aig_ManDup( pTemp = pAig, 0 );
- Aig_ManStop( pTemp );
-
- // refactor
- Dar_ManRefactor( pAig, pParsRef );
- pAig = Aig_ManDup( pTemp = pAig, 0 );
- Aig_ManStop( pTemp );
- return pAig;
-}
-
-/**Function*************************************************************
-
- Synopsis [Reproduces script "compress2".]
-
- Description []
-
- SideEffects [This procedure does not tighten level during restructuring.]
-
- SeeAlso []
-
-***********************************************************************/
-Aig_Man_t * Dar_ManCompress2( Aig_Man_t * pAig, int fVerbose )
-//alias compress2 "b -l; rw -l; rf -l; b -l; rw -l; rwz -l; b -l; rfz -l; rwz -l; b -l"
-{
- Aig_Man_t * pTemp;
- int fBalance = 0;
-
- Dar_RwrPar_t ParsRwr, * pParsRwr = &ParsRwr;
- Dar_RefPar_t ParsRef, * pParsRef = &ParsRef;
-
- Dar_ManDefaultRwrParams( pParsRwr );
- Dar_ManDefaultRefParams( pParsRef );
+ pParsRwr->fUpdateLevel = 0;
+ pParsRef->fUpdateLevel = 0;
pParsRwr->fVerbose = fVerbose;
pParsRef->fVerbose = fVerbose;
@@ -206,37 +156,19 @@ Aig_Man_t * Dar_ManCompress2( Aig_Man_t * pAig, int fVerbose )
Dar_ManRefactor( pAig, pParsRef );
pAig = Aig_ManDup( pTemp = pAig, 0 );
Aig_ManStop( pTemp );
-/*
- // balance
- pAig = Dar_ManBalance( pTemp = pAig, fBalance );
- Aig_ManStop( pTemp );
-*/
- // rewrite
- Dar_ManRewrite( pAig, pParsRwr );
- pAig = Aig_ManDup( pTemp = pAig, 0 );
- Aig_ManStop( pTemp );
-
- pParsRwr->fUseZeros = 1;
- pParsRef->fUseZeros = 1;
-
- // rewrite
- Dar_ManRewrite( pAig, pParsRwr );
- pAig = Aig_ManDup( pTemp = pAig, 0 );
- Aig_ManStop( pTemp );
// balance
- pAig = Dar_ManBalance( pTemp = pAig, fBalance );
- Aig_ManStop( pTemp );
-
- // refactor
- Dar_ManRefactor( pAig, pParsRef );
- pAig = Aig_ManDup( pTemp = pAig, 0 );
+ if ( fBalance )
+ {
+ pAig = Dar_ManBalance( pTemp = pAig, 0 );
Aig_ManStop( pTemp );
+ }
// rewrite
Dar_ManRewrite( pAig, pParsRwr );
pAig = Aig_ManDup( pTemp = pAig, 0 );
Aig_ManStop( pTemp );
+
return pAig;
}