Commit 4e00ec61 by Alan Mishchenko

Structural mapper into structures.

parent e70adbcd
...@@ -3715,6 +3715,10 @@ SOURCE=.\src\aig\gia\giaIf.c ...@@ -3715,6 +3715,10 @@ SOURCE=.\src\aig\gia\giaIf.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\aig\gia\giaIff.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaIso.c SOURCE=.\src\aig\gia\giaIso.c
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -1461,6 +1461,7 @@ void Gia_ManTransferPacking( Gia_Man_t * pGia, Gia_Man_t * p ) ...@@ -1461,6 +1461,7 @@ void Gia_ManTransferPacking( Gia_Man_t * pGia, Gia_Man_t * p )
***********************************************************************/ ***********************************************************************/
Gia_Man_t * Gia_ManPerformMapping( Gia_Man_t * p, void * pp, int fNormalized ) Gia_Man_t * Gia_ManPerformMapping( Gia_Man_t * p, void * pp, int fNormalized )
{ {
extern void Gia_ManIffTest( Gia_Man_t * pGia, If_LibLut_t * pLib, int fVerbose );
Gia_Man_t * pNew; Gia_Man_t * pNew;
If_Man_t * pIfMan; If_Man_t * pIfMan;
If_Par_t * pPars = (If_Par_t *)pp; If_Par_t * pPars = (If_Par_t *)pp;
...@@ -1529,6 +1530,8 @@ Gia_Man_t * Gia_ManPerformMapping( Gia_Man_t * p, void * pp, int fNormalized ) ...@@ -1529,6 +1530,8 @@ Gia_Man_t * Gia_ManPerformMapping( Gia_Man_t * p, void * pp, int fNormalized )
Gia_ManStop( p ); Gia_ManStop( p );
// printf( "PERFORMING VERIFICATION:\n" ); // printf( "PERFORMING VERIFICATION:\n" );
// Gia_ManVerifyWithBoxes( pNew, NULL ); // Gia_ManVerifyWithBoxes( pNew, NULL );
if ( pPars->fRepack )
Gia_ManIffTest( pNew, pPars->pLutLib, pPars->fVerbose );
return pNew; return pNew;
} }
......
...@@ -27,6 +27,7 @@ SRC += src/aig/gia/giaAig.c \ ...@@ -27,6 +27,7 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaGlitch.c \ src/aig/gia/giaGlitch.c \
src/aig/gia/giaHash.c \ src/aig/gia/giaHash.c \
src/aig/gia/giaIf.c \ src/aig/gia/giaIf.c \
src/aig/gia/giaIff.c \
src/aig/gia/giaIso.c \ src/aig/gia/giaIso.c \
src/aig/gia/giaIso2.c \ src/aig/gia/giaIso2.c \
src/aig/gia/giaJf.c \ src/aig/gia/giaJf.c \
......
...@@ -29741,7 +29741,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29741,7 +29741,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
pPars->pLutLib = (If_LibLut_t *)pAbc->pLibLut; pPars->pLutLib = (If_LibLut_t *)pAbc->pLibLut;
Extra_UtilGetoptReset(); Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "KCFAGRDEWSqalepmrsdbgyojikfuzvh" ) ) != EOF ) while ( ( c = Extra_UtilGetopt( argc, argv, "KCFAGRDEWSqalepmrsdbgyojikfuztvh" ) ) != EOF )
{ {
switch ( c ) switch ( c )
{ {
...@@ -29917,6 +29917,9 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29917,6 +29917,9 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
case 'z': case 'z':
pPars->fDeriveLuts ^= 1; pPars->fDeriveLuts ^= 1;
break; break;
case 't':
pPars->fRepack ^= 1;
break;
case 'v': case 'v':
pPars->fVerbose ^= 1; pPars->fVerbose ^= 1;
break; break;
...@@ -30111,7 +30114,7 @@ usage: ...@@ -30111,7 +30114,7 @@ usage:
sprintf(LutSize, "library" ); sprintf(LutSize, "library" );
else else
sprintf(LutSize, "%d", pPars->nLutSize ); sprintf(LutSize, "%d", pPars->nLutSize );
Abc_Print( -2, "usage: &if [-KCFAGR num] [-DEW float] [-S str] [-qarlepmsdbgyojikfuczvh]\n" ); Abc_Print( -2, "usage: &if [-KCFAGR num] [-DEW float] [-S str] [-qarlepmsdbgyojikfucztvh]\n" );
Abc_Print( -2, "\t performs FPGA technology mapping of the network\n" ); Abc_Print( -2, "\t performs FPGA technology mapping of the network\n" );
Abc_Print( -2, "\t-K num : the number of LUT inputs (2 < num < %d) [default = %s]\n", IF_MAX_LUTSIZE+1, LutSize ); Abc_Print( -2, "\t-K num : the number of LUT inputs (2 < num < %d) [default = %s]\n", IF_MAX_LUTSIZE+1, LutSize );
Abc_Print( -2, "\t-C num : the max number of priority cuts (0 < num < 2^12) [default = %d]\n", pPars->nCutsMax ); Abc_Print( -2, "\t-C num : the max number of priority cuts (0 < num < 2^12) [default = %d]\n", pPars->nCutsMax );
...@@ -30142,6 +30145,7 @@ usage: ...@@ -30142,6 +30145,7 @@ usage:
Abc_Print( -2, "\t-f : toggles enabling additional check [default = %s]\n", pPars->fEnableCheck75? "yes": "no" ); Abc_Print( -2, "\t-f : toggles enabling additional check [default = %s]\n", pPars->fEnableCheck75? "yes": "no" );
Abc_Print( -2, "\t-u : toggles enabling additional check [default = %s]\n", pPars->fEnableCheck75u? "yes": "no" ); Abc_Print( -2, "\t-u : toggles enabling additional check [default = %s]\n", pPars->fEnableCheck75u? "yes": "no" );
Abc_Print( -2, "\t-z : toggles deriving LUTs when mapping into LUT structures [default = %s]\n", pPars->fDeriveLuts? "yes": "no" ); Abc_Print( -2, "\t-z : toggles deriving LUTs when mapping into LUT structures [default = %s]\n", pPars->fDeriveLuts? "yes": "no" );
Abc_Print( -2, "\t-t : toggles repacking LUTs into new structures [default = %s]\n", pPars->fRepack? "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-h : prints the command usage\n"); Abc_Print( -2, "\t-h : prints the command usage\n");
return 1; return 1;
...@@ -123,6 +123,7 @@ struct If_Par_t_ ...@@ -123,6 +123,7 @@ struct If_Par_t_
int fEnableCheck75u;// enable additional checking int fEnableCheck75u;// enable additional checking
int fUseDsd; // compute DSD of the cut functions int fUseDsd; // compute DSD of the cut functions
int fDeriveLuts; // enables deriving LUT structures int fDeriveLuts; // enables deriving LUT structures
int fRepack; // repack after mapping
int fVerbose; // the verbosity flag int fVerbose; // the verbosity flag
char * pLutStruct; // LUT structure char * pLutStruct; // LUT structure
float WireDelay; // wire delay float WireDelay; // wire delay
......
...@@ -106,6 +106,14 @@ static inline Vec_Flt_t * Vec_FltStart( int nSize ) ...@@ -106,6 +106,14 @@ static inline Vec_Flt_t * Vec_FltStart( int nSize )
memset( p->pArray, 0, sizeof(float) * nSize ); memset( p->pArray, 0, sizeof(float) * nSize );
return p; return p;
} }
static inline Vec_Flt_t * Vec_FltStartFull( int nSize )
{
Vec_Flt_t * p;
p = Vec_FltAlloc( nSize );
p->nSize = nSize;
memset( p->pArray, 0xFF, sizeof(float) * nSize );
return p;
}
/**Function************************************************************* /**Function*************************************************************
......
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