Commit a9815b75 by Alan Mishchenko

Adding dump of name mapping after blasting.

parent 26bfd740
...@@ -969,12 +969,12 @@ usage: ...@@ -969,12 +969,12 @@ usage:
int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv ) int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
Wlc_Ntk_t * pNtk = Wlc_AbcGetNtk(pAbc); Wlc_Ntk_t * pNtk = Wlc_AbcGetNtk(pAbc);
Gia_Man_t * pNew = NULL; int c; Gia_Man_t * pNew = NULL; int c, fMiter = 0, fDumpNames = 0;
Wlc_BstPar_t Par, * pPar = &Par; Wlc_BstPar_t Par, * pPar = &Par;
Wlc_BstParDefault( pPar ); Wlc_BstParDefault( pPar );
pPar->nOutputRange = 2; pPar->nOutputRange = 2;
Extra_UtilGetoptReset(); Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "ORAMcombadsvh" ) ) != EOF ) while ( ( c = Extra_UtilGetopt( argc, argv, "ORAMcombadstnvh" ) ) != EOF )
{ {
switch ( c ) switch ( c )
{ {
...@@ -1043,6 +1043,13 @@ int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -1043,6 +1043,13 @@ int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv )
case 's': case 's':
pPar->fDecMuxes ^= 1; pPar->fDecMuxes ^= 1;
break; break;
case 't':
pPar->fCreateMiter ^= 1;
fMiter ^= 1;
break;
case 'n':
fDumpNames ^= 1;
break;
case 'v': case 'v':
pPar->fVerbose ^= 1; pPar->fVerbose ^= 1;
break; break;
...@@ -1085,10 +1092,31 @@ int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -1085,10 +1092,31 @@ int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( 1, "Abc_CommandBlast(): Bit-blasting has failed.\n" ); Abc_Print( 1, "Abc_CommandBlast(): Bit-blasting has failed.\n" );
return 0; return 0;
} }
// generate miter
if ( fMiter )
{
Gia_Man_t * pTemp = pNew;
pNew = Gia_ManTransformMiter( pNew );
Gia_ManStop( pTemp );
Abc_Print( 1, "Bit-blasting created a traditional multi-output miter by XORing POs pair-wise.\n" );
if ( fDumpNames )
{
int i; char * pName;
FILE * pFile = fopen( "pio_name_map.txt", "wb" );
if ( pNew->vNamesIn )
Vec_PtrForEachEntry( char *, pNew->vNamesIn, pName, i )
fprintf( pFile, "i%d %s\n", i, pName );
if ( pNew->vNamesOut )
Vec_PtrForEachEntry( char *, pNew->vNamesOut, pName, i )
fprintf( pFile, "o%d %s\n", i, pName );
fclose( pFile );
Abc_Print( 1, "Finished dumping file \"pio_name_map.txt\" containing PI/PO name mapping.\n" );
}
}
Abc_FrameUpdateGia( pAbc, pNew ); Abc_FrameUpdateGia( pAbc, pNew );
return 0; return 0;
usage: usage:
Abc_Print( -2, "usage: %%blast [-ORAM num] [-combadsvh]\n" ); Abc_Print( -2, "usage: %%blast [-ORAM num] [-combadstnvh]\n" );
Abc_Print( -2, "\t performs bit-blasting of the word-level design\n" ); Abc_Print( -2, "\t performs bit-blasting of the word-level design\n" );
Abc_Print( -2, "\t-O num : zero-based index of the first word-level PO to bit-blast [default = %d]\n", pPar->iOutput ); Abc_Print( -2, "\t-O num : zero-based index of the first word-level PO to bit-blast [default = %d]\n", pPar->iOutput );
Abc_Print( -2, "\t-R num : the total number of word-level POs to bit-blast [default = %d]\n", pPar->nOutputRange ); Abc_Print( -2, "\t-R num : the total number of word-level POs to bit-blast [default = %d]\n", pPar->nOutputRange );
...@@ -1099,8 +1127,10 @@ usage: ...@@ -1099,8 +1127,10 @@ usage:
Abc_Print( -2, "\t-m : toggle creating boxes for all multipliers in the design [default = %s]\n", pPar->fMulti? "yes": "no" ); Abc_Print( -2, "\t-m : toggle creating boxes for all multipliers in the design [default = %s]\n", pPar->fMulti? "yes": "no" );
Abc_Print( -2, "\t-b : toggle generating radix-4 Booth multipliers [default = %s]\n", pPar->fBooth? "yes": "no" ); Abc_Print( -2, "\t-b : toggle generating radix-4 Booth multipliers [default = %s]\n", pPar->fBooth? "yes": "no" );
Abc_Print( -2, "\t-a : toggle generating carry-look-ahead adder [default = %s]\n", pPar->fCla? "yes": "no" ); Abc_Print( -2, "\t-a : toggle generating carry-look-ahead adder [default = %s]\n", pPar->fCla? "yes": "no" );
Abc_Print( -2, "\t-d : toggle creating dual-output miter [default = %s]\n", pPar->fCreateMiter? "yes": "no" ); Abc_Print( -2, "\t-d : toggle creating dual-output multi-output miter [default = %s]\n", pPar->fCreateMiter? "yes": "no" );
Abc_Print( -2, "\t-s : toggle creating decoded MUXes [default = %s]\n", pPar->fDecMuxes? "yes": "no" ); Abc_Print( -2, "\t-s : toggle creating decoded MUXes [default = %s]\n", pPar->fDecMuxes? "yes": "no" );
Abc_Print( -2, "\t-t : toggle creating regular multi-output miter [default = %s]\n", fMiter? "yes": "no" );
Abc_Print( -2, "\t-n : toggle dumping signal names into a text file [default = %s]\n", fDumpNames? "yes": "no" );
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", pPar->fVerbose? "yes": "no" ); Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", pPar->fVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n"); Abc_Print( -2, "\t-h : print the command usage\n");
return 1; return 1;
......
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