summaryrefslogtreecommitdiffstats
path: root/src/misc/nm/nm.h
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2006-08-24 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2006-08-24 08:01:00 -0700
commit735bca1658f92881e12a616f9bdc6a58d0a4c60b (patch)
treebf38d65e91be84e4086b585c489411876750f041 /src/misc/nm/nm.h
parent7b09d2d28aa81916f9c06f0993f2569a7ad18596 (diff)
downloadabc-735bca1658f92881e12a616f9bdc6a58d0a4c60b.tar.gz
abc-735bca1658f92881e12a616f9bdc6a58d0a4c60b.tar.bz2
abc-735bca1658f92881e12a616f9bdc6a58d0a4c60b.zip
Version abc60824
Diffstat (limited to 'src/misc/nm/nm.h')
-rw-r--r--src/misc/nm/nm.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/misc/nm/nm.h b/src/misc/nm/nm.h
index 9c96c8ba..89a9efac 100644
--- a/src/misc/nm/nm.h
+++ b/src/misc/nm/nm.h
@@ -25,6 +25,27 @@
extern "C" {
#endif
+/*
+ This manager is designed to store ID-to-name and name-to-ID mapping
+ for Boolean networks and And-Inverter Graphs.
+
+ In a netlist, net names are unique. In this case, there is a one-to-one
+ mapping between IDs and names.
+
+ In a logic network, which do not have nets, several objects may have
+ the same name. For example, a latch output and a primary output.
+ Another example, a primary input and an input to a black box.
+ In this case, for each ID on an object there is only one name,
+ but for each name may be several IDs of objects having this name.
+
+ The name manager maps ID-to-name uniquely but it allows one name to
+ be mapped into several IDs. When a query to find an ID of the object
+ by its name is submitted, it is possible to specify the object type,
+ which will help select one of several IDs. If the type is -1, and
+ there is more than one object with the given name, any object with
+ the given name is returned.
+*/
+
////////////////////////////////////////////////////////////////////////
/// INCLUDES ///
////////////////////////////////////////////////////////////////////////
@@ -51,12 +72,11 @@ typedef struct Nm_Man_t_ Nm_Man_t;
extern Nm_Man_t * Nm_ManCreate( int nSize );
extern void Nm_ManFree( Nm_Man_t * p );
extern int Nm_ManNumEntries( Nm_Man_t * p );
-extern char * Nm_ManStoreIdName( Nm_Man_t * p, int ObjId, char * pName, char * pSuffix );
+extern char * Nm_ManStoreIdName( Nm_Man_t * p, int ObjId, int Type, char * pName, char * pSuffix );
extern void Nm_ManDeleteIdName( Nm_Man_t * p, int ObjId );
extern char * Nm_ManCreateUniqueName( Nm_Man_t * p, int ObjId );
extern char * Nm_ManFindNameById( Nm_Man_t * p, int ObjId );
-extern int Nm_ManFindIdByName( Nm_Man_t * p, char * pName, int * pSecond );
-extern void Nm_ManPrintTables( Nm_Man_t * p );
+extern int Nm_ManFindIdByName( Nm_Man_t * p, char * pName, int Type );
extern Vec_Int_t * Nm_ManReturnNameIds( Nm_Man_t * p );
#ifdef __cplusplus