Commit 681483c9 by Alan Mishchenko

Bug fixes in the above patches.

parent 34ab5957
...@@ -563,6 +563,7 @@ void Ioa_WriteAiger( Aig_Man_t * pMan, char * pFileName, int fWriteSymbols, int ...@@ -563,6 +563,7 @@ void Ioa_WriteAiger( Aig_Man_t * pMan, char * pFileName, int fWriteSymbols, int
// write the symbol table // write the symbol table
if ( fWriteSymbols ) if ( fWriteSymbols )
{ {
int bads;
// write PIs // write PIs
Aig_ManForEachPiSeq( pMan, pObj, i ) Aig_ManForEachPiSeq( pMan, pObj, i )
fprintf( pFile, "i%d %s\n", i, Aig_ObjName(pObj) ); fprintf( pFile, "i%d %s\n", i, Aig_ObjName(pObj) );
...@@ -570,11 +571,11 @@ void Ioa_WriteAiger( Aig_Man_t * pMan, char * pFileName, int fWriteSymbols, int ...@@ -570,11 +571,11 @@ void Ioa_WriteAiger( Aig_Man_t * pMan, char * pFileName, int fWriteSymbols, int
Aig_ManForEachLoSeq( pMan, pObj, i ) Aig_ManForEachLoSeq( pMan, pObj, i )
fprintf( pFile, "l%d %s\n", i, Aig_ObjName(Aig_ObjFanout0(pObj)) ); fprintf( pFile, "l%d %s\n", i, Aig_ObjName(Aig_ObjFanout0(pObj)) );
// write POs // write POs
int bads = Aig_ManCoNum(pMan) - Aig_ManRegNum(pMan) - Aig_ManConstrNum(pMan); bads = Aig_ManCoNum(pMan) - Aig_ManRegNum(pMan) - Aig_ManConstrNum(pMan);
Aig_ManForEachPoSeq( pMan, pObj, i ) Aig_ManForEachPoSeq( pMan, pObj, i )
if ( !Aig_ManConstrNum(pMan) ) if ( !Aig_ManConstrNum(pMan) )
fprintf( pFile, "o%d %s\n", i, Aig_ObjName(pObj) ); fprintf( pFile, "o%d %s\n", i, Aig_ObjName(pObj) );
else ( i < bads ) else if ( i < bads )
fprintf( pFile, "b%d %s\n", i, Aig_ObjName(pObj) ); fprintf( pFile, "b%d %s\n", i, Aig_ObjName(pObj) );
else else
fprintf( pFile, "c%d %s\n", i - bads, Aig_ObjName(pObj) ); fprintf( pFile, "c%d %s\n", i - bads, Aig_ObjName(pObj) );
......
...@@ -549,11 +549,11 @@ void Io_WriteAigerGz( Abc_Ntk_t * pNtk, char * pFileName, int fWriteSymbols ) ...@@ -549,11 +549,11 @@ void Io_WriteAigerGz( Abc_Ntk_t * pNtk, char * pFileName, int fWriteSymbols )
// write POs // write POs
Abc_NtkForEachPo( pNtk, pObj, i ) Abc_NtkForEachPo( pNtk, pObj, i )
if ( !fExtended ) if ( !fExtended )
gzprintf( pFile, "o%d %s\n", i, Aig_ObjName(pObj) ); gzprintf( pFile, "o%d %s\n", i, Abc_ObjName(pObj) );
else ( i < Abc_NtkPoNum(pNtk) - Abc_NtkConstrNum(pNtk) ) else if ( i < Abc_NtkPoNum(pNtk) - Abc_NtkConstrNum(pNtk) )
gzprintf( pFile, "b%d %s\n", i, Aig_ObjName(pObj) ); gzprintf( pFile, "b%d %s\n", i, Abc_ObjName(pObj) );
else else
gzprintf( pFile, "c%d %s\n", i - (Abc_NtkPoNum(pNtk) - Abc_NtkConstrNum(pNtk)), Aig_ObjName(pObj) ); gzprintf( pFile, "c%d %s\n", i - (Abc_NtkPoNum(pNtk) - Abc_NtkConstrNum(pNtk)), Abc_ObjName(pObj) );
} }
// write the comment // write the comment
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment