Skip to content

Commit 07be495

Browse files
authored
Merge pull request #9753 from The-OpenROAD-Project-staging/web
[Preview] OpenROAD web server as new GUI
2 parents c9288fe + 4ddc3d3 commit 07be495

108 files changed

Lines changed: 32685 additions & 1546 deletions

File tree

Some content is hidden

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

.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ test --test_timeout=300,1800,1800,9600
1515
# bazel 7 is somewhat forgiving for glob patterns that don't
1616
# match, but bazel 8 will be strict. So start now.
1717
common --incompatible_disallow_empty_glob
18+
common --experimental_isolated_extension_usages
1819

1920
build --cxxopt "-std=c++20" --host_cxxopt "-std=c++20"
2021
build --cxxopt "-xc++" --host_cxxopt "-xc++"

BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ OPENROAD_LIBRARY_DEPS = [
126126
"//src/upf:ui",
127127
"//src/utl",
128128
"//src/utl:ui",
129+
"//src/web",
130+
"//src/web:ui",
129131
"@abc",
130132
":ord",
131133
] + select(

MODULE.bazel

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ bazel_dep(name = "readline", version = "8.2.bcr.3")
7979
bazel_dep(name = "bant", version = "0.2.4", dev_dependency = True)
8080
bazel_dep(name = "googletest", version = "1.17.0.bcr.2", dev_dependency = True)
8181

82+
# JavaScript unit tests
83+
bazel_dep(name = "aspect_rules_js", version = "3.0.2", dev_dependency = True)
84+
bazel_dep(name = "rules_nodejs", version = "6.7.3", dev_dependency = True)
85+
8286
# A from source build of QT that allows it to link into OpenROAD.
8387
# Building like any other bazel project. scripts in the docker folder
8488
# of this project generate stubs .ifso for things like X11 that will
@@ -123,6 +127,25 @@ pip.parse(
123127
)
124128
use_repo(pip, "openroad-pip")
125129

130+
node = use_extension(
131+
"@rules_nodejs//nodejs:extensions.bzl",
132+
"node",
133+
dev_dependency = True,
134+
)
135+
node.toolchain(node_version = "22.14.0")
136+
137+
npm = use_extension(
138+
"@aspect_rules_js//npm:extensions.bzl",
139+
"npm",
140+
dev_dependency = True,
141+
isolate = True,
142+
)
143+
npm.npm_translate_lock(
144+
name = "npm",
145+
pnpm_lock = "//src/web:pnpm-lock.yaml",
146+
)
147+
use_repo(npm, "npm")
148+
126149
bazel_dep(name = "bazel-orfs", dev_dependency = True)
127150

128151
# To bump version, run: bazelisk run @bazel-orfs//:bump

MODULE.bazel.lock

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

etc/Build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,4 +265,4 @@ if [[ "$isNinja" == "yes" ]]; then
265265
exit 0
266266
fi
267267
eval cmake "${cmakeOptions}" -B "${buildDir}" .
268-
eval time cmake --build "${buildDir}" -j "${numThreads}"
268+
eval time cmake --build "${buildDir}" -j "${numThreads}"

include/ord/OpenRoad.hh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ namespace est {
128128
class EstimateParasitics;
129129
}
130130

131+
namespace web {
132+
class WebServer;
133+
}
134+
131135
namespace ord {
132136

133137
class dbVerilogNetwork;
@@ -181,6 +185,7 @@ class OpenRoad
181185
{
182186
return estimate_parasitics_;
183187
}
188+
web::WebServer* getWebServer() { return web_server_; }
184189

185190
// Return the bounding box of the db rows.
186191
odb::Rect getCore();
@@ -284,6 +289,7 @@ class OpenRoad
284289
stt::SteinerTreeBuilder* stt_builder_ = nullptr;
285290
dft::Dft* dft_ = nullptr;
286291
est::EstimateParasitics* estimate_parasitics_ = nullptr;
292+
web::WebServer* web_server_ = nullptr;
287293
utl::CallBackHandler* callback_handler_ = nullptr;
288294

289295
int threads_ = 1;

src/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ add_subdirectory(dft)
288288
add_subdirectory(mpl)
289289
add_subdirectory(par)
290290
add_subdirectory(est)
291+
add_subdirectory(web)
291292

292293
################################################################
293294

@@ -358,6 +359,7 @@ target_link_libraries(openroad
358359
mpl
359360
par
360361
est
362+
web
361363
absl::synchronization
362364
${ABC_LIBRARY}
363365
${TCL_LIBRARY}
@@ -437,6 +439,7 @@ if (Python3_FOUND AND BUILD_PYTHON)
437439
pdn_py
438440
dft_py
439441
par_py
442+
web_py
440443
)
441444

442445
else()

src/Main.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ using std::string;
6464
X(gpl) \
6565
X(dpl) \
6666
X(exa) \
67+
X(web) \
6768
X(ppl) \
6869
X(tap) \
6970
X(cts) \

src/OpenRoad.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@
9090
#include "utl/Progress.h"
9191
#include "utl/ScopedTemporaryFile.h"
9292
#include "utl/decode.h"
93+
#include "web/MakeWeb.h"
94+
#include "web/web.h"
9395

9496
namespace ord {
9597
extern const char* ord_tcl_inits[];
@@ -146,6 +148,7 @@ OpenRoad::~OpenRoad()
146148
delete stt_builder_;
147149
delete dft_;
148150
delete estimate_parasitics_;
151+
delete web_server_;
149152
delete logger_;
150153
delete verilog_reader_;
151154
delete callback_handler_;
@@ -256,6 +259,7 @@ void OpenRoad::init(Tcl_Interp* tcl_interp,
256259
icewall_ = new pad::ICeWall(db_, logger_);
257260
dft_ = new dft::Dft(db_, sta_, logger_);
258261
example_ = new exa::Example(db_, logger_);
262+
web_server_ = new web::WebServer(db_, sta_, logger_, tcl_interp);
259263

260264
// Init components.
261265
Ord_Init(tcl_interp);
@@ -295,6 +299,7 @@ void OpenRoad::init(Tcl_Interp* tcl_interp,
295299
stt::initSteinerTreeBuilder(tcl_interp);
296300
dft::initDft(tcl_interp);
297301
est::initTcl(tcl_interp);
302+
web::initWeb(tcl_interp);
298303

299304
// Import exported commands to global namespace.
300305
Tcl_Eval(tcl_interp, "sta::define_sta_cmds");

src/grt/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ target_link_libraries(grt_lib
3939
ant_lib
4040
dpl_lib
4141
dbSta_lib
42+
gui_heatmap_core
4243
stt_lib
4344
rsz_lib
4445
OpenSTA
@@ -94,6 +95,7 @@ if (Python3_FOUND AND BUILD_PYTHON)
9495
dpl_lib
9596
dbSta
9697
gui
98+
gui_heatmap_core
9799
stt
98100
OpenSTA
99101
Boost::boost

0 commit comments

Comments
 (0)