Skip to content

Commit 91d6187

Browse files
committed
Merge origin/master into bazel-install
2 parents 56656ed + 2be0a8c commit 91d6187

28 files changed

Lines changed: 1377 additions & 211 deletions

.github/workflows/github-actions-cron-util-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on:
44
- cron: "0 8 * * SUN"
55
push:
66
paths:
7-
- 'flow/util/genElapsedTime.py'
8-
- 'flow/test/test_genElapsedTime.py'
7+
- 'flow/util/*.py'
8+
- 'flow/test/test_*.py'
99
pull_request:
1010
paths:
11-
- 'flow/util/genElapsedTime.py'
12-
- 'flow/test/test_genElapsedTime.py'
11+
- 'flow/util/*.py'
12+
- 'flow/test/test_*.py'
1313
# Allows you to run this workflow manually from the Actions tab
1414
workflow_dispatch:
1515

docs/user/FlowVariables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ configuration file.
234234
| <a name="REMOVE_CELLS_FOR_LEC"></a>REMOVE_CELLS_FOR_LEC| String patterns directly passed to write_verilog -remove_cells <> for lec checks.| |
235235
| <a name="REPAIR_PDN_VIA_LAYER"></a>REPAIR_PDN_VIA_LAYER| Remove power grid vias which generate DRC violations after detailed routing.| |
236236
| <a name="REPORT_CLOCK_SKEW"></a>REPORT_CLOCK_SKEW| Report clock skew as part of reporting metrics, starting at CTS, before which there is no clock skew. This metric can be quite time-consuming, so it can be useful to disable.| 1|
237-
| <a name="ROUTING_LAYER_ADJUSTMENT"></a>ROUTING_LAYER_ADJUSTMENT| Adjusts routing layer capacities to manage congestion and improve detailed routing. High values ease detailed routing but risk excessive detours and long global routing times, while low values reduce global routing failure but can complicate detailed routing. The global routing running time normally reduces dramatically (entirely design specific, but going from hours to minutes has been observed) when the value is low (such as 0.10). Sometimes, global routing will succeed with lower values and fail with higher values. Exploring results with different values can help shed light on the problem. Start with a too low value, such as 0.10, and bisect to value that works by doing multiple global routing runs. As a last resort, `make global_route_issue` and using the tools/OpenROAD/etc/deltaDebug.py can be useful to debug global routing errors. If there is something specific that is impossible to route, such as a clock line over a macro, global routing will terminate with DRC errors routes that could have been routed were it not for the specific impossible routes. deltaDebug.py should weed out the possible routes and leave a minimal failing case that pinpoints the problem.| 0.5|
237+
| <a name="ROUTING_LAYER_ADJUSTMENT"></a>ROUTING_LAYER_ADJUSTMENT| Adjusts routing layer capacities to manage congestion and improve detailed routing. High values ease detailed routing but risk excessive detours and long global routing times, while low values reduce global routing failure but can complicate detailed routing. The global routing running time normally reduces dramatically (entirely design specific, but going from hours to minutes has been observed) when the value is low (such as 0.10). Sometimes, global routing will succeed with lower values and fail with higher values. Exploring results with different values can help shed light on the problem. Start with a too low value, such as 0.10, and bisect to value that works by doing multiple global routing runs. As a last resort, `make global_route_issue` and using the tools/OpenROAD/etc/whittle.py can be useful to debug global routing errors. If there is something specific that is impossible to route, such as a clock line over a macro, global routing will terminate with DRC errors routes that could have been routed were it not for the specific impossible routes. whittle.py should weed out the possible routes and leave a minimal failing case that pinpoints the problem.| 0.5|
238238
| <a name="RTLMP_AREA_WT"></a>RTLMP_AREA_WT| Weight for the area of the current floorplan.| 0.1|
239239
| <a name="RTLMP_ARGS"></a>RTLMP_ARGS| Overrides all other RTL macro placer arguments.| |
240240
| <a name="RTLMP_BOUNDARY_WT"></a>RTLMP_BOUNDARY_WT| Weight for the boundary or how far the hard macro clusters are from boundaries.| 50.0|

