diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-04-18 00:05:11 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-04-18 00:05:11 -0700 |
commit | 96b784ecd7cc05f99e12d52f36437c9bd9eb2375 (patch) | |
tree | be730d9a80266baf0b3f664e58b5ab32784703c5 /src/base/io | |
parent | 61ecc9c633d227160c720d6f0f611cf4e62a9602 (diff) | |
download | abc-96b784ecd7cc05f99e12d52f36437c9bd9eb2375.tar.gz abc-96b784ecd7cc05f99e12d52f36437c9bd9eb2375.tar.bz2 abc-96b784ecd7cc05f99e12d52f36437c9bd9eb2375.zip |
Fixing both AIGER readers (read_aiger and &r) to work with AIGER 1.9 (except for liveness properties).
Diffstat (limited to 'src/base/io')
-rw-r--r-- | src/base/io/ioReadAiger.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/base/io/ioReadAiger.c b/src/base/io/ioReadAiger.c index b936ceb2..5c31f56c 100644 --- a/src/base/io/ioReadAiger.c +++ b/src/base/io/ioReadAiger.c @@ -423,13 +423,19 @@ Abc_Ntk_t * Io_ReadAiger( char * pFileName, int fCheck ) uLit0 = atoi( pCur ); while ( *pCur != ' ' && *pCur != '\n' ) pCur++; if ( *pCur == ' ' ) // read initial value { + int Init; pCur++; - if ( atoi( pCur ) == 0 ) + Init = atoi( pCur ); + if ( Init == 0 ) Abc_LatchSetInit0( Abc_NtkBox(pNtkNew, i) ); - else if ( atoi( pCur ) == 1 ) + else if ( Init == 1 ) Abc_LatchSetInit1( Abc_NtkBox(pNtkNew, i) ); else + { + assert( Init == Abc_Var2Lit(1+Abc_NtkPiNum(pNtkNew)+i, 0) ); + // unitialized value of the latch is the latch literal according to http://fmv.jku.at/hwmcc11/beyond1.pdf Abc_LatchSetInitDc( Abc_NtkBox(pNtkNew, i) ); + } while ( *pCur != ' ' && *pCur != '\n' ) pCur++; } if ( *pCur != '\n' ) |