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
// write the symbol table
if ( fWriteSymbols )
{
int bads;
// write PIs
Aig_ManForEachPiSeq( pMan, pObj, i )
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
Aig_ManForEachLoSeq( pMan, pObj, i )
fprintf( pFile, "l%d %s\n", i, Aig_ObjName(Aig_ObjFanout0(pObj)) );
// 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 )
if ( !Aig_ManConstrNum(pMan) )
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) );
else
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 )
// write POs
Abc_NtkForEachPo( pNtk, pObj, i )
if ( !fExtended )
gzprintf( pFile, "o%d %s\n", i, Aig_ObjName(pObj) );
else ( i < Abc_NtkPoNum(pNtk) - Abc_NtkConstrNum(pNtk) )
gzprintf( pFile, "b%d %s\n", i, Aig_ObjName(pObj) );
gzprintf( pFile, "o%d %s\n", i, Abc_ObjName(pObj) );
else if ( i < Abc_NtkPoNum(pNtk) - Abc_NtkConstrNum(pNtk) )
gzprintf( pFile, "b%d %s\n", i, Abc_ObjName(pObj) );
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
......
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