Commit a6f8625d by Alan Mishchenko

Experiments with word-level data structures.

parent 6097ac1d
...@@ -539,7 +539,7 @@ void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars ) ...@@ -539,7 +539,7 @@ void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars )
Abc_Print( 1, " %s =%8d", p->pMuxes? "nod" : "and", Gia_ManAndNum(p) ); Abc_Print( 1, " %s =%8d", p->pMuxes? "nod" : "and", Gia_ManAndNum(p) );
SetConsoleTextAttribute( hConsole, 13 ); // magenta SetConsoleTextAttribute( hConsole, 13 ); // magenta
Abc_Print( 1, " lev =%5d", Gia_ManLevelNum(p) ); Abc_Print( 1, " lev =%5d", Gia_ManLevelNum(p) );
Abc_Print( 1, " (%.2f)", Gia_ManLevelAve(p) ); Abc_Print( 1, " (%7.2f)", Gia_ManLevelAve(p) );
SetConsoleTextAttribute( hConsole, 7 ); // normal SetConsoleTextAttribute( hConsole, 7 ); // normal
} }
#else #else
......
...@@ -2130,18 +2130,22 @@ int Abc_CommandSolve( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -2130,18 +2130,22 @@ int Abc_CommandSolve( Abc_Frame_t * pAbc, int argc, char ** argv )
extern void Rtl_LibOrderWires( Rtl_Lib_t * pLib ); extern void Rtl_LibOrderWires( Rtl_Lib_t * pLib );
extern void Rtl_LibOrderCells( Rtl_Lib_t * pLib ); extern void Rtl_LibOrderCells( Rtl_Lib_t * pLib );
extern void Rtl_LibBlast( Rtl_Lib_t * pLib ); extern void Rtl_LibBlast( Rtl_Lib_t * pLib );
extern void Rtl_LibBlast2( Rtl_Lib_t * pLib );
extern void Rtl_LibReorderModules( Rtl_Lib_t * pLib ); extern void Rtl_LibReorderModules( Rtl_Lib_t * pLib );
extern void Rtl_LibSolve( Rtl_Lib_t * pLib ); extern void Rtl_LibSolve( Rtl_Lib_t * pLib );
extern void Rtl_LibPreprocess( Rtl_Lib_t * pLib ); extern void Rtl_LibPreprocess( Rtl_Lib_t * pLib );
Gia_Man_t * pGia = NULL; Gia_Man_t * pGia = NULL;
Rtl_Lib_t * pLib = Wlc_AbcGetRtl(pAbc); Rtl_Lib_t * pLib = Wlc_AbcGetRtl(pAbc);
int c, fPrepro = 0, fVerbose = 0; int c, fOldBlast = 0, fPrepro = 0, fVerbose = 0;
Extra_UtilGetoptReset(); Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "pvh" ) ) != EOF ) while ( ( c = Extra_UtilGetopt( argc, argv, "opvh" ) ) != EOF )
{ {
switch ( c ) switch ( c )
{ {
case 'o':
fOldBlast ^= 1;
break;
case 'p': case 'p':
fPrepro ^= 1; fPrepro ^= 1;
break; break;
...@@ -2157,9 +2161,14 @@ int Abc_CommandSolve( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -2157,9 +2161,14 @@ int Abc_CommandSolve( Abc_Frame_t * pAbc, int argc, char ** argv )
Rtl_LibPrintStats( pLib ); Rtl_LibPrintStats( pLib );
//Rtl_LibPrint( NULL, pLib ); //Rtl_LibPrint( NULL, pLib );
Rtl_LibOrderWires( pLib ); Rtl_LibOrderWires( pLib );
Rtl_LibOrderCells( pLib );
if ( fOldBlast )
{
Rtl_LibOrderCells( pLib );
Rtl_LibBlast( pLib ); Rtl_LibBlast( pLib );
}
else
Rtl_LibBlast2( pLib );
//Rtl_LibReorderModules( pLib ); //Rtl_LibReorderModules( pLib );
//Rtl_LibPrintStats( pLib ); //Rtl_LibPrintStats( pLib );
...@@ -2172,8 +2181,9 @@ int Abc_CommandSolve( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -2172,8 +2181,9 @@ int Abc_CommandSolve( Abc_Frame_t * pAbc, int argc, char ** argv )
Gia_ManStopP( &pGia ); Gia_ManStopP( &pGia );
return 0; return 0;
usage: usage:
Abc_Print( -2, "usage: %%solve [-pvh]\n" ); Abc_Print( -2, "usage: %%solve [-opvh]\n" );
Abc_Print( -2, "\t experiments with word-level networks\n" ); Abc_Print( -2, "\t experiments with word-level networks\n" );
Abc_Print( -2, "\t-o : toggle using old bit-blasting procedure [default = %s]\n", fOldBlast? "yes": "no" );
Abc_Print( -2, "\t-p : toggle preprocessing for verification [default = %s]\n", fPrepro? "yes": "no" ); Abc_Print( -2, "\t-p : toggle preprocessing for verification [default = %s]\n", fPrepro? "yes": "no" );
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "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"); Abc_Print( -2, "\t-h : print the command usage\n");
......
...@@ -49,6 +49,34 @@ ABC_NAMESPACE_IMPL_START ...@@ -49,6 +49,34 @@ ABC_NAMESPACE_IMPL_START
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
#define MAX_LINE 1000000
void Rtl_NtkCleanFile( char * pFileName )
{
char * pBuffer, * pFileName2 = "_temp__.rtlil";
FILE * pFile = fopen( pFileName, "rb" );
FILE * pFile2;
if ( pFile == NULL )
{
printf( "Cannot open file \"%s\" for reading.\n", pFileName );
return;
}
pFile2 = fopen( pFileName2, "wb" );
if ( pFile2 == NULL )
{
fclose( pFile );
printf( "Cannot open file \"%s\" for writing.\n", pFileName2 );
return;
}
pBuffer = ABC_ALLOC( char, MAX_LINE );
while ( fgets( pBuffer, MAX_LINE, pFile ) != NULL )
if ( !strstr(pBuffer, "attribute \\src") )
fputs( pBuffer, pFile2 );
ABC_FREE( pBuffer );
fclose( pFile );
fclose( pFile2 );
}
char * Wln_GetYosysName() char * Wln_GetYosysName()
{ {
char * pYosysName = NULL; char * pYosysName = NULL;
...@@ -105,7 +133,8 @@ Rtl_Lib_t * Wln_ReadSystemVerilog( char * pFileName, char * pTopModule, int fCol ...@@ -105,7 +133,8 @@ Rtl_Lib_t * Wln_ReadSystemVerilog( char * pFileName, char * pTopModule, int fCol
printf( "Dumped the design into file \"%s\".\n", pFileTemp ); printf( "Dumped the design into file \"%s\".\n", pFileTemp );
return NULL; return NULL;
} }
//unlink( pFileTemp ); Rtl_NtkCleanFile( pFileTemp );
unlink( pFileTemp );
return pNtk; return pNtk;
} }
Gia_Man_t * Wln_BlastSystemVerilog( char * pFileName, char * pTopModule, int fSkipStrash, int fInvert, int fTechMap, int fVerbose ) Gia_Man_t * Wln_BlastSystemVerilog( char * pFileName, char * pTopModule, int fSkipStrash, int fInvert, int fTechMap, int fVerbose )
......
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