Commit 3c3a770a by Alan Mishchenko

New multi-output PLA reader and preprocessor (read_plamo) (added dist-1 merge).

parent e06c04a3
...@@ -1043,14 +1043,17 @@ usage: ...@@ -1043,14 +1043,17 @@ usage:
***********************************************************************/ ***********************************************************************/
int IoCommandReadPlaMo( Abc_Frame_t * pAbc, int argc, char ** argv ) int IoCommandReadPlaMo( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
extern Abc_Ntk_t * Mop_ManTest( char * pFileName, int fVerbose ); extern Abc_Ntk_t * Mop_ManTest( char * pFileName, int fMerge, int fVerbose );
Abc_Ntk_t * pNtk; Abc_Ntk_t * pNtk;
int c, fVerbose = 0; int c, fMerge = 0, fVerbose = 0;
Extra_UtilGetoptReset(); Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "vh" ) ) != EOF ) while ( ( c = Extra_UtilGetopt( argc, argv, "mvh" ) ) != EOF )
{ {
switch ( c ) switch ( c )
{ {
case 'm':
fMerge ^= 1;
break;
case 'v': case 'v':
fVerbose ^= 1; fVerbose ^= 1;
break; break;
...@@ -1063,7 +1066,7 @@ int IoCommandReadPlaMo( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -1063,7 +1066,7 @@ int IoCommandReadPlaMo( Abc_Frame_t * pAbc, int argc, char ** argv )
if ( argc != globalUtilOptind + 1 ) if ( argc != globalUtilOptind + 1 )
goto usage; goto usage;
// get the input file name // get the input file name
pNtk = Mop_ManTest( argv[globalUtilOptind], fVerbose ); pNtk = Mop_ManTest( argv[globalUtilOptind], fMerge, fVerbose );
if ( pNtk == NULL ) if ( pNtk == NULL )
return 1; return 1;
// replace the current network // replace the current network
...@@ -1072,8 +1075,9 @@ int IoCommandReadPlaMo( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -1072,8 +1075,9 @@ int IoCommandReadPlaMo( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0; return 0;
usage: usage:
fprintf( pAbc->Err, "usage: read_plamo [-vh] <file>\n" ); fprintf( pAbc->Err, "usage: read_plamo [-mvh] <file>\n" );
fprintf( pAbc->Err, "\t reads the network in multi-output PLA\n" ); fprintf( pAbc->Err, "\t reads the network in multi-output PLA\n" );
fprintf( pAbc->Err, "\t-m : toggle dist-1 merge for cubes with identical outputs [default = %s]\n", fMerge? "yes":"no" );
fprintf( pAbc->Err, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes":"no" ); fprintf( pAbc->Err, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes":"no" );
fprintf( pAbc->Err, "\t-h : prints the command summary\n" ); fprintf( pAbc->Err, "\t-h : prints the command summary\n" );
fprintf( pAbc->Err, "\tfile : the name of a file to read\n" ); fprintf( pAbc->Err, "\tfile : the name of a file to read\n" );
......
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