Skip to content

Commit 2d2c940

Browse files
committed
Merge remote-tracking branch 'origin/master' into cgt
2 parents dc0cdb2 + 23fb0e6 commit 2d2c940

File tree

234 files changed

+14281
-5841
lines changed

Some content is hidden

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

234 files changed

+14281
-5841
lines changed

.github/workflows/github-actions-are-odb-files-generated.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
19+
submodules: 'recursive'
1920
- name: setup
2021
run: |
2122
python3 -m venv venv

.github/workflows/github-actions-lint-tcl.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
steps:
1515
- name: Checkout repository
1616
uses: actions/checkout@v4
17+
with:
18+
submodules: 'recursive'
1719
- name: Install Dependencies
1820
run: |
1921
python3 -m venv venv

BUILD.bazel

Lines changed: 18 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ load("//bazel:tcl_wrap_cc.bzl", "tcl_wrap_cc")
88
package(
99
features = [
1010
"-parse_headers",
11-
"-layering_check",
11+
"layering_check",
1212
# TODO(b/299593765): Fix strict ordering.
1313
"-libcxx_assertions",
1414
],
@@ -86,6 +86,8 @@ OPENROAD_LIBRARY_DEPS = [
8686
"//src/psm",
8787
"//src/rcx",
8888
"//src/rcx:ui",
89+
"//src/rmp",
90+
"//src/rmp:ui",
8991
"//src/rsz",
9092
"//src/rsz:ui",
9193
"//src/stt",
@@ -131,24 +133,20 @@ cc_binary(
131133
name = "openroad",
132134
srcs = [
133135
"src/Main.cc",
134-
"src/OpenRoad.cc",
135-
":openroad_swig",
136-
":openroad_tcl",
137-
":rmp_swig",
138-
":rmp_tcl",
139136
"//bazel:runfiles",
140137
],
141138
copts = OPENROAD_COPTS,
142139
features = ["-use_header_modules"],
143140
malloc = "@tcmalloc//tcmalloc",
144141
visibility = ["//visibility:public"],
145142
deps = [
146-
":openroad_lib_private",
143+
":openroad_lib",
147144
":openroad_version",
148-
"//src/odb",
149-
"//src/rsz",
145+
"//:ord",
146+
"//src/gui",
150147
"//src/sta:opensta_lib",
151148
"//src/utl",
149+
"@boost.stacktrace",
152150
"@rules_cc//cc/runfiles",
153151
"@tk_tcl//:tcl",
154152
],
@@ -167,21 +165,17 @@ cc_library(
167165
"src/Design.cc",
168166
"src/Tech.cc",
169167
"src/Timing.cc",
170-
] + glob([
171-
"src/rmp/src/*.h",
172-
"src/rmp/src/*.cpp",
173-
]),
174-
hdrs = glob([
175-
"src/rmp/include/rmp/*.h",
176-
]),
168+
],
177169
copts = OPENROAD_COPTS,
178170
defines = OPENROAD_DEFINES + GUI_BUILD_FLAGS,
179171
features = ["-use_header_modules"],
180172
includes = [
181173
"include",
182-
"src/rmp/include",
183174
],
184-
deps = OPENROAD_LIBRARY_DEPS,
175+
deps = OPENROAD_LIBRARY_DEPS + [
176+
"//src/sta:opensta_lib",
177+
"@tk_tcl//:tcl",
178+
]
185179
)
186180

187181
cc_library(
@@ -193,21 +187,19 @@ cc_library(
193187
"src/Timing.cc",
194188
":openroad_swig",
195189
":openroad_tcl",
196-
":rmp_swig",
197-
":rmp_tcl",
198-
] + glob(["src/rmp/src/*.cpp"]),
199-
hdrs = glob([
200-
"src/rmp/include/rmp/*.h",
201-
]),
190+
],
202191
copts = OPENROAD_COPTS,
203192
defines = OPENROAD_DEFINES + GUI_BUILD_FLAGS,
204193
features = ["-use_header_modules"],
205194
includes = [
206195
"include",
207-
"src/rmp/include",
208196
],
209197
visibility = ["//visibility:public"],
210-
deps = OPENROAD_LIBRARY_DEPS,
198+
deps = OPENROAD_LIBRARY_DEPS + [
199+
"//src/sta:opensta_lib",
200+
"@boost.stacktrace",
201+
"@tk_tcl//:tcl",
202+
]
211203
)
212204

