Skip to content

Commit ad37f56

Browse files
committed
Merge branch 'master' into mpl-notch-penalty
2 parents 65ed987 + 862863d commit ad37f56

File tree

130 files changed

+3129
-2205
lines changed

Some content is hidden

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

130 files changed

+3129
-2205
lines changed

BUILD.bazel

Lines changed: 18 additions & 52 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
],
@@ -84,6 +84,8 @@ OPENROAD_LIBRARY_DEPS = [
8484
"//src/psm",
8585
"//src/rcx",
8686
"//src/rcx:ui",
87+
"//src/rmp",
88+
"//src/rmp:ui",
8789
"//src/rsz",
8890
"//src/rsz:ui",
8991
"//src/stt",
@@ -129,24 +131,20 @@ cc_binary(
129131
name = "openroad",
130132
srcs = [
131133
"src/Main.cc",
132-
"src/OpenRoad.cc",
133-
":openroad_swig",
134-
":openroad_tcl",
135-
":rmp_swig",
136-
":rmp_tcl",
137134
"//bazel:runfiles",
138135
],
139136
copts = OPENROAD_COPTS,
140137
features = ["-use_header_modules"],
141138
malloc = "@tcmalloc//tcmalloc",
142139
visibility = ["//visibility:public"],
143140
deps = [
144-
":openroad_lib_private",
141+
":openroad_lib",
145142
":openroad_version",
146-
"//src/odb",
147-
"//src/rsz",
143+
"//:ord",
144+
"//src/gui",
148145
"//src/sta:opensta_lib",
149146
"//src/utl",
147+
"@boost.stacktrace",
150148
"@rules_cc//cc/runfiles",
151149
"@tk_tcl//:tcl",
152150
],
@@ -165,21 +163,17 @@ cc_library(
165163
"src/Design.cc",
166164
"src/Tech.cc",
167165
"src/Timing.cc",
168-
] + glob([
169-
"src/rmp/src/*.h",
170-
"src/rmp/src/*.cpp",
171-
]),
172-
hdrs = glob([
173-
"src/rmp/include/rmp/*.h",
174-
]),
166+
],
175167
copts = OPENROAD_COPTS,
176168
defines = OPENROAD_DEFINES + GUI_BUILD_FLAGS,
177169
features = ["-use_header_modules"],
178170
includes = [
179171
"include",
180-
"src/rmp/include",
181172
],
182-
deps = OPENROAD_LIBRARY_DEPS,
173+
deps = OPENROAD_LIBRARY_DEPS + [
174+
"//src/sta:opensta_lib",
175+
"@tk_tcl//:tcl",
176+
]
183177
)
184178

185179
cc_library(
@@ -191,22 +185,19 @@ cc_library(
191185
"src/Timing.cc",
192186
":openroad_swig",
193187
":openroad_tcl",
194-
":rmp_swig",
195-
":rmp_tcl",
196-
] + glob([
197-
"src/rmp/src/*.cpp",
198-
"src/rmp/src/*.h",
199-
]),
200-
hdrs = glob(["src/rmp/include/rmp/*.h"]),
188+
],
201189
copts = OPENROAD_COPTS,
202190
defines = OPENROAD_DEFINES + GUI_BUILD_FLAGS,
203191
features = ["-use_header_modules"],
204192
includes = [
205193
"include",
206-
"src/rmp/include",
207194
],
208195
visibility = ["//visibility:public"],
209-
deps = OPENROAD_LIBRARY_DEPS,
196+
deps = OPENROAD_LIBRARY_DEPS + [
197+
"//src/sta:opensta_lib",
198+
"@boost.stacktrace",
199+
"@tk_tcl//:tcl",
200+
]
210201
)
211202

