mirror of https://github.com/YosysHQ/abc.git
Delay optimization using precomputed library.
This commit is contained in:
parent
fce98abf43
commit
6c19c1dfed
|
|
@ -772,13 +772,14 @@ extern ABC_DLL void Abc_NtkShow6VarFunc( char * pF0, char * pF1 );
|
||||||
extern ABC_DLL int Abc_NtkMiterProve( Abc_Ntk_t ** ppNtk, void * pParams );
|
extern ABC_DLL int Abc_NtkMiterProve( Abc_Ntk_t ** ppNtk, void * pParams );
|
||||||
extern ABC_DLL int Abc_NtkIvyProve( Abc_Ntk_t ** ppNtk, void * pPars );
|
extern ABC_DLL int Abc_NtkIvyProve( Abc_Ntk_t ** ppNtk, void * pPars );
|
||||||
/*=== abcRec.c ==========================================================*/
|
/*=== abcRec.c ==========================================================*/
|
||||||
extern ABC_DLL void Abc_NtkRecStart( Abc_Ntk_t * pNtk, int nVars, int nCuts );
|
extern ABC_DLL void Abc_NtkRecStart( Abc_Ntk_t * pNtk, int nVars, int nCuts, int fTrim );
|
||||||
extern ABC_DLL void Abc_NtkRecStop();
|
extern ABC_DLL void Abc_NtkRecStop();
|
||||||
extern ABC_DLL void Abc_NtkRecAdd( Abc_Ntk_t * pNtk );
|
extern ABC_DLL void Abc_NtkRecAdd( Abc_Ntk_t * pNtk );
|
||||||
extern ABC_DLL void Abc_NtkRecPs();
|
extern ABC_DLL void Abc_NtkRecPs();
|
||||||
extern ABC_DLL void Abc_NtkRecFilter( int iVar, int iPlus );
|
extern ABC_DLL void Abc_NtkRecFilter(int nLimit);
|
||||||
extern ABC_DLL Abc_Ntk_t * Abc_NtkRecUse();
|
extern ABC_DLL Abc_Ntk_t * Abc_NtkRecUse();
|
||||||
extern ABC_DLL int Abc_NtkRecIsRunning();
|
extern ABC_DLL int Abc_NtkRecIsRunning();
|
||||||
|
extern ABC_DLL int Abc_NtkRecIsInTrimMode();
|
||||||
extern ABC_DLL int Abc_NtkRecVarNum();
|
extern ABC_DLL int Abc_NtkRecVarNum();
|
||||||
extern ABC_DLL Vec_Int_t * Abc_NtkRecMemory();
|
extern ABC_DLL Vec_Int_t * Abc_NtkRecMemory();
|
||||||
extern ABC_DLL int Abc_NtkRecStrashNode( Abc_Ntk_t * pNtkNew, Abc_Obj_t * pObj, unsigned * pTruth, int nVars );
|
extern ABC_DLL int Abc_NtkRecStrashNode( Abc_Ntk_t * pNtkNew, Abc_Obj_t * pObj, unsigned * pTruth, int nVars );
|
||||||
|
|
|
||||||
|
|
@ -211,6 +211,7 @@ static int Abc_CommandRecStop ( Abc_Frame_t * pAbc, int argc, cha
|
||||||
static int Abc_CommandRecAdd ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
static int Abc_CommandRecAdd ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
||||||
static int Abc_CommandRecPs ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
static int Abc_CommandRecPs ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
||||||
static int Abc_CommandRecUse ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
static int Abc_CommandRecUse ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
||||||
|
static int Abc_CommandRecFilter ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
||||||
|
|
||||||
static int Abc_CommandMap ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
static int Abc_CommandMap ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
||||||
static int Abc_CommandAmap ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
static int Abc_CommandAmap ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
||||||
|
|
@ -668,6 +669,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
|
||||||
Cmd_CommandAdd( pAbc, "Choicing", "rec_add", Abc_CommandRecAdd, 0 );
|
Cmd_CommandAdd( pAbc, "Choicing", "rec_add", Abc_CommandRecAdd, 0 );
|
||||||
Cmd_CommandAdd( pAbc, "Choicing", "rec_ps", Abc_CommandRecPs, 0 );
|
Cmd_CommandAdd( pAbc, "Choicing", "rec_ps", Abc_CommandRecPs, 0 );
|
||||||
Cmd_CommandAdd( pAbc, "Choicing", "rec_use", Abc_CommandRecUse, 1 );
|
Cmd_CommandAdd( pAbc, "Choicing", "rec_use", Abc_CommandRecUse, 1 );
|
||||||
|
Cmd_CommandAdd( pAbc, "Choicing", "rec_filter", Abc_CommandRecFilter, 1 );
|
||||||
|
|
||||||
Cmd_CommandAdd( pAbc, "SC mapping", "map", Abc_CommandMap, 1 );
|
Cmd_CommandAdd( pAbc, "SC mapping", "map", Abc_CommandMap, 1 );
|
||||||
Cmd_CommandAdd( pAbc, "SC mapping", "amap", Abc_CommandAmap, 1 );
|
Cmd_CommandAdd( pAbc, "SC mapping", "amap", Abc_CommandAmap, 1 );
|
||||||
|
|
@ -11935,13 +11937,15 @@ int Abc_CommandRecStart( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||||
int c;
|
int c;
|
||||||
int nVars;
|
int nVars;
|
||||||
int nCuts;
|
int nCuts;
|
||||||
|
int fTrim;
|
||||||
|
|
||||||
pNtk = Abc_FrameReadNtk(pAbc);
|
pNtk = Abc_FrameReadNtk(pAbc);
|
||||||
// set defaults
|
// set defaults
|
||||||
nVars = 6;
|
nVars = 6;
|
||||||
nCuts = 8;
|
nCuts = 8;
|
||||||
|
fTrim = 0;
|
||||||
Extra_UtilGetoptReset();
|
Extra_UtilGetoptReset();
|
||||||
while ( ( c = Extra_UtilGetopt( argc, argv, "KCh" ) ) != EOF )
|
while ( ( c = Extra_UtilGetopt( argc, argv, "KCth" ) ) != EOF )
|
||||||
{
|
{
|
||||||
switch ( c )
|
switch ( c )
|
||||||
{
|
{
|
||||||
|
|
@ -11967,6 +11971,9 @@ int Abc_CommandRecStart( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||||
if ( nCuts < 1 )
|
if ( nCuts < 1 )
|
||||||
goto usage;
|
goto usage;
|
||||||
break;
|
break;
|
||||||
|
case 't':
|
||||||
|
fTrim ^= 1;
|
||||||
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
goto usage;
|
goto usage;
|
||||||
default:
|
default:
|
||||||
|
|
@ -11988,15 +11995,16 @@ int Abc_CommandRecStart( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||||
Abc_Print( -1, "This command works only for AIGs; run strashing (\"st\").\n" );
|
Abc_Print( -1, "This command works only for AIGs; run strashing (\"st\").\n" );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Abc_NtkRecStart( pNtk, nVars, nCuts );
|
Abc_NtkRecStart( pNtk, nVars, nCuts, fTrim );
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
usage:
|
usage:
|
||||||
Abc_Print( -2, "usage: rec_start [-K num] [-C num] [-h]\n" );
|
Abc_Print( -2, "usage: rec_start [-K num] [-C num] [-th]\n" );
|
||||||
Abc_Print( -2, "\t starts recording AIG subgraphs (should be called for\n" );
|
Abc_Print( -2, "\t starts recording AIG subgraphs (should be called for\n" );
|
||||||
Abc_Print( -2, "\t an empty network or after reading in a previous record)\n" );
|
Abc_Print( -2, "\t an empty network or after reading in a previous record)\n" );
|
||||||
Abc_Print( -2, "\t-K num : the largest number of inputs [default = %d]\n", nVars );
|
Abc_Print( -2, "\t-K num : the largest number of inputs [default = %d]\n", nVars );
|
||||||
Abc_Print( -2, "\t-C num : the max number of cuts used at a node (0 < num < 2^12) [default = %d]\n", nCuts );
|
Abc_Print( -2, "\t-C num : the max number of cuts used at a node (0 < num < 2^12) [default = %d]\n", nCuts );
|
||||||
|
Abc_Print( -2, "\t-t : toggles the use of trimming [default = %s]\n", fTrim? "yes": "no" );
|
||||||
Abc_Print( -2, "\t-h : print the command usage\n");
|
Abc_Print( -2, "\t-h : print the command usage\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
@ -12184,6 +12192,64 @@ usage:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**Function*************************************************************
|
||||||
|
|
||||||
|
Synopsis []
|
||||||
|
|
||||||
|
Description []
|
||||||
|
|
||||||
|
SideEffects []
|
||||||
|
|
||||||
|
SeeAlso []
|
||||||
|
|
||||||
|
***********************************************************************/
|
||||||
|
int Abc_CommandRecFilter( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||||
|
{
|
||||||
|
Abc_Ntk_t * pNtk = Abc_FrameReadNtk(pAbc);
|
||||||
|
int c, nLimit = 0;
|
||||||
|
// set defaults
|
||||||
|
Extra_UtilGetoptReset();
|
||||||
|
while ( ( c = Extra_UtilGetopt( argc, argv, "Fh" ) ) != EOF )
|
||||||
|
{
|
||||||
|
switch ( c )
|
||||||
|
{
|
||||||
|
case 'F':
|
||||||
|
if ( globalUtilOptind >= argc )
|
||||||
|
{
|
||||||
|
Abc_Print( -1, "Command line switch \"-F\" should be followed by an integer.\n" );
|
||||||
|
goto usage;
|
||||||
|
}
|
||||||
|
nLimit = atoi(argv[globalUtilOptind]);
|
||||||
|
globalUtilOptind++;
|
||||||
|
if ( nLimit < 0 )
|
||||||
|
goto usage;
|
||||||
|
break;
|
||||||
|
case 'h':
|
||||||
|
goto usage;
|
||||||
|
default:
|
||||||
|
goto usage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( !Abc_NtkRecIsRunning() )
|
||||||
|
{
|
||||||
|
Abc_Print( -1, "This command works for AIGs only after calling \"rec_start\".\n" );
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (!Abc_NtkRecIsInTrimMode())
|
||||||
|
Abc_Print( 0, "This command works fine only in trim mode. Please call \"rec_start -t\" first.\n" );
|
||||||
|
|
||||||
|
Abc_NtkRecFilter(nLimit);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
usage:
|
||||||
|
Abc_Print( -2, "usage: rec_filter [-h]\n" );
|
||||||
|
Abc_Print( -2, "\t filter the library of the recorder\n" );
|
||||||
|
Abc_Print( -2, "\t-F num : the limit number of function class [default = %d]\n", nLimit );
|
||||||
|
Abc_Print( -2, "\t-h : print the command usage\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**Function*************************************************************
|
/**Function*************************************************************
|
||||||
|
|
||||||
Synopsis []
|
Synopsis []
|
||||||
|
|
@ -13090,7 +13156,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||||
|
|
||||||
fLutMux = 0;
|
fLutMux = 0;
|
||||||
Extra_UtilGetoptReset();
|
Extra_UtilGetoptReset();
|
||||||
while ( ( c = Extra_UtilGetopt( argc, argv, "KCFADEWSqaflepmrsdbugojikcvh" ) ) != EOF )
|
while ( ( c = Extra_UtilGetopt( argc, argv, "KCFADEWSqaflepmrsdbugyojikcvh" ) ) != EOF )
|
||||||
{
|
{
|
||||||
switch ( c )
|
switch ( c )
|
||||||
{
|
{
|
||||||
|
|
@ -13226,6 +13292,9 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||||
case 'g':
|
case 'g':
|
||||||
pPars->fDelayOpt ^= 1;
|
pPars->fDelayOpt ^= 1;
|
||||||
break;
|
break;
|
||||||
|
case 'y':
|
||||||
|
pPars->fUserRecLib ^= 1;
|
||||||
|
break;
|
||||||
case 'o':
|
case 'o':
|
||||||
pPars->fUseBuffs ^= 1;
|
pPars->fUseBuffs ^= 1;
|
||||||
break;
|
break;
|
||||||
|
|
@ -13375,7 +13444,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||||
}
|
}
|
||||||
|
|
||||||
// modify for global delay optimization
|
// modify for global delay optimization
|
||||||
if ( pPars->fDelayOpt )
|
if ( pPars->fDelayOpt || pPars->fUserRecLib )
|
||||||
{
|
{
|
||||||
pPars->fTruth = 1;
|
pPars->fTruth = 1;
|
||||||
pPars->fExpRed = 0;
|
pPars->fExpRed = 0;
|
||||||
|
|
@ -13459,7 +13528,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 [-KCFA num] [-DEW float] [-S str] [-qarlepmsdbugojikcvh]\n" );
|
Abc_Print( -2, "usage: if [-KCFA num] [-DEW float] [-S str] [-qarlepmsdbugyojikcvh]\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 );
|
||||||
|
|
@ -13482,6 +13551,7 @@ usage:
|
||||||
Abc_Print( -2, "\t-b : toggles the use of one special feature [default = %s]\n", pPars->fUseBat? "yes": "no" );
|
Abc_Print( -2, "\t-b : toggles the use of one special feature [default = %s]\n", pPars->fUseBat? "yes": "no" );
|
||||||
Abc_Print( -2, "\t-u : toggles the use of MUXes along with LUTs [default = %s]\n", fLutMux? "yes": "no" );
|
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-g : toggles global delay optimization [default = %s]\n", pPars->fDelayOpt? "yes": "no" );
|
||||||
|
Abc_Print( -2, "\t-y : toggles delay optimization with recorded library [default = %s]\n", pPars->fUserRecLib? "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-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->fEnableCheck07? "yes": "no" );
|
Abc_Print( -2, "\t-j : toggles enabling additional check [default = %s]\n", pPars->fEnableCheck07? "yes": "no" );
|
||||||
Abc_Print( -2, "\t-i : toggles enabling additional check [default = %s]\n", pPars->fEnableCheck08? "yes": "no" );
|
Abc_Print( -2, "\t-i : toggles enabling additional check [default = %s]\n", pPars->fEnableCheck08? "yes": "no" );
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ void Abc_NtkIfComputeSwitching( Abc_Ntk_t * pNtk, If_Man_t * pIfMan )
|
||||||
if ( (pObjAig = (Aig_Obj_t *)pObjAbc->pTemp) )
|
if ( (pObjAig = (Aig_Obj_t *)pObjAbc->pTemp) )
|
||||||
{
|
{
|
||||||
pObjAbc->dTemp = pSwitching[pObjAig->Id];
|
pObjAbc->dTemp = pSwitching[pObjAig->Id];
|
||||||
// J. Anderson and F. N. Najm, “Power-Aware Technology Mapping for LUT-Based FPGAs,”
|
// J. Anderson and F. N. Najm, “Power-Aware Technology Mapping for LUT-Based FPGAs,
|
||||||
// IEEE Intl. Conf. on Field-Programmable Technology, 2002.
|
// IEEE Intl. Conf. on Field-Programmable Technology, 2002.
|
||||||
// pObjAbc->dTemp = (1.55 + 1.05 / (float) Abc_ObjFanoutNum(pObjAbc)) * pSwitching[pObjAig->Id];
|
// pObjAbc->dTemp = (1.55 + 1.05 / (float) Abc_ObjFanoutNum(pObjAbc)) * pSwitching[pObjAig->Id];
|
||||||
}
|
}
|
||||||
|
|
@ -436,7 +436,7 @@ Abc_Obj_t * Abc_NodeFromIf_rec( Abc_Ntk_t * pNtkNew, If_Man_t * pIfMan, If_Obj_t
|
||||||
pCutBest = If_ObjCutBest( pIfObj );
|
pCutBest = If_ObjCutBest( pIfObj );
|
||||||
// printf( "%d 0x%02X %d\n", pCutBest->nLeaves, 0xff & *If_CutTruth(pCutBest), pIfMan->pPars->pFuncCost(pCutBest) );
|
// printf( "%d 0x%02X %d\n", pCutBest->nLeaves, 0xff & *If_CutTruth(pCutBest), pIfMan->pPars->pFuncCost(pCutBest) );
|
||||||
// if ( pIfMan->pPars->pLutLib && pIfMan->pPars->pLutLib->fVarPinDelays )
|
// if ( pIfMan->pPars->pLutLib && pIfMan->pPars->pLutLib->fVarPinDelays )
|
||||||
if ( !pIfMan->pPars->fDelayOpt && !pIfMan->pPars->pLutStruct )
|
if ( !pIfMan->pPars->fDelayOpt && !pIfMan->pPars->pLutStruct && !pIfMan->pPars->fUserRecLib )
|
||||||
If_CutRotatePins( pIfMan, pCutBest );
|
If_CutRotatePins( pIfMan, pCutBest );
|
||||||
if ( pIfMan->pPars->fUseCnfs || pIfMan->pPars->fUseMv )
|
if ( pIfMan->pPars->fUseCnfs || pIfMan->pPars->fUseMv )
|
||||||
{
|
{
|
||||||
|
|
@ -488,6 +488,11 @@ Abc_Obj_t * Abc_NodeFromIf_rec( Abc_Ntk_t * pNtkNew, If_Man_t * pIfMan, If_Obj_t
|
||||||
extern Hop_Obj_t * Abc_NodeTruthToHop( Hop_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut );
|
extern Hop_Obj_t * Abc_NodeTruthToHop( Hop_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut );
|
||||||
pNodeNew->pData = Abc_NodeTruthToHop( (Hop_Man_t *)pNtkNew->pManFunc, pIfMan, pCutBest );
|
pNodeNew->pData = Abc_NodeTruthToHop( (Hop_Man_t *)pNtkNew->pManFunc, pIfMan, pCutBest );
|
||||||
}
|
}
|
||||||
|
else if ( pIfMan->pPars->fUserRecLib )
|
||||||
|
{
|
||||||
|
extern Hop_Obj_t * Abc_RecToHop( Hop_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut );
|
||||||
|
pNodeNew->pData = Abc_RecToHop( (Hop_Man_t *)pNtkNew->pManFunc, pIfMan, pCutBest );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
extern Hop_Obj_t * Kit_TruthToHop( Hop_Man_t * pMan, unsigned * pTruth, int nVars, Vec_Int_t * vMemory );
|
extern Hop_Obj_t * Kit_TruthToHop( Hop_Man_t * pMan, unsigned * pTruth, int nVars, Vec_Int_t * vMemory );
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -105,6 +105,7 @@ struct If_Par_t_
|
||||||
float WireDelay; // wire delay
|
float WireDelay; // wire delay
|
||||||
// internal parameters
|
// internal parameters
|
||||||
int fDelayOpt; // special delay optimization
|
int fDelayOpt; // special delay optimization
|
||||||
|
int fUserRecLib; // use recorded library
|
||||||
int fAreaOnly; // area only mode
|
int fAreaOnly; // area only mode
|
||||||
int fTruth; // truth table computation enabled
|
int fTruth; // truth table computation enabled
|
||||||
int fUsePerm; // use permutation (delay info)
|
int fUsePerm; // use permutation (delay info)
|
||||||
|
|
@ -497,6 +498,9 @@ extern Vec_Int_t * If_ManCollectMappingInt( If_Man_t * p );
|
||||||
|
|
||||||
extern int If_ManCountSpecialPos( If_Man_t * p );
|
extern int If_ManCountSpecialPos( If_Man_t * p );
|
||||||
|
|
||||||
|
/*=== abcRec.c ============================================================*/
|
||||||
|
extern int If_CutDelayRecCost(If_Man_t* p, If_Cut_t* pCut);
|
||||||
|
|
||||||
// othe packages
|
// othe packages
|
||||||
extern int Bat_ManCellFuncLookup( unsigned * pTruth, int nVars, int nLeaves );
|
extern int Bat_ManCellFuncLookup( unsigned * pTruth, int nVars, int nLeaves );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@
|
||||||
|
|
||||||
#include "if.h"
|
#include "if.h"
|
||||||
|
|
||||||
ABC_NAMESPACE_IMPL_START
|
|
||||||
|
|
||||||
|
ABC_NAMESPACE_IMPL_START
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
/// DECLARATIONS ///
|
/// DECLARATIONS ///
|
||||||
|
|
@ -156,8 +156,10 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
|
||||||
/// if ( p->pPars->pLutStruct )
|
/// if ( p->pPars->pLutStruct )
|
||||||
/// pCut->Delay = If_CutDelayLutStruct( p, pCut, p->pPars->pLutStruct, p->pPars->WireDelay );
|
/// pCut->Delay = If_CutDelayLutStruct( p, pCut, p->pPars->pLutStruct, p->pPars->WireDelay );
|
||||||
// else if ( p->pPars->fDelayOpt )
|
// else if ( p->pPars->fDelayOpt )
|
||||||
if ( p->pPars->fDelayOpt )
|
if ( p->pPars->fUserRecLib )
|
||||||
pCut->Delay = If_CutDelaySopCost( p, pCut );
|
pCut->Delay = If_CutDelayRecCost(p, pCut);
|
||||||
|
else if(p->pPars->fDelayOpt)
|
||||||
|
pCut->Delay = If_CutDelaySopCost(p,pCut);
|
||||||
else
|
else
|
||||||
pCut->Delay = If_CutDelay( p, pObj, pCut );
|
pCut->Delay = If_CutDelay( p, pObj, pCut );
|
||||||
// assert( pCut->Delay <= pObj->Required + p->fEpsilon );
|
// assert( pCut->Delay <= pObj->Required + p->fEpsilon );
|
||||||
|
|
@ -224,8 +226,10 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
|
||||||
/// if ( p->pPars->pLutStruct )
|
/// if ( p->pPars->pLutStruct )
|
||||||
/// pCut->Delay = If_CutDelayLutStruct( p, pCut, p->pPars->pLutStruct, p->pPars->WireDelay );
|
/// pCut->Delay = If_CutDelayLutStruct( p, pCut, p->pPars->pLutStruct, p->pPars->WireDelay );
|
||||||
// else if ( p->pPars->fDelayOpt )
|
// else if ( p->pPars->fDelayOpt )
|
||||||
if ( p->pPars->fDelayOpt )
|
if ( p->pPars->fUserRecLib )
|
||||||
pCut->Delay = If_CutDelaySopCost( p, pCut );
|
pCut->Delay = If_CutDelayRecCost(p, pCut);
|
||||||
|
else if (p->pPars->fDelayOpt)
|
||||||
|
pCut->Delay = If_CutDelaySopCost(p, pCut);
|
||||||
else
|
else
|
||||||
pCut->Delay = If_CutDelay( p, pObj, pCut );
|
pCut->Delay = If_CutDelay( p, pObj, pCut );
|
||||||
// Abc_Print( 1, "%.2f ", pCut->Delay );
|
// Abc_Print( 1, "%.2f ", pCut->Delay );
|
||||||
|
|
@ -252,9 +256,12 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
|
||||||
|
|
||||||
// update the best cut
|
// update the best cut
|
||||||
if ( !fPreprocess || pCutSet->ppCuts[0]->Delay <= pObj->Required + p->fEpsilon )
|
if ( !fPreprocess || pCutSet->ppCuts[0]->Delay <= pObj->Required + p->fEpsilon )
|
||||||
|
{
|
||||||
If_CutCopy( p, If_ObjCutBest(pObj), pCutSet->ppCuts[0] );
|
If_CutCopy( p, If_ObjCutBest(pObj), pCutSet->ppCuts[0] );
|
||||||
|
if(p->pPars->fUserRecLib)
|
||||||
|
assert(If_ObjCutBest(pObj)->Cost < IF_COST_MAX && If_ObjCutBest(pObj)->Delay < ABC_INFINITY);
|
||||||
|
}
|
||||||
assert( p->pPars->fSeqMap || If_ObjCutBest(pObj)->nLeaves > 1 );
|
assert( p->pPars->fSeqMap || If_ObjCutBest(pObj)->nLeaves > 1 );
|
||||||
|
|
||||||
// ref the selected cut
|
// ref the selected cut
|
||||||
if ( Mode && pObj->nRefs > 0 )
|
if ( Mode && pObj->nRefs > 0 )
|
||||||
If_CutAreaRef( p, If_ObjCutBest(pObj) );
|
If_CutAreaRef( p, If_ObjCutBest(pObj) );
|
||||||
|
|
@ -266,6 +273,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
|
||||||
If_ObjForEachCut( pObj, pCut, i )
|
If_ObjForEachCut( pObj, pCut, i )
|
||||||
p->pPars->pFuncUser( p, pObj, pCut );
|
p->pPars->pFuncUser( p, pObj, pCut );
|
||||||
|
|
||||||
|
|
||||||
// free the cuts
|
// free the cuts
|
||||||
If_ManDerefNodeCutSet( p, pObj );
|
If_ManDerefNodeCutSet( p, pObj );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue