Skip to content

Commit df27cac

Browse files
committed
Merge remote-tracking branch 'origin' into ant_use_pin_on_dsu_graph
Signed-off-by: luis201420 <[email protected]>
2 parents e115c43 + 01162dd commit df27cac

File tree

19 files changed

+1271
-564
lines changed

19 files changed

+1271
-564
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 = "80266603b55778dd30531c9b286152a7b664fbb7"
11+
rules_hdl_git_hash = "56da46a87e8e5a4dbe84c0bbe5d00e92b936494f"
1212

13-
rules_hdl_git_sha256 = "38f04d38cfbf46c52643325b496673d607ce5ea6fda99dc1dfa3997a520bb0c2"
13+
rules_hdl_git_sha256 = "dc184ad0fe92f315eb5600fb3293c94ce1fce3fc1d0fd79400107038ed917d70"
1414

1515
http_archive(
1616
name = "rules_hdl",

src/Metrics.tcl

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ proc report_tns_metric { args } {
3636

3737
define_cmd_args "report_worst_slack_metric" {[-setup]|[-hold]}
3838
proc report_worst_slack_metric { args } {
39-
global sta_report_default_digits
4039
parse_key_args "report_worst_slack_metric" args keys {} flags {-setup -hold}
4140

4241
set min_max "-max"
@@ -53,7 +52,6 @@ proc report_worst_slack_metric { args } {
5352

5453
define_cmd_args "report_worst_negative_slack_metric" {[-setup]|[-hold]}
5554
proc report_worst_negative_slack_metric { args } {
56-
global sta_report_default_digits
5755
parse_key_args "report_worst_negative_slack_metric" args keys {} flags {-setup -hold}
5856

5957
set min_max "-max"
@@ -68,6 +66,51 @@ proc report_worst_negative_slack_metric { args } {
6866
utl::metric_float $metric_name [worst_negative_slack $min_max]
6967
}
7068

69+
define_cmd_args "report_fmax_metric" {}
70+
proc report_fmax_metric { args } {
71+
parse_key_args "report_fmax_metric" args keys {} flags {}
72+
73+
# Taken from: https://github.com/siliconcompiler/siliconcompiler/blob/e46c702df218c93483b951533fe00bcf01cf772d/siliconcompiler/tools/openroad/scripts/common/reports.tcl#L98
74+
# Modeled on: https://github.com/The-OpenROAD-Project/OpenSTA/blob/f913c3ddbb3e7b4364ed4437c65ac78c4da9174b/tcl/Search.tcl#L1078
75+
set fmax_metric 0
76+
foreach clk [sta::sort_by_name [all_clocks]] {
77+
set clk_name [get_name $clk]
78+
set min_period [sta::find_clk_min_period $clk 1]
79+
if { $min_period == 0.0 } {
80+
continue
81+
}
82+
set fmax [expr { 1.0 / $min_period }]
83+
utl::metric_float "timing__fmax__clock:${clk_name}" $fmax
84+
puts "$clk_name fmax = [format %.2f [expr { $fmax / 1e6 }]] MHz"
85+
set fmax_metric [expr { max($fmax_metric, $fmax) }]
86+
}
87+
if { $fmax_metric == 0 } {
88+
# attempt to compute based on combinatorial path
89+
set fmax_valid true
90+
set max_path [find_timing_paths -unconstrained -path_delay max]
91+
if { $max_path == "" } {
92+
set fmax_valid false
93+
} else {
94+
set max_path_delay [$max_path data_arrival_time]
95+
}
96+
set min_path [find_timing_paths -unconstrained -path_delay min]
97+
if { $min_path == "" } {
98+
set fmax_valid false
99+
} else {
100+
set min_path_delay [$min_path data_arrival_time]
101+
}
102+
if { $fmax_valid } {
103+
set path_delay [expr { $max_path_delay - min(0, $min_path_delay) }]
104+
if { $path_delay > 0 } {
105+
set fmax_metric [expr { 1.0 / $path_delay }]
106+
}
107+
}
108+
}
109+
if { $fmax_metric > 0 } {
110+
utl::metric_float "timing__fmax" $fmax_metric
111+
}
112+
}
113+
71114
# From https://wiki.tcl-lang.org/page/Inf
72115
proc ::tcl::mathfunc::finite { x } {
73116
expr { [string is double -strict $x] && $x == $x && $x + 1 != $x }

src/gpl/src/placerBase.cpp

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,10 +1015,24 @@ void PlacerBase::init()
10151015
continue;
10161016
}
10171017

1018-
if (inst->dbInst() && inst->dbInst()->getGroup() != group_) {
1018+
odb::dbInst* db_inst = inst->dbInst();
1019+
if (!db_inst) {
10191020
continue;
10201021
}
10211022

1023+
odb::dbGroup* db_inst_group = db_inst->getGroup();
1024+
if (group_ == nullptr) {
1025+
if (db_inst_group
1026+
&& db_inst_group->getType() != odb::dbGroupType::VISUAL_DEBUG) {
1027+
continue;
1028+
}
1029+
} else {
1030+
if (!db_inst_group || db_inst_group != group_
1031+
|| db_inst_group->getType() == odb::dbGroupType::VISUAL_DEBUG) {
1032+
continue;
1033+
}
1034+
}
1035+
10221036
if (inst->isFixed()) {
10231037
// Check whether fixed instance is
10241038
// within the corearea
@@ -1196,9 +1210,23 @@ void PlacerBase::initInstsForUnusableSites()
11961210
if (!inst->isFixed()) {
11971211
continue;
11981212
}
1199-
if (inst->dbInst() && inst->dbInst()->getGroup() != group_) {
1213+
odb::dbInst* db_inst = inst->dbInst();
1214+
if (!db_inst) {
12001215
continue;
12011216
}
1217+
1218+
odb::dbGroup* db_inst_group = db_inst->getGroup();
1219+
if (group_ == nullptr) {
1220+
if (db_inst_group
1221+
&& db_inst_group->getType() != odb::dbGroupType::VISUAL_DEBUG) {
1222+
continue;
1223+
}
1224+
} else {
1225+
if (!db_inst_group || db_inst_group != group_
1226+
|| db_inst_group->getType() == odb::dbGroupType::VISUAL_DEBUG) {
1227+
continue;
1228+
}
1229+
}
12021230
std::pair<int, int> pairX = getMinMaxIdx(
12031231
inst->lx(), inst->ux(), die_.coreLx(), siteSizeX_, 0, siteCountX);
12041232
std::pair<int, int> pairY = getMinMaxIdx(

src/grt/src/fastroute/include/DataType.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ enum class EdgeDirection
4848
struct Segment // A Segment is a 2-pin connection
4949
{
5050
Segment(int16_t x1, int16_t y1, int16_t x2, int16_t y2, int8_t cost)
51-
: x1(x1), y1(y1), x2(x2), y2(y2), cost(cost)
51+
: x1(x1), y1(y1), x2(x2), y2(y2), cost(cost), xFirst(false), HVH(false)
5252
{
5353
}
5454
const int16_t x1, y1, x2, y2; // coordinates of two endpoints (x1 <= x2)

src/gui/src/gui.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,6 @@ int Gui::select(const std::string& type,
504504
if (
505505
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
506506
!reg_filter.match(QString::fromStdString(sel_name)).hasMatch()
507-
508507
#else
509508
!reg_filter.exactMatch(QString::fromStdString(sel_name))
510509
#endif
@@ -516,7 +515,8 @@ int Gui::select(const std::string& type,
516515

517516
if (!attribute.empty()) {
518517
bool is_valid_attribute = false;
519-
Descriptor::Properties properties = descriptor->getProperties(sel);
518+
Descriptor::Properties properties
519+
= descriptor->getProperties(sel.getObject());
520520
if (filterSelectionProperties(
521521
properties, attribute, value, is_valid_attribute)) {
522522
return; // doesn't match the attribute filter

0 commit comments

Comments
 (0)