Skip to content

Commit 993421d

Browse files
authored
Merge pull request #4346 from The-OpenROAD-Project-staging/secure-yosys0.67
2 parents bea7dcd + a323dc4 commit 993421d

34 files changed

Lines changed: 176 additions & 209 deletions

File tree

‎.dockerignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Build working directories
22
tools/OpenROAD/build/
3-
tools/yosys-slang/build/
43
tools/kepler-formal/build/
54

65
# Build files

‎.gitmodules‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
[submodule "tools/OpenROAD"]
55
path = tools/OpenROAD
66
url = ../OpenROAD.git
7-
[submodule "tools/yosys-slang"]
8-
path = tools/yosys-slang
9-
url = https://github.com/povik/yosys-slang.git
107
[submodule "tools/kepler-formal"]
118
path = tools/kepler-formal
129
url = https://github.com/keplertech/kepler-formal

‎bazel/install.sh‎

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -e
33

44
# ORFS developer install script
5-
# Builds and installs OpenROAD, Yosys, and yosys-slang to tools/install/
5+
# Builds and installs OpenROAD and Yosys to tools/install/
66
# where flow/Makefile expects them.
77
#
88
# Uses stamp files for fast no-op re-runs (seconds when nothing changed).
@@ -80,7 +80,7 @@ while [[ $# -gt 0 ]]; do
8080
done
8181

8282
# --- Check submodules are initialized ---
83-
for sub in tools/OpenROAD tools/yosys tools/yosys-slang; do
83+
for sub in tools/OpenROAD tools/yosys; do
8484
if [[ ! -d "${WORKSPACE}/${sub}" ]] || [[ -z "$(ls -A "${WORKSPACE}/${sub}" 2>/dev/null)" ]]; then
8585
echo "ERROR: ${sub} not initialized."
8686
echo "Run: git submodule update --init --recursive"
@@ -105,37 +105,19 @@ if [[ -f "${YOSYS_STAMP}" ]] && [[ "$(cat "${YOSYS_STAMP}")" == "${YOSYS_COMMIT}
105105
echo "=== Yosys already up to date (${YOSYS_COMMIT:0:12}) ==="
106106
else
107107
echo "=== Building Yosys ==="
108+
# Yosys 0.67+ builds with CMake (no Makefile); mirrors build_openroad.sh.
108109
(
109110
cd "${WORKSPACE}/tools/yosys"
110-
make -j "${NUM_THREADS}" PREFIX="${YOSYS_INSTALL}" ABC_ARCHFLAGS=-Wno-register
111-
make install PREFIX="${YOSYS_INSTALL}"
111+
cmake -B build . \
112+
-DCMAKE_BUILD_TYPE=Release \
113+
-DYOSYS_SKIP_ABC_SUBMODULE_CHECK=ON \
114+
-DCMAKE_INSTALL_PREFIX="${YOSYS_INSTALL}"
115+
cmake --build build --target install -j "${NUM_THREADS}"
112116
)
113117
echo "${YOSYS_COMMIT}" > "${YOSYS_STAMP}"
114118
echo "Yosys installed to ${YOSYS_INSTALL}/bin/yosys"
115119
fi
116120

117-
# --- yosys-slang ---
118-
SLANG_STAMP="${YOSYS_INSTALL}/.slang_commit"
119-
SLANG_COMMIT="$(git -C "${WORKSPACE}/tools/yosys-slang" rev-parse HEAD)"
120-
121-
if [[ -f "${SLANG_STAMP}" ]] && [[ "$(cat "${SLANG_STAMP}")" == "${SLANG_COMMIT}" ]]; then
122-
echo "=== yosys-slang already up to date (${SLANG_COMMIT:0:12}) ==="
123-
else
124-
echo "=== Building yosys-slang ==="
125-
(
126-
cd "${WORKSPACE}/tools/yosys-slang"
127-
cmake -S . -B build \
128-
-DYOSYS_CONFIG="${YOSYS_INSTALL}/bin/yosys-config" \
129-
-DCMAKE_BUILD_TYPE=Release \
130-
-DYOSYS_SLANG_REVISION=unknown \
131-
-DSLANG_REVISION=unknown
132-
cmake --build build -j "${NUM_THREADS}"
133-
cmake --install build --prefix "${YOSYS_INSTALL}"
134-
)
135-
echo "${SLANG_COMMIT}" > "${SLANG_STAMP}"
136-
echo "yosys-slang installed to ${YOSYS_INSTALL}/share/yosys/plugins/"
137-
fi
138-
139121
echo ""
140122
echo "=== Done ==="
141123
echo "cd flow && make"

‎build_openroad.sh‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ PROC=-1
3232
WITH_VERIFIC=0
3333
VERIFIC_SRC=""
3434
VERIFIC_COMPONENTS='database util containers pct hier_tree verilog'
35-
VERIFIC_ARGS=" VERIFIC_COMPONENTS='${VERIFIC_COMPONENTS}'"
36-
VERIFIC_ARGS+=" ENABLE_VERIFIC=1 ENABLE_VERIFIC_VHDL=0 VERIFIC_DIR=verific"
35+
VERIFIC_ARGS=" -DYOSYS_VERIFIC_DIR=\"${DIR}/tools/yosys/verific\""
3736

3837
function usage() {
3938
cat << EOF
@@ -207,7 +206,7 @@ fi
207206
echo "[INFO FLW-0028] Compiling with ${PROC} threads."
208207

209208
# Only add install prefix variables after parsing arguments.
210-
YOSYS_ARGS+=" PREFIX=${INSTALL_PATH}/yosys"
209+
YOSYS_ARGS+=" -DCMAKE_INSTALL_PREFIX=\"${INSTALL_PATH}/yosys\""
211210
OPENROAD_APP_ARGS+=" -D CMAKE_INSTALL_PREFIX=${INSTALL_PATH}/OpenROAD"
212211
if [ -n "$CMAKE_INSTALL_RPATH" ]; then
213212
OPENROAD_APP_ARGS+=" -D CMAKE_INSTALL_RPATH=${CMAKE_INSTALL_RPATH}"
@@ -364,11 +363,11 @@ __local_build()
364363
fi
365364

366365
echo "[INFO FLW-0017] Compiling Yosys."
367-
eval ${NICE} make install -C tools/yosys -j "${PROC}" ${YOSYS_ARGS}
368-
369-
echo "[INFO FLW-0030] Compiling yosys-slang."
370-
# CMAKE_FLAGS added to work around yosys-slang#141 (unable to build outside of git checkout)
371-
${NICE} make install -C tools/yosys-slang -j "${PROC}" YOSYS_PREFIX="${INSTALL_PATH}/yosys/bin/" CMAKE_FLAGS="-DYOSYS_SLANG_REVISION=unknown -DSLANG_REVISION=unknown"
366+
eval ${NICE} cmake -B tools/yosys/build tools/yosys \
367+
-DCMAKE_BUILD_TYPE=Release \
368+
-DYOSYS_SKIP_ABC_SUBMODULE_CHECK=ON \
369+
${YOSYS_ARGS}
370+
${NICE} cmake --build tools/yosys/build --target install -j "${PROC}"
372371

373372
echo "[INFO FLW-0031] Compiling kepler-formal"
374373
${NICE} cmake -B tools/kepler-formal/build tools/kepler-formal \

‎docs/user/FlowVariables.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ configuration file.
289289
| <a name="SKIP_REPAIR_TIE_FANOUT"></a>SKIP_REPAIR_TIE_FANOUT| Skip repair_tie_fanout at floorplan step.| 0|
290290
| <a name="SKIP_REPORT_METRICS"></a>SKIP_REPORT_METRICS| If set to 1, then metrics, report_metrics does nothing. Useful to speed up builds.| 0|
291291
| <a name="SKIP_VT_SWAP"></a>SKIP_VT_SWAP| Do not perform VT swap to improve QoR (default: do VT swap).| |
292-
| <a name="SLANG_PLUGIN_PATH"></a>SLANG_PLUGIN_PATH| Path to the slang plugin for Yosys. This can be a full path to a custom-built plugin (e.g. for Bazel builds) or just the plugin name.| slang|
293292
| <a name="SLEW_MARGIN"></a>SLEW_MARGIN| Specifies a slew margin when fixing max slew violations. This option allows you to overfix.| |
294293
| <a name="SWAP_ARITH_OPERATORS"></a>SWAP_ARITH_OPERATORS| Improve timing QoR by swapping ALU and MULT arithmetic operators.| |
295294
| <a name="SYNTH_ARGS"></a>SYNTH_ARGS| Optional synthesis variables for yosys.| |
@@ -352,7 +351,6 @@ configuration file.
352351
- [SDC_FILE](#SDC_FILE)
353352
- [SDC_GUT](#SDC_GUT)
354353
- [SKIP_REPORT_METRICS](#SKIP_REPORT_METRICS)
355-
- [SLANG_PLUGIN_PATH](#SLANG_PLUGIN_PATH)
356354
- [SYNTH_ARGS](#SYNTH_ARGS)
357355
- [SYNTH_BLACKBOXES](#SYNTH_BLACKBOXES)
358356
- [SYNTH_CANONICALIZE_TCL](#SYNTH_CANONICALIZE_TCL)

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"synth__canonical_netlist__hash": {
3-
"value": "3fc8a6d24fdb16116484d2eed15ff2dbe4531126",
3+
"value": "e845e75a0a2ebf22edd0b35335fffe85bf118732",
44
"compare": "==",
55
"level": "warning"
66
},
77
"synth__netlist__hash": {
8-
"value": "d11001678e38263ee1a14c55bc48935b767ef70e",
8+
"value": "a1413c77490f5f69d469c02fd395b9047501eb60",
99
"compare": "==",
1010
"level": "warning"
1111
},
@@ -38,11 +38,11 @@
3838
"compare": "<="
3939
},
4040
"cts__timing__setup__ws": {
41-
"value": -84.1,
41+
"value": -126.0,
4242
"compare": ">="
4343
},
4444
"cts__timing__setup__tns": {
45-
"value": -4320.0,
45+
"value": -5500.0,
4646
"compare": ">="
4747
},
4848
"cts__timing__hold__ws": {
@@ -58,11 +58,11 @@
5858
"compare": "<="
5959
},
6060
"globalroute__timing__setup__ws": {
61-
"value": -31.1,
61+
"value": -25.0,
6262
"compare": ">="
6363
},
6464
"globalroute__timing__setup__tns": {
65-
"value": -174.0,
65+
"value": -92.5,
6666
"compare": ">="
6767
},
6868
"globalroute__timing__hold__ws": {
@@ -74,7 +74,7 @@
7474
"compare": ">="
7575
},
7676
"detailedroute__route__wirelength": {
77-
"value": 50261,
77+
"value": 48942,
7878
"compare": "<="
7979
},
8080
"detailedroute__route__drc_errors": {
@@ -90,11 +90,11 @@
9090
"compare": "<="
9191
},
9292
"finish__timing__setup__ws": {
93-
"value": -56.6,
93+
"value": -55.6,
9494
"compare": ">="
9595
},
9696
"finish__timing__setup__tns": {
97-
"value": -1520.0,
97+
"value": -511.0,
9898
"compare": ">="
9999
},
100100
"finish__timing__hold__ws": {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"compare": "<="
3939
},
4040
"cts__timing__setup__ws": {
41-
"value": -28.9,
41+
"value": -27.5,
4242
"compare": ">="
4343
},
4444
"cts__timing__setup__tns": {
@@ -58,11 +58,11 @@
5858
"compare": "<="
5959
},
6060
"globalroute__timing__setup__ws": {
61-
"value": -28.0,
61+
"value": -27.8,
6262
"compare": ">="
6363
},
6464
"globalroute__timing__setup__tns": {
65-
"value": -164.0,
65+
"value": -248.0,
6666
"compare": ">="
6767
},
6868
"globalroute__timing__hold__ws": {

‎flow/designs/asap7/ethmac/rules-base.json‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
22
"synth__canonical_netlist__hash": {
3-
"value": "80bd19c2d0b116a1d88f0f84cbfe00da3a31d68c",
3+
"value": "7acd8f58cb4522b4111742580e4e5e656473ba7d",
44
"compare": "==",
55
"level": "warning"
66
},
77
"synth__netlist__hash": {
8-
"value": "ef3244761c23b0d7c0d2ee7eaf97545ad0b74921",
8+
"value": "cb3ea9e02e4231a1646261bbc4f6cba6dd58b568",
99
"compare": "==",
1010
"level": "warning"
1111
},
1212
"synth__design__instance__area__stdcell": {
13-
"value": 8510.0,
13+
"value": 8420.0,
1414
"compare": "<="
1515
},
1616
"constraints__clocks__count": {
1717
"value": 6,
1818
"compare": "=="
1919
},
2020
"placeopt__design__instance__area": {
21-
"value": 8783,
21+
"value": 8704,
2222
"compare": "<="
2323
},
2424
"placeopt__design__instance__count__stdcell": {
25-
"value": 68712,
25+
"value": 68710,
2626
"compare": "<="
2727
},
2828
"detailedplace__design__violations": {
@@ -38,7 +38,7 @@
3838
"compare": "<="
3939
},
4040
"cts__timing__setup__ws": {
41-
"value": -88.6,
41+
"value": -105.0,
4242
"compare": ">="
4343
},
4444
"cts__timing__setup__tns": {
@@ -62,7 +62,7 @@
6262
"compare": ">="
6363
},
6464
"globalroute__timing__setup__tns": {
65-
"value": -2120.0,
65+
"value": -2020.0,
6666
"compare": ">="
6767
},
6868
"globalroute__timing__hold__ws": {
@@ -74,7 +74,7 @@
7474
"compare": ">="
7575
},
7676
"detailedroute__route__wirelength": {
77-
"value": 244604,
77+
"value": 240797,
7878
"compare": "<="
7979
},
8080
"detailedroute__route__drc_errors": {
@@ -94,7 +94,7 @@
9494
"compare": ">="
9595
},
9696
"finish__timing__setup__tns": {
97-
"value": -1650.0,
97+
"value": -1500.0,
9898
"compare": ">="
9999
},
100100
"finish__timing__hold__ws": {
@@ -106,7 +106,7 @@
106106
"compare": ">="
107107
},
108108
"finish__design__instance__area": {
109-
"value": 9440,
109+
"value": 9362,
110110
"compare": "<="
111111
}
112112
}

‎flow/designs/asap7/riscv32i/rules-base.json‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"synth__canonical_netlist__hash": {
3-
"value": "1b153640320fe931005e9414a100c25715206b08",
3+
"value": "24d1128afe4c92ecfe91e78f05b71e9f23fe18a0",
44
"compare": "==",
55
"level": "warning"
66
},
77
"synth__netlist__hash": {
8-
"value": "3cda72525274bb1b952aec8e0a640cf60c42b6da",
8+
"value": "35c991086e2870003e3a2bd8f0b533614ab30c5a",
99
"compare": "==",
1010
"level": "warning"
1111
},
@@ -58,11 +58,11 @@
5858
"compare": "<="
5959
},
6060
"globalroute__timing__setup__ws": {
61-
"value": -49.8,
61+
"value": -49.4,
6262
"compare": ">="
6363
},
6464
"globalroute__timing__setup__tns": {
65-
"value": -222.0,
65+
"value": -206.0,
6666
"compare": ">="
6767
},
6868
"globalroute__timing__hold__ws": {
@@ -94,7 +94,7 @@
9494
"compare": ">="
9595
},
9696
"finish__timing__setup__tns": {
97-
"value": -10600.0,
97+
"value": -14500.0,
9898
"compare": ">="
9999
},
100100
"finish__timing__hold__ws": {

‎flow/designs/asap7/swerv_wrapper/config.mk‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ export SYNTH_KEEP_MODULES ?= \
4545
export LIB_MODEL = CCS
4646

4747
export VERILOG_FILES = $(DESIGN_HOME)/src/swerv/swerv_wrapper.sv2v.v \
48-
$(DESIGN_HOME)/$(PLATFORM)/swerv_wrapper/macros.v
48+
$(DESIGN_HOME)/$(PLATFORM)/swerv_wrapper/macros.v \
49+
$(CLKGATE_MAP_FILE)
4950
export SDC_FILE = $(DESIGN_HOME)/$(PLATFORM)/swerv_wrapper/constraint.sdc
5051

5152
export ADDITIONAL_LEFS = $(sort $(wildcard $(DESIGN_HOME)/$(PLATFORM)/swerv_wrapper/lef/*.lef))
@@ -58,7 +59,9 @@ export PLACE_DENSITY_LB_ADDON = 0.20
5859

5960
export ROUTING_LAYER_ADJUSTMENT = 0.2
6061

61-
export SWAP_ARITH_OPERATORS = 1
62+
# Use OpenROAD-native synthesis (SYN) instead of Yosys. SWAP_ARITH_OPERATORS
63+
# removed: its wrapped-operator flow is Yosys-only and unsupported by SYN.
64+
export SYNTH_USE_SYN = 1
6265
export OPENROAD_HIERARCHICAL = 1
6366

6467
export GPL_RANDOM_SEED = 2

0 commit comments

Comments
 (0)