mirror of https://github.com/YosysHQ/abc.git
Changes to LUT mappers.
This commit is contained in:
parent
c97a9c0d18
commit
ff997b1b65
|
|
@ -238,6 +238,7 @@ static int Abc_CommandDsdFree ( Abc_Frame_t * pAbc, int argc, cha
|
|||
static int Abc_CommandDsdPs ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
||||
static int Abc_CommandDsdTune ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
||||
static int Abc_CommandDsdMerge ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
||||
static int Abc_CommandDsdClean ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
||||
|
||||
static int Abc_CommandScut ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
||||
static int Abc_CommandInit ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
||||
|
|
@ -799,6 +800,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
|
|||
Cmd_CommandAdd( pAbc, "DSD manager", "dsd_ps", Abc_CommandDsdPs, 0 );
|
||||
Cmd_CommandAdd( pAbc, "DSD manager", "dsd_tune", Abc_CommandDsdTune, 0 );
|
||||
Cmd_CommandAdd( pAbc, "DSD manager", "dsd_merge", Abc_CommandDsdMerge, 0 );
|
||||
Cmd_CommandAdd( pAbc, "DSD manager", "dsd_clean", Abc_CommandDsdClean, 0 );
|
||||
|
||||
// Cmd_CommandAdd( pAbc, "Sequential", "scut", Abc_CommandScut, 0 );
|
||||
Cmd_CommandAdd( pAbc, "Sequential", "init", Abc_CommandInit, 1 );
|
||||
|
|
@ -15737,6 +15739,50 @@ usage:
|
|||
return 1;
|
||||
}
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
Synopsis []
|
||||
|
||||
Description []
|
||||
|
||||
SideEffects []
|
||||
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
int Abc_CommandDsdClean( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||
{
|
||||
int c, fVerbose = 0;
|
||||
Extra_UtilGetoptReset();
|
||||
while ( ( c = Extra_UtilGetopt( argc, argv, "vh" ) ) != EOF )
|
||||
{
|
||||
switch ( c )
|
||||
{
|
||||
case 'v':
|
||||
fVerbose ^= 1;
|
||||
break;
|
||||
case 'h':
|
||||
goto usage;
|
||||
default:
|
||||
goto usage;
|
||||
}
|
||||
}
|
||||
if ( !Abc_FrameReadManDsd() )
|
||||
{
|
||||
Abc_Print( 1, "The DSD manager is not started.\n" );
|
||||
return 0;
|
||||
}
|
||||
If_DsdManClean( (If_DsdMan_t *)Abc_FrameReadManDsd(), fVerbose );
|
||||
return 0;
|
||||
|
||||
usage:
|
||||
Abc_Print( -2, "usage: dsd_clean [-K num] [-vh]\n" );
|
||||
Abc_Print( -2, "\t cleans the occurrence counters\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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**Function*************************************************************
|
||||
|
|
|
|||
|
|
@ -524,6 +524,7 @@ extern void If_DsdManFree( If_DsdMan_t * p, int fVerbose );
|
|||
extern void If_DsdManSave( If_DsdMan_t * p, char * pFileName );
|
||||
extern If_DsdMan_t * If_DsdManLoad( char * pFileName );
|
||||
extern void If_DsdManMerge( If_DsdMan_t * p, If_DsdMan_t * pNew );
|
||||
extern void If_DsdManClean( If_DsdMan_t * p, int fVerbose );
|
||||
extern int If_DsdManCompute( If_DsdMan_t * p, word * pTruth, int nLeaves, unsigned char * pPerm, char * pLutStruct );
|
||||
extern char * If_DsdManFileName( If_DsdMan_t * p );
|
||||
extern int If_DsdManVarNum( If_DsdMan_t * p );
|
||||
|
|
|
|||
|
|
@ -860,6 +860,13 @@ void If_DsdManMerge( If_DsdMan_t * p, If_DsdMan_t * pNew )
|
|||
assert( Vec_IntSize(vMap) == Vec_PtrSize(pNew->vObjs) );
|
||||
Vec_IntFree( vMap );
|
||||
}
|
||||
void If_DsdManClean( If_DsdMan_t * p, int fVerbose )
|
||||
{
|
||||
If_DsdObj_t * pObj;
|
||||
int i;
|
||||
If_DsdVecForEachObj( p->vObjs, pObj, i )
|
||||
pObj->Count = 0;
|
||||
}
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue