Skip to content

Commit ea001a1

Browse files
authored
Merge pull request #8054 from osamahammad21/odb-chipbump
ODB: dbChipBump, dbChipBumpInst and dbChipNet
2 parents 12ff72b + 0f68cd7 commit ea001a1

32 files changed

+1289
-15
lines changed

src/odb/include/odb/db.h

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,11 @@ class dbAccessPoint;
106106
class dbBusPort;
107107
class dbCellEdgeSpacing;
108108
class dbChip;
109+
class dbChipBump;
110+
class dbChipBumpInst;
109111
class dbChipConn;
110112
class dbChipInst;
113+
class dbChipNet;
111114
class dbChipRegion;
112115
class dbChipRegionInst;
113116
class dbDatabase;
@@ -7012,6 +7015,8 @@ class dbChip : public dbObject
70127015

70137016
dbSet<dbChipConn> getChipConns() const;
70147017

7018+
dbSet<dbChipNet> getChipNets() const;
7019+
70157020
///
70167021
/// Create a new chip.
70177022
/// Returns nullptr if there is no database technology.
@@ -7032,6 +7037,41 @@ class dbChip : public dbObject
70327037
// User Code End dbChip
70337038
};
70347039

7040+
class dbChipBump : public dbObject
7041+
{
7042+
public:
7043+
// User Code Begin dbChipBump
7044+
dbChip* getChip() const;
7045+
7046+
dbChipRegion* getChipRegion() const;
7047+
7048+
dbInst* getInst() const;
7049+
7050+
dbNet* getNet() const;
7051+
7052+
dbBTerm* getBTerm() const;
7053+
7054+
void setNet(dbNet* net);
7055+
7056+
void setBTerm(dbBTerm* bterm);
7057+
7058+
static dbChipBump* create(dbChipRegion* chip_region, dbInst* inst);
7059+
7060+
// User Code End dbChipBump
7061+
};
7062+
7063+
class dbChipBumpInst : public dbObject
7064+
{
7065+
public:
7066+
// User Code Begin dbChipBumpInst
7067+
7068+
dbChipBump* getChipBump() const;
7069+
7070+
dbChipRegionInst* getChipRegionInst() const;
7071+
7072+
// User Code End dbChipBumpInst
7073+
};
7074+
70357075
class dbChipConn : public dbObject
70367076
{
70377077
public:
@@ -7094,6 +7134,27 @@ class dbChipInst : public dbObject
70947134
// User Code End dbChipInst
70957135
};
70967136

7137+
class dbChipNet : public dbObject
7138+
{
7139+
public:
7140+
std::string getName() const;
7141+
7142+
// User Code Begin dbChipNet
7143+
dbChip* getChip() const;
7144+
7145+
uint getNumBumpInsts() const;
7146+
7147+
dbChipBumpInst* getBumpInst(uint index, std::vector<dbChipInst*>& path) const;
7148+
7149+
void addBumpInst(dbChipBumpInst* bump_inst,
7150+
const std::vector<dbChipInst*>& path);
7151+
7152+
static dbChipNet* create(dbChip* chip, const std::string& name);
7153+
7154+
static void destroy(dbChipNet* net);
7155+
// User Code End dbChipNet
7156+
};
7157+
70977158
class dbChipRegion : public dbObject
70987159
{
70997160
public:
@@ -7111,6 +7172,8 @@ class dbChipRegion : public dbObject
71117172

71127173
Rect getBox() const;
71137174

7175+
dbSet<dbChipBump> getChipBumps() const;
7176+
71147177
// User Code Begin dbChipRegion
71157178
dbChip* getChip() const;
71167179

@@ -7135,6 +7198,8 @@ class dbChipRegionInst : public dbObject
71357198

71367199
dbChipRegion* getChipRegion() const;
71377200

7201+
dbSet<dbChipBumpInst> getChipBumpInsts() const;
7202+
71387203
// User Code End dbChipRegionInst
71397204
};
71407205

@@ -7153,6 +7218,10 @@ class dbDatabase : public dbObject
71537218

71547219
dbSet<dbChipConn> getChipConns() const;
71557220

7221+
dbSet<dbChipBumpInst> getChipBumpInsts() const;
7222+
7223+
dbSet<dbChipNet> getChipNets() const;
7224+
71567225
// User Code Begin dbDatabase
71577226

