mirror of https://github.com/YosysHQ/abc.git
Updated technology mapping.
This commit is contained in:
parent
b8b75cf14f
commit
27bb2a684d
|
|
@ -12689,7 +12689,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
|
||||
fLutMux = 0;
|
||||
Extra_UtilGetoptReset();
|
||||
while ( ( c = Extra_UtilGetopt( argc, argv, "KCFADEqaflepmrsdbugovh" ) ) != EOF )
|
||||
while ( ( c = Extra_UtilGetopt( argc, argv, "KCFADEqaflepmrsdbugojvh" ) ) != EOF )
|
||||
{
|
||||
switch ( c )
|
||||
{
|
||||
|
|
@ -12803,6 +12803,9 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
case 'o':
|
||||
pPars->fUseBuffs ^= 1;
|
||||
break;
|
||||
case 'j':
|
||||
pPars->fEnableCheck ^= 1;
|
||||
break;
|
||||
case 'v':
|
||||
pPars->fVerbose ^= 1;
|
||||
break;
|
||||
|
|
@ -12881,7 +12884,19 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
}
|
||||
pPars->fCutMin = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
if ( pPars->fEnableCheck )
|
||||
{
|
||||
extern int If_CutPerformCheck( unsigned * pTruth, int nVars, int nLeaves );
|
||||
if ( pPars->nLutSize < 6 || pPars->nLutSize > 7 )
|
||||
{
|
||||
Abc_Print( -1, "This feature only works for {6,7}-LUTs.\n" );
|
||||
return 1;
|
||||
}
|
||||
pPars->pFuncCell = If_CutPerformCheck;
|
||||
pPars->fCutMin = 1;
|
||||
}
|
||||
*/
|
||||
// enable truth table computation if cut minimization is selected
|
||||
if ( pPars->fCutMin )
|
||||
{
|
||||
|
|
@ -12959,7 +12974,7 @@ usage:
|
|||
sprintf( LutSize, "library" );
|
||||
else
|
||||
sprintf( LutSize, "%d", pPars->nLutSize );
|
||||
Abc_Print( -2, "usage: if [-KCFA num] [-DE float] [-qarlepmsdbugovh]\n" );
|
||||
Abc_Print( -2, "usage: if [-KCFA num] [-DE float] [-qarlepmsdbugojvh]\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 );
|
||||
|
|
@ -12981,6 +12996,7 @@ usage:
|
|||
Abc_Print( -2, "\t-u : toggles the use of MUXes along with LUTs [default = %s]\n", fLutMux? "yes": "no" );
|
||||
Abc_Print( -2, "\t-g : toggles global delay optimization [default = %s]\n", pPars->fDelayOpt? "yes": "no" );
|
||||
Abc_Print( -2, "\t-o : toggles using buffers to decouple combinational outputs [default = %s]\n", pPars->fUseBuffs? "yes": "no" );
|
||||
Abc_Print( -2, "\t-j : toggles enabling additional check [default = %s]\n", pPars->fEnableCheck? "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;
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ struct If_Par_t_
|
|||
int fBidec; // use bi-decomposition
|
||||
int fUseBat; // use one specialized feature
|
||||
int fUseBuffs; // use buffers to decouple outputs
|
||||
int fEnableCheck; // enable additional checking
|
||||
int fVerbose; // the verbosity flag
|
||||
// internal parameters
|
||||
int fDelayOpt; // special delay optimization
|
||||
|
|
@ -444,7 +445,7 @@ extern float If_CutDelay( If_Man_t * p, If_Cut_t * pCut );
|
|||
extern void If_CutPropagateRequired( If_Man_t * p, If_Cut_t * pCut, float Required );
|
||||
extern void If_CutRotatePins( If_Man_t * p, If_Cut_t * pCut );
|
||||
/*=== ifTruth.c ===========================================================*/
|
||||
extern void If_CutComputeTruth( If_Man_t * p, If_Cut_t * pCut, If_Cut_t * pCut0, If_Cut_t * pCut1, int fCompl0, int fCompl1 );
|
||||
extern int If_CutComputeTruth( If_Man_t * p, If_Cut_t * pCut, If_Cut_t * pCut0, If_Cut_t * pCut1, int fCompl0, int fCompl1 );
|
||||
extern void If_CutTruthPermute( unsigned * pOut, unsigned * pIn, int nVars, float * pDelays, int * pVars );
|
||||
/*=== ifUtil.c ============================================================*/
|
||||
extern void If_ManCleanNodeCopy( If_Man_t * p );
|
||||
|
|
|
|||
|
|
@ -685,7 +685,7 @@ void If_CutSort( If_Man_t * p, If_Set_t * pCutSet, If_Cut_t * pCut )
|
|||
return;
|
||||
}
|
||||
|
||||
if ( p->pPars->fUseBat && !pCut->fUseless )
|
||||
if ( (p->pPars->fUseBat || p->pPars->fEnableCheck) && !pCut->fUseless )
|
||||
{
|
||||
If_Cut_t * pFirst = pCutSet->ppCuts[0];
|
||||
if ( pFirst->fUseless || If_ManSortCompare(p, pFirst, pCut) == 1 )
|
||||
|
|
|
|||
|
|
@ -135,14 +135,16 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
|
|||
if ( p->pPars->fTruth )
|
||||
{
|
||||
// int clk = clock();
|
||||
If_CutComputeTruth( p, pCut, pCut0, pCut1, pObj->fCompl0, pObj->fCompl1 );
|
||||
int RetValue = If_CutComputeTruth( p, pCut, pCut0, pCut1, pObj->fCompl0, pObj->fCompl1 );
|
||||
// p->timeTruth += clock() - clk;
|
||||
if ( p->pPars->pFuncCell )
|
||||
pCut->fUseless = 0;
|
||||
if ( p->pPars->pFuncCell && RetValue < 2 )
|
||||
{
|
||||
assert( pCut->nLimit >= 4 && pCut->nLimit <= 6 );
|
||||
assert( pCut->nLimit >= 4 && pCut->nLimit <= 7 );
|
||||
pCut->fUseless = !p->pPars->pFuncCell( If_CutTruth(pCut), pCut->nLimit, pCut->nLeaves );
|
||||
p->nCutsUseless += pCut->fUseless;
|
||||
}
|
||||
|
||||
}
|
||||
// compute the application-specific cost and depth
|
||||
pCut->fUser = (p->pPars->pFuncCost != NULL);
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ static inline unsigned If_CutTruthPhase( If_Cut_t * pCut, If_Cut_t * pCut1 )
|
|||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
void If_CutComputeTruth( If_Man_t * p, If_Cut_t * pCut, If_Cut_t * pCut0, If_Cut_t * pCut1, int fCompl0, int fCompl1 )
|
||||
int If_CutComputeTruth( If_Man_t * p, If_Cut_t * pCut, If_Cut_t * pCut0, If_Cut_t * pCut1, int fCompl0, int fCompl1 )
|
||||
{
|
||||
extern void If_CutFactorTest( unsigned * pTruth, int nVars );
|
||||
|
||||
|
|
@ -380,11 +380,12 @@ void If_CutComputeTruth( If_Man_t * p, If_Cut_t * pCut, If_Cut_t * pCut0, If_Cut
|
|||
|
||||
// minimize the support of the cut
|
||||
if ( p->pPars->fCutMin )
|
||||
If_CutTruthMinimize( p, pCut );
|
||||
return If_CutTruthMinimize( p, pCut );
|
||||
|
||||
// perform
|
||||
// If_CutFactorTest( If_CutTruth(pCut), pCut->nLimit );
|
||||
// printf( "%d ", If_CutLeaveNum(pCut) - If_CutTruthSupportSize(If_CutTruth(pCut), If_CutLeaveNum(pCut)) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -412,7 +413,7 @@ int If_CutTruthMinimize( If_Man_t * p, If_Cut_t * pCut )
|
|||
if ( nSuppSize < 2 )
|
||||
{
|
||||
p->nSmallSupp++;
|
||||
return 0;
|
||||
return 2;
|
||||
}
|
||||
// if ( If_CutLeaveNum(pCut) - nSuppSize > 1 )
|
||||
// return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue