From a03a726de2580b5a58610c4435129d4af66f1c84 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Tue, 17 Jun 2014 14:21:28 -0700 Subject: Bug fix in writing latch init values in 'write_aiger'. --- src/base/io/ioWriteAiger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/base/io') diff --git a/src/base/io/ioWriteAiger.c b/src/base/io/ioWriteAiger.c index 74bde820..b1eb40f4 100644 --- a/src/base/io/ioWriteAiger.c +++ b/src/base/io/ioWriteAiger.c @@ -340,7 +340,7 @@ void Io_WriteAiger_old( Abc_Ntk_t * pNtk, char * pFileName, int fWriteSymbols, i { // Both None and DC are written as 'uninitialized' e.g. a free boolean value assert( Abc_LatchIsInitNone(pLatch) || Abc_LatchIsInitDc(pLatch) ); - fprintf( pFile, "%u %u\n", uLit, Io_ObjMakeLit( Io_ObjAigerNum(pLatch), 0 ) ); + fprintf( pFile, "%u %u\n", uLit, Io_ObjMakeLit( Io_ObjAigerNum(Abc_ObjFanout0(pLatch)), 0 ) ); } } // write PO drivers @@ -492,7 +492,7 @@ void Io_WriteAigerGz( Abc_Ntk_t * pNtk, char * pFileName, int fWriteSymbols ) { // Both None and DC are written as 'uninitialized' e.g. a free boolean value assert( Abc_LatchIsInitNone(pLatch) || Abc_LatchIsInitDc(pLatch) ); - gzprintf( pFile, "%u %u\n", uLit, Io_ObjMakeLit( Io_ObjAigerNum(pLatch), 0 ) ); + gzprintf( pFile, "%u %u\n", uLit, Io_ObjMakeLit( Io_ObjAigerNum(Abc_ObjFanout0(pLatch)), 0 ) ); } } // write PO drivers @@ -737,7 +737,7 @@ void Io_WriteAiger( Abc_Ntk_t * pNtk, char * pFileName, int fWriteSymbols, int f { // Both None and DC are written as 'uninitialized' e.g. a free boolean value assert( Abc_LatchIsInitNone(pLatch) || Abc_LatchIsInitDc(pLatch) ); - fprintfBz2Aig( &b, "%u %u\n", uLit, Io_ObjMakeLit( Io_ObjAigerNum(pLatch), 0 ) ); + fprintfBz2Aig( &b, "%u %u\n", uLit, Io_ObjMakeLit( Io_ObjAigerNum(Abc_ObjFanout0(pLatch)), 0 ) ); } } // write PO drivers -- cgit v1.2.3