213205
cc_library(
@@ -255,15 +247,6 @@ tcl_encode(
255247
namespace = "ord",
256248
)
257249

258-
tcl_encode(
259-
name = "rmp_tcl",
260-
srcs = [
261-
"src/rmp/src/rmp.tcl",
262-
],
263-
char_array_name = "rmp_tcl_inits",
264-
namespace = "rmp",
265-
)
266-
267250
tcl_wrap_cc(
268251
name = "openroad_swig",
269252
srcs = [
@@ -278,22 +261,6 @@ tcl_wrap_cc(
278261
],
279262
)
280263

281-
tcl_wrap_cc(
282-
name = "rmp_swig",
283-
srcs = [
284-
"src/rmp/src/rmp.i",
285-
":error_swig",
286-
"//src/sta:sta_swig_files",
287-
],
288-
module = "rmp",
289-
namespace_prefix = "rmp",
290-
root_swig_src = "src/rmp/src/rmp.i",
291-
swig_includes = [
292-
"src/rmp/src",
293-
"src/sta",
294-
],
295-
)
296-
297264
filegroup(
298265
name = "error_swig",
299266
srcs = [

MODULE.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ bazel_dep(name = "boost.smart_ptr", version = BOOST_VERSION)
7979
bazel_dep(name = "boost.spirit", version = BOOST_VERSION)
8080
bazel_dep(name = "boost.stacktrace", version = BOOST_VERSION)
8181
bazel_dep(name = "boost.system", version = BOOST_VERSION)
82+
bazel_dep(name = "boost.test", version = BOOST_VERSION + ".bcr.1")
8283
bazel_dep(name = "boost.thread", version = BOOST_VERSION + ".bcr.2")
8384
bazel_dep(name = "boost.tokenizer", version = BOOST_VERSION)
8485
bazel_dep(name = "boost.unordered", version = BOOST_VERSION)

MODULE.bazel.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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 = "56da46a87e8e5a4dbe84c0bbe5d00e92b936494f"
11+
rules_hdl_git_hash = "cf2bd95334741db74b39b47fa1d4622b0d45ce6c"
1212

13-
rules_hdl_git_sha256 = "dc184ad0fe92f315eb5600fb3293c94ce1fce3fc1d0fd79400107038ed917d70"
13+
rules_hdl_git_sha256 = "137e1fbde970a41f295ca348f9105bc7eedd6640374ec7f4a8abaee9a2cfc2d0"
1414

1515
http_archive(
1616
name = "rules_hdl",

src/Metrics.tcl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ proc report_fmax_metric { args } {
8181
}
8282
set fmax [expr { 1.0 / $min_period }]
8383
utl::metric_float "timing__fmax__clock:${clk_name}" $fmax
84-
puts "$clk_name fmax = [format %.2f [expr { $fmax / 1e6 }]] MHz"
8584
set fmax_metric [expr { max($fmax_metric, $fmax) }]
8685
}
8786
if { $fmax_metric == 0 } {

src/cts/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ clock_tree_synthesis
6161
[-num_static_layers]
6262
[-sink_clustering_buffer]
6363
[-obstruction_aware]
64-
[-apply_ndr]
64+
[-apply_ndr strategy]
6565
[-insertion_delay]
6666
[-dont_use_dummy_load]
6767
[-sink_buffer_max_cap_derate derate_value]
@@ -92,7 +92,7 @@ clock_tree_synthesis
9292
| `-num_static_layers` | Set the number of static layers. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. |
9393
| `-sink_clustering_buffer` | Set the sink clustering buffer(s) to be used. |
9494
| `-obstruction_aware` | Enables obstruction-aware buffering such that clock buffers are not placed on top of blockages or hard macros. This option may reduce legalizer displacement, leading to better latency, skew or timing QoR. The default value is `False`, and the allowed values are bool. |
95-
| `-apply_ndr` | Applies 2X spacing non-default rule to all clock nets except leaf-level nets. The default value is `False`. |
95+
| `-apply_ndr` | Applies 2X spacing non-default rule to clock nets except leaf-level nets following some strategy. There are four strategy options: `none, root_only, half, full`. If this is not specified, the default value is `none`. |
9696
| `-dont_use_dummy_load` | Don't apply dummy buffer or inverter cells at clock tree leaves to balance loads. The default values is `False`. |
9797
| `-sink_buffer_max_cap_derate` | Use this option to control automatic buffer selection. To favor strong(weak) drive strength buffers use a small(large) value. The default value is `0.01`, meaning that buffers are selected by derating max cap limit by 0.01. The value of 1.0 means no derating of max cap limit. |
9898
| `-delay_buffer_derate` | This option balances latencies between macro cells and registers by inserting delay buffers. The default value is `1.0`, meaning all needed delay buffers are inserted. A value of 0.5 means only half of necessary delay buffers are inserted. A value of 0.0 means no insertion of delay buffers. |

src/cts/include/cts/TritonCTS.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,25 @@ class TritonCTS
9898
void buildClockTrees();
9999
void writeDataToDb();
100100

101+
// NDR functions
102+
std::vector<int> getAllClockTreeLevels(Clock& clockNet);
103+
int applyNDRToClockLevels(Clock& clockNet,
104+
odb::dbTechNonDefaultRule* clockNDR,
105+
const std::vector<int>& targetLevels);
106+
107+
int applyNDRToClockLevelRange(Clock& clockNet,
108+
odb::dbTechNonDefaultRule* clockNDR,
109+
int minLevel,
110+
int maxLevel);
111+
int applyNDRToFirstHalfLevels(Clock& clockNet,
112+
odb::dbTechNonDefaultRule* clockNDR);
113+
101114
// db functions
102115
bool masterExists(const std::string& master) const;
103116
void populateTritonCTS();
104117
void writeClockNetsToDb(TreeBuilder* builder,
105118
std::set<odb::dbNet*>& clkLeafNets);
106-
void writeClockNDRsToDb(const std::set<odb::dbNet*>& clkLeafNets);
119+
void writeClockNDRsToDb(TreeBuilder* builder);
107120
void incrementNumClocks() { ++numberOfClocks_; }
108121
void clearNumClocks() { numberOfClocks_ = 0; }
109122
unsigned getNumClocks() const { return numberOfClocks_; }

src/cts/src/Clock.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,16 @@ class ClockSubNet
9494
std::deque<ClockInst*> instances_;
9595
std::unordered_map<ClockInst*, unsigned> mapInstToIdx_;
9696
bool leafLevel_ = false;
97+
int level_ = -1;
98+
odb::dbNet* netObj_ = nullptr;
9799

98100
public:
99101
explicit ClockSubNet(const std::string& name) : name_(name) {}
100102

103+
void setNetObj(odb::dbNet* net) { netObj_ = net; }
104+
odb::dbNet* getNetObj() { return netObj_; }
105+
void setTreeLevel(int level) { level_ = level; }
106+
int getTreeLevel() { return level_; }
101107
void setLeafLevel(bool isLeaf) { leafLevel_ = isLeaf; }
102108
bool isLeafLevel() const { return leafLevel_; }
103109

0 commit comments

Comments
 (0)