summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-10-02 17:27:36 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-10-02 17:27:36 -0700
commitaeb7f7ea11ac4ab5046754bbc1a2dacae49c18ca (patch)
treeefeff8228e3b1800e7ed82d1f580fe776b9a613c
parent9d6f7fa4e625c7cfb12d9a83b676a64d943f7d65 (diff)
downloadabc-aeb7f7ea11ac4ab5046754bbc1a2dacae49c18ca.tar.gz
abc-aeb7f7ea11ac4ab5046754bbc1a2dacae49c18ca.tar.bz2
abc-aeb7f7ea11ac4ab5046754bbc1a2dacae49c18ca.zip
Combined old reparametrization command with the new one.
-rw-r--r--abclib.dsp8
-rw-r--r--src/aig/gia/gia.h2
-rw-r--r--src/aig/gia/module.make1
-rw-r--r--src/base/abci/abc.c66
-rw-r--r--src/proof/abs/abs.h4
-rw-r--r--src/proof/abs/absRpmOld.c (renamed from src/aig/gia/giaReparam.c)12
-rw-r--r--src/proof/abs/module.make1
7 files changed, 26 insertions, 68 deletions
diff --git a/abclib.dsp b/abclib.dsp
index 8690e70a..bb8e8719 100644
--- a/abclib.dsp
+++ b/abclib.dsp
@@ -3503,10 +3503,6 @@ SOURCE=.\src\aig\gia\giaPat.c
# End Source File
# Begin Source File
-SOURCE=.\src\aig\gia\giaReparam.c
-# End Source File
-# Begin Source File
-
SOURCE=.\src\aig\gia\giaRetime.c
# End Source File
# Begin Source File
@@ -4411,6 +4407,10 @@ SOURCE=.\src\proof\abs\absRpm.c
# End Source File
# Begin Source File
+SOURCE=.\src\proof\abs\absRpmOld.c
+# End Source File
+# Begin Source File
+
SOURCE=.\src\proof\abs\absUtil.c
# End Source File
# Begin Source File
diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h
index 25187a33..fd47d2c7 100644
--- a/src/aig/gia/gia.h
+++ b/src/aig/gia/gia.h
@@ -857,8 +857,6 @@ extern void Gia_MmStepEntryRecycle( Gia_MmStep_t * p, char * pEnt
extern int Gia_MmStepReadMemUsage( Gia_MmStep_t * p );
/*=== giaPat.c ===========================================================*/
extern void Gia_SatVerifyPattern( Gia_Man_t * p, Gia_Obj_t * pRoot, Vec_Int_t * vCex, Vec_Int_t * vVisit );
-/*=== giaReparam.c ===========================================================*/
-extern Gia_Man_t * Gia_ManReparam( Gia_Man_t * p, int fVerbose );
/*=== giaRetime.c ===========================================================*/
extern Gia_Man_t * Gia_ManRetimeForward( Gia_Man_t * p, int nMaxIters, int fVerbose );
/*=== giaSat.c ============================================================*/
diff --git a/src/aig/gia/module.make b/src/aig/gia/module.make
index 5bdd4ff1..fcff9a9f 100644
--- a/src/aig/gia/module.make
+++ b/src/aig/gia/module.make
@@ -28,7 +28,6 @@ SRC += src/aig/gia/gia.c \
src/aig/gia/giaMan.c \
src/aig/gia/giaMem.c \
src/aig/gia/giaPat.c \
- src/aig/gia/giaReparam.c \
src/aig/gia/giaRetime.c \
src/aig/gia/giaScl.c \
src/aig/gia/giaShrink.c \
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 9f3d9a9e..f5f1b39b 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -342,7 +342,6 @@ static int Abc_CommandAbc9Trace ( Abc_Frame_t * pAbc, int argc, cha
static int Abc_CommandAbc9Speedup ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9Era ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9Dch ( Abc_Frame_t * pAbc, int argc, char ** argv );
-static int Abc_CommandAbc9Reparam ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9Rpm ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9BackReach ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9Posplit ( Abc_Frame_t * pAbc, int argc, char ** argv );
@@ -791,7 +790,6 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd( pAbc, "ABC9", "&speedup", Abc_CommandAbc9Speedup, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&era", Abc_CommandAbc9Era, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&dch", Abc_CommandAbc9Dch, 0 );
- Cmd_CommandAdd( pAbc, "ABC9", "&reparam", Abc_CommandAbc9Reparam, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&rpm", Abc_CommandAbc9Rpm, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&back_reach", Abc_CommandAbc9BackReach, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&posplit", Abc_CommandAbc9Posplit, 0 );
@@ -26736,61 +26734,15 @@ usage:
SeeAlso []
***********************************************************************/
-int Abc_CommandAbc9Reparam( Abc_Frame_t * pAbc, int argc, char ** argv )
-{
- Gia_Man_t * pTemp = NULL;
- int c, fVerbose = 0;
- Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "vh" ) ) != EOF )
- {
- switch ( c )
- {
- case 'v':
- fVerbose ^= 1;
- break;
- case 'h':
- goto usage;
- default:
- goto usage;
- }
- }
- if ( pAbc->pGia == NULL )
- {
- Abc_Print( -1, "Abc_CommandAbc9Reparam(): There is no AIG.\n" );
- return 0;
- }
- pTemp = Gia_ManReparam( pAbc->pGia, fVerbose );
- Abc_CommandUpdate9( pAbc, pTemp );
- return 0;
-
-usage:
- Abc_Print( -2, "usage: &reparam [-vh]\n" );
- Abc_Print( -2, "\t performs input trimming and reparameterization\n" );
- Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" );
- Abc_Print( -2, "\t-h : print the command usage\n");
- return 1;
-}
-
-/**Function*************************************************************
-
- Synopsis []
-
- Description []
-
- SideEffects []
-
- SeeAlso []
-
-***********************************************************************/
int Abc_CommandAbc9Rpm( Abc_Frame_t * pAbc, int argc, char ** argv )
{
- extern Gia_Man_t * Abs_RpmPerform( Gia_Man_t * p, int nCutMax, int fVerbose, int fVeryVerbose );
Gia_Man_t * pTemp;
int c, nCutMax = 6;
+ int fUseOldAlgo = 0;
int fVerbose = 0;
int fVeryVerbose = 0;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "Cvwh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "Cavwh" ) ) != EOF )
{
switch ( c )
{
@@ -26805,6 +26757,9 @@ int Abc_CommandAbc9Rpm( Abc_Frame_t * pAbc, int argc, char ** argv )
if ( nCutMax < 0 )
goto usage;
break;
+ case 'a':
+ fUseOldAlgo ^= 1;
+ break;
case 'v':
fVerbose ^= 1;
break;
@@ -26822,15 +26777,18 @@ int Abc_CommandAbc9Rpm( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9Rpm(): There is no AIG.\n" );
return 0;
}
- pTemp = Abs_RpmPerform( pAbc->pGia, nCutMax, fVerbose, fVeryVerbose );
- if ( pTemp )
- Abc_CommandUpdate9( pAbc, pTemp );
+ if ( fUseOldAlgo )
+ pTemp = Abs_RpmPerformOld( pAbc->pGia, fVerbose );
+ else
+ pTemp = Abs_RpmPerform( pAbc->pGia, nCutMax, fVerbose, fVeryVerbose );
+ Abc_CommandUpdate9( pAbc, pTemp );
return 0;
usage:
- Abc_Print( -2, "usage: &rpm [-C num] [-vwh]\n" );
+ Abc_Print( -2, "usage: &rpm [-C num] [-avwh]\n" );
Abc_Print( -2, "\t performs structural reparametrization\n" );
Abc_Print( -2, "\t-C num : max cut size for testing range equivalence [default = %d]\n", nCutMax );
+ Abc_Print( -2, "\t-a : toggle using old algorithm [default = %s]\n", fUseOldAlgo? "yes": "no" );
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" );
Abc_Print( -2, "\t-w : toggle printing more verbose information [default = %s]\n", fVeryVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n");
diff --git a/src/proof/abs/abs.h b/src/proof/abs/abs.h
index 5b4f89be..537a8a36 100644
--- a/src/proof/abs/abs.h
+++ b/src/proof/abs/abs.h
@@ -123,6 +123,10 @@ extern Vec_Int_t * Gia_GlaConvertToFla( Gia_Man_t * p, Vec_Int_t * vGla );
extern int Gia_GlaCountFlops( Gia_Man_t * p, Vec_Int_t * vGla );
extern int Gia_GlaCountNodes( Gia_Man_t * p, Vec_Int_t * vGla );
+/*=== absRpm.c =========================================================*/
+extern Gia_Man_t * Abs_RpmPerform( Gia_Man_t * p, int nCutMax, int fVerbose, int fVeryVerbose );
+/*=== absRpmOld.c =========================================================*/
+extern Gia_Man_t * Abs_RpmPerformOld( Gia_Man_t * p, int fVerbose );
/*=== absOldCex.c ==========================================================*/
extern Vec_Int_t * Saig_ManCbaFilterFlops( Aig_Man_t * pAig, Abc_Cex_t * pAbsCex, Vec_Int_t * vFlopClasses, Vec_Int_t * vAbsFfsToAdd, int nFfsToSelect );
diff --git a/src/aig/gia/giaReparam.c b/src/proof/abs/absRpmOld.c
index a63af649..362df8de 100644
--- a/src/aig/gia/giaReparam.c
+++ b/src/proof/abs/absRpmOld.c
@@ -1,12 +1,12 @@
/**CFile****************************************************************
- FileName [gia.c]
+ FileName [absRpmOld.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Scalable AIG package.]
- Synopsis []
+ Synopsis [Old min-cut-based reparametrization.]
Author [Alan Mishchenko]
@@ -14,13 +14,11 @@
Date [Ver. 1.0. Started - June 20, 2005.]
- Revision [$Id: gia.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
+ Revision [$Id: absRpmOld.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
***********************************************************************/
-#include "gia.h"
-#include "giaAig.h"
-#include "aig/saig/saig.h"
+#include "abs.h"
ABC_NAMESPACE_IMPL_START
@@ -140,7 +138,7 @@ Gia_Man_t * Gia_ManDupFf2In( Gia_Man_t * p, int nFlopsOld )
SeeAlso []
***********************************************************************/
-Gia_Man_t * Gia_ManReparam( Gia_Man_t * p, int fVerbose )
+Gia_Man_t * Abs_RpmPerformOld( Gia_Man_t * p, int fVerbose )
{
// extern Aig_Man_t * Saig_ManRetimeMinArea( Aig_Man_t * p, int nMaxIters, int fForwardOnly, int fBackwardOnly, int fInitial, int fVerbose );
Aig_Man_t * pMan, * pTemp;
diff --git a/src/proof/abs/module.make b/src/proof/abs/module.make
index 7c35381f..7b8c8166 100644
--- a/src/proof/abs/module.make
+++ b/src/proof/abs/module.make
@@ -12,5 +12,6 @@ SRC += src/proof/abs/abs.c \
src/proof/abs/absRef.c \
src/proof/abs/absRefSelect.c \
src/proof/abs/absRpm.c \
+ src/proof/abs/absRpmOld.c \
src/proof/abs/absVta.c \
src/proof/abs/absUtil.c