Merge pull request #310 from QuantamHD/ethan_fixing_things_2

Adds option to unmap network using a non static version of the library
This commit is contained in:
alanminko 2024-07-31 18:31:26 -07:00 committed by GitHub
commit 279a909a05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 4 deletions

View File

@ -678,6 +678,7 @@ extern ABC_DLL void Abc_NtkLogicMakeDirectSops( Abc_Ntk_t * pNtk )
extern ABC_DLL int Abc_NtkSopToAig( Abc_Ntk_t * pNtk );
extern ABC_DLL int Abc_NtkAigToBdd( Abc_Ntk_t * pNtk );
extern ABC_DLL Gia_Man_t * Abc_NtkAigToGia( Abc_Ntk_t * p, int fGiaSimple );
extern ABC_DLL int Abc_NtkMapToSopUsingLibrary( Abc_Ntk_t * pNtk, void* library );
extern ABC_DLL int Abc_NtkMapToSop( Abc_Ntk_t * pNtk );
extern ABC_DLL int Abc_NtkToSop( Abc_Ntk_t * pNtk, int fMode, int nCubeLimit );
extern ABC_DLL int Abc_NtkToBdd( Abc_Ntk_t * pNtk );

View File

@ -1182,7 +1182,7 @@ Abc_Obj_t * Abc_ConvertAigToAig( Abc_Ntk_t * pNtkAig, Abc_Obj_t * pObjOld )
/**Function*************************************************************
Synopsis [Unmaps the network.]
Synopsis [Unmaps the network with user provided Mio library.]
Description []
@ -1191,16 +1191,15 @@ Abc_Obj_t * Abc_ConvertAigToAig( Abc_Ntk_t * pNtkAig, Abc_Obj_t * pObjOld )
SeeAlso []
***********************************************************************/
int Abc_NtkMapToSop( Abc_Ntk_t * pNtk )
int Abc_NtkMapToSopUsingLibrary( Abc_Ntk_t * pNtk, void* library)
{
extern void * Abc_FrameReadLibGen();
Abc_Obj_t * pNode;
char * pSop;
int i;
assert( Abc_NtkHasMapping(pNtk) );
// update the functionality manager
assert( pNtk->pManFunc == Abc_FrameReadLibGen() );
assert( pNtk->pManFunc == (void*) library );
pNtk->pManFunc = Mem_FlexStart();
// update the nodes
Abc_NtkForEachNode( pNtk, pNode, i )
@ -1215,6 +1214,23 @@ int Abc_NtkMapToSop( Abc_Ntk_t * pNtk )
return 1;
}
/**Function*************************************************************
Synopsis [Unmaps the network.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int Abc_NtkMapToSop( Abc_Ntk_t * pNtk )
{
extern void * Abc_FrameReadLibGen();
return Abc_NtkMapToSopUsingLibrary(pNtk, Abc_FrameReadLibGen());
}
/**Function*************************************************************
Synopsis [Converts SOP functions into BLIF-MV functions.]