71587227
void setTopChip(dbChip* chip);

src/odb/include/odb/dbCompare.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,25 @@ struct less<odb::dbChip*>
479479
}
480480
};
481481

482+
template <>
483+
struct less<odb::dbChipBump*>
484+
{
485+
bool operator()(const odb::dbChipBump* lhs, const odb::dbChipBump* rhs) const
486+
{
487+
return odb::compare_by_id(lhs, rhs);
488+
}
489+
};
490+
491+
template <>
492+
struct less<odb::dbChipBumpInst*>
493+
{
494+
bool operator()(const odb::dbChipBumpInst* lhs,
495+
const odb::dbChipBumpInst* rhs) const
496+
{
497+
return odb::compare_by_id(lhs, rhs);
498+
}
499+
};
500+
482501
template <>
483502
struct less<odb::dbChipConn*>
484503
{
@@ -497,6 +516,15 @@ struct less<odb::dbChipInst*>
497516
}
498517
};
499518

519+
template <>
520+
struct less<odb::dbChipNet*>
521+
{
522+
bool operator()(const odb::dbChipNet* lhs, const odb::dbChipNet* rhs) const
523+
{
524+
return odb::compare_by_id(lhs, rhs);
525+
}
526+
};
527+
500528
template <>
501529
struct less<odb::dbChipRegion*>
502530
{

src/odb/include/odb/dbObject.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,11 @@ enum dbObjectType
6161
dbBusPortObj,
6262
dbCellEdgeSpacingObj,
6363
dbChipObj,
64+
dbChipBumpObj,
65+
dbChipBumpInstObj,
6466
dbChipConnObj,
6567
dbChipInstObj,
68+
dbChipNetObj,
6669
dbChipRegionObj,
6770
dbChipRegionInstObj,
6871
dbDatabaseObj,

src/odb/src/codeGenerator/schema.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,24 @@
189189
"orderReversed": "true",
190190
"sequential": 0,
191191
"includes": ["dbChipConn.h", "dbChip.h"]
192+
},
193+
{
194+
"name": "dbChipBumpInstItr",
195+
"parentObject": "dbChipBumpInst",
196+
"tableName": "chip_bump_inst_tbl",
197+
"reversible": "true",
198+
"orderReversed": "true",
199+
"sequential": 0,
200+
"includes": ["dbChipBumpInst.h", "dbChipRegionInst.h"]
201+
},
202+
{
203+
"name": "dbChipNetItr",
204+
"parentObject": "dbChipNet",
205+
"tableName": "chip_net_tbl",
206+
"reversible": "true",
207+
"orderReversed": "true",
208+
"sequential": 0,
209+
"includes": ["dbChipNet.h", "dbChip.h"]
192210
}
193211
],
194212
"relations":[
@@ -407,6 +425,14 @@
407425
"schema":"db_schema_chip_region",
408426
"tbl_name":"chip_region_tbl_"
409427
},
428+
{
429+
"parent":"dbChipRegion",
430+
"child":"dbChipBump",
431+
"type":"1_n",
432+
"flags": [],
433+
"schema":"db_schema_chip_bump",
434+
"tbl_name":"chip_bump_tbl_"
435+
},
410436
{
411437
"parent":"dbDatabase",
412438
"child":"dbChip",
@@ -446,6 +472,22 @@
446472
"tbl_name":"chip_conn_tbl_",
447473
"schema":"db_schema_chip_region",
448474
"flags": ["no-serial"]
475+
},
476+
{
477+
"parent":"dbDatabase",
478+
"child":"dbChipBumpInst",
479+
"type":"1_n",
480+
"tbl_name":"chip_bump_inst_tbl_",
481+
"schema":"db_schema_chip_bump",
482+
"flags": ["no-serial"]
483+
},
484+
{
485+
"parent":"dbDatabase",
486+
"child":"dbChipNet",
487+
"type":"1_n",
488+
"tbl_name":"chip_net_tbl_",
489+
"schema":"db_schema_chip_region",
490+
"flags": ["no-serial"]
449491
}
450492
]
451493
}

