Skip to content

Commit 4dace5f

Browse files
committed
Merge branch 'master' of https://github.com/The-OpenROAD-Project-private/OpenROAD into trivial
2 parents 9bec3b4 + 93b6f40 commit 4dace5f

File tree

119 files changed

+1709
-5338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+1709
-5338
lines changed

WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ workspace(name = "openroad")
88

99
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
1010

11-
rules_hdl_git_hash = "4bfc8987e521f2002e7b898ba94d3df4c6204913"
11+
rules_hdl_git_hash = "80266603b55778dd30531c9b286152a7b664fbb7"
1212

13-
rules_hdl_git_sha256 = "227ac0288299f2b0f31a188113cef9f733258398fd616215275bddab1e43d019"
13+
rules_hdl_git_sha256 = "38f04d38cfbf46c52643325b496673d607ce5ea6fda99dc1dfa3997a520bb0c2"
1414

1515
http_archive(
1616
name = "rules_hdl",

src/odb/include/odb/db.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3263,6 +3263,12 @@ class dbInst : public dbObject
32633263
///
32643264
bool isEndCap() const;
32653265

3266+
///
3267+
/// Get the scan version of this instance.
3268+
/// Returns nullptr if this instance has no scan version.
3269+
///
3270+
dbScanInst* getScanInst() const;
3271+
32663272
void setPinAccessIdx(uint idx);
32673273

32683274
uint getPinAccessIdx() const;
@@ -8440,6 +8446,8 @@ class dbScanInst : public dbObject
84408446

84418447
dbInst* getInst() const;
84428448

8449+
void insertAtFront(dbScanList* scan_list);
8450+
84438451
static dbScanInst* create(dbScanList* scan_list, dbInst* inst);
84448452
// User Code End dbScanInst
84458453
};
@@ -8452,9 +8460,8 @@ class dbScanInst : public dbObject
84528460
class dbScanList : public dbObject
84538461
{
84548462
public:
8455-
dbSet<dbScanInst> getScanInsts() const;
8456-
84578463
// User Code Begin dbScanList
8464+
dbSet<dbScanInst> getScanInsts() const;
84588465
dbScanInst* add(dbInst* inst);
84598466
static dbScanList* create(dbScanPartition* scan_partition);
84608467
// User Code End dbScanList

src/odb/include/odb/dbId.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,17 @@ class dbId
4040
};
4141

4242
} // namespace odb
43+
44+
// Enable unordered_map/set usage
45+
namespace std {
46+
47+
template <typename T>
48+
struct hash<odb::dbId<T>>
49+
{
50+
std::size_t operator()(const odb::dbId<T>& db_id) const
51+
{
52+
return std::hash<unsigned int>()(db_id);
53+
}
54+
};
55+
56+
} // namespace std

src/odb/src/codeGenerator/schema.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,15 @@
153153
"reversible": "true",
154154
"orderReversed": "true",
155155
"sequential": 0
156+
},
157+
{
158+
"name": "dbScanListScanInstItr",
159+
"parentObject": "dbScanInst",
160+
"tableName": "scan_inst_tbl",
161+
"reversible": "true",
162+
"orderReversed": "true",
163+
"sequential": 0,
164+
"includes": ["dbScanList.h", "dbScanInst.h"]
156165
}
157166
],
158167
"relations":[
@@ -301,12 +310,6 @@
301310
"type": "1_n",
302311
"tbl_name": "scan_lists_"
303312
},
304-
{
305-
"parent": "dbScanList",
306-
"child": "dbScanInst",
307-
"type": "1_n",
308-
"tbl_name": "scan_insts_"
309-
},
310313
{
311314
"parent": "dbDft",
312315
"child": "dbScanChain",

src/odb/src/codeGenerator/schema/scan/dbScanInst.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@
4242
"type": "uint",
4343
"default": "0",
4444
"flags": ["private"]
45+
},
46+
{
47+
"name": "_next_list_scan_inst",
48+
"type": "dbId<_dbScanInst>",
49+
"flags": ["private"],
50+
"schema":"db_schema_block_owns_scan_insts"
51+
},
52+
{
53+
"name": "_prev_list_scan_inst",
54+
"type": "dbId<_dbScanInst>",
55+
"flags": ["private"],
56+
"schema":"db_schema_block_owns_scan_insts"
4557
}
4658
],
4759
"enums": [

src/odb/src/codeGenerator/schema/scan/dbScanList.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,27 @@
99
"optimizing the scan chain."],
1010
"cpp_includes": [
1111
"dbScanChain.h",
12-
"dbScanPartition.h"
12+
"dbScanPartition.h",
13+
"dbDft.h",
14+
"dbScanListScanInstItr.h"],
15+
"fields": [
16+
{
17+
"name": "_unused",
18+
"type": "uint",
19+
"flags": [
20+
"private"
21+
],
22+
"default": 0,
23+
"comment": "// As the elements of a free dbTable are 12 bytes long, we need this additional member in order to make _dbScanList big enough to allow safe casting between table members.",
24+
"schema": "db_schema_block_owns_scan_insts"
25+
},
26+
{
27+
"name": "_first_scan_inst",
28+
"type": "dbId<_dbScanInst>",
29+
"flags": [
30+
"private"
31+
],
32+
"schema": "db_schema_block_owns_scan_insts"
33+
}
1334
]
1435
}

