summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/aig/gia/giaMan.c2
-rw-r--r--src/aig/gia/module.make2
-rw-r--r--src/base/abci/abc.c63
-rw-r--r--src/base/acb/acbUtil.c21
4 files changed, 65 insertions, 23 deletions
diff --git a/src/aig/gia/giaMan.c b/src/aig/gia/giaMan.c
index bb1305be..772dc31a 100644
--- a/src/aig/gia/giaMan.c
+++ b/src/aig/gia/giaMan.c
@@ -81,8 +81,6 @@ Gia_Man_t * Gia_ManStart( int nObjsMax )
***********************************************************************/
void Gia_ManStop( Gia_Man_t * p )
{
- extern void Gia_DatFree( Gia_Dat_t * p );
- Gia_DatFree( p->pUData );
if ( p->vSeqModelVec )
Vec_PtrFreeFree( p->vSeqModelVec );
Gia_ManStaticFanoutStop( p );
diff --git a/src/aig/gia/module.make b/src/aig/gia/module.make
index acb32c18..35ed4ab0 100644
--- a/src/aig/gia/module.make
+++ b/src/aig/gia/module.make
@@ -60,6 +60,8 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaPat.c \
src/aig/gia/giaPf.c \
src/aig/gia/giaQbf.c \
+ src/aig/gia/giaReshape1.c \
+ src/aig/gia/giaReshape2.c \
src/aig/gia/giaResub.c \
src/aig/gia/giaResub2.c \
src/aig/gia/giaResub3.c \
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 50edfcbf..8ff96d99 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -445,6 +445,7 @@ static int Abc_CommandAbc9Extract ( Abc_Frame_t * pAbc, int argc, cha
static int Abc_CommandAbc9Balance ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9BalanceLut ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9Resub ( Abc_Frame_t * pAbc, int argc, char ** argv );
+static int Abc_CommandAbc9Reshape ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9Syn2 ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9Syn3 ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9Syn4 ( Abc_Frame_t * pAbc, int argc, char ** argv );
@@ -1186,6 +1187,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd( pAbc, "ABC9", "&b", Abc_CommandAbc9Balance, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&blut", Abc_CommandAbc9BalanceLut, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&resub", Abc_CommandAbc9Resub, 0 );
+ Cmd_CommandAdd( pAbc, "ABC9", "&reshape", Abc_CommandAbc9Reshape, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&syn2", Abc_CommandAbc9Syn2, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&syn3", Abc_CommandAbc9Syn3, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&syn4", Abc_CommandAbc9Syn4, 0 );
@@ -35494,6 +35496,67 @@ usage:
SeeAlso []
***********************************************************************/
+int Abc_CommandAbc9Reshape( Abc_Frame_t * pAbc, int argc, char ** argv )
+{
+ extern Gia_Man_t * Gia_ManReshape1( Gia_Man_t * pGia, int fVerbose, int fVeryVerbose );
+ extern Gia_Man_t * Gia_ManReshape2( Gia_Man_t * pGia, int fVerbose, int fVeryVerbose );
+ Gia_Man_t * pTemp;
+ int fUseReshape1 = 0;
+ int c, fVerbose = 0;
+ int fVeryVerbose = 0;
+ Extra_UtilGetoptReset();
+ while ( ( c = Extra_UtilGetopt( argc, argv, "avwh" ) ) != EOF )
+ {
+ switch ( c )
+ {
+ case 'a':
+ fUseReshape1 ^= 1;
+ break;
+ case 'v':
+ fVerbose ^= 1;
+ break;
+ case 'w':
+ fVeryVerbose ^= 1;
+ break;
+ case 'h':
+ goto usage;
+ default:
+ goto usage;
+ }
+ }
+ if ( pAbc->pGia == NULL )
+ {
+ Abc_Print( -1, "Abc_CommandAbc9Resub(): There is no AIG.\n" );
+ return 1;
+ }
+ if ( fUseReshape1 )
+ pTemp = Gia_ManReshape1( pAbc->pGia, fVerbose, fVeryVerbose );
+ else
+ pTemp = Gia_ManReshape2( pAbc->pGia, fVerbose, fVeryVerbose );
+ Abc_FrameUpdateGia( pAbc, pTemp );
+ return 0;
+
+usage:
+ Abc_Print( -2, "usage: &reshape [-avwh]\n" );
+ Abc_Print( -2, "\t performs AIG resubstitution\n" );
+ Abc_Print( -2, "\t-a : toggles selecting the algorithm [default = %s]\n", fUseReshape1? "yes": "no" );
+ Abc_Print( -2, "\t-v : toggles printing verbose information [default = %s]\n", fVerbose? "yes": "no" );
+ Abc_Print( -2, "\t-w : toggles printing additional information [default = %s]\n", fVeryVerbose? "yes": "no" );
+ Abc_Print( -2, "\t-h : print the command usage\n");
+ return 1;
+}
+
+/**Function*************************************************************
+
+ Synopsis []
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
int Abc_CommandAbc9Syn2( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Gia_Man_t * pTemp;
diff --git a/src/base/acb/acbUtil.c b/src/base/acb/acbUtil.c
index b6adb6b3..ef106e86 100644
--- a/src/base/acb/acbUtil.c
+++ b/src/base/acb/acbUtil.c
@@ -1259,27 +1259,6 @@ void Acb_Ntk4DumpWeights( char * pFileNameIn, Vec_Ptr_t * vObjNames, char * pFil
Vec_IntFree( vObjs );
}
-/**Function*************************************************************
-
- Synopsis []
-
- Description []
-
- SideEffects []
-
- SeeAlso []
-
-***********************************************************************/
-void Acb_NtkRunSim( char * pFileName[4], int nTimeout, int nWords, int nBeam, int LevL, int LevU, int fOrder, int fFancy, int fUseBuf, int fRandom, int fUseWeights, int fInputs, int fSkipMffc, int fVerbose, int fVeryVerbose )
-{
- extern int Gia_Sim4Try( char * pFileName0, char * pFileName1, char * pFileName2, int nTimeout, int nWords, int nBeam, int LevL, int LevU, int fOrder, int fFancy, int fUseBuf, int fSkipMffc, int fVerbose );
- extern void Acb_NtkRunEco( char * pFileNames[4], int nTimeout, int fCheck, int fRandom, int fInputs, int fUnitW, int fVerbose, int fVeryVerbose );
- char * pFileNames[4] = { pFileName[2], pFileName[1], fUseWeights ? (char *)"weights.txt" : NULL, pFileName[2] };
- if ( Gia_Sim4Try( pFileName[0], pFileName[1], pFileName[2], nTimeout, nWords, nBeam, LevL, LevU, fOrder, fFancy, fUseBuf, fSkipMffc, fVerbose ) )
- Acb_NtkRunEco( pFileNames, nTimeout, 1, fRandom, fInputs, 0, fVerbose, fVeryVerbose );
-}
-
-
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////