Commit 2e1dcdd2 by Alan Mishchenko

Added model ID inside the design.

parent 56cc5734
......@@ -193,6 +193,7 @@ struct Abc_Ntk_t_
Abc_Lib_t * pDesign;
short fHieVisited; // flag to mark the visited network
short fHiePath; // flag to mark the network on the path
int Id; // model ID
// miscellaneous data members
int nTravIds; // the unique traversal IDs of nodes
Mem_Fixed_t * pMmObj; // memory manager for objects
......
......@@ -174,6 +174,8 @@ int Abc_LibAddModel( Abc_Lib_t * pLib, Abc_Ntk_t * pNtk )
if ( st_is_member( pLib->tModules, (char *)pNtk->pName ) )
return 0;
st_insert( pLib->tModules, (char *)pNtk->pName, (char *)pNtk );
assert( pNtk->Id == 0 );
pNtk->Id = Vec_PtrSize(pLib->vModules);
Vec_PtrPush( pLib->vModules, pNtk );
pNtk->pDesign = pLib;
return 1;
......
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