Commit 14606c47 by Alan Mishchenko

Improvements to the new technology mapper.

parent 0a346a36
......@@ -244,6 +244,7 @@ struct Jf_Par_t_
int fAreaOnly;
int fCoarsen;
int fCutMin;
int fUseTts;
int fVerbose;
int fVeryVerbose;
int nLutSizeMax;
......
......@@ -29847,7 +29847,7 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv )
int c;
Jf_ManSetDefaultPars( pPars );
Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "KCRDacmvwh" ) ) != EOF )
while ( ( c = Extra_UtilGetopt( argc, argv, "KCRDacmtvwh" ) ) != EOF )
{
switch ( c )
{
......@@ -29910,6 +29910,9 @@ int Abc_CommandAbc9Jf( Abc_Frame_t * pAbc, int argc, char ** argv )
case 'm':
pPars->fCutMin ^= 1;
break;
case 't':
pPars->fUseTts ^= 1;
break;
case 'v':
pPars->fVerbose ^= 1;
break;
......@@ -29948,7 +29951,7 @@ usage:
sprintf(Buffer, "best possible" );
else
sprintf(Buffer, "%d", pPars->DelayTarget );
Abc_Print( -2, "usage: &jf [-KCRD num] [-acvwh]\n" );
Abc_Print( -2, "usage: &jf [-KCRD num] [-acmtvwh]\n" );
Abc_Print( -2, "\t performs technology mapping of the network\n" );
Abc_Print( -2, "\t-K num : LUT size for the mapping (2 <= K <= %d) [default = %d]\n", pPars->nLutSizeMax, pPars->nLutSize );
Abc_Print( -2, "\t-C num : the max number of priority cuts (1 <= C <= %d) [default = %d]\n", pPars->nCutNumMax, pPars->nCutNum );
......@@ -29957,6 +29960,7 @@ usage:
Abc_Print( -2, "\t-a : toggles area-oriented mapping [default = %s]\n", pPars->fAreaOnly? "yes": "no" );
Abc_Print( -2, "\t-c : toggles coarsening the subject graph [default = %s]\n", pPars->fCoarsen? "yes": "no" );
Abc_Print( -2, "\t-m : toggles cut minimization [default = %s]\n", pPars->fCutMin? "yes": "no" );
Abc_Print( -2, "\t-t : toggles truth tables for minimization [default = %s]\n", pPars->fUseTts? "yes": "no" );
Abc_Print( -2, "\t-v : toggles verbose output [default = %s]\n", pPars->fVerbose? "yes": "no" );
Abc_Print( -2, "\t-w : toggles very verbose output [default = %s]\n", pPars->fVeryVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : prints the command usage\n");
......@@ -1111,6 +1111,52 @@ static inline int Abc_TtMinimumBase( word * t, int * pSupp, int nVarsAll, int *
/**Function*************************************************************
Synopsis [Cut minimization.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline int Abc_TtMinBase( word * pTruth, int * pVars, int nVars )
{
int i, k;
for ( i = k = 0; i < nVars; i++ )
{
if ( !Abc_TtHasVar( pTruth, nVars, i ) )
continue;
if ( k < i )
{
pVars[k] = pVars[i];
Abc_TtSwapVars( pTruth, nVars, k, i );
}
k++;
}
if ( k == nVars )
return k;
assert( k < nVars );
// assert( k == Abc_TtSupportSize(pTruth, nVars) );
return k;
}
static inline void Abc_TtStretch( word * pTruth0, int nVars, int * pCut0, int nCutSize0, int * pCut, int nCutSize )
{
int i, k;
for ( i = nCutSize - 1, k = nCutSize0 - 1; i >= 0 && k >= 0; i-- )
{
if ( pCut[i] > pCut0[k] )
continue;
assert( pCut[i] == pCut0[k] );
if ( k < i )
Abc_TtSwapVars( pTruth0, nVars, k, i );
k--;
}
assert( k == -1 );
}
/**Function*************************************************************
Synopsis [Implemeting given NPN config.]
Description []
......
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