mirror of https://github.com/YosysHQ/abc.git
Corner case bug in deriving truth table from SOP.
This commit is contained in:
parent
9a89e3f9f5
commit
55e9c4d0fa
|
|
@ -954,7 +954,7 @@ char * Abc_SopFromTruthHex( char * pTruth )
|
|||
|
||||
// get the number of variables
|
||||
nTruthSize = strlen(pTruth);
|
||||
nVars = Extra_Base2Log( nTruthSize ) + 2;
|
||||
nVars = (nTruthSize < 2) ? 2 : Extra_Base2Log(nTruthSize) + 2;
|
||||
if ( nTruthSize != (1 << (nVars-2)) )
|
||||
{
|
||||
printf( "String %s does not look like a truth table of a %d-variable function.\n", pTruth, nVars );
|
||||
|
|
|
|||
Loading…
Reference in New Issue