src/odb/src/codeGenerator/schema/chip/dbChip.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@
154154
"type": "dbId<_dbChipConn>",
155155
"flags": ["private"],
156156
"schema": "db_schema_chip_region"
157+
},
158+
{
159+
"name": "nets_",
160+
"type": "dbId<_dbChipNet>",
161+
"flags": ["private"],
162+
"schema": "db_schema_chip_bump"
157163
}
158164
],
159165
"declared_classes": ["dbPropertyItr", "_dbNameCache","dbBlockItr"],
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "dbChipBump",
3+
"type": "dbObject",
4+
"fields": [
5+
{ "name": "inst_", "type":"dbId<_dbInst>", "flags": ["private"] },
6+
{ "name": "chip_", "type":"dbId<_dbChip>", "flags": ["private"] },
7+
{ "name": "chip_region_", "type":"dbId<_dbChipRegion>", "flags": ["private"] },
8+
{ "name": "net_", "type":"dbId<_dbNet>", "flags": ["private"] },
9+
{ "name": "bterm_", "type":"dbId<_dbBTerm>", "flags": ["private"] }
10+
],
11+
"h_includes": ["odb/dbId.h"],
12+
"cpp_includes": ["dbInst.h", "dbChip.h"]
13+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "dbChipBumpInst",
3+
"type": "dbObject",
4+
"fields": [
5+
{ "name": "chip_bump_", "type":"dbId<_dbChipBump>", "flags": ["private"] },
6+
{ "name": "chip_region_inst_", "type":"dbId<_dbChipRegionInst>", "flags": ["private"] },
7+
{ "name": "region_next_", "type":"dbId<_dbChipBumpInst>", "flags": ["private"] }
8+
],
9+
"h_includes": ["odb/dbId.h"],
10+
"cpp_includes": ["dbInst.h", "dbChip.h"]
11+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "dbChipNet",
3+
"type": "dbObject",
4+
"fields": [
5+
{
6+
"name": "name_",
7+
"type": "std::string",
8+
"flags": [
9+
"no-set"
10+
]
11+
},
12+
{
13+
"name": "chip_",
14+
"type": "dbId<_dbChip>",
15+
"flags": [
16+
"private"
17+
]
18+
},
19+
{
20+
"name": "chip_net_next_",
21+
"type": "dbId<_dbChipNet>",
22+
"flags": [
23+
"private"
24+
]
25+
},
26+
{
27+
"name": "bump_insts_paths_",
28+
"type": "std::vector<std::pair<std::vector<dbId<_dbChipInst>>, dbId<_dbChipBumpInst>>>",
29+
"flags": [
30+
"private"
31+
]
32+
}
33+
],
34+
"h_includes": [
35+
"odb/dbId.h"
36+
],
37+
"cpp_includes": [
38+
"dbChipRegionInst.h",
39+
"dbChipInst.h",
40+
"dbChipBumpInst.h",
41+
"dbChip.h"
42+
]
43+
}

src/odb/src/codeGenerator/schema/chip/dbChipRegionInst.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
"name":"chip_region_inst_next_",
1717
"type":"dbId<_dbChipRegionInst>",
1818
"flags":["private"]
19+
},
20+
{
21+
"name":"chip_bump_insts_",
22+
"type":"dbId<_dbChipBumpInst>",
23+
"flags":["private"]
1924
}
2025
],
2126
"h_includes": [

src/odb/src/db/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@ add_library(db
8888
dbBusPort.cpp
8989
dbCellEdgeSpacing.cpp
9090
dbChip.cpp
91+
dbChipBump.cpp
92+
dbChipBumpInst.cpp
9193
dbChipConn.cpp
9294
dbChipInst.cpp
95+
dbChipNet.cpp
9396
dbChipRegion.cpp
9497
dbChipRegionInst.cpp
9598
dbDatabase.cpp
@@ -148,8 +151,10 @@ add_library(db
148151
dbTechLayerTwoWiresForbiddenSpcRule.cpp
149152
dbTechLayerWidthTableRule.cpp
150153
dbTechLayerWrongDirSpacingRule.cpp
154+
dbChipBumpInstItr.cpp
151155
dbChipConnItr.cpp
152156
dbChipInstItr.cpp
157+
dbChipNetItr.cpp
153158
dbChipRegionInstItr.cpp
154159
dbGroupInstItr.cpp
155160
dbGroupItr.cpp

0 commit comments

Comments
 (0)