src/odb/src/codeGenerator/templates/serializer_out.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,7 @@
1414
stream << {{field.name}}bit_field;
1515
{% else %}
1616
{% if 'no-serial' not in field.flags %}
17-
{% if 'schema' in field %}
18-
if (obj.getDatabase()->isSchema({{field.schema}})) {
19-
{% endif %}
2017
stream << {% if field.table %}*{% endif %}obj.{{field.name}};
21-
{% if 'schema' in field %}
22-
}
23-
{% endif %}
2418
{% endif %}
2519
{% endif %}
2620
{% endfor %}

src/odb/src/db/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ add_library(db
161161
dbModulePortItr.cpp
162162
dbNetTrackItr.cpp
163163
dbRegionGroupItr.cpp
164+
dbScanListScanInstItr.cpp
164165
# Generator Code End cpp
165166
)
166167

src/odb/src/db/dbBTerm.cpp

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ bool _dbBTerm::operator==(const _dbBTerm& rhs) const
156156

157157
dbOStream& operator<<(dbOStream& stream, const _dbBTerm& bterm)
158158
{
159-
dbBlock* block = (dbBlock*) (bterm.getOwner());
160-
_dbDatabase* db = (_dbDatabase*) (block->getDataBase());
161159
uint* bit_field = (uint*) &bterm._flags;
162160
stream << *bit_field;
163161
stream << bterm._ext_id;
@@ -166,25 +164,17 @@ dbOStream& operator<<(dbOStream& stream, const _dbBTerm& bterm)
166164
stream << bterm._net;
167165
stream << bterm._next_bterm;
168166
stream << bterm._prev_bterm;
169-
if (db->isSchema(db_schema_update_hierarchy)) {
170-
stream << bterm._mnet;
171-
stream << bterm._next_modnet_bterm;
172-
stream << bterm._prev_modnet_bterm;
173-
}
167+
stream << bterm._mnet;
168+
stream << bterm._next_modnet_bterm;
169+
stream << bterm._prev_modnet_bterm;
174170
stream << bterm._parent_block;
175171
stream << bterm._parent_iterm;
176172
stream << bterm._bpins;
177173
stream << bterm._ground_pin;
178174
stream << bterm._supply_pin;
179-
if (bterm.getDatabase()->isSchema(db_schema_bterm_constraint_region)) {
180-
stream << bterm._constraint_region;
181-
}
182-
if (bterm.getDatabase()->isSchema(db_schema_bterm_mirrored_pin)) {
183-
stream << bterm._mirrored_bterm;
184-
}
185-
if (bterm.getDatabase()->isSchema(db_schema_bterm_is_mirrored)) {
186-
stream << bterm._is_mirrored;
187-
}
175+
stream << bterm._constraint_region;
176+
stream << bterm._mirrored_bterm;
177+
stream << bterm._is_mirrored;
188178

189179
return stream;
190180
}

src/odb/src/db/dbBlock.cpp

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@
9191
#include "dbSBoxItr.h"
9292
#include "dbSWire.h"
9393
#include "dbSWireItr.h"
94+
#include "dbScanInst.h"
95+
#include "dbScanListScanInstItr.h"
9496
#include "dbTable.h"
9597
#include "dbTable.hpp"
9698
#include "dbTech.h"
@@ -180,6 +182,9 @@ _dbBlock::_dbBlock(_dbDatabase* db)
180182
_inst_tbl = new dbTable<_dbInst>(
181183
db, this, (GetObjTbl_t) &_dbBlock::getObjectTable, dbInstObj);
182184

185+
_scan_inst_tbl = new dbTable<_dbScanInst>(
186+
db, this, (GetObjTbl_t) &_dbBlock::getObjectTable, dbScanInstObj);
187+
183188
_module_tbl = new dbTable<_dbModule>(
184189
db, this, (GetObjTbl_t) &_dbBlock::getObjectTable, dbModuleObj);
185190

@@ -338,6 +343,8 @@ _dbBlock::_dbBlock(_dbDatabase* db)
338343

339344
_inst_iterm_itr = new dbInstITermItr(_iterm_tbl);
340345

346+
_scan_list_scan_inst_itr = new dbScanListScanInstItr(_scan_inst_tbl);
347+
341348
_box_itr = new dbBoxItr<1024>(_box_tbl, nullptr, false);
342349