212203
cc_library(
@@ -254,15 +245,6 @@ tcl_encode(
254245
namespace = "ord",
255246
)
256247

257-
tcl_encode(
258-
name = "rmp_tcl",
259-
srcs = [
260-
"src/rmp/src/rmp.tcl",
261-
],
262-
char_array_name = "rmp_tcl_inits",
263-
namespace = "rmp",
264-
)
265-
266248
tcl_wrap_cc(
267249
name = "openroad_swig",
268250
srcs = [
@@ -277,22 +259,6 @@ tcl_wrap_cc(
277259
],
278260
)
279261

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

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",

etc/DependencyInstaller.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ _installCommonDev() {
9191
cmakeBin=${cmakePrefix}/bin/cmake
9292
if [[ ! -f ${cmakeBin} || -z $(${cmakeBin} --version | grep ${cmakeVersionBig}) ]]; then
9393
cd "${baseDir}"
94-
eval wget https://cmake.org/files/v${cmakeVersionBig}/cmake-${cmakeVersionSmall}-${osName}-${arch}.sh
94+
eval wget https://github.com/Kitware/CMake/releases/download/v${cmakeVersionSmall}/cmake-${cmakeVersionSmall}-linux-${arch}.sh
9595
md5sum -c <(echo "${cmakeChecksum} cmake-${cmakeVersionSmall}-${osName}-${arch}.sh") || exit 1
9696
chmod +x cmake-${cmakeVersionSmall}-${osName}-${arch}.sh
9797
./cmake-${cmakeVersionSmall}-${osName}-${arch}.sh --skip-license --prefix=${cmakePrefix}
@@ -861,10 +861,10 @@ while [ "$#" -gt 0 ]; do
861861
export GIT_SSL_NO_VERIFY=true
862862
;;
863863
-save-deps-prefixes=*)
864-
saveDepsPrefixes=$(realpath ${1#-save-deps-prefixes=})
864+
saveDepsPrefixes=$(realpath ${1#*=})
865865
;;
866866
-threads=*)
867-
numThreads=${1}
867+
numThreads=${1#*=}
868868
;;
869869
*)
870870
echo "unknown option: ${1}" >&2
@@ -933,11 +933,13 @@ case "${os}" in
933933
_installOrTools "ubuntu" "${ubuntuVersion}" "amd64"
934934
fi
935935
;;
936-
"Red Hat Enterprise Linux" | "Rocky Linux")
936+
"Red Hat Enterprise Linux" | "Rocky Linux" | "AlmaLinux")
937937
if [[ "${os}" == "Red Hat Enterprise Linux" ]]; then
938938
rhelVersion=$(rpm -q --queryformat '%{VERSION}' redhat-release | cut -d. -f1)
939939
elif [[ "${os}" == "Rocky Linux" ]]; then
940940
rhelVersion=$(rpm -q --queryformat '%{VERSION}' rocky-release | cut -d. -f1)
941+
elif [[ "${os}" == "AlmaLinux" ]]; then
942+
rhelVersion=$(rpm -q --queryformat '%{VERSION}' almalinux-release | cut -d. -f1)
941943
fi
942944
if [[ "${rhelVersion}" != "8" ]] && [[ "${rhelVersion}" != "9" ]]; then
943945
echo "ERROR: Unsupported ${rhelVersion} version. Versions '8' and '9' are supported."
@@ -1018,4 +1020,8 @@ esac
10181020
if [[ ! -z ${saveDepsPrefixes} ]]; then
10191021
mkdir -p "$(dirname $saveDepsPrefixes)"
10201022
echo "$CMAKE_PACKAGE_ROOT_ARGS" > $saveDepsPrefixes
1023+
# Fix permissions if running as root to allow user access
1024+
if [[ $(id -u) == 0 && ! -z "${SUDO_USER+x}" ]]; then
1025+
chown "$SUDO_USER:$(id -gn "$SUDO_USER")" "$saveDepsPrefixes" 2>/dev/null || true
1026+
fi
10211027
fi

src/cts/test/balance_levels.defok

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
VERSION 5.8 ;
2-
DIVIDERCHAR "|" ;
2+
DIVIDERCHAR "/" ;
33
BUSBITCHARS "[]" ;
44
DESIGN multi_sink ;
55
UNITS DISTANCE MICRONS 2000 ;

src/dbSta/include/db_sta/dbNetwork.hh

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,26 @@ class dbNetwork : public ConcreteNetwork
298298
NetTermIterator* termIterator(const Net* net) const override;
299299
const Net* highestConnectedNet(Net* net) const override;
300300
bool isSpecial(Net* net);
301+
302+
// Get the flat net (dbNet) with the Net*.
303+
// If the net is a hierarchical net (dbModNet), return nullptr
301304
dbNet* flatNet(const Net* net) const;
302-
Net* getOrFindFlatNet(const Net* net) const;
303-
dbNet* getOrFindFlatDbNet(const Net* net) const;
304-
Net* getOrFindFlatNet(const Pin* pin) const;
305-
dbNet* getOrFindFlatDbNet(const Pin* pin) const;
305+
306+
// Given a net or pin that may be hierarchical, find the corresponding flat
307+
// dbNet by traversing the netlist.
308+
// If the net is already a flat net (dbNet), it is returned as is.
309+
// If the net is a hierarchical net (dbModNet), find the associated dbNet.
310+
dbNet* findFlatDbNet(const Net* net) const;
311+
dbNet* findFlatDbNet(const Pin* pin) const;
312+
313+
// Given a net that may be hierarchical, find the corresponding flat dbNet by
314+
// traversing the netlist and return it as Net*.
315+
// If the net is already a flat net, it is returned as is.
316+
// If the net is a hierarchical net (dbModNet), find the associated dbNet and
317+
// return it as Net*.
318+
Net* findFlatNet(const Net* net) const;
319+
Net* findFlatNet(const Pin* pin) const;
320+
306321
bool hasPort(const Net* net) const;
307322

308323
////////////////////////////////////////////////////////////////

src/dbSta/src/dbNetwork.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2655,7 +2655,7 @@ Net* dbNetwork::mergedInto(Net*)
26552655

26562656
bool dbNetwork::isSpecial(Net* net)
26572657
{
2658-
dbNet* db_net = getOrFindFlatDbNet(net);
2658+
dbNet* db_net = findFlatDbNet(net);
26592659
return (db_net && db_net->isSpecial());
26602660
}
26612661

@@ -3977,15 +3977,15 @@ void dbNetwork::checkAxioms()
39773977
// If the net is already a flat net, it is returned as is.
39783978
// If the net is a hierarchical net (dbModNet), find the associated dbNet and
39793979
// return it as Net*.
3980-
Net* dbNetwork::getOrFindFlatNet(const Net* net) const
3980+
Net* dbNetwork::findFlatNet(const Net* net) const
39813981
{
3982-
return dbToSta(getOrFindFlatDbNet(net));
3982+
return dbToSta(findFlatDbNet(net));
39833983
}
39843984

39853985
// Given a net that may be hierarchical, find the corresponding flat dbNet.
39863986
// If the net is already a flat net (dbNet), it is returned as is.
39873987
// If the net is a hierarchical net (dbModNet), find the associated dbNet.
3988-
dbNet* dbNetwork::getOrFindFlatDbNet(const Net* net) const
3988+
dbNet* dbNetwork::findFlatDbNet(const Net* net) const
39893989
{
39903990
if (!net) {
39913991
return nullptr;
@@ -4010,14 +4010,14 @@ dbNet* dbNetwork::getOrFindFlatDbNet(const Net* net) const
40104010

40114011
// Find the flat net connected to the pin.
40124012
// This function handles both internal instance pins and top-level port pins.
4013-
Net* dbNetwork::getOrFindFlatNet(const Pin* pin) const
4013+
Net* dbNetwork::findFlatNet(const Pin* pin) const
40144014
{
4015-
return dbToSta(getOrFindFlatDbNet(pin));
4015+
return dbToSta(findFlatDbNet(pin));
40164016
}
40174017

40184018
// Find the flat net (dbNet) connected to the pin in the OpenDB database.
40194019
// This function handles both internal instance pins and top-level port pins.
4020-
dbNet* dbNetwork::getOrFindFlatDbNet(const Pin* pin) const
4020+
dbNet* dbNetwork::findFlatDbNet(const Pin* pin) const
40214021
{
40224022
dbNet* db_net = nullptr;
40234023
if (isTopLevelPort(pin)) {

src/est/src/EstimateParasitics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ SteinerTree* EstimateParasitics::makeSteinerTree(const Pin* drvr_pin)
993993
/*
994994
Handle hierarchy. Make sure all traversal on dbNets.
995995
*/
996-
odb::dbNet* db_net = db_network_->getOrFindFlatDbNet(drvr_pin);
996+
odb::dbNet* db_net = db_network_->findFlatDbNet(drvr_pin);
997997
Net* net = db_network_->dbToSta(db_net);
998998

999999
debugPrint(logger_, EST, "steiner", 1, "Net {}", sdc_network->pathName(net));

src/gpl/test/clust02.defok

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
VERSION 5.8 ;
2-
DIVIDERCHAR "|" ;
2+
DIVIDERCHAR "/" ;
33
BUSBITCHARS "[]" ;
44
DESIGN top ;
55
UNITS DISTANCE MICRONS 1000 ;

0 commit comments

Comments
 (0)