Bug fix in truth table reading for funcs with less than 6 vars.

This commit is contained in:
Alan Mishchenko 2016-03-28 10:18:17 -07:00
parent 81b70c4d20
commit e026f05ae3
3 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ static inline void Abc_TruthWriteHexDigit( FILE * pFile, int HexDigit )
void Abc_TruthReadHex( word * pTruth, char * pString, int nVars )
{
int nWords = (nVars < 7)? 1 : (1 << (nVars-6));
int k, Digit, nDigits = (nWords << 4);
int k, Digit, nDigits = (nVars < 7) ? (1 << (nVars-2)) : (nWords << 4);
char EndSymbol;
// skip the first 2 symbols if they are "0x"
if ( pString[0] == '0' && pString[1] == 'x' )

View File

@ -96,7 +96,7 @@ static inline void Abc_TruthWriteHexDigit(FILE * pFile, int HexDigit) {
static void Abc_TruthReadHex(word * pTruth, char * pString, int nVars) {
int nWords = (nVars < 7) ? 1 : (1 << (nVars - 6));
int k, Digit, nDigits = (nWords << 4);
int k, Digit, nDigits = (nVars < 7) ? (1 << (nVars-2)) : (nWords << 4);
char EndSymbol;
// skip the first 2 symbols if they are "0x"
if (pString[0] == '0' && pString[1] == 'x')

View File

@ -56,7 +56,7 @@ static inline void Abc_TruthWriteHexDigit( FILE * pFile, int HexDigit )
static inline void Abc_TruthReadHex( word * pTruth, char * pString, int nVars )
{
int nWords = (nVars < 7)? 1 : (1 << (nVars-6));
int k, Digit, nDigits = (nWords << 4);
int k, Digit, nDigits = (nVars < 7) ? (1 << (nVars-2)) : (nWords << 4);
char EndSymbol;
// skip the first 2 symbols if they are "0x"
if ( pString[0] == '0' && pString[1] == 'x' )