Skip to content

Commit 5a25908

Browse files
committed
Merge remote-tracking branch 'private/master' into secure-dpl-negotiation-default
2 parents 96409f8 + bd2a6b6 commit 5a25908

71 files changed

Lines changed: 929 additions & 328 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.

build_openroad.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Options:
6969
-n, --nice Nice all jobs. Use all cpus unless --threads is
7070
also given, then use N threads.
7171
72-
--yosys-args-overwrite Do not use default flags set by this scrip during
72+
--yosys-args-overwrite Do not use default flags set by this script during
7373
Yosys compilation.
7474
7575
--yosys-args STRING Additional compilation flags for Yosys compilation.
@@ -78,7 +78,7 @@ Options:
7878
to the Verific source folder.
7979
8080
--openroad-args-overwrite
81-
Do not use default flags set by this scrip during
81+
Do not use default flags set by this script during
8282
OpenROAD app compilation.
8383
8484
--openroad-args STRING Additional compilation flags for OpenROAD app

docker/Dockerfile.builder

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,9 @@ COPY --link build_openroad.sh build_openroad.sh
1515
1616
FROM orfs-base AS orfs-builder-base
1717
18-
# Inject compiler wrapper scripts that append the macros
19-
RUN mkdir -p /usr/local/bin/wrapped-cc && \
20-
echo '#!/bin/sh' > /usr/local/bin/wrapped-cc/gcc && \
21-
echo 'exec /usr/bin/gcc -D__TIME__="\"0\"" -D__DATE__="\"0\"" -D__TIMESTAMP__="\"0\"" -Wno-builtin-macro-redefined "$@"' >> /usr/local/bin/wrapped-cc/gcc && \
22-
chmod +x /usr/local/bin/wrapped-cc/gcc && \
23-
ln -sf /usr/local/bin/wrapped-cc/gcc /usr/local/bin/wrapped-cc/cc && \
24-
echo '#!/bin/sh' > /usr/local/bin/wrapped-cc/g++ && \
25-
echo 'exec /usr/bin/g++ -D__TIME__="\"0\"" -D__DATE__="\"0\"" -D__TIMESTAMP__="\"0\"" -Wno-builtin-macro-redefined "$@"' >> /usr/local/bin/wrapped-cc/g++ && \
26-
chmod +x /usr/local/bin/wrapped-cc/g++
18+
# Add compiler wrapper scripts for reproducible builds
19+
COPY --link etc/setup_compiler_wrappers.sh /tmp/
20+
RUN sh /tmp/setup_compiler_wrappers.sh && rm /tmp/setup_compiler_wrappers.sh
2721

2822
# Prepend wrapper directory to PATH so they override system compilers
2923
ENV PATH="/usr/local/bin/wrapped-cc:$PATH"

docker/Dockerfile.dev

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,14 @@ COPY InstallerOpenROAD.sh \
1515
ARG options=""
1616
ARG constantBuildDir="-constant-build-dir"
1717

18-
# add compiler wrapper scripts
19-
# inject the macro definitions during compilation only
20-
RUN mkdir -p /usr/local/bin/wrapped-cc && \
21-
echo '#!/bin/sh' > /usr/local/bin/wrapped-cc/gcc && \
22-
echo 'exec /usr/bin/gcc -D__TIME__="\"0\"" -D__DATE__="\"0\"" -D__TIMESTAMP__="\"0\"" -Wno-builtin-macro-redefined "$@"' >> /usr/local/bin/wrapped-cc/gcc && \
23-
chmod +x /usr/local/bin/wrapped-cc/gcc && \
24-
ln -sf /usr/local/bin/wrapped-cc/gcc /usr/local/bin/wrapped-cc/cc && \
25-
echo '#!/bin/sh' > /usr/local/bin/wrapped-cc/g++ && \
26-
echo 'exec /usr/bin/g++ -D__TIME__="\"0\"" -D__DATE__="\"0\"" -D__TIMESTAMP__="\"0\"" -Wno-builtin-macro-redefined "$@"' >> /usr/local/bin/wrapped-cc/g++ && \
27-
chmod +x /usr/local/bin/wrapped-cc/g++
18+
# add compiler wrapper scripts for reproducible builds
19+
COPY setup_compiler_wrappers.sh /tmp/
20+
RUN sh /tmp/setup_compiler_wrappers.sh && rm /tmp/setup_compiler_wrappers.sh
2821

