-
Notifications
You must be signed in to change notification settings - Fork 933
Expand file tree
/
Copy pathdbObject.h
More file actions
201 lines (184 loc) · 4.18 KB
/
Copy pathdbObject.h
File metadata and controls
201 lines (184 loc) · 4.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2019-2025, The OpenROAD Authors
#pragma once
#include <cstdint>
#include <string>
namespace utl {
class Logger;
}
namespace odb {
///
/// When adding a new database object, you must add a dbObjectType enumerator
/// and edit dbObject.cpp and assign an unique "character" code for its
/// database-name.
///
class _dbDatabase;
class dbOStream;
class dbIStream;
class dbObjectPage;
class dbObjectTable;
class _dbObject;
///
/// Steps to add new objects -
/// - add the "name_tbl" entry in dbObject.cpp
/// - add the table entry to the getObjectTable method of the container
/// object.
///
enum dbObjectType
{
// Design Objects
dbGdsLibObj,
dbBlockObj,
dbInstHdrObj,
dbInstObj,
dbNetObj,
dbBTermObj,
dbITermObj,
dbBoxObj,
dbViaObj,
dbTrackGridObj,
dbObstructionObj,
dbBlockageObj,
dbWireObj,
dbSWireObj,
dbSBoxObj,
dbCapNodeObj,
dbRSegObj,
dbCCSegObj,
dbRowObj,
dbFillObj,
dbRegionObj,
dbHierObj,
dbBPinObj,
// Generator Code Begin DbObjectType
dbAccessPointObj,
dbAlignmentMarkerRuleObj,
dbBusPortObj,
dbCellEdgeSpacingObj,
dbChipObj,
dbChipBumpObj,
dbChipBumpInstObj,
dbChipConnObj,
dbChipInstObj,
dbChipNetObj,
dbChipPathObj,
dbChipRegionObj,
dbChipRegionInstObj,
dbCornerObj,
dbDatabaseObj,
dbDftObj,
dbGCellGridObj,
dbGDSARefObj,
dbGDSBoundaryObj,
dbGDSBoxObj,
dbGDSPathObj,
dbGDSSRefObj,
dbGDSStructureObj,
dbGDSTextObj,
dbGlobalConnectObj,
dbGroupObj,
dbGuideObj,
dbIsolationObj,
dbLevelShifterObj,
dbLogicPortObj,
dbMarkerObj,
dbMarkerCategoryObj,
dbMasterEdgeTypeObj,
dbMetalWidthViaMapObj,
dbModBTermObj,
dbModInstObj,
dbModITermObj,
dbModNetObj,
dbModuleObj,
dbNetTrackObj,
dbPolygonObj,
dbPowerDomainObj,
dbPowerSwitchObj,
dbPropertyObj,
dbScanChainObj,
dbScanInstObj,
dbScanListObj,
dbScanPartitionObj,
dbScanPinObj,
dbTechLayerObj,
dbTechLayerAreaRuleObj,
dbTechLayerArraySpacingRuleObj,
dbTechLayerCornerSpacingRuleObj,
dbTechLayerCutClassRuleObj,
dbTechLayerCutEnclosureRuleObj,
dbTechLayerCutSpacingRuleObj,
dbTechLayerCutSpacingTableDefRuleObj,
dbTechLayerCutSpacingTableOrthRuleObj,
dbTechLayerEolExtensionRuleObj,
dbTechLayerEolKeepOutRuleObj,
dbTechLayerForbiddenSpacingRuleObj,
dbTechLayerKeepOutZoneRuleObj,
dbTechLayerMaxSpacingRuleObj,
dbTechLayerMinCutRuleObj,
dbTechLayerMinStepRuleObj,
dbTechLayerSpacingEolRuleObj,
dbTechLayerSpacingTablePrlRuleObj,
dbTechLayerTwoWiresForbiddenSpcRuleObj,
dbTechLayerVoltageSpacingObj,
dbTechLayerWidthTableRuleObj,
dbTechLayerWrongDirSpacingRuleObj,
dbUnfoldedChipBumpInstObj,
dbUnfoldedChipConnObj,
dbUnfoldedChipInstObj,
dbUnfoldedChipNetObj,
dbUnfoldedChipRegionInstObj,
// Generator Code End DbObjectType
// Lib Objects
dbLibObj,
dbSiteObj,
dbMasterObj,
dbMPinObj,
dbMTermObj,
dbTechAntennaPinModelObj,
// Tech Objects
dbTechObj,
dbTechViaObj,
dbTechNonDefaultRuleObj, // also a design object
dbTechLayerRuleObj, // also a design object
dbTechSameNetRuleObj,
dbTechLayerSpacingRuleObj,
dbTechMinCutRuleObj,
dbTechMinEncRuleObj,
dbTechV55InfluenceEntryObj,
dbTechLayerAntennaRuleObj,
dbTechViaRuleObj,
dbTechViaGenerateRuleObj,
dbTechViaLayerRuleObj,
// Property
dbNameObj
};
class dbDatabase;
class dbObject
{
public:
dbObjectType getObjectType() const;
dbDatabase* getDb() const;
uint32_t getId() const;
const char* getTypeName() const;
std::string getName() const;
bool isValid() const;
static const char* getTypeName(dbObjectType type);
static dbObjectType getType(const char* name, utl::Logger* logger);
///
/// These are not intended for client use as the returned class is
/// not exported. They are for internal db convenience.
///
_dbObject* getImpl();
const _dbObject* getImpl() const;
///
/// Returns object name for debugging
/// e.g., "dbITerm(34, 0x555551234b, 'u0/buf/A')"
///
std::string getDebugName() const;
protected:
dbObject() = default;
~dbObject() = default;
};
dbIStream& operator>>(dbIStream& stream, dbObjectType& type);
dbOStream& operator<<(dbOStream& stream, dbObjectType type);
} // namespace odb