ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
nmInt.h
Go to the documentation of this file.
1
20
21#ifndef ABC__misc__nm__nmInt_h
22#define ABC__misc__nm__nmInt_h
23
24
28
29#include "misc/extra/extra.h"
30#include "misc/vec/vec.h"
31#include "nm.h"
32
36
37
38
40
41
45
46typedef 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
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
71
75
76/*=== nmTable.c ==========================================================*/
77extern int Nm_ManTableAdd( Nm_Man_t * p, Nm_Entry_t * pEntry );
78extern int Nm_ManTableDelete( Nm_Man_t * p, int ObjId );
79extern Nm_Entry_t * Nm_ManTableLookupId( Nm_Man_t * p, int ObjId );
80extern Nm_Entry_t * Nm_ManTableLookupName( Nm_Man_t * p, char * pName, int Type );
81
82
83
85
86
87
88#endif
89
93
94
#define ABC_NAMESPACE_HEADER_END
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Cube * p
Definition exorList.c:222
struct Extra_MmFlex_t_ Extra_MmFlex_t
Definition extra.h:148
Nm_Entry_t * Nm_ManTableLookupName(Nm_Man_t *p, char *pName, int Type)
Definition nmTable.c:191
int Nm_ManTableAdd(Nm_Man_t *p, Nm_Entry_t *pEntry)
MACRO DEFINITIONS ///.
Definition nmTable.c:71
int Nm_ManTableDelete(Nm_Man_t *p, int ObjId)
Definition nmTable.c:112
Nm_Entry_t * Nm_ManTableLookupId(Nm_Man_t *p, int ObjId)
Definition nmTable.c:171
typedefABC_NAMESPACE_HEADER_START struct Nm_Entry_t_ Nm_Entry_t
INCLUDES ///.
Definition nmInt.h:46
typedefABC_NAMESPACE_HEADER_START struct Nm_Man_t_ Nm_Man_t
INCLUDES ///.
Definition nm.h:63
Definition nmInt.h:48
Nm_Entry_t * pNextN2I
Definition nmInt.h:52
char Name[0]
Definition nmInt.h:54
Nm_Entry_t * pNameSake
Definition nmInt.h:53
unsigned ObjId
Definition nmInt.h:50
unsigned Type
Definition nmInt.h:49
Nm_Entry_t * pNextI2N
Definition nmInt.h:51
int nBins
Definition nmInt.h:61
Extra_MmFlex_t * pMem
Definition nmInt.h:65
int nGrowthFactor
Definition nmInt.h:64
Nm_Entry_t ** pBinsI2N
Definition nmInt.h:59
Nm_Entry_t ** pBinsN2I
Definition nmInt.h:60
int nSizeFactor
Definition nmInt.h:63
int nEntries
Definition nmInt.h:62