diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2017-07-21 14:10:46 +0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2017-07-21 14:10:46 +0700 |
commit | a5e9563a0f2d7f925d1590a7c4ed1561d8a3d96e (patch) | |
tree | c3233e6bade7177bb9d15b4b8de39c39769fe7f2 | |
parent | 9ff1776d06fdf83cd7deffda858a57dba0a4d0f9 (diff) | |
download | abc-a5e9563a0f2d7f925d1590a7c4ed1561d8a3d96e.tar.gz abc-a5e9563a0f2d7f925d1590a7c4ed1561d8a3d96e.tar.bz2 abc-a5e9563a0f2d7f925d1590a7c4ed1561d8a3d96e.zip |
Handling corner cases in TT print-out.
-rw-r--r-- | src/misc/extra/extraUtilFile.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/misc/extra/extraUtilFile.c b/src/misc/extra/extraUtilFile.c index 6b4453a5..6568c305 100644 --- a/src/misc/extra/extraUtilFile.c +++ b/src/misc/extra/extraUtilFile.c @@ -592,6 +592,10 @@ void Extra_PrintHexadecimal( FILE * pFile, unsigned Sign[], int nVars ) void Extra_PrintHexadecimalString( char * pString, unsigned Sign[], int nVars ) { int nDigits, Digit, k; + if ( nVars == 0 && !(Sign[0] & 1) ) { sprintf(pString, "0"); return; } // const0 + if ( nVars == 0 && (Sign[0] & 1) ) { sprintf(pString, "1"); return; } // const1 + if ( nVars == 1 && (Sign[0] & 1) ) { sprintf(pString, "1"); return; } // inverter + if ( nVars == 1 && !(Sign[0] & 1) ) { sprintf(pString, "2"); return; } // buffer // write the number into the file nDigits = (1 << nVars) / 4; for ( k = nDigits - 1; k >= 0; k-- ) |