2922
ENV PATH="/usr/local/bin/wrapped-cc:$PATH"
3023

31-
RUN ./DependencyInstaller.sh -all $options $constantBuildDir -save-deps-prefixes=/etc/openroad_deps_prefixes.txt \
24+
RUN ./DependencyInstaller.sh -base $options $constantBuildDir -save-deps-prefixes=/etc/openroad_deps_prefixes.txt \
25+
&& ./DependencyInstaller.sh -common $options $constantBuildDir -save-deps-prefixes=/etc/openroad_deps_prefixes.txt \
3226
&& rm -rf /tmp/installer /tmp/* /var/tmp/* /var/lib/apt/lists/*
3327

3428
ARG fromImage

etc/DependencyInstaller.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,11 @@ _install_EL7_Packages() {
7171
yum -y update
7272
yum -y install \
7373
time \
74+
readline \
7475
ruby \
75-
ruby-devel
76+
ruby-devel \
77+
tcl-tclreadline \
78+
tcl-tclreadline-devel
7679

7780
if ! [ -x "$(command -v klayout)" ]; then
7881
yum -y install https://www.klayout.org/downloads/CentOS_7/klayout-${klayoutVersion}-0.x86_64.rpm
@@ -108,9 +111,21 @@ _install_EL8_EL9_Packages() {
108111
dnf -y update
109112
dnf -y install \
110113
time \
114+
readline \
111115
ruby \
112116
ruby-devel
113117

118+
if [[ "${elVersion}" == "8" ]]; then
119+
dnf -y install \
120+
tcl-tclreadline \
121+
tcl-tclreadline-devel
122+
fi
123+
124+
if [[ "${elVersion}" == "9" ]]; then
125+
dnf -y install \
126+
https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/readline-devel-8.1-4.el9.x86_64.rpm
127+
fi
128+
114129
# Install KLayout based on EL version, note the different URLs
115130
case "${elVersion}" in
116131
"8")
@@ -186,6 +201,7 @@ _installUbuntuPackages() {
186201
libqt5opengl5 \
187202
libqt5svg5-dev \
188203
libqt5xmlpatterns5-dev \
204+
libreadline-dev \
189205
libtbb-dev \
190206
libz-dev \
191207
perl \
@@ -196,6 +212,7 @@ _installUbuntuPackages() {
196212
qttools5-dev \
197213
ruby \
198214
ruby-dev \
215+
tcl-tclreadline \
199216
time \
200217
zlib1g \
201218
zlib1g-dev

etc/setup_compiler_wrappers.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh
2+
# setup_compiler_wrappers.sh
3+
# Creates compiler wrapper scripts for reproducible builds by overriding
4+
# __TIME__, __DATE__, and __TIMESTAMP__ macros with constant values.
5+
# This ensures Docker image builds are deterministic regardless of build time.
6+
7+
set -e
8+
9+
WRAPPER_DIR="/usr/local/bin/wrapped-cc"
10+
mkdir -p "$WRAPPER_DIR"
11+
12+
# GCC wrapper
13+
cat > "$WRAPPER_DIR/gcc" << 'WRAPPER'
14+
#!/bin/sh
15+
exec /usr/bin/gcc -D__TIME__="\"0\"" -D__DATE__="\"0\"" -D__TIMESTAMP__="\"0\"" -Wno-builtin-macro-redefined "$@"
16+
WRAPPER
17+
chmod +x "$WRAPPER_DIR/gcc"
18+
19+
# Symlink cc to gcc wrapper
20+
ln -sf "$WRAPPER_DIR/gcc" "$WRAPPER_DIR/cc"
21+
22+
# G++ wrapper
23+
cat > "$WRAPPER_DIR/g++" << 'WRAPPER'
24+
#!/bin/sh
25+
exec /usr/bin/g++ -D__TIME__="\"0\"" -D__DATE__="\"0\"" -D__TIMESTAMP__="\"0\"" -Wno-builtin-macro-redefined "$@"
26+
WRAPPER
27+
chmod +x "$WRAPPER_DIR/g++"

flow/BUILD

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ exports_files(
1818
visibility = ["//visibility:public"],
1919
)
2020

21+
# Expose synth.tcl as an addressable source label so bazel-orfs can
22+
# point its `_synth_tcl` attr default at `@orfs//flow:scripts/synth.tcl`
23+
# instead of vendoring its own (drifting) copy at the bazel-orfs repo
24+
# root. See bazel-orfs `private/rules.bzl`.
25+
exports_files(
26+
["scripts/synth.tcl"],
27+
visibility = ["//visibility:public"],
28+
)
29+
2130
# files shared between scripts/synth.sh and scripts/flow.sh steps
2231
MAKEFILE_SHARED = [
2332
"scripts/variables.json",

flow/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ do-klayout:
200200
--template $(KLAYOUT_TECH_FILE) \
201201
--output $(OBJECTS_DIR)/klayout.lyt \
202202
--lef-files $(OBJECTS_DIR)/klayout_tech.lef $(SC_LEF) $(ADDITIONAL_LEFS) \
203-
--reference-dir $(RESULTS_DIR) \
204203
--map-files $(wildcard $(FLOW_HOME)/platforms/$(PLATFORM)/*map)
205204

206205
$(OBJECTS_DIR)/klayout_wrap.lyt: $(KLAYOUT_TECH_FILE) $(OBJECTS_DIR)/klayout_tech.lef
@@ -212,8 +211,7 @@ do-klayout_wrap:
212211
$(PYTHON_EXE) $(UTILS_DIR)/generate_klayout_tech.py \
213212
--template $(KLAYOUT_TECH_FILE) \
214213
--output $(OBJECTS_DIR)/klayout_wrap.lyt \
215-
--lef-files $(OBJECTS_DIR)/klayout_tech.lef $(WRAP_LEFS) \
216-
--reference-dir $(OBJECTS_DIR)/def
214+
--lef-files $(OBJECTS_DIR)/klayout_tech.lef $(WRAP_LEFS)
217215

218216
$(WRAPPED_LEFS):
219217
mkdir -p $(OBJECTS_DIR)/lef $(OBJECTS_DIR)/def

flow/designs/asap7/aes-block/rules-base.json

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
{
2+
"synth__canonical_netlist__hash": {
3+
"value": "83fdb355d67936eac58202298e680864403e2e7c",
4+
"compare": "==",
5+
"level": "warning"
6+
},
7+
"synth__netlist__hash": {
8+
"value": "d11001678e38263ee1a14c55bc48935b767ef70e",
9+
"compare": "==",
10+
"level": "warning"
11+
},
212
"synth__design__instance__area__stdcell": {
3-
"value": 2010.0,
13+
"value": 1930.0,
414
"compare": "<="
515
},
616
"constraints__clocks__count": {
717
"value": 1,
818
"compare": "=="
919
},
1020
"placeopt__design__instance__area": {
11-
"value": 7139,
21+
"value": 6699,
1222
"compare": "<="
1323
},
1424
"placeopt__design__instance__count__stdcell": {
@@ -28,11 +38,11 @@
2838
"compare": "<="
2939
},
3040
"cts__timing__setup__ws": {
31-
"value": -113.0,
41+
"value": -89.2,
3242
"compare": ">="
3343
},
3444
"cts__timing__setup__tns": {
35-
"value": -7390.0,
45+
"value": -3220.0,
3646
"compare": ">="
3747
},
3848
"cts__timing__hold__ws": {
@@ -48,11 +58,11 @@
4858
"compare": "<="
4959
},
5060
"globalroute__timing__setup__ws": {
51-
"value": -125.0,
61+
"value": -22.5,
5262
"compare": ">="
5363
},
5464
"globalroute__timing__setup__tns": {
55-
"value": -6000.0,
65+
"value": -90.0,
5666
"compare": ">="
5767
},
5868
"globalroute__timing__hold__ws": {
@@ -80,11 +90,11 @@
8090
"compare": "<="
8191
},
8292
"finish__timing__setup__ws": {
83-
"value": -91.5,
93+
"value": -31.5,
8494
"compare": ">="
8595
},
8696
"finish__timing__setup__tns": {
87-
"value": -2720.0,
97+
"value": -123.0,
8898
"compare": ">="
8999
},
90100
"finish__timing__hold__ws": {
@@ -96,7 +106,7 @@
96106
"compare": ">="
97107
},
98108
"finish__design__instance__area": {
99-
"value": 7205,
109+
"value": 6742,
100110
"compare": "<="
101111
}
102112
}

flow/designs/asap7/aes-mbff/rules-base.json

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,48 @@
11
{
2+
"synth__canonical_netlist__hash": {
3+
"value": "f657f68d8fc6a5a1050e3594864d42efefcbc3ad",
4+
"compare": "==",
5+
"level": "warning"
6+
},
7+
"synth__netlist__hash": {
8+
"value": "a04d44da52dba7d4a701d80927ba32d1d89ef9a1",
9+
"compare": "==",
10+
"level": "warning"
11+
},
212
"synth__design__instance__area__stdcell": {
3-
"value": 1900.0,
13+
"value": 1780.0,
414
"compare": "<="
515
},
616
"constraints__clocks__count": {
717
"value": 1,
818
"compare": "=="
919
},
1020
"placeopt__design__instance__area": {
11-
"value": 2087,
21+
"value": 1898,
1222
"compare": "<="
1323
},
1424
"placeopt__design__instance__count__stdcell": {
15-
"value": 19594,
25+
"value": 18149,
1626
"compare": "<="
1727
},
1828
"detailedplace__design__violations": {
1929
"value": 0,
2030
"compare": "=="
2131
},
2232
"cts__design__instance__count__setup_buffer": {
23-
"value": 1704,
33+
"value": 1578,
2434
"compare": "<="
2535
},
2636
"cts__design__instance__count__hold_buffer": {
27-
"value": 1704,
37+
"value": 1578,
2838
"compare": "<="
2939
},
3040
"cts__timing__setup__ws": {
31-
"value": -26.6,
41+
"value": -25.4,
3242
"compare": ">="
3343
},
3444
"cts__timing__setup__tns": {
35-
"value": -146.0,
45+
"value": -82.7,
3646
"compare": ">="
3747
},
3848
"cts__timing__hold__ws": {
@@ -48,11 +58,11 @@
4858
"compare": "<="
4959
},
5060
"globalroute__timing__setup__ws": {
51-
"value": -37.1,
61+
"value": -19.7,
5262
"compare": ">="
5363
},
5464
"globalroute__timing__setup__tns": {
55-
"value": -622.0,
65+
"value": -76.7,
5666
"compare": ">="
5767
},
5868
"globalroute__timing__hold__ws": {
@@ -64,7 +74,7 @@
6474
"compare": ">="
6575
},
6676
"detailedroute__route__wirelength": {
67-
"value": 74169,
77+
"value": 69010,
6878
"compare": "<="
6979
},
7080
"detailedroute__route__drc_errors": {
@@ -80,11 +90,11 @@
8090
"compare": "<="
8191
},
8292
"finish__timing__setup__ws": {
83-
"value": -31.8,
93+
"value": -19.0,
8494
"compare": ">="
8595
},
8696
"finish__timing__setup__tns": {
87-
"value": -185.0,
97+
"value": -76.0,
8898
"compare": ">="
8999
},
90100
"finish__timing__hold__ws": {
@@ -96,7 +106,7 @@
96106
"compare": ">="
97107
},
98108
"finish__design__instance__area": {
99-
"value": 2180,
109+
"value": 1952,
100110
"compare": "<="
101111
}
102112
}

0 commit comments

Comments
 (0)