etc/DependencyInstaller.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,19 +152,25 @@ _installUbuntuPackages() {
152152
apt-get -y update
153153
apt-get -y install --no-install-recommends \
154154
bison \
155+
capnproto \
155156
curl \
156157
flex \
157158
help2man \
159+
libboost-iostreams-dev \
160+
libcapnp-dev \
158161
libfl-dev \
159162
libfl2 \
160163
libgit2-dev \
161164
libgoogle-perftools-dev \
165+
libgtest-dev \
162166
libqt5multimediawidgets5 \
163167
libqt5opengl5 \
164168
libqt5svg5-dev \
165169
libqt5xmlpatterns5-dev \
170+
libtbb-dev \
166171
libz-dev \
167172
perl \
173+
pkg-config \
168174
python3-pip \
169175
python3-venv \
170176
qtmultimedia5-dev \
@@ -274,10 +280,7 @@ _installCI() {
274280
coreutils \
275281
curl \
276282
python3 \
277-
software-properties-common \
278-
clang pkg-config \
279-
libboost-dev libfl-dev libtbb-dev capnproto libcapnp-dev \
280-
libgtest-dev libspdlog-dev libfmt-dev libboost-iostreams-dev zlib1g-dev
283+
software-properties-common
281284
}
282285

283286
_help() {

flow/Makefile

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -195,21 +195,25 @@ $(OBJECTS_DIR)/klayout.lyt: $(KLAYOUT_TECH_FILE) $(OBJECTS_DIR)/klayout_tech.lef
195195

196196
.PHONY: do-klayout
197197
do-klayout:
198-
ifeq ($(KLAYOUT_ENV_VAR_IN_PATH),valid)
199-
SC_LEF_RELATIVE_PATH="$(shell realpath --relative-to=$(RESULTS_DIR) $(SC_LEF))"; \
200-
OTHER_LEFS_RELATIVE_PATHS=$$(echo "$(foreach file, $(OBJECTS_DIR)/klayout_tech.lef $(ADDITIONAL_LEFS),<lef-files>$$(realpath --relative-to=$(RESULTS_DIR) $(file))</lef-files>)"); \
201-
sed 's,<lef-files>.*</lef-files>,<lef-files>'"$$SC_LEF_RELATIVE_PATH"'</lef-files>'"$$OTHER_LEFS_RELATIVE_PATHS"',g' $(KLAYOUT_TECH_FILE) > $(OBJECTS_DIR)/klayout.lyt
202-
else
203-
sed 's,<lef-files>.*</lef-files>,$(foreach file, $(OBJECTS_DIR)/klayout_tech.lef $(SC_LEF) $(ADDITIONAL_LEFS),<lef-files>$(shell realpath --relative-to=$(RESULTS_DIR) $(file))</lef-files>),g' $(KLAYOUT_TECH_FILE) > $(OBJECTS_DIR)/klayout.lyt
204-
endif
205-
sed -i 's,<map-file>.*</map-file>,$(foreach file, $(FLOW_HOME)/platforms/$(PLATFORM)/*map,<map-file>$(shell realpath $(file))</map-file>),g' $(OBJECTS_DIR)/klayout.lyt
198+
@mkdir -p $(dir $(OBJECTS_DIR)/klayout.lyt)
199+
$(PYTHON_EXE) $(UTILS_DIR)/generate_klayout_tech.py \
200+
--template $(KLAYOUT_TECH_FILE) \
201+
--output $(OBJECTS_DIR)/klayout.lyt \
202+
--lef-files $(OBJECTS_DIR)/klayout_tech.lef $(SC_LEF) $(ADDITIONAL_LEFS) \
203+
--reference-dir $(RESULTS_DIR) \
204+
--map-files $(wildcard $(FLOW_HOME)/platforms/$(PLATFORM)/*map)
206205

207206
$(OBJECTS_DIR)/klayout_wrap.lyt: $(KLAYOUT_TECH_FILE) $(OBJECTS_DIR)/klayout_tech.lef
208207
$(UNSET_AND_MAKE) do-klayout_wrap
209208

210209
.PHONY: do-klayout_wrap
211210
do-klayout_wrap:
212-
sed 's,<lef-files>.*</lef-files>,$(foreach file, $(OBJECTS_DIR)/klayout_tech.lef $(WRAP_LEFS),<lef-files>$(shell realpath --relative-to=$(OBJECTS_DIR)/def $(file))</lef-files>),g' $(KLAYOUT_TECH_FILE) > $(OBJECTS_DIR)/klayout_wrap.lyt
211+
@mkdir -p $(dir $(OBJECTS_DIR)/klayout_wrap.lyt)
212+
$(PYTHON_EXE) $(UTILS_DIR)/generate_klayout_tech.py \
213+
--template $(KLAYOUT_TECH_FILE) \
214+
--output $(OBJECTS_DIR)/klayout_wrap.lyt \
215+
--lef-files $(OBJECTS_DIR)/klayout_tech.lef $(WRAP_LEFS) \
216+
--reference-dir $(OBJECTS_DIR)/def
213217

214218
$(WRAPPED_LEFS):
215219
mkdir -p $(OBJECTS_DIR)/lef $(OBJECTS_DIR)/def
@@ -627,7 +631,7 @@ final: finish
627631

628632
.PHONY: do-finish
629633
do-finish:
630-
$(UNSET_AND_MAKE) do-6_1_fill do-6_1_fill.sdc do-6_final.sdc do-6_report do-gds elapsed
634+
$(UNSET_AND_MAKE) do-6_1_fill do-6_1_fill.sdc do-6_final.sdc do-6_report elapsed
631635

632636
.PHONY: generate_abstract
633637
generate_abstract: $(RESULTS_DIR)/6_final.gds $(RESULTS_DIR)/6_final.def $(RESULTS_DIR)/6_final.v $(RESULTS_DIR)/6_final.sdc
@@ -643,6 +647,17 @@ do-generate_abstract:
643647
clean_abstract:
644648
rm -f $(RESULTS_DIR)/$(DESIGN_NAME).lib $(RESULTS_DIR)/$(DESIGN_NAME).lef
645649

650+
.PHONY: check-klayout
651+
check-klayout:
652+
@if [ -z "$(KLAYOUT_CMD)" ]; then \
653+
echo "Error: KLayout not found. Install KLayout or set KLAYOUT_CMD."; \
654+
echo "Hint: KLayout is needed for GDS/DRC/LVS targets."; \
655+
exit 1; \
656+
fi
657+
658+
.PHONY: gds
659+
gds: $(GDS_FINAL_FILE)
660+
646661
# Merge wrapped macros using Klayout
647662
#-------------------------------------------------------------------------------
648663
$(WRAPPED_GDSOAS): $(OBJECTS_DIR)/klayout_wrap.lyt $(WRAPPED_LEFS)
@@ -658,7 +673,7 @@ $(WRAPPED_GDSOAS): $(OBJECTS_DIR)/klayout_wrap.lyt $(WRAPPED_LEFS)
658673

659674
# Merge GDS using Klayout
660675
#-------------------------------------------------------------------------------
661-
$(GDS_MERGED_FILE): $(RESULTS_DIR)/6_final.def $(OBJECTS_DIR)/klayout.lyt $(GDSOAS_FILES) $(WRAPPED_GDSOAS) $(SEAL_GDSOAS)
676+
$(GDS_MERGED_FILE): check-klayout $(RESULTS_DIR)/6_final.def $(OBJECTS_DIR)/klayout.lyt $(GDSOAS_FILES) $(WRAPPED_GDSOAS) $(SEAL_GDSOAS)
662677
$(UNSET_AND_MAKE) do-gds-merged
663678

664679
.PHONY: do-gds-merged
@@ -768,7 +783,7 @@ nuke: clean_test clean_issues
768783
# DEF/GDS/OAS viewer shortcuts
769784
#-------------------------------------------------------------------------------
770785
.PHONY: $(foreach file,$(RESULTS_DEF) $(RESULTS_GDS) $(RESULTS_OAS),klayout_$(file))
771-
$(foreach file,$(RESULTS_DEF) $(RESULTS_GDS) $(RESULTS_OAS),klayout_$(file)): klayout_%: $(OBJECTS_DIR)/klayout.lyt
786+
$(foreach file,$(RESULTS_DEF) $(RESULTS_GDS) $(RESULTS_OAS),klayout_$(file)): klayout_%: check-klayout $(OBJECTS_DIR)/klayout.lyt
772787
$(SCRIPTS_DIR)/klayout.sh -nn $(OBJECTS_DIR)/klayout.lyt $(RESULTS_DIR)/$*
773788

774789
$(eval $(call OPEN_GUI_SHORTCUT,synth,1_synth.odb))

flow/designs/rapidus2hp/cva6/rules-base.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"compare": "<="
1313
},
1414
"placeopt__design__instance__count__stdcell": {
15-
"value": 167948,
15+
"value": 194724,
1616
"compare": "<="
1717
},
1818
"detailedplace__design__violations": {
@@ -32,7 +32,7 @@
3232
"compare": ">="
3333
},
3434
"cts__timing__setup__tns": {
35-
"value": -212.0,
35+
"value": -135.0,
3636
"compare": ">="
3737
},
3838
"cts__timing__hold__ws": {
@@ -52,7 +52,7 @@
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
55-
"value": -584.0,
55+
"value": -452.0,
5656
"compare": ">="
5757
},
5858
"globalroute__timing__hold__ws": {
@@ -68,7 +68,7 @@
6868
"compare": ">="
6969
},
7070
"finish__timing__setup__tns": {
71-
"value": -584.0,
71+
"value": -452.0,
7272
"compare": ">="
7373
},
7474
"finish__timing__hold__ws": {

flow/designs/rapidus2hp/cva6/rules-verific.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"compare": "<="
1313
},
1414
"placeopt__design__instance__count__stdcell": {
15-
"value": 173997,
15+
"value": 201058,
1616
"compare": "<="
1717
},
1818
"detailedplace__design__violations": {
@@ -28,11 +28,11 @@
2828
"compare": "<="
2929
},
3030
"cts__timing__setup__ws": {
31-
"value": -0.14,
31+
"value": -0.136,
3232
"compare": ">="
3333
},
3434
"cts__timing__setup__tns": {
35-
"value": -412.0,
35+
"value": -388.0,
3636
"compare": ">="
3737
},
3838
"cts__timing__hold__ws": {
@@ -48,11 +48,11 @@
4848
"compare": "<="
4949
},
5050
"globalroute__timing__setup__ws": {
51-
"value": -0.358,
51+
"value": -0.279,
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
55-
"value": -697.0,
55+
"value": -659.0,
5656
"compare": ">="
5757
},
5858
"globalroute__timing__hold__ws": {
@@ -64,11 +64,11 @@
6464
"compare": ">="
6565
},
6666
"finish__timing__setup__ws": {
67-
"value": -0.358,
67+
"value": -0.279,
6868
"compare": ">="
6969
},
7070
"finish__timing__setup__tns": {
71-
"value": -697.0,
71+
"value": -550.0,
7272
"compare": ">="
7373
},
7474
"finish__timing__hold__ws": {

flow/designs/rapidus2hp/ethmac/rules-base.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
"compare": "<="
2929
},
3030
"cts__timing__setup__ws": {
31-
"value": -0.0361,
31+
"value": -0.0347,
3232
"compare": ">="
3333
},
3434
"cts__timing__setup__tns": {
35-
"value": -0.538,
35+
"value": -0.453,
3636
"compare": ">="
3737
},
3838
"cts__timing__hold__ws": {
@@ -48,11 +48,11 @@
4848
"compare": "<="
4949
},
5050
"globalroute__timing__setup__ws": {
51-
"value": -0.0526,
51+
"value": -0.0462,
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
55-
"value": -1.44,
55+
"value": -1.07,
5656
"compare": ">="
5757
},
5858
"globalroute__timing__hold__ws": {
@@ -64,11 +64,11 @@
6464
"compare": ">="
6565
},
6666
"finish__timing__setup__ws": {
67-
"value": -0.0526,
67+
"value": -0.0462,
6868
"compare": ">="
6969
},
7070
"finish__timing__setup__tns": {
71-
"value": -1.44,
71+
"value": -1.07,
7272
"compare": ">="
7373
},
7474
"finish__timing__hold__ws": {

flow/designs/rapidus2hp/ethmac/rules-verific.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"compare": ">="
3333
},
3434
"cts__timing__setup__tns": {
35-
"value": -0.47,
35+
"value": -0.514,
3636
"compare": ">="
3737
},
3838
"cts__timing__hold__ws": {
@@ -48,11 +48,11 @@
4848
"compare": "<="
4949
},
5050
"globalroute__timing__setup__ws": {
51-
"value": -0.0514,
51+
"value": -0.0459,
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
55-
"value": -1.37,
55+
"value": -0.885,
5656
"compare": ">="
5757
},
5858
"globalroute__timing__hold__ws": {
@@ -64,11 +64,11 @@
6464
"compare": ">="
6565
},
6666
"finish__timing__setup__ws": {
67-
"value": -0.0514,
67+
"value": -0.0459,
6868
"compare": ">="
6969
},
7070
"finish__timing__setup__tns": {
71-
"value": -1.37,
71+
"value": -0.885,
7272
"compare": ">="
7373
},
7474
"finish__timing__hold__ws": {

flow/designs/rapidus2hp/gcd/rules-base.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
"compare": "=="
99
},
1010
"placeopt__design__instance__area": {
11-
"value": 27,
11+
"value": 36,
1212
"compare": "<="
1313
},
1414
"placeopt__design__instance__count__stdcell": {
15-
"value": 637,
15+
"value": 773,
1616
"compare": "<="
1717
},
1818
"detailedplace__design__violations": {
@@ -32,7 +32,7 @@
3232
"compare": ">="
3333
},
3434
"cts__timing__setup__tns": {
35-
"value": -0.493,
35+
"value": -0.322,
3636
"compare": ">="
3737
},
3838
"cts__timing__hold__ws": {
@@ -48,11 +48,11 @@
4848
"compare": "<="
4949
},
5050
"globalroute__timing__setup__ws": {
51-
"value": -0.0404,
51+
"value": -0.0397,
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
55-
"value": -0.904,
55+
"value": -0.726,
5656
"compare": ">="
5757
},
5858
"globalroute__timing__hold__ws": {
@@ -64,11 +64,11 @@
6464
"compare": ">="
6565
},
6666
"finish__timing__setup__ws": {
67-
"value": -0.0404,
67+
"value": -0.0397,
6868
"compare": ">="
6969
},
7070
"finish__timing__setup__tns": {
71-
"value": -0.904,
71+
"value": -0.726,
7272
"compare": ">="
7373
},
7474
"finish__timing__hold__ws": {
@@ -80,7 +80,7 @@
8080
"compare": ">="
8181
},
8282
"finish__design__instance__area": {
83-
"value": 31,
83+
"value": 40,
8484
"compare": "<="
8585
}
8686
}

0 commit comments

Comments
 (0)