abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
nmInt.h
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [nmInt.h]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Name manager.]
8 
9  Synopsis [Internal 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: nmInt.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #ifndef ABC__misc__nm__nmInt_h
22 #define ABC__misc__nm__nmInt_h
23 
24 
25 ////////////////////////////////////////////////////////////////////////
26 /// INCLUDES ///
27 ////////////////////////////////////////////////////////////////////////
28 
29 #include "misc/extra/extra.h"
30 #include "misc/vec/vec.h"
31 #include "nm.h"
32 
33 ////////////////////////////////////////////////////////////////////////
34 /// PARAMETERS ///
35 ////////////////////////////////////////////////////////////////////////
36 
37 
38 
40 
41 
42 ////////////////////////////////////////////////////////////////////////
43 /// BASIC TYPES ///
44 ////////////////////////////////////////////////////////////////////////
45 
46 typedef struct Nm_Entry_t_ Nm_Entry_t;
48 {
49  unsigned Type; // object type
50  unsigned ObjId; // object ID
51  Nm_Entry_t * pNextI2N; // the next entry in the ID hash table
52  Nm_Entry_t * pNextN2I; // the next entry in the name hash table
53  Nm_Entry_t * pNameSake; // the next entry with the same name
54  char Name[0]; // name of the object
55 };
56 
57 struct Nm_Man_t_
58 {
59  Nm_Entry_t ** pBinsI2N; // mapping IDs into names
60  Nm_Entry_t ** pBinsN2I; // mapping names into IDs
61  int nBins; // the number of bins in tables
62  int nEntries; // the number of entries
63  int nSizeFactor; // determined how much larger the table should be
64  int nGrowthFactor; // determined how much the table grows after resizing
65  Extra_MmFlex_t * pMem; // memory manager for entries (and names)
66 };
67 
68 ////////////////////////////////////////////////////////////////////////
69 /// MACRO DEFINITIONS ///
70 ////////////////////////////////////////////////////////////////////////
71 
72 ////////////////////////////////////////////////////////////////////////
73 /// FUNCTION DECLARATIONS ///
74 ////////////////////////////////////////////////////////////////////////
75 
76 /*=== nmTable.c ==========================================================*/
77 extern int Nm_ManTableAdd( Nm_Man_t * p, Nm_Entry_t * pEntry );
78 extern int Nm_ManTableDelete( Nm_Man_t * p, int ObjId );
79 extern Nm_Entry_t * Nm_ManTableLookupId( Nm_Man_t * p, int ObjId );
80 extern Nm_Entry_t * Nm_ManTableLookupName( Nm_Man_t * p, char * pName, int Type );
81 
82 
83 
85 
86 
87 
88 #endif
89 
90 ////////////////////////////////////////////////////////////////////////
91 /// END OF FILE ///
92 ////////////////////////////////////////////////////////////////////////
93 
94 
int Nm_ManTableDelete(Nm_Man_t *p, int ObjId)
Definition: nmTable.c:112
Nm_Entry_t ** pBinsN2I
Definition: nmInt.h:60
static Llb_Mgr_t * p
Definition: llb3Image.c:950
Nm_Entry_t * pNextN2I
Definition: nmInt.h:52
Definition: nmInt.h:47
typedefABC_NAMESPACE_HEADER_START struct Nm_Entry_t_ Nm_Entry_t
INCLUDES ///.
Definition: nmInt.h:46
int nGrowthFactor
Definition: nmInt.h:64
Nm_Entry_t * Nm_ManTableLookupId(Nm_Man_t *p, int ObjId)
Definition: nmTable.c:171
Nm_Entry_t * pNextI2N
Definition: nmInt.h:51
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
int nEntries
Definition: nmInt.h:62
#define ABC_NAMESPACE_HEADER_END
Definition: abc_global.h:106
Nm_Entry_t * pNameSake
Definition: nmInt.h:53
char Name[0]
Definition: nmInt.h:54
Extra_MmFlex_t * pMem
Definition: nmInt.h:65
unsigned Type
Definition: nmInt.h:49
Nm_Entry_t * Nm_ManTableLookupName(Nm_Man_t *p, char *pName, int Type)
Definition: nmTable.c:191
int nSizeFactor
Definition: nmInt.h:63
int Nm_ManTableAdd(Nm_Man_t *p, Nm_Entry_t *pEntry)
MACRO DEFINITIONS ///.
Definition: nmTable.c:71
int nBins
Definition: nmInt.h:61
unsigned ObjId
Definition: nmInt.h:50
Nm_Entry_t ** pBinsI2N
Definition: nmInt.h:59