diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-10-05 21:02:46 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-10-05 21:02:46 -0700 |
commit | 369b5f479ae28ed67b29ce524c58d2dee8733c7e (patch) | |
tree | 4cc6c4e5e84401583a230bc575abe5505b80937d /src/base/abci | |
parent | b852db94fbe7f6652ffcef6964195a4ea4d02108 (diff) | |
download | abc-369b5f479ae28ed67b29ce524c58d2dee8733c7e.tar.gz abc-369b5f479ae28ed67b29ce524c58d2dee8733c7e.tar.bz2 abc-369b5f479ae28ed67b29ce524c58d2dee8733c7e.zip |
Allow for binary input file in 'testdec' and 'testnpn'.
Diffstat (limited to 'src/base/abci')
-rw-r--r-- | src/base/abci/abcDec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/base/abci/abcDec.c b/src/base/abci/abcDec.c index 7b8370cd..7e49beb1 100644 --- a/src/base/abci/abcDec.c +++ b/src/base/abci/abcDec.c @@ -399,14 +399,16 @@ Abc_TtStore_t * Abc_TtStoreLoad( char * pFileName, int nVarNum ) Abc_TruthStoreRead( pFileName, p ); } else - { + { char * pBuffer; int nFileSize = Abc_FileSize( pFileName ); int nBytes = (1 << nVarNum); int nTruths = nFileSize / nBytes; if ( nFileSize == -1 ) return NULL; - assert( nFileSize % nBytes == 0 ); + if ( nFileSize % nBytes != 0 ) + Abc_Print( 0, "The file size (%d) is divided by the truth table size (%d) with remainder (%d).\n", + nFileSize, nBytes, nFileSize % nBytes ); // read file contents pBuffer = Abc_FileRead( pFileName ); // allocate data-structure |