mirror of https://github.com/YosysHQ/abc.git
Adding generation of combinational speculative miters.
This commit is contained in:
parent
06094ade87
commit
8066fdbcb5
|
|
@ -36606,8 +36606,9 @@ int Abc_CommandAbc9Srm( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
int fSpeculate = 1;
|
||||
int fSkipSome = 0;
|
||||
int fDualOut = 0;
|
||||
int fComb = 0;
|
||||
Extra_UtilGetoptReset();
|
||||
while ( ( c = Extra_UtilGetopt( argc, argv, "Adrsfvh" ) ) != EOF )
|
||||
while ( ( c = Extra_UtilGetopt( argc, argv, "Adrsfcvh" ) ) != EOF )
|
||||
{
|
||||
switch ( c )
|
||||
{
|
||||
|
|
@ -36632,6 +36633,9 @@ int Abc_CommandAbc9Srm( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
case 'f':
|
||||
fSkipSome ^= 1;
|
||||
break;
|
||||
case 'c':
|
||||
fComb ^= 1;
|
||||
break;
|
||||
case 'v':
|
||||
fVerbose ^= 1;
|
||||
break;
|
||||
|
|
@ -36646,6 +36650,15 @@ int Abc_CommandAbc9Srm( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
Abc_Print( -1, "Abc_CommandAbc9Srm(): There is no AIG.\n" );
|
||||
return 1;
|
||||
}
|
||||
if ( fComb )
|
||||
{
|
||||
extern int Cec4_ManSimulateOnlyTest( Gia_Man_t * p, int fVerbose );
|
||||
int Result = Cec4_ManSimulateOnlyTest( pAbc->pGia, fVerbose );
|
||||
extern Gia_Man_t * Gia_ManCombSpecReduce( Gia_Man_t * p );
|
||||
pTemp = Gia_ManCombSpecReduce( pAbc->pGia );
|
||||
Abc_FrameUpdateGia( pAbc, pTemp );
|
||||
return 0;
|
||||
}
|
||||
sprintf(pFileName, "gsrm%s.aig", fSpeculate? "" : "s" );
|
||||
sprintf(pFileName2, "gsyn%s.aig", fSpeculate? "" : "s" );
|
||||
pTemp = Gia_ManSpecReduce( pAbc->pGia, fDualOut, fSynthesis, fSpeculate, fSkipSome, fVerbose );
|
||||
|
|
@ -36678,13 +36691,14 @@ int Abc_CommandAbc9Srm( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
return 0;
|
||||
|
||||
usage:
|
||||
Abc_Print( -2, "usage: &srm [-A file] [-drsfvh]\n" );
|
||||
Abc_Print( -2, "\t writes speculatively reduced model into file \"%s\"\n", pFileName );
|
||||
Abc_Print( -2, "usage: &srm [-A file] [-drsfcvh]\n" );
|
||||
Abc_Print( -2, "\t derives or writes speculatively reduced model into file \"%s\"\n", pFileName );
|
||||
Abc_Print( -2, "\t-A file : file name for dumping speculative-reduced model [default = \"gsrm.aig\"]\n" );
|
||||
Abc_Print( -2, "\t-d : toggle creating dual-output miter [default = %s]\n", fDualOut? "yes": "no" );
|
||||
Abc_Print( -2, "\t-r : toggle writing reduced network for synthesis [default = %s]\n", fSynthesis? "yes": "no" );
|
||||
Abc_Print( -2, "\t-s : toggle using speculation at the internal nodes [default = %s]\n", fSpeculate? "yes": "no" );
|
||||
Abc_Print( -2, "\t-f : toggle filtering to remove redundant equivalences [default = %s]\n", fSkipSome? "yes": "no" );
|
||||
Abc_Print( -2, "\t-c : toggle using combinational speculation [default = %s]\n", fComb? "yes": "no" );
|
||||
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" );
|
||||
Abc_Print( -2, "\t-h : print the command usage\n");
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -1651,7 +1651,7 @@ Gia_Obj_t * Cec4_ManFindRepr( Gia_Man_t * p, Cec4_Man_t * pMan, int iObj )
|
|||
pMan->timeResimLoc += Abc_Clock() - clk;
|
||||
return NULL;
|
||||
}
|
||||
int Cec4_ManPerformSweeping( Gia_Man_t * p, Cec_ParFra_t * pPars, Gia_Man_t ** ppNew )
|
||||
int Cec4_ManPerformSweeping( Gia_Man_t * p, Cec_ParFra_t * pPars, Gia_Man_t ** ppNew, int fSimOnly )
|
||||
{
|
||||
Cec4_Man_t * pMan = Cec4_ManCreate( p, pPars );
|
||||
Gia_Obj_t * pObj, * pRepr;
|
||||
|
|
@ -1699,6 +1699,8 @@ int Cec4_ManPerformSweeping( Gia_Man_t * p, Cec_ParFra_t * pPars, Gia_Man_t ** p
|
|||
if ( i && i % (pPars->nRounds / 5) == 0 && pPars->fVerbose )
|
||||
Cec4_ManPrintStats( p, pPars, pMan, 1 );
|
||||
}
|
||||
if ( fSimOnly )
|
||||
goto finalize;
|
||||
|
||||
// perform additional simulation
|
||||
Cec4_ManCandIterStart( pMan );
|
||||
|
|
@ -1789,7 +1791,7 @@ finalize:
|
|||
Gia_Man_t * Cec4_ManSimulateTest( Gia_Man_t * p, Cec_ParFra_t * pPars )
|
||||
{
|
||||
Gia_Man_t * pNew = NULL;
|
||||
Cec4_ManPerformSweeping( p, pPars, &pNew );
|
||||
Cec4_ManPerformSweeping( p, pPars, &pNew, 0 );
|
||||
return pNew;
|
||||
}
|
||||
void Cec4_ManSimulateTest2( Gia_Man_t * p, int fVerbose )
|
||||
|
|
@ -1797,7 +1799,7 @@ void Cec4_ManSimulateTest2( Gia_Man_t * p, int fVerbose )
|
|||
abctime clk = Abc_Clock();
|
||||
Cec_ParFra_t ParsFra, * pPars = &ParsFra;
|
||||
Cec4_ManSetParams( pPars );
|
||||
Cec4_ManPerformSweeping( p, pPars, NULL );
|
||||
Cec4_ManPerformSweeping( p, pPars, NULL, 0 );
|
||||
pPars->fVerbose = fVerbose;
|
||||
if ( fVerbose )
|
||||
Abc_PrintTime( 1, "New choice computation time", Abc_Clock() - clk );
|
||||
|
|
@ -1809,9 +1811,16 @@ Gia_Man_t * Cec4_ManSimulateTest3( Gia_Man_t * p, int nBTLimit, int fVerbose )
|
|||
Cec4_ManSetParams( pPars );
|
||||
pPars->fVerbose = fVerbose;
|
||||
pPars->nBTLimit = nBTLimit;
|
||||
Cec4_ManPerformSweeping( p, pPars, &pNew );
|
||||
Cec4_ManPerformSweeping( p, pPars, &pNew, 0 );
|
||||
return pNew;
|
||||
}
|
||||
int Cec4_ManSimulateOnlyTest( Gia_Man_t * p, int fVerbose )
|
||||
{
|
||||
Cec_ParFra_t ParsFra, * pPars = &ParsFra;
|
||||
Cec4_ManSetParams( pPars );
|
||||
pPars->fVerbose = fVerbose;
|
||||
return Cec4_ManPerformSweeping( p, pPars, NULL, 1 );
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
/// END OF FILE ///
|
||||
|
|
|
|||
Loading…
Reference in New Issue