Skip to content

Commit 50bc7f2

Browse files
committed
Merge remote-tracking branch 'private/master' into gpl-extend-max-iter-by-routability
2 parents f6846c8 + 0816570 commit 50bc7f2

22 files changed

+362
-73
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",

include/ord/OpenRoad.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ class OpenRoad
187187
int bloat_factor,
188188
bool bloat_occupied_layers);
189189

190+
void writeDef(const char* filename, const char* version);
190191
void writeDef(const char* filename,
191192
// major.minor (avoid including defout.h)
192193
const string& version);

src/OpenRoad.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,11 @@ static odb::defout::Version stringToDefVersion(const string& version)
348348
return odb::defout::Version::DEF_5_8;
349349
}
350350

351+
void OpenRoad::writeDef(const char* filename, const char* version)
352+
{
353+
writeDef(filename, std::string(version));
354+
}
355+
351356
void OpenRoad::writeDef(const char* filename, const string& version)
352357
{
353358
odb::dbChip* chip = db_->getChip();

src/gui/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ messages(
8989
)
9090

9191
else()
92-
message(STATUS "GUI is not enabled")
92+
if(BUILD_GUI)
93+
message(STATUS "QT5 not found. GUI is disabled")
94+
else()
95+
message(STATUS "GUI is not enabled")
96+
endif()
9397
add_library(gui
9498
src/stub.cpp
9599
src/stub_heatMap.cpp

src/gui/src/dbDescriptors.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,11 @@ Descriptor::Properties DbInstDescriptor::getDBProperties(
619619
props.push_back({"Timing/Power", gui->makeSelected(sta_inst)});
620620
}
621621

622+
odb::dbScanInst* scan_inst = inst->getScanInst();
623+
if (scan_inst != nullptr) {
624+
props.push_back({"Scan Inst", gui->makeSelected(scan_inst)});
625+
}
626+
622627
return props;
623628
}
624629

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
}

0 commit comments

Comments
 (0)