Skip to content

Commit 6ccfe7c

Browse files
authored
Merge pull request #8002 from osamahammad21/odb-database-chip
ODB: codeGenerate dbDatabase and dbChip
2 parents 5f3c357 + 16ae4d1 commit 6ccfe7c

File tree

12 files changed

+1182
-546
lines changed

12 files changed

+1182
-546
lines changed

src/odb/include/odb/db.h

Lines changed: 277 additions & 224 deletions
Large diffs are not rendered by default.

src/odb/include/odb/dbCompare.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,6 @@ struct less<odb::dbDoubleProperty*>
7575
}
7676
};
7777

78-
template <>
79-
struct less<odb::dbDatabase*>
80-
{
81-
bool operator()(const odb::dbDatabase* lhs, const odb::dbDatabase* rhs) const
82-
{
83-
return odb::compare_by_id(lhs, rhs);
84-
}
85-
};
86-
8778
template <>
8879
struct less<odb::dbBox*>
8980
{
@@ -102,15 +93,6 @@ struct less<odb::dbSBox*>
10293
}
10394
};
10495

105-
template <>
106-
struct less<odb::dbChip*>
107-
{
108-
bool operator()(const odb::dbChip* lhs, const odb::dbChip* rhs) const
109-
{
110-
return odb::compare_by_id(lhs, rhs);
111-
}
112-
};
113-
11496
template <>
11597
struct less<odb::dbBlock*>
11698
{
@@ -488,6 +470,24 @@ struct less<odb::dbCellEdgeSpacing*>
488470
}
489471
};
490472

