From ea7d10d45da5f6c60ddd4a250ecd93991d31426b Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Thu, 12 May 2016 13:59:30 -0700 Subject: Adding 'read_pla -d' to read dc-set along with on-set (useful to derive offset). --- src/base/io/io.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/base/io/io.c') diff --git a/src/base/io/io.c b/src/base/io/io.c index ad6c76ba..e0e524fd 100644 --- a/src/base/io/io.c +++ b/src/base/io/io.c @@ -903,10 +903,10 @@ int IoCommandReadPla( Abc_Frame_t * pAbc, int argc, char ** argv ) { Abc_Ntk_t * pNtk; char * pFileName; - int c, fZeros = 0, fBoth = 0, fSkipPrepro = 0, fCheck = 1; + int c, fZeros = 0, fBoth = 0, fOnDc = 0, fSkipPrepro = 0, fCheck = 1; Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "zbxch" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "zbdxch" ) ) != EOF ) { switch ( c ) { @@ -916,6 +916,9 @@ int IoCommandReadPla( Abc_Frame_t * pAbc, int argc, char ** argv ) case 'b': fBoth ^= 1; break; + case 'd': + fOnDc ^= 1; + break; case 'x': fSkipPrepro ^= 1; break; @@ -933,10 +936,10 @@ int IoCommandReadPla( Abc_Frame_t * pAbc, int argc, char ** argv ) // get the input file name pFileName = argv[globalUtilOptind]; // read the file using the corresponding file reader - if ( fZeros || fBoth || fSkipPrepro ) + if ( fZeros || fBoth || fOnDc || fSkipPrepro ) { Abc_Ntk_t * pTemp; - pNtk = Io_ReadPla( pFileName, fZeros, fBoth, fSkipPrepro, fCheck ); + pNtk = Io_ReadPla( pFileName, fZeros, fBoth, fOnDc, fSkipPrepro, fCheck ); if ( pNtk == NULL ) { printf( "Reading PLA file has failed.\n" ); @@ -955,10 +958,11 @@ int IoCommandReadPla( Abc_Frame_t * pAbc, int argc, char ** argv ) return 0; usage: - fprintf( pAbc->Err, "usage: read_pla [-zbxch] \n" ); + fprintf( pAbc->Err, "usage: read_pla [-zbdxch] \n" ); fprintf( pAbc->Err, "\t reads the network in PLA\n" ); fprintf( pAbc->Err, "\t-z : toggle reading on-set and off-set [default = %s]\n", fZeros? "off-set":"on-set" ); fprintf( pAbc->Err, "\t-b : toggle reading both on-set and off-set as on-set [default = %s]\n", fBoth? "off-set":"on-set" ); + fprintf( pAbc->Err, "\t-d : toggle reading both on-set and dc-set as on-set [default = %s]\n", fOnDc? "off-set":"on-set" ); fprintf( pAbc->Err, "\t-x : toggle reading Exclusive SOP rather than SOP [default = %s]\n", fSkipPrepro? "yes":"no" ); fprintf( pAbc->Err, "\t-c : toggle network check after reading [default = %s]\n", fCheck? "yes":"no" ); fprintf( pAbc->Err, "\t-h : prints the command summary\n" ); -- cgit v1.2.3