Commit ada21a65 by Alan Mishchenko

New multi-output PLA reader and preprocessor (read_plamo).

parent e1b51d18
...@@ -603,6 +603,10 @@ SOURCE=.\src\base\io\ioReadPla.c ...@@ -603,6 +603,10 @@ SOURCE=.\src\base\io\ioReadPla.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\base\io\ioReadPlaMo.c
# End Source File
# Begin Source File
SOURCE=.\src\base\io\ioReadVerilog.c SOURCE=.\src\base\io\ioReadVerilog.c
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -43,6 +43,7 @@ static int IoCommandReadEqn ( Abc_Frame_t * pAbc, int argc, char **argv ); ...@@ -43,6 +43,7 @@ static int IoCommandReadEqn ( Abc_Frame_t * pAbc, int argc, char **argv );
static int IoCommandReadFins ( Abc_Frame_t * pAbc, int argc, char **argv ); static int IoCommandReadFins ( Abc_Frame_t * pAbc, int argc, char **argv );
static int IoCommandReadInit ( Abc_Frame_t * pAbc, int argc, char **argv ); static int IoCommandReadInit ( Abc_Frame_t * pAbc, int argc, char **argv );
static int IoCommandReadPla ( Abc_Frame_t * pAbc, int argc, char **argv ); static int IoCommandReadPla ( Abc_Frame_t * pAbc, int argc, char **argv );
static int IoCommandReadPlaMo ( Abc_Frame_t * pAbc, int argc, char **argv );
static int IoCommandReadTruth ( Abc_Frame_t * pAbc, int argc, char **argv ); static int IoCommandReadTruth ( Abc_Frame_t * pAbc, int argc, char **argv );
static int IoCommandReadVerilog ( Abc_Frame_t * pAbc, int argc, char **argv ); static int IoCommandReadVerilog ( Abc_Frame_t * pAbc, int argc, char **argv );
static int IoCommandReadStatus ( Abc_Frame_t * pAbc, int argc, char **argv ); static int IoCommandReadStatus ( Abc_Frame_t * pAbc, int argc, char **argv );
...@@ -108,6 +109,7 @@ void Io_Init( Abc_Frame_t * pAbc ) ...@@ -108,6 +109,7 @@ void Io_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd( pAbc, "I/O", "read_fins", IoCommandReadFins, 0 ); Cmd_CommandAdd( pAbc, "I/O", "read_fins", IoCommandReadFins, 0 );
Cmd_CommandAdd( pAbc, "I/O", "read_init", IoCommandReadInit, 1 ); Cmd_CommandAdd( pAbc, "I/O", "read_init", IoCommandReadInit, 1 );
Cmd_CommandAdd( pAbc, "I/O", "read_pla", IoCommandReadPla, 1 ); Cmd_CommandAdd( pAbc, "I/O", "read_pla", IoCommandReadPla, 1 );
Cmd_CommandAdd( pAbc, "I/O", "read_plamo", IoCommandReadPlaMo, 1 );
Cmd_CommandAdd( pAbc, "I/O", "read_truth", IoCommandReadTruth, 1 ); Cmd_CommandAdd( pAbc, "I/O", "read_truth", IoCommandReadTruth, 1 );
Cmd_CommandAdd( pAbc, "I/O", "read_verilog", IoCommandReadVerilog, 1 ); Cmd_CommandAdd( pAbc, "I/O", "read_verilog", IoCommandReadVerilog, 1 );
Cmd_CommandAdd( pAbc, "I/O", "read_status", IoCommandReadStatus, 0 ); Cmd_CommandAdd( pAbc, "I/O", "read_status", IoCommandReadStatus, 0 );
...@@ -1039,6 +1041,56 @@ usage: ...@@ -1039,6 +1041,56 @@ usage:
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
int IoCommandReadPlaMo( Abc_Frame_t * pAbc, int argc, char ** argv )
{
extern Abc_Ntk_t * Mop_ManTest( char * pFileName, int fVerbose );
Abc_Ntk_t * pNtk;
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 ( argc != globalUtilOptind + 1 )
goto usage;
// get the input file name
pNtk = Mop_ManTest( argv[globalUtilOptind], fVerbose );
if ( pNtk == NULL )
return 1;
// replace the current network
Abc_FrameReplaceCurrentNetwork( pAbc, pNtk );
Abc_FrameClearVerifStatus( pAbc );
return 0;
usage:
fprintf( pAbc->Err, "usage: read_plamo [-vh] <file>\n" );
fprintf( pAbc->Err, "\t reads the network in multi-output PLA\n" );
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, "\tfile : the name of a file to read\n" );
return 1;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int IoCommandReadTruth( Abc_Frame_t * pAbc, int argc, char ** argv ) int IoCommandReadTruth( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
Abc_Ntk_t * pNtk; Abc_Ntk_t * pNtk;
......
...@@ -10,6 +10,7 @@ SRC += src/base/io/io.c \ ...@@ -10,6 +10,7 @@ SRC += src/base/io/io.c \
src/base/io/ioReadEdif.c \ src/base/io/ioReadEdif.c \
src/base/io/ioReadEqn.c \ src/base/io/ioReadEqn.c \
src/base/io/ioReadPla.c \ src/base/io/ioReadPla.c \
src/base/io/ioReadPlaMo.c \
src/base/io/ioReadVerilog.c \ src/base/io/ioReadVerilog.c \
src/base/io/ioUtil.c \ src/base/io/ioUtil.c \
src/base/io/ioWriteAiger.c \ src/base/io/ioWriteAiger.c \
......
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