abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
nm.h
Go to the documentation of this file.
1 /**CFilextern e****************************************************************
2 
3  FileName [nm.h]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Name manager.]
8 
9  Synopsis [External declarations.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: nm.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #ifndef ABC__misc__nm__nm_h
22 #define ABC__misc__nm__nm_h
23 
24 
25 /*
26  This manager is designed to store ID-to-name and name-to-ID mapping
27  for Boolean networks and And-Inverter Graphs.
28 
29  In a netlist, net names are unique. In this case, there is a one-to-one
30  mapping between IDs and names.
31 
32  In a logic network, which do not have nets, several objects may have
33  the same name. For example, a latch output and a primary output.
34  Another example, a primary input and an input to a black box.
35  In this case, for each ID on an object there is only one name,
36  but for each name may be several IDs of objects having this name.
37 
38  The name manager maps ID-to-name uniquely but it allows one name to
39  be mapped into several IDs. When a query to find an ID of the object
40  by its name is submitted, it is possible to specify the object type,
41  which will help select one of several IDs. If the type is -1, and
42  there is more than one object with the given name, any object with
43  the given name is returned.
44 */
45 
46 ////////////////////////////////////////////////////////////////////////
47 /// INCLUDES ///
48 ////////////////////////////////////////////////////////////////////////
49 
50 ////////////////////////////////////////////////////////////////////////
51 /// PARAMETERS ///
52 ////////////////////////////////////////////////////////////////////////
53 
54 
55 
57 
58 
59 ////////////////////////////////////////////////////////////////////////
60 /// BASIC TYPES ///
61 ////////////////////////////////////////////////////////////////////////
62 
63 typedef struct Nm_Man_t_ Nm_Man_t;
64 
65 ////////////////////////////////////////////////////////////////////////
66 /// MACRO DEFINITIONS ///
67 ////////////////////////////////////////////////////////////////////////
68 
69 ////////////////////////////////////////////////////////////////////////
70 /// FUNCTION DECLARATIONS ///
71 ////////////////////////////////////////////////////////////////////////
72 
73 /*=== nmApi.c ==========================================================*/
74 extern Nm_Man_t * Nm_ManCreate( int nSize );
75 extern void Nm_ManFree( Nm_Man_t * p );
76 extern int Nm_ManNumEntries( Nm_Man_t * p );
77 extern char * Nm_ManStoreIdName( Nm_Man_t * p, int ObjId, int Type, char * pName, char * pSuffix );
78 extern void Nm_ManDeleteIdName( Nm_Man_t * p, int ObjId );
79 extern char * Nm_ManCreateUniqueName( Nm_Man_t * p, int ObjId );
80 extern char * Nm_ManFindNameById( Nm_Man_t * p, int ObjId );
81 extern int Nm_ManFindIdByName( Nm_Man_t * p, char * pName, int Type );
82 extern int Nm_ManFindIdByNameTwoTypes( Nm_Man_t * p, char * pName, int Type1, int Type2 );
84 
85 
86 
88 
89 
90 
91 #endif
92 
93 ////////////////////////////////////////////////////////////////////////
94 /// END OF FILE ///
95 ////////////////////////////////////////////////////////////////////////
96 
int Nm_ManFindIdByName(Nm_Man_t *p, char *pName, int Type)
Definition: nmApi.c:219
void Nm_ManDeleteIdName(Nm_Man_t *p, int ObjId)
Definition: nmApi.c:149
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
int Nm_ManNumEntries(Nm_Man_t *p)
Definition: nmApi.c:95
Vec_Int_t * Nm_ManReturnNameIds(Nm_Man_t *p)
Definition: nmApi.c:261
char * Nm_ManStoreIdName(Nm_Man_t *p, int ObjId, int Type, char *pName, char *pSuffix)
Definition: nmApi.c:112
int Nm_ManFindIdByNameTwoTypes(Nm_Man_t *p, char *pName, int Type1, int Type2)
Definition: nmApi.c:239
char * Nm_ManFindNameById(Nm_Man_t *p, int ObjId)
Definition: nmApi.c:199
typedefABC_NAMESPACE_HEADER_START struct Nm_Man_t_ Nm_Man_t
INCLUDES ///.
Definition: nm.h:63
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Definition: abc_global.h:105
#define ABC_NAMESPACE_HEADER_END
Definition: abc_global.h:106
char * Nm_ManCreateUniqueName(Nm_Man_t *p, int ObjId)
Definition: nmApi.c:175
Nm_Man_t * Nm_ManCreate(int nSize)
MACRO DEFINITIONS ///.
Definition: nmApi.c:45
void Nm_ManFree(Nm_Man_t *p)
Definition: nmApi.c:76