Commit 48db1c3a by Alan Mishchenko

Improvements to the new technology mapper.

parent 6a86be40
...@@ -2631,6 +2631,10 @@ SOURCE=.\src\misc\extra\extraUtilCanon.c ...@@ -2631,6 +2631,10 @@ SOURCE=.\src\misc\extra\extraUtilCanon.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\misc\extra\extraUtilDsd.c
# End Source File
# Begin Source File
SOURCE=.\src\misc\extra\extraUtilFile.c SOURCE=.\src\misc\extra\extraUtilFile.c
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -243,6 +243,7 @@ struct Jf_Par_t_ ...@@ -243,6 +243,7 @@ struct Jf_Par_t_
int DelayTarget; int DelayTarget;
int fAreaOnly; int fAreaOnly;
int fCoarsen; int fCoarsen;
int fCutMin;
int fVerbose; int fVerbose;
int fVeryVerbose; int fVeryVerbose;
int nLutSizeMax; int nLutSizeMax;
......
...@@ -981,6 +981,9 @@ void Abc_Init( Abc_Frame_t * pAbc ) ...@@ -981,6 +981,9 @@ void Abc_Init( Abc_Frame_t * pAbc )
extern void Dau_DsdTest(); extern void Dau_DsdTest();
Dau_DsdTest(); Dau_DsdTest();
} }
if ( Sdm_ManCanRead() )
Sdm_ManRead();
} }
/**Function************************************************************* /**Function*************************************************************
...@@ -1015,6 +1018,10 @@ void Abc_End( Abc_Frame_t * pAbc ) ...@@ -1015,6 +1018,10 @@ void Abc_End( Abc_Frame_t * pAbc )
extern void Npn_ManClean(); extern void Npn_ManClean();
Npn_ManClean(); Npn_ManClean();
} }
{
extern void Sdm_ManQuit();
Sdm_ManQuit();
}
Abc_NtkFraigStoreClean(); Abc_NtkFraigStoreClean();
if ( Abc_FrameGetGlobalFrame()->pGia ) if ( Abc_FrameGetGlobalFrame()->pGia )
Gia_ManStop( Abc_FrameGetGlobalFrame()->pGia ); Gia_ManStop( Abc_FrameGetGlobalFrame()->pGia );
...@@ -29731,6 +29738,13 @@ int Abc_CommandAbc9If2( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29731,6 +29738,13 @@ int Abc_CommandAbc9If2( Abc_Frame_t * pAbc, int argc, char ** argv )
goto usage; goto usage;
} }
} }
if ( pAbc->pGia == NULL )
{
Abc_Print( -1, "Empty GIA network.\n" );
return 1;
}
if ( pPars->fMap4Cnf ) if ( pPars->fMap4Cnf )
pPars->fUseDsd = 1; pPars->fUseDsd = 1;
if ( pPars->fCutMin ) if ( pPars->fCutMin )
...@@ -29829,7 +29843,7 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29829,7 +29843,7 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv )
int c; int c;
Jf_ManSetDefaultPars( pPars ); Jf_ManSetDefaultPars( pPars );
Extra_UtilGetoptReset(); Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "KCRDacvwh" ) ) != EOF ) while ( ( c = Extra_UtilGetopt( argc, argv, "KCRDacmvwh" ) ) != EOF )
{ {
switch ( c ) switch ( c )
{ {
...@@ -29889,6 +29903,9 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29889,6 +29903,9 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv )
case 'c': case 'c':
pPars->fCoarsen ^= 1; pPars->fCoarsen ^= 1;
break; break;
case 'm':
pPars->fCutMin ^= 1;
break;
case 'v': case 'v':
pPars->fVerbose ^= 1; pPars->fVerbose ^= 1;
break; break;
...@@ -29900,6 +29917,19 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29900,6 +29917,19 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv )
goto usage; 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 ); pNew = Jf_ManPerformMapping( pAbc->pGia, pPars );
if ( pNew == NULL ) if ( pNew == NULL )
{ {
...@@ -29922,6 +29952,7 @@ usage: ...@@ -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-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-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-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-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-w : toggles very verbose output [default = %s]\n", pPars->fVeryVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : prints the command usage\n"); Abc_Print( -2, "\t-h : prints the command usage\n");
...@@ -213,6 +213,16 @@ extern word Extra_Truth6MinimumHeuristic( word t ); ...@@ -213,6 +213,16 @@ extern word Extra_Truth6MinimumHeuristic( word t );
/* fast computation of N-canoninical form up to 6 inputs */ /* fast computation of N-canoninical form up to 6 inputs */
extern int Extra_TruthCanonFastN( int nVarsMax, int nVarsReal, unsigned * pt, unsigned ** pptRes, char ** ppfRes ); 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 ================================================================*/ /*=== extraUtilProgress.c ================================================================*/
typedef struct ProgressBarStruct ProgressBar; typedef struct ProgressBarStruct ProgressBar;
......
...@@ -8,6 +8,7 @@ SRC += src/misc/extra/extraBddAuto.c \ ...@@ -8,6 +8,7 @@ SRC += src/misc/extra/extraBddAuto.c \
src/misc/extra/extraBddUnate.c \ src/misc/extra/extraBddUnate.c \
src/misc/extra/extraUtilBitMatrix.c \ src/misc/extra/extraUtilBitMatrix.c \
src/misc/extra/extraUtilCanon.c \ src/misc/extra/extraUtilCanon.c \
src/misc/extra/extraUtilDsd.c \
src/misc/extra/extraUtilFile.c \ src/misc/extra/extraUtilFile.c \
src/misc/extra/extraUtilMemory.c \ src/misc/extra/extraUtilMemory.c \
src/misc/extra/extraUtilMisc.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