summaryrefslogtreecommitdiffstats
path: root/src/base/io
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-06-17 14:21:28 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2014-06-17 14:21:28 -0700
commita03a726de2580b5a58610c4435129d4af66f1c84 (patch)
tree5a367fd0857dc2e92eeecc2dc7efebc7b784b1e2 /src/base/io
parentdd867b404acec3d7e22663189bdf1108435a381d (diff)
downloadabc-a03a726de2580b5a58610c4435129d4af66f1c84.tar.gz
abc-a03a726de2580b5a58610c4435129d4af66f1c84.tar.bz2
abc-a03a726de2580b5a58610c4435129d4af66f1c84.zip
Bug fix in writing latch init values in 'write_aiger'.
Diffstat (limited to 'src/base/io')
-rw-r--r--src/base/io/ioWriteAiger.c6
1 files changed, 3 insertions, 3 deletions
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