summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-01-12 23:29:47 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2012-01-12 23:29:47 -0800
commit2e1dcdd239c1376a4fa2a7b9d01515319b74b4d0 (patch)
treebe75a9dfc7a30d086447968a8b29e3b2146716a1
parent56cc5734a4f9b75484142d5c964397bd2e00300e (diff)
downloadabc-2e1dcdd239c1376a4fa2a7b9d01515319b74b4d0.tar.gz
abc-2e1dcdd239c1376a4fa2a7b9d01515319b74b4d0.tar.bz2
abc-2e1dcdd239c1376a4fa2a7b9d01515319b74b4d0.zip
Added model ID inside the design.
-rw-r--r--src/base/abc/abc.h1
-rw-r--r--src/base/abc/abcLib.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/base/abc/abc.h b/src/base/abc/abc.h
index de789fc6..8df9ea70 100644
--- a/src/base/abc/abc.h
+++ b/src/base/abc/abc.h
@@ -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
diff --git a/src/base/abc/abcLib.c b/src/base/abc/abcLib.c
index f376f039..a9bb5691 100644
--- a/src/base/abc/abcLib.c
+++ b/src/base/abc/abcLib.c
@@ -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;