diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2009-03-29 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2009-03-29 08:01:00 -0700 |
commit | 23fd11037a006089898cb13494305e402a11ec76 (patch) | |
tree | be45622eade1dc6e6b1cb6dd7ca8b115ca00b1cb /src/base/io | |
parent | d74d35aa4244a1e2e8e73c0776703528a5bd94db (diff) | |
download | abc-23fd11037a006089898cb13494305e402a11ec76.tar.gz abc-23fd11037a006089898cb13494305e402a11ec76.tar.bz2 abc-23fd11037a006089898cb13494305e402a11ec76.zip |
Version abc90329
Diffstat (limited to 'src/base/io')
-rw-r--r-- | src/base/io/io.c | 1 | ||||
-rw-r--r-- | src/base/io/ioReadBlifMv.c | 12 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/base/io/io.c b/src/base/io/io.c index e8af161e..20f412e0 100644 --- a/src/base/io/io.c +++ b/src/base/io/io.c @@ -1849,6 +1849,7 @@ int IoCommandWriteCounter( Abc_Frame_t * pAbc, int argc, char **argv ) if ( argc != globalUtilOptind + 1 ) { + printf( "File name is missing on the command line.\n" ); goto usage; } // get the input file name diff --git a/src/base/io/ioReadBlifMv.c b/src/base/io/ioReadBlifMv.c index 95ea4fe5..34ea4294 100644 --- a/src/base/io/ioReadBlifMv.c +++ b/src/base/io/ioReadBlifMv.c @@ -1615,7 +1615,7 @@ static char * Io_MvParseTableBlif( Io_MvMod_t * p, char * pTable, int nFanins ) { Vec_Ptr_t * vTokens = p->pMan->vTokens; Vec_Str_t * vFunc = p->pMan->vFunc; - char * pProduct, * pOutput; + char * pProduct, * pOutput, c; int i, Polarity = -1; p->pMan->nTablesRead++; @@ -1626,7 +1626,8 @@ static char * Io_MvParseTableBlif( Io_MvMod_t * p, char * pTable, int nFanins ) if ( Vec_PtrSize(vTokens) == 1 ) { pOutput = Vec_PtrEntry( vTokens, 0 ); - if ( ((pOutput[0] - '0') & 0x8E) || pOutput[1] ) + c = pOutput[0]; + if ( (c!='0'&&c!='1'&&c!='x'&&c!='n') || pOutput[1] ) { sprintf( p->pMan->sError, "Line %d: Constant table has wrong output value \"%s\".", Io_MvGetLine(p->pMan, pOutput), pOutput ); return NULL; @@ -1650,14 +1651,15 @@ static char * Io_MvParseTableBlif( Io_MvMod_t * p, char * pTable, int nFanins ) sprintf( p->pMan->sError, "Line %d: Cube \"%s\" has size different from the fanin count (%d).", Io_MvGetLine(p->pMan, pProduct), pProduct, nFanins ); return NULL; } - if ( ((pOutput[0] - '0') & 0x8E) || pOutput[1] ) + c = pOutput[0]; + if ( (c!='0'&&c!='1'&&c!='x'&&c!='n') || pOutput[1] ) { sprintf( p->pMan->sError, "Line %d: Output value \"%s\" is incorrect.", Io_MvGetLine(p->pMan, pProduct), pOutput ); return NULL; } if ( Polarity == -1 ) - Polarity = pOutput[0] - '0'; - else if ( Polarity != pOutput[0] - '0' ) + Polarity = (c=='1' || c=='x'); + else if ( Polarity != (c=='1' || c=='x') ) { sprintf( p->pMan->sError, "Line %d: Output value \"%s\" differs from the value in the first line of the table (%d).", Io_MvGetLine(p->pMan, pProduct), pOutput, Polarity ); return NULL; |