mirror of https://github.com/YosysHQ/abc.git
Bug fix in truth table reading for funcs with less than 6 vars.
This commit is contained in:
parent
81b70c4d20
commit
e026f05ae3
|
|
@ -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' )
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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' )
|
||||
|
|
|
|||
Loading…
Reference in New Issue