ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
nm.h
Go to the documentation of this file.
1
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
49
53
54
55
57
58
62
63typedef struct Nm_Man_t_ Nm_Man_t;
64
68
72
73/*=== nmApi.c ==========================================================*/
74extern Nm_Man_t * Nm_ManCreate( int nSize );
75extern void Nm_ManFree( Nm_Man_t * p );
76extern int Nm_ManNumEntries( Nm_Man_t * p );
77extern char * Nm_ManStoreIdName( Nm_Man_t * p, int ObjId, int Type, char * pName, char * pSuffix );
78extern void Nm_ManDeleteIdName( Nm_Man_t * p, int ObjId );
79extern char * Nm_ManCreateUniqueName( Nm_Man_t * p, int ObjId );
80extern char * Nm_ManFindNameById( Nm_Man_t * p, int ObjId );
81extern int Nm_ManFindIdByName( Nm_Man_t * p, char * pName, int Type );
82extern int Nm_ManFindIdByNameTwoTypes( Nm_Man_t * p, char * pName, int Type1, int Type2 );
84
85
86
88
89
90
91#endif
92
96
#define ABC_NAMESPACE_HEADER_END
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
Cube * p
Definition exorList.c:222
Vec_Int_t * Nm_ManReturnNameIds(Nm_Man_t *p)
Definition nmApi.c:261
int Nm_ManNumEntries(Nm_Man_t *p)
Definition nmApi.c:95
char * Nm_ManFindNameById(Nm_Man_t *p, int ObjId)
Definition nmApi.c:199
void Nm_ManFree(Nm_Man_t *p)
Definition nmApi.c:76
int Nm_ManFindIdByNameTwoTypes(Nm_Man_t *p, char *pName, int Type1, int Type2)
Definition nmApi.c:239
void Nm_ManDeleteIdName(Nm_Man_t *p, int ObjId)
Definition nmApi.c:149
char * Nm_ManCreateUniqueName(Nm_Man_t *p, int ObjId)
Definition nmApi.c:175
int Nm_ManFindIdByName(Nm_Man_t *p, char *pName, int Type)
Definition nmApi.c:219
Nm_Man_t * Nm_ManCreate(int nSize)
MACRO DEFINITIONS ///.
Definition nmApi.c:45
typedefABC_NAMESPACE_HEADER_START struct Nm_Man_t_ Nm_Man_t
INCLUDES ///.
Definition nm.h:63
char * Nm_ManStoreIdName(Nm_Man_t *p, int ObjId, int Type, char *pName, char *pSuffix)
Definition nmApi.c:112