Skip to content

Commit 5cee43d

Browse files
committed
Merge remote-tracking branch 'private/master' into rsz-fix-tie-placement
2 parents 4448cce + dc6dc21 commit 5cee43d

18 files changed

Lines changed: 3573 additions & 450 deletions

BUILD.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,10 @@ cc_library(
253253
"include/ord",
254254
],
255255
visibility = ["//:__subpackages__"],
256-
deps = ["@abseil-cpp//absl/synchronization"],
256+
deps = [
257+
"@abseil-cpp//absl/synchronization",
258+
"@tcl_lang//:tcl",
259+
],
257260
)
258261

259262
cc_library(

MODULE.bazel

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ bazel_dep(name = "verilator", version = "5.036.bcr.3", dev_dependency = True)
100100
bazel_dep(name = "bazel-orfs", dev_dependency = True)
101101
bazel_dep(name = "bazel-orfs-verilog", dev_dependency = True)
102102

103-
BAZEL_ORFS_COMMIT = "f5e20547f93729a4f67929902aaa3386d933bad0"
103+
BAZEL_ORFS_COMMIT = "78f19f25cec73bdec3517a76465dec7ce17ce227"
104104

105105
BAZEL_ORFS_REMOTE = "https://github.com/The-OpenROAD-Project/bazel-orfs.git"
106106

@@ -118,6 +118,34 @@ git_override(
118118
strip_prefix = "verilog",
119119
)
120120

121+
# bazel-orfs pulls in orfs without a version and patches yosys, relying on
122+
# overrides that only apply when bazel-orfs is the root module. Mirror them
123+
# here so OpenROAD-as-root can resolve the module graph.
124+
bazel_dep(name = "orfs", dev_dependency = True)
125+
git_override(
126+
module_name = "orfs",
127+
commit = "10a2baea2171059ec14cda9a5855aa26dd7572c6",
128+
patch_strip = 1,
129+
patches = [
130+
"//bazel/bazel-orfs-patches:0035-fix-remove-non-root-overrides-from-MODULE.bazel.patch",
131+
],
132+
remote = "https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts.git",
133+
)
134+
135+
bazel_dep(name = "yosys", version = "0.62.bcr.2", dev_dependency = True)
136+
137+
# yosys-slang is not on BCR. Pin to a commit on povik/yosys-slang master
138+
# that has the upstream Bazel build (povik/yosys-slang#310) and the
139+
# slang.so visibility fix (povik/yosys-slang#311). Submodules pull in
140+
# vendored slang and fmt sources.
141+
bazel_dep(name = "yosys-slang", dev_dependency = True)
142+
git_override(
143+
module_name = "yosys-slang",
144+
commit = "7753ea70431d85929292b90c33b32f6dbdb3b048",
145+
init_submodules = True,
146+
remote = "https://github.com/povik/yosys-slang.git",
147+
)
148+
121149
# --- Extensions ---
122150

123151
llvm = use_extension(
@@ -172,16 +200,13 @@ npm.npm_translate_lock(
172200
use_repo(npm, "npm")
173201

174202
orfs = use_extension("@bazel-orfs//:extension.bzl", "orfs_repositories", dev_dependency = True)
175-
176-
# To bump version, run: bazelisk run @bazel-orfs//:bump
177203
orfs.default(
178-
# Official image https://hub.docker.com/r/openroad/orfs/tags
179-
image = "docker.io/openroad/orfs:26Q1-816-gf40d2f346",
180-
# Use OpenROAD of this repo instead of from the docker image
204+
# Use OpenROAD of this repo instead of the one bundled with @orfs
181205
openroad = "//:openroad",
182-
sha256 = "2b05a14ae8062b4af82b245d648e95fa0293e09b61b57468518b66578744afb8",
206+
# Expose the yosys-slang plugin via YOSYS_PLUGIN_PATH so
207+
# SYNTH_HDL_FRONTEND=slang works in mock-array and other tests.
208+
yosys_plugins = ["@yosys-slang//src/yosys_plugin:slang.so"],
183209
)
184-
use_repo(orfs, "docker_orfs")
185210

186211
# --- Overrides ---
187212

MODULE.bazel.lock

Lines changed: 3391 additions & 275 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?=C3=98yvind=20Harboe?= <oyvind.harboe@zylin.com>
3+
Date: Wed, 2 Apr 2026 22:00:00 +0200
4+
Subject: [PATCH] fix: remove non-root overrides from MODULE.bazel
5+
6+
When ORFS is fetched as a non-root dependency, git_override and
7+
orfs.default() directives are ignored/illegal. Remove them so
8+
the module can be used as a dependency without errors.
9+
10+
Signed-off-by: =?UTF-8?q?=C3=98yvind=20Harboe?= <oyvind.harboe@zylin.com>
11+
---
12+
MODULE.bazel | 19 -------------------
13+
1 file changed, 19 deletions(-)
14+
15+
diff --git a/MODULE.bazel b/MODULE.bazel
16+
--- a/MODULE.bazel
17+
+++ b/MODULE.bazel
18+
@@ -8,13 +8,6 @@
19+
20+
bazel_dep(name = "bazel-orfs")
21+
22+
-# To bump version, run: bazelisk run @bazel-orfs//:bump
23+
-git_override(
24+
- module_name = "bazel-orfs",
25+
- commit = "f8a4b694b37c8f5322323eba9a9ae37f9541ee17",
26+
- remote = "https://github.com/The-OpenROAD-Project/bazel-orfs.git",
27+
-)
28+
-
29+
bazel_dep(name = "rules_python", version = "1.8.5")
30+
bazel_dep(name = "rules_shell", version = "0.6.1")
31+
32+
@@ -36,15 +29,3 @@
33+
use_repo(pip, "orfs-pip")
34+
35+
orfs = use_extension("@bazel-orfs//:extension.bzl", "orfs_repositories")
36+
-
37+
-# To bump version, run: bazelisk run @bazel-orfs//:bump
38+
-orfs.default(
39+
- image = "docker.io/openroad/orfs:v3.0-3273-gedf3d6bf",
40+
- # Use local files instead of docker image
41+
- makefile = "//flow:makefile",
42+
- makefile_yosys = "//flow:makefile_yosys",
43+
- pdk = "//flow:asap7",
44+
- sha256 = "f5692c6325ebcf27cc348e033355ec95c82c35ace1af7e72a0d352624ada143e",
45+
-)
46+
-use_repo(orfs, "com_github_nixos_patchelf_download")
47+
-use_repo(orfs, "docker_orfs")
48+
--
49+
2.51.0
50+

bazel/bazel-orfs-patches/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
exports_files(glob(["*.patch"]))

src/gpl/src/nesterovBase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "nesterovBase.h"
55

66
#include <algorithm>
7-
#include <boost/polygon/polygon.hpp>
87
#include <cassert>
98
#include <climits>
109
#include <cmath>
@@ -23,6 +22,7 @@
2322
#include <utility>
2423
#include <vector>
2524

25+
#include "boost/polygon/polygon.hpp"
2626
#include "fft.h"
2727
#include "gpl/Replace.h"
2828
#include "nesterovPlace.h"

src/tst/include/tst/nangate45_fixture.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#include <memory>
55

6-
#include "gtest/gtest.h"
76
#include "odb/db.h"
87
#include "tst/fixture.h"
98

src/web/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ cc_library(
169169
"@boost.beast",
170170
"@boost.geometry",
171171
"@boost.json",
172+
"@boost.system",
172173
"@spdlog",
173174
"@tcl_lang//:tcl",
174175
],

src/web/include/web/web.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <vector>
1616

1717
#include "boost/asio/ip/tcp.hpp"
18+
#include "boost/asio/steady_timer.hpp"
1819
#include "odb/db.h"
1920
#include "tcl.h"
2021
#include "utl/Logger.h"
@@ -133,6 +134,13 @@ class WebServer
133134
std::unique_ptr<boost::asio::io_context> ioc_;
134135
std::vector<std::thread> threads_;
135136

137+
// Periodic timer that drains WebLogSink so log output produced by
138+
// long-running Tcl commands streams to clients without waiting for a
139+
// debug pause/redraw or for the command to return. Reschedules
140+
// itself; cancelled in stop() before ioc_ is shut down.
141+
std::unique_ptr<boost::asio::steady_timer> log_drain_timer_;
142+
void scheduleLogDrain();
143+
136144
// Closes the Listener's acceptor before the io_context is destroyed,
137145
// avoiding a crash where the acceptor references a half-destroyed
138146
// io_context.

src/web/src/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -505,12 +505,12 @@ function createTclConsole(container) {
505505
tclAppend(`>>> ${cmd}\n`, 'tcl-cmd');
506506
completer.addToHistory(cmd);
507507
input.value = '';
508+
// Log output produced while the command runs streams in
509+
// separately as {"type":"log",...} push messages (handled
510+
// below in the onPush dispatch). The eval response only
511+
// carries the Tcl return value plus shutdown signaling.
508512
app.websocketManager.request({ type: 'tcl_eval', cmd })
509513
.then(data => {
510-
if (data.output) {
511-
tclAppend(data.output,
512-
data.is_error ? 'tcl-error' : '');
513-
}
514514
if (data.result) {
515515
tclAppend(data.result + '\n',
516516
data.is_error ? 'tcl-error' : '');

0 commit comments

Comments
 (0)