/**Function************************************************************* Synopsis [Procedures to read/write GIA to/from MiniAIG file.] Description [] SideEffects [] SeeAlso [] ***********************************************************************/ Gia_Man_t * Gia_ManReadMiniAig( char * pFileName ) { Mini_Aig_t * p = Mini_AigLoad( pFileName ); Gia_Man_t * pGia = Gia_ManFromMiniAig( p ); ABC_FREE( pGia->pName ); pGia->pName = Extra_FileNameGeneric( pFileName ); Mini_AigStop( p ); return pGia; }
/**Function************************************************************* Synopsis [Testing the above code.] Description [] SideEffects [] SeeAlso [] ***********************************************************************/ void Abc_NtkMiniAigTest( Abc_Ntk_t * pNtk ) { Abc_Ntk_t * pNtkNew; Mini_Aig_t * p; p = Abc_NtkToMiniAig( pNtk ); pNtkNew = Abc_NtkFromMiniAig( p ); Mini_AigStop( p ); Abc_NtkPrintStats( pNtkNew, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); Abc_NtkDelete( pNtkNew ); // test dumping p = Abc_NtkToMiniAig( pNtk ); Mini_AigDump( p, "miniaig.data" ); Mini_AigPrintStats( p ); Mini_AigStop( p ); p = Mini_AigLoad( "miniaig.data" ); Mini_AigPrintStats( p ); Mini_AigStop( p ); }