Commit fadde52d by Alan Mishchenko

Changes to the lazy man's synthesis code.

parent 22ae2e45
......@@ -1666,6 +1666,7 @@ unsigned Kit_TruthSemiCanonicize( unsigned * pInOut, unsigned * pAux, int nVars,
uCanonPhase = 0;
nOnes = Kit_TruthCountOnes(pIn, nVars);
//if(pIn[0] & 1)
if ( (nOnes > nWords * 16) )//|| ((nOnes == nWords * 16) && (pIn[0] & 1)) )
{
uCanonPhase |= (1 << nVars);
......
......@@ -777,6 +777,7 @@ extern ABC_DLL void Abc_NtkRecStop();
extern ABC_DLL void Abc_NtkRecAdd( Abc_Ntk_t * pNtk );
extern ABC_DLL void Abc_NtkRecPs();
extern ABC_DLL void Abc_NtkRecFilter(int nLimit);
extern ABC_DLL void Abc_NtkRecLibMerge(Abc_Ntk_t * pNtk);
extern ABC_DLL Abc_Ntk_t * Abc_NtkRecUse();
extern ABC_DLL int Abc_NtkRecIsRunning();
extern ABC_DLL int Abc_NtkRecIsInTrimMode();
......
......@@ -212,6 +212,7 @@ static int Abc_CommandRecAdd ( Abc_Frame_t * pAbc, int argc, cha
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_CommandRecFilter ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandRecMerge ( 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 );
......@@ -671,6 +672,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd( pAbc, "Choicing", "rec_ps", Abc_CommandRecPs, 0 );
Cmd_CommandAdd( pAbc, "Choicing", "rec_use", Abc_CommandRecUse, 1 );
Cmd_CommandAdd( pAbc, "Choicing", "rec_filter", Abc_CommandRecFilter, 1 );
Cmd_CommandAdd( pAbc, "Choicing", "rec_merge", Abc_CommandRecMerge, 1 );
Cmd_CommandAdd( pAbc, "SC mapping", "map", Abc_CommandMap, 1 );
Cmd_CommandAdd( pAbc, "SC mapping", "amap", Abc_CommandAmap, 1 );
......@@ -11947,7 +11949,7 @@ int Abc_CommandRecStart( Abc_Frame_t * pAbc, int argc, char ** argv )
pNtk = Abc_FrameReadNtk(pAbc);
// set defaults
nVars = 6;
nCuts = 8;
nCuts = 32;
fTrim = 0;
Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "KCth" ) ) != EOF )
......@@ -12254,6 +12256,50 @@ usage:
return 1;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int Abc_CommandRecMerge( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Abc_Ntk_t * pNtk;
int c;
pNtk = Abc_FrameReadNtk(pAbc);
// set defaults
Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "dh" ) ) != EOF )
{
switch ( c )
{
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;
}
Abc_NtkRecLibMerge(pNtk);
return 0;
usage:
Abc_Print( -2, "usage: rec_merge [-h]\n" );
Abc_Print( -2, "\t merge libraries\n" );
Abc_Print( -2, "\t-h : print the command usage\n");
return 1;
}
/**Function*************************************************************
......
......@@ -106,6 +106,7 @@ struct If_Par_t_
// internal parameters
int fDelayOpt; // special delay optimization
int fUserRecLib; // use recorded library
int fSkipCutFilter;// skip cut filter
int fAreaOnly; // area only mode
int fTruth; // truth table computation enabled
int fUsePerm; // use permutation (delay info)
......
......@@ -196,7 +196,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
p->nCutsTotal++;
// check if this cut is contained in any of the available cuts
// if ( p->pPars->pFuncCost == NULL && If_CutFilter( p, pCut ) ) // do not filter functionality cuts
if ( If_CutFilter( pCutSet, pCut ) )
if ( !p->pPars->fSkipCutFilter && If_CutFilter( pCutSet, pCut ) )
continue;
// compute the truth table
pCut->fCompl = 0;
......
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