Commit 4e00ec61 by Alan Mishchenko

Structural mapper into structures.

parent e70adbcd
......@@ -3715,6 +3715,10 @@ SOURCE=.\src\aig\gia\giaIf.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaIff.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaIso.c
# End Source File
# Begin Source File
......
......@@ -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 )
{
extern void Gia_ManIffTest( Gia_Man_t * pGia, If_LibLut_t * pLib, int fVerbose );
Gia_Man_t * pNew;
If_Man_t * pIfMan;
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 )
Gia_ManStop( p );
// printf( "PERFORMING VERIFICATION:\n" );
// Gia_ManVerifyWithBoxes( pNew, NULL );
if ( pPars->fRepack )
Gia_ManIffTest( pNew, pPars->pLutLib, pPars->fVerbose );
return pNew;
}
......
......@@ -27,6 +27,7 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaGlitch.c \
src/aig/gia/giaHash.c \
src/aig/gia/giaIf.c \
src/aig/gia/giaIff.c \
src/aig/gia/giaIso.c \
src/aig/gia/giaIso2.c \
src/aig/gia/giaJf.c \
......
......@@ -29741,7 +29741,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
}
pPars->pLutLib = (If_LibLut_t *)pAbc->pLibLut;
Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "KCFAGRDEWSqalepmrsdbgyojikfuzvh" ) ) != EOF )
while ( ( c = Extra_UtilGetopt( argc, argv, "KCFAGRDEWSqalepmrsdbgyojikfuztvh" ) ) != EOF )
{
switch ( c )
{
......@@ -29917,6 +29917,9 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
case 'z':
pPars->fDeriveLuts ^= 1;
break;
case 't':
pPars->fRepack ^= 1;
break;
case 'v':
pPars->fVerbose ^= 1;
break;
......@@ -30111,7 +30114,7 @@ usage:
sprintf(LutSize, "library" );
else
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-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 );
......@@ -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-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-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-h : prints the command usage\n");
return 1;
......@@ -123,6 +123,7 @@ struct If_Par_t_
int fEnableCheck75u;// enable additional checking
int fUseDsd; // compute DSD of the cut functions
int fDeriveLuts; // enables deriving LUT structures
int fRepack; // repack after mapping
int fVerbose; // the verbosity flag
char * pLutStruct; // LUT structure
float WireDelay; // wire delay
......
......@@ -106,6 +106,14 @@ static inline Vec_Flt_t * Vec_FltStart( int nSize )
memset( p->pArray, 0, sizeof(float) * nSize );
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*************************************************************
......
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