343350
_swire_itr = new dbSWireItr(_swire_tbl);
@@ -406,6 +413,7 @@ _dbBlock::~_dbBlock()
406413
delete _net_tbl;
407414
delete _inst_hdr_tbl;
408415
delete _inst_tbl;
416+
delete _scan_inst_tbl;
409417
delete _module_tbl;
410418
delete _modinst_tbl;
411419
delete _modbterm_tbl;
@@ -450,6 +458,7 @@ _dbBlock::~_dbBlock()
450458
delete _net_bterm_itr;
451459
delete _net_iterm_itr;
452460
delete _inst_iterm_itr;
461+
delete _scan_list_scan_inst_itr;
453462
delete _box_itr;
454463
delete _swire_itr;
455464
delete _sbox_itr;
@@ -738,7 +747,6 @@ dbOStream& operator<<(dbOStream& stream, const _dbBlock& block)
738747
(**cbitr)().inDbBlockStreamOutBefore(
739748
(dbBlock*) &block); // client ECO initialization - payam
740749
}
741-
_dbDatabase* db = block.getImpl()->getDatabase();
742750
dbOStreamScope scope(stream, "dbBlock");
743751
stream << block._def_units;
744752
stream << block._dbu_per_micron;
@@ -750,9 +758,7 @@ dbOStream& operator<<(dbOStream& stream, const _dbBlock& block)
750758
stream << block._corner_name_list;
751759
stream << block._name;
752760
stream << block._die_area;
753-
if (db->isSchema(db_schema_dbblock_blocked_regions_for_pins)) {
754-
stream << block._blocked_regions_for_pins;
755-
}
761+
stream << block._blocked_regions_for_pins;
756762
stream << block._tech;
757763
stream << block._chip;
758764
stream << block._bbox;
@@ -786,22 +792,14 @@ dbOStream& operator<<(dbOStream& stream, const _dbBlock& block)
786792
stream << *block._iterm_tbl;
787793
stream << *block._net_tbl;
788794
stream << *block._inst_hdr_tbl;
789-
if (db->isSchema(db_schema_db_remove_hash)) {
790-
stream << *block._module_tbl;
791-
stream << *block._inst_tbl;
792-
} else {
793-
stream << *block._inst_tbl;
794-
stream << *block._module_tbl;
795-
}
795+
stream << *block._module_tbl;
796+
stream << *block._inst_tbl;
797+
stream << *block._scan_inst_tbl;
796798
stream << *block._modinst_tbl;
797-
if (db->isSchema(db_schema_update_hierarchy)) {
798-
stream << *block._modbterm_tbl;
799-
if (db->isSchema(db_schema_db_remove_hash)) {
800-
stream << *block._busport_tbl;
801-
}
802-
stream << *block._moditerm_tbl;
803-
stream << *block._modnet_tbl;
804-
}
799+
stream << *block._modbterm_tbl;
800+
stream << *block._busport_tbl;
801+
stream << *block._moditerm_tbl;
802+
stream << *block._modnet_tbl;
805803
stream << *block._powerdomain_tbl;
806804
stream << *block._logicport_tbl;
807805
stream << *block._powerswitch_tbl;
@@ -842,18 +840,13 @@ dbOStream& operator<<(dbOStream& stream, const _dbBlock& block)
842840
stream << *block._dft_tbl;
843841
stream << *block._marker_categories_tbl;
844842
stream << block._marker_category_hash;
845-
if (block.getDatabase()->isSchema(db_schema_dbblock_layers_ranges)) {
846-
stream << block._min_routing_layer;
847-
stream << block._max_routing_layer;
848-
stream << block._min_layer_for_clock;
849-
stream << block._max_layer_for_clock;
850-
}
851-
if (db->isSchema(db_schema_block_pin_groups)) {
852-
stream << block._bterm_groups;
853-
}
854-
if (db->isSchema(db_schema_bterm_top_layer_grid)) {
855-
stream << block._bterm_top_layer_grid;
856-
}
843+
stream << block._min_routing_layer;
844+
stream << block._max_routing_layer;
845+
stream << block._min_layer_for_clock;
846+
stream << block._max_layer_for_clock;
847+
stream << block._bterm_groups;
848+
stream << block._bterm_top_layer_grid;
849+
stream << block._inst_scan_inst_map;
857850

858851
//---------------------------------------------------------- stream out
859852
// properties
@@ -959,6 +952,9 @@ dbIStream& operator>>(dbIStream& stream, _dbBlock& block)
959952
stream >> *block._inst_tbl;
960953
stream >> *block._module_tbl;
961954
}
955+
if (db->isSchema(db_schema_block_owns_scan_insts)) {
956+
stream >> *block._scan_inst_tbl;
957+
}
962958
stream >> *block._modinst_tbl;
963959
if (db->isSchema(db_schema_update_hierarchy)) {
964960
stream >> *block._modbterm_tbl;
@@ -1029,6 +1025,9 @@ dbIStream& operator>>(dbIStream& stream, _dbBlock& block)
10291025
if (db->isSchema(db_schema_bterm_top_layer_grid)) {
10301026
stream >> block._bterm_top_layer_grid;
10311027
}
1028+
if (db->isSchema(db_schema_map_insts_to_scan_insts)) {
1029+
stream >> block._inst_scan_inst_map;
1030+
}
10321031

10331032
//---------------------------------------------------------- stream in
10341033
// properties

0 commit comments

Comments
 (0)