473+
template <>
474+
struct less<odb::dbChip*>
475+
{
476+
bool operator()(const odb::dbChip* lhs, const odb::dbChip* rhs) const
477+
{
478+
return odb::compare_by_id(lhs, rhs);
479+
}
480+
};
481+
482+
template <>
483+
struct less<odb::dbDatabase*>
484+
{
485+
bool operator()(const odb::dbDatabase* lhs, const odb::dbDatabase* rhs) const
486+
{
487+
return odb::compare_by_id(lhs, rhs);
488+
}
489+
};
490+
491491
template <>
492492
struct less<odb::dbDft*>
493493
{

src/odb/include/odb/dbObject.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ class _dbObject;
3131
///
3232
enum dbObjectType
3333
{
34-
dbDatabaseObj,
3534

3635
// Design Objects
37-
dbChipObj,
3836
dbGdsLibObj,
3937
dbBlockObj,
4038
dbInstHdrObj,
@@ -62,6 +60,8 @@ enum dbObjectType
6260
dbAccessPointObj,
6361
dbBusPortObj,
6462
dbCellEdgeSpacingObj,
63+
dbChipObj,
64+
dbDatabaseObj,
6565
dbDftObj,
6666
dbGCellGridObj,
6767
dbGDSARefObj,

src/odb/src/codeGenerator/schema.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,21 @@
364364
"type":"1_n",
365365
"tbl_name":"categories_tbl_",
366366
"hash":true
367+
},
368+
{
369+
"parent":"dbChip",
370+
"child":"dbProperty",
371+
"type":"1_n",
372+
"flags": ["no-serial", "private"],
373+
"tbl_name":"_prop_tbl"
374+
},
375+
{
376+
"parent":"dbDatabase",
377+
"child":"dbChip",
378+
"type":"1_n",
379+
"tbl_name":"_chip_tbl",
380+
"flags": ["no-serial"],
381+
"page_size": 2
367382
}
368383
]
369384
}
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
{
2+
"name": "dbChip",
3+
"type": "dbObject",
4+
"ostream_scope": true,
5+
"hash" : "0x1",
6+
"enums": [
7+
{
8+
"name": "ChipType",
9+
"class": true,
10+
"values": [
11+
"DIE",
12+
"RDL",
13+
"IP",
14+
"SUBSTRATE",
15+
"HIER"
16+
],
17+
"public": true
18+
}
19+
],
20+
"fields": [
21+
{
22+
"name": "name_",
23+
"type": "std::string",
24+
"schema": "db_schema_chip_extended",
25+
"flags": ["no-set"]
26+
},
27+
{
28+
"name": "type_",
29+
"type": "uint",
30+
"default": 0,
31+
"schema": "db_schema_chip_extended",
32+
"flags": ["private"]
33+
},
34+
{
35+
"name": "offset_",
36+
"type": "Point",
37+
"default": "{}",
38+
"schema": "db_schema_chip_extended"
39+
},
40+
{
41+
"name": "width_",
42+
"type": "int",
43+
"default": "0",
44+
"schema": "db_schema_chip_extended"
45+
},
46+
{
47+
"name": "height_",
48+
"type": "int",
49+
"default": "0",
50+
"schema": "db_schema_chip_extended"
51+
},
52+
{
53+
"name": "thickness_",
54+
"type": "int",
55+
"default": "0",
56+
"schema": "db_schema_chip_extended"
57+
},
58+
{
59+
"name": "shrink_",
60+
"type": "float",
61+
"default": "0.0",
62+
"comment": "// range ]0, 1]",
63+
"schema": "db_schema_chip_extended"
64+
},
65+
{
66+
"name": "seal_ring_east_",
67+
"type": "int",
68+
"default": "0",
69+
"schema": "db_schema_chip_extended"
70+
},
71+
{
72+
"name": "seal_ring_west_",
73+
"type": "int",
74+
"default": "0",
75+
"schema": "db_schema_chip_extended"
76+
},
77+
{
78+
"name": "seal_ring_north_",
79+
"type": "int",
80+
"default": "0",
81+
"schema": "db_schema_chip_extended"
82+
},
83+
{
84+
"name": "seal_ring_south_",
85+
"type": "int",
86+
"default": "0",
87+
"schema": "db_schema_chip_extended"
88+
},
89+
{
90+
"name": "scribe_line_east_",
91+
"type": "int",
92+
"default": "0",
93+
"schema": "db_schema_chip_extended"
94+
},
95+
{
96+
"name": "scribe_line_west_",
97+
"type": "int",
98+
"default": "0",
99+
"schema": "db_schema_chip_extended"
100+
},
101+
{
102+
"name": "scribe_line_north_",
103+
"type": "int",
104+
"default": "0",
105+
"schema": "db_schema_chip_extended"
106+
},
107+
{
108+
"name": "scribe_line_south_",
109+
"type": "int",
110+
"default": "0",
111+
"schema": "db_schema_chip_extended"
112+
},
113+
{
114+
"name": "tsv_",
115+
"type": "bool",
116+
"default": "false",
117+
"schema": "db_schema_chip_extended"
118+
},
119+
{
120+
"name": "_top",
121+
"type": "dbId<_dbBlock>",
122+
"flags": ["private", "cmpgt"],
123+
"parent": "dbBlock"
124+
},
125+
{
126+
"name": "_block_tbl",
127+
"type": "dbTable<_dbBlock>*",
128+
"flags": ["private", "no-serial"]
129+
},
130+
{
131+
"name": "_name_cache",
132+
"type": "_dbNameCache*",
133+
"flags": ["private", "no-cmp", "no-serial"]
134+
},
135+
{
136+
"name": "_block_itr",
137+
"type": "dbBlockItr*",
138+
"flags": ["private", "no-cmp", "no-serial"]
139+
},
140+
{
141+
"name": "_prop_itr",
142+
"type": "dbPropertyItr*",
143+
"flags": ["private", "no-cmp", "no-serial"]
144+
}
145+
],
146+
"declared_classes": ["dbPropertyItr", "_dbNameCache","dbBlockItr"],
147+
"h_includes": [
148+
"odb/geom.h"
149+
],
150+
"cpp_includes": [
151+
"dbTable.h",
152+
"dbTable.hpp",
153+
"dbNameCache.h",
154+
"dbBlockItr.h",
155+
"dbBlock.h",
156+
"dbTech.h",
157+
"dbPropertyItr.h"
158+
]
159+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "dbDatabase",
3+
"type": "dbObject",
4+
"ostream_scope": true,
5+
"hash" : "0x0",
6+
"fields": [
7+
{
8+
"name": "_magic1",
9+
"type": "uint",
10+
"flags": ["private", "no-cmp", "no-serial"]
11+
},
12+
{
13+
"name": "_magic2",
14+
"type": "uint",
15+
"flags": ["private", "no-cmp", "no-serial"]
16+
},
17+
{
18+
"name": "_schema_major",
19+
"type": "uint",
20+
"flags": ["private", "no-cmp", "no-serial"]
21+
},
22+
{
23+
"name": "_schema_minor",
24+
"type": "uint",
25+
"flags": ["private", "no-cmp", "no-serial"]
26+
},
27+
{
28+
"name": "_master_id",
29+
"type": "uint",
30+
"flags": ["private", "no-serial"]
31+
},
32+
{
33+
"name": "_chip",
34+
"type": "dbId<_dbChip>",
35+
"flags": ["private", "no-serial"]
36+
}
37+
]
38+
}

src/odb/src/db/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ add_library(db
1010
dbBlockItr.cpp
1111
dbBox.cpp
1212
dbBoxItr.cpp
13-
dbChip.cpp
14-
dbDatabase.cpp
1513
dbITerm.cpp
1614
dbITermItr.cpp
1715
dbInst.cpp
@@ -89,6 +87,8 @@ add_library(db
8987
dbAccessPoint.cpp
9088
dbBusPort.cpp
9189
dbCellEdgeSpacing.cpp
90+
dbChip.cpp
91+
dbDatabase.cpp
9292
dbDft.cpp
9393
dbGCellGrid.cpp
9494
dbGDSARef.cpp

0 commit comments

Comments
 (0)