Commit 48db1c3a by Alan Mishchenko

Improvements to the new technology mapper.

parent 6a86be40
......@@ -2631,6 +2631,10 @@ SOURCE=.\src\misc\extra\extraUtilCanon.c
# End Source File
# Begin Source File
SOURCE=.\src\misc\extra\extraUtilDsd.c
# End Source File
# Begin Source File
SOURCE=.\src\misc\extra\extraUtilFile.c
# End Source File
# Begin Source File
......
......@@ -243,6 +243,7 @@ struct Jf_Par_t_
int DelayTarget;
int fAreaOnly;
int fCoarsen;
int fCutMin;
int fVerbose;
int fVeryVerbose;
int nLutSizeMax;
......
......@@ -981,6 +981,9 @@ void Abc_Init( Abc_Frame_t * pAbc )
extern void Dau_DsdTest();
Dau_DsdTest();
}
if ( Sdm_ManCanRead() )
Sdm_ManRead();
}
/**Function*************************************************************
......@@ -1015,6 +1018,10 @@ void Abc_End( Abc_Frame_t * pAbc )
extern void Npn_ManClean();
Npn_ManClean();
}
{
extern void Sdm_ManQuit();
Sdm_ManQuit();
}
Abc_NtkFraigStoreClean();
if ( Abc_FrameGetGlobalFrame()->pGia )
Gia_ManStop( Abc_FrameGetGlobalFrame()->pGia );
......@@ -29731,6 +29738,13 @@ int Abc_CommandAbc9If2( Abc_Frame_t * pAbc, int argc, char ** argv )
goto usage;
}
}
if ( pAbc->pGia == NULL )
{
Abc_Print( -1, "Empty GIA network.\n" );
return 1;
}
if ( pPars->fMap4Cnf )
pPars->fUseDsd = 1;
if ( pPars->fCutMin )
......@@ -29829,7 +29843,7 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv )
int c;
Jf_ManSetDefaultPars( pPars );
Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "KCRDacvwh" ) ) != EOF )
while ( ( c = Extra_UtilGetopt( argc, argv, "KCRDacmvwh" ) ) != EOF )
{
switch ( c )
{
......@@ -29889,6 +29903,9 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv )
case 'c':
pPars->fCoarsen ^= 1;
break;
case 'm':
pPars->fCutMin ^= 1;
break;
case 'v':
pPars->fVerbose ^= 1;
break;
......@@ -29900,6 +29917,19 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv )
goto usage;
}
}
if ( pAbc->pGia == NULL )
{
Abc_Print( -1, "Empty GIA network.\n" );
return 1;
}
if ( pPars->fCutMin && !Sdm_ManCanRead() )
{
Abc_Print( -1, "Abc_CommandAbc9If2(): Cannot input DSD data from file.\n" );
return 1;
}
pNew = Jf_ManPerformMapping( pAbc->pGia, pPars );
if ( pNew == NULL )
{
......@@ -29922,6 +29952,7 @@ usage:
Abc_Print( -2, "\t-D num : sets the delay constraint for the mapping [default = %s]\n", Buffer );
Abc_Print( -2, "\t-a : toggles area-oriented mapping [default = %s]\n", pPars->fAreaOnly? "yes": "no" );
Abc_Print( -2, "\t-c : toggles coarsening the subject graph [default = %s]\n", pPars->fCoarsen? "yes": "no" );
Abc_Print( -2, "\t-m : toggles cut minimization [default = %s]\n", pPars->fCutMin? "yes": "no" );
Abc_Print( -2, "\t-v : toggles verbose output [default = %s]\n", pPars->fVerbose? "yes": "no" );
Abc_Print( -2, "\t-w : toggles very verbose output [default = %s]\n", pPars->fVeryVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : prints the command usage\n");
......@@ -213,6 +213,16 @@ extern word Extra_Truth6MinimumHeuristic( word t );
/* fast computation of N-canoninical form up to 6 inputs */
extern int Extra_TruthCanonFastN( int nVarsMax, int nVarsReal, unsigned * pt, unsigned ** pptRes, char ** ppfRes );
/*=== extraUtilDsd.c ========================================================*/
typedef struct Sdm_Man_t_ Sdm_Man_t;
extern int Sdm_ManCanRead();
extern Sdm_Man_t * Sdm_ManRead();
extern void Sdm_ManQuit();
extern int Sdm_ManComputeFunc( Sdm_Man_t * p, int iDsdLit0, int iDsdLit1, int * pCut, int uMask, int fXor );
extern int Sdm_ManReadCnfSize( Sdm_Man_t * p, int iDsd );
extern void Sdm_ManPrintDsdStats( Sdm_Man_t * p, int fVerbose );
/*=== extraUtilProgress.c ================================================================*/
typedef struct ProgressBarStruct ProgressBar;
......
......@@ -8,6 +8,7 @@ SRC += src/misc/extra/extraBddAuto.c \
src/misc/extra/extraBddUnate.c \
src/misc/extra/extraUtilBitMatrix.c \
src/misc/extra/extraUtilCanon.c \
src/misc/extra/extraUtilDsd.c \
src/misc/extra/extraUtilFile.c \
src/misc/extra/extraUtilMemory.c \
src/misc/extra/extraUtilMisc.c \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment