mirror of https://github.com/YosysHQ/abc.git
Changes to LUT mappers.
This commit is contained in:
parent
839632140e
commit
a8a08035f5
|
|
@ -1298,7 +1298,7 @@ Gia_Man_t * Gia_ManFromIfLogic( If_Man_t * pIfMan )
|
|||
If_CutForEachLeaf( pIfMan, pCutBest, pIfLeaf, k )
|
||||
Vec_IntPush( vLeaves, pIfLeaf->iCopy );
|
||||
// perform one of the two types of mapping: with and without structures
|
||||
if ( pIfMan->pPars->fUseDsd )
|
||||
if ( pIfMan->pPars->fUseDsd && pIfMan->pPars->pLutStruct )
|
||||
{
|
||||
if ( pSat == NULL )
|
||||
pSat = (sat_solver *)If_ManSatBuildXY( (int)(pIfMan->pPars->pLutStruct[0] - '0') );
|
||||
|
|
@ -1308,7 +1308,7 @@ Gia_Man_t * Gia_ManFromIfLogic( If_Man_t * pIfMan )
|
|||
pIfObj->iCopy = Gia_ManFromIfLogicCreateLut( pNew, If_CutTruthW(pIfMan, pCutBest), vLeaves, vCover, vMapping, vMapping2 );
|
||||
pIfObj->iCopy = Abc_LitNotCond( pIfObj->iCopy, pCutBest->fCompl );
|
||||
}
|
||||
else if ( pIfMan->pPars->fDeriveLuts && pIfMan->pPars->fTruth )
|
||||
else if ( (pIfMan->pPars->fDeriveLuts && pIfMan->pPars->fTruth) || pIfMan->pPars->fUseDsd )
|
||||
{
|
||||
// perform decomposition of the cut
|
||||
pIfObj->iCopy = Gia_ManFromIfLogicNode( pIfMan, pNew, i, vLeaves, vLeaves2, If_CutTruthW(pIfMan, pCutBest), pIfMan->pPars->pLutStruct, vCover, vMapping, vMapping2, vPacking, (pIfMan->pPars->fEnableCheck75 || pIfMan->pPars->fEnableCheck75u), pIfMan->pPars->fEnableCheck07 );
|
||||
|
|
@ -1528,7 +1528,7 @@ Gia_Man_t * Gia_ManPerformMapping( Gia_Man_t * p, void * pp, int fNormalized )
|
|||
If_Man_t * pIfMan;
|
||||
If_Par_t * pPars = (If_Par_t *)pp;
|
||||
// disable cut minimization when GIA strucure is needed
|
||||
if ( !pPars->fDelayOpt && !pPars->fUserRecLib && ((!pPars->fDeriveLuts && !pPars->fUseDsd) || !pPars->pLutStruct) )
|
||||
if ( !pPars->fDelayOpt && !pPars->fUserRecLib && !pPars->fDeriveLuts && !pPars->fUseDsd )
|
||||
pPars->fCutMin = 0;
|
||||
|
||||
// reconstruct GIA according to the hierarchy manager
|
||||
|
|
|
|||
|
|
@ -15531,14 +15531,25 @@ usage:
|
|||
***********************************************************************/
|
||||
int Abc_CommandDsdPs( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||
{
|
||||
int c, fPrintLib = 0;
|
||||
int c, Number = 0, fVerbose = 0;
|
||||
Extra_UtilGetoptReset();
|
||||
while ( ( c = Extra_UtilGetopt( argc, argv, "ph" ) ) != EOF )
|
||||
while ( ( c = Extra_UtilGetopt( argc, argv, "Nvh" ) ) != EOF )
|
||||
{
|
||||
switch ( c )
|
||||
{
|
||||
case 'p':
|
||||
fPrintLib ^= 1;
|
||||
case 'N':
|
||||
if ( globalUtilOptind >= argc )
|
||||
{
|
||||
Abc_Print( -1, "Command line switch \"-N\" should be followed by a floating point number.\n" );
|
||||
goto usage;
|
||||
}
|
||||
Number = atoi(argv[globalUtilOptind]);
|
||||
globalUtilOptind++;
|
||||
if ( Number < 0 )
|
||||
goto usage;
|
||||
break;
|
||||
case 'v':
|
||||
fVerbose ^= 1;
|
||||
break;
|
||||
case 'h':
|
||||
goto usage;
|
||||
|
|
@ -15551,12 +15562,13 @@ int Abc_CommandDsdPs( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
Abc_Print( 1, "The DSD manager is not started.\n" );
|
||||
return 0;
|
||||
}
|
||||
If_DsdManPrint( (If_DsdMan_t *)Abc_FrameReadManDsd(), NULL, 0 );
|
||||
If_DsdManPrint( (If_DsdMan_t *)Abc_FrameReadManDsd(), NULL, Number, fVerbose );
|
||||
return 0;
|
||||
|
||||
usage:
|
||||
Abc_Print( -2, "usage: dsd_ps [-h]\n" );
|
||||
Abc_Print( -2, "usage: dsd_ps [-N num] [-vh]\n" );
|
||||
Abc_Print( -2, "\t prints statistics of DSD manager\n" );
|
||||
Abc_Print( -2, "\t-v : toggles verbose output [default = %s]\n", fVerbose? "yes": "no" );
|
||||
Abc_Print( -2, "\t-h : print the command usage\n");
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -519,7 +519,7 @@ extern int If_CluCheckExt3( void * p, word * pTruth, int nVars, int
|
|||
/*=== ifDsd.c =============================================================*/
|
||||
extern If_DsdMan_t * If_DsdManAlloc( int nVars, int nLutSize );
|
||||
extern void If_DsdManDump( If_DsdMan_t * p );
|
||||
extern void If_DsdManPrint( If_DsdMan_t * p, char * pFileName, int fVerbose );
|
||||
extern void If_DsdManPrint( If_DsdMan_t * p, char * pFileName, int Number, int fVerbose );
|
||||
extern void If_DsdManTune( If_DsdMan_t * p, int LutSize, int fFast, int fSpec, int fVerbose );
|
||||
extern void If_DsdManFree( If_DsdMan_t * p, int fVerbose );
|
||||
extern void If_DsdManSave( If_DsdMan_t * p, char * pFileName );
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ void If_DsdManFree( If_DsdMan_t * p, int fVerbose )
|
|||
int v;
|
||||
// If_DsdManDump( p );
|
||||
if ( fVerbose )
|
||||
If_DsdManPrint( p, NULL, 0 );
|
||||
If_DsdManPrint( p, NULL, 0, 0 );
|
||||
if ( fVerbose )
|
||||
Vec_MemDumpTruthTables( p->vTtMem, "dumpdsd", p->nVars );
|
||||
for ( v = 2; v < p->nVars; v++ )
|
||||
|
|
@ -396,7 +396,7 @@ void If_DsdManPrintDistrib( If_DsdMan_t * p )
|
|||
printf( "(%6.2f %%)", 100.0 * CountNonTotal / Vec_PtrSize(p->vObjs) );
|
||||
printf( "\n" );
|
||||
}
|
||||
void If_DsdManPrint( If_DsdMan_t * p, char * pFileName, int fVerbose )
|
||||
void If_DsdManPrint( If_DsdMan_t * p, char * pFileName, int Number, int fVerbose )
|
||||
{
|
||||
If_DsdObj_t * pObj;
|
||||
int i, DsdMax = 0, CountUsed = 0, CountNonDsdStr = 0, CountMarked = 0;
|
||||
|
|
@ -441,8 +441,8 @@ void If_DsdManPrint( If_DsdMan_t * p, char * pFileName, int fVerbose )
|
|||
return;
|
||||
If_DsdVecForEachObj( p->vObjs, pObj, i )
|
||||
{
|
||||
// if ( i == 50 )
|
||||
// break;
|
||||
if ( Number && i % Number )
|
||||
continue;
|
||||
If_DsdManPrintOne( pFile, p, pObj->Id, NULL, 1 );
|
||||
}
|
||||
fprintf( pFile, "\n" );
|
||||
|
|
|
|||
Loading…
Reference in New Issue