Skip to content

Commit a1b4fd7

Browse files
committed
Merge branch 'master' into secure-gf12-bps-incr-density
Signed-off-by: Eder Monteiro <[email protected]>
2 parents eb8cbd7 + 725bac4 commit a1b4fd7

File tree

230 files changed

+11042
-10908
lines changed

Some content is hidden

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

230 files changed

+11042
-10908
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,6 @@ mainREADME.md
9595
build
9696
.scala-build/
9797
.bsp/
98+
99+
# autotuner artifacts
100+
metadata-base-at.json

docs/tutorials/FlowTutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ OpenROAD-flow-scripts installation is complete.
6969
Launch the docker with OpenROAD-flow-scripts container as follows:
7070

7171
```shell
72-
docker run --rm -it -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd)/flow:/OpenROAD-flow-scripts/flow openroad/flow-ubuntu22-builder
72+
docker run --rm -it -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd)/flow:/OpenROAD-flow-scripts/flow openroad/flow-ubuntu22.04-builder
7373
```
7474

7575
:::{seealso}

docs/user/FlowVariables.md

Lines changed: 275 additions & 267 deletions
Large diffs are not rendered by default.

docs/user/InstructionsForAutoTuner.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ We have provided two convenience scripts, `./install.sh` and `./setup.sh`
2727
that works in Python3.8 for installation and configuration of AutoTuner,
2828
as shown below:
2929

30+
```{note}
31+
Make sure you run the following commands in `./tools/AutoTuner/src/autotuner`.
32+
```
33+
3034
```shell
3135
# Install prerequisites
3236
./tools/AutoTuner/install.sh
@@ -127,8 +131,8 @@ Example:
127131

128132
```shell
129133
python3 distributed.py --design gcd --platform sky130hd \
130-
--config ../designs/sky130hd/gcd/autotuner.json \
131-
tune
134+
--config ../../../../flow/designs/sky130hd/gcd/autotuner.json \
135+
tune --samples 5
132136
```
133137
#### Sweep only
134138

@@ -204,6 +208,7 @@ Assuming the virtual environment is setup at `./tools/AutoTuner/autotuner_env`:
204208
./tools/AutoTuner/setup.sh
205209
python3 ./tools/AutoTuner/test/smoke_test_sweep.py
206210
python3 ./tools/AutoTuner/test/smoke_test_tune.py
211+
python3 ./tools/AutoTuner/test/smoke_test_sample_iteration.py
207212
```
208213

209214
## Citation

etc/DependencyInstaller.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ _installUbuntuPackages() {
195195
docker-ce \
196196
docker-ce-cli \
197197
containerd.io \
198-
docker-buildx-plugin
198+
docker-buildx-plugin \
199+
docker-compose-plugin
199200
fi
200201
}
201202

flow/Makefile

Lines changed: 22 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -109,48 +109,8 @@ DESIGN_CONFIG ?= ./designs/nangate45/gcd/config.mk
109109
# this file.
110110
include $(DESIGN_CONFIG)
111111

112-
# For instance Bazel needs artifacts (.odb and .rpt files) on a failure to
113-
# allow the user to save hours on re-running the failed step locally, but
114-
# when working with a Makefile flow, it is more natural to fail the step
115-
# and leave the user to manually inspect the logs and artifacts directly via
116-
# the file system.
117-
#
118-
# Set to 1 to change the behavior to generate artifacts upon failure to
119-
# e.g. do a global route. The exit code will still be non-zero on all other
120-
# failures that aren't covered by the "useful to inspect the artifacts on
121-
# failure" use-case.
122-
#
123-
# Example: just like detailed routing, a global route that fails with congestion, is not
124-
# a build failure(as in exit code non-zero), it is a successful(as in zero exit code)
125-
# global route that produce reports detailing the problem.
126-
#
127-
# Detailed route will not proceed, if there is global routing congestion
128-
#
129-
# This allows build systems, such as bazel, to create artifacts for global
130-
# and detailed route, even if the operation had problems, without having
131-
# know about the semantics between global and detailed route.
132-
#
133-
# Considering that global and detailed route can run for a long time and
134-
# use a lot of memory, this allows inspecting results on a laptop for
135-
# a build that ran on a server.
136-
export GENERATE_ARTIFACTS_ON_FAILURE ?= 0
137-
138-
# Default TNS_END_PERCENT value for post CTS timing repair
139-
# Try fixing all violating endpoints by default (reduce to 5% for runtime)
140-
export TNS_END_PERCENT ?=100
141-
142-
# Default routing layer adjustment
143-
export ROUTING_LAYER_ADJUSTMENT ?= 0.5
144-
export RECOVER_POWER ?= 0
145-
export SKIP_INCREMENTAL_REPAIR ?= 0
146-
export DETAILED_METRICS ?= 0
147-
export EQUIVALENCE_CHECK ?= 0
148-
export CORE_UTILIZATION ?=
149-
export DIE_AREA ?=
150-
export CORE_AREA ?=
151-
152112
# If we are running headless use offscreen rendering for save_image
153-
ifndef DISPLAY
113+
ifeq ($(DISPLAY),)
154114
export QT_QPA_PLATFORM ?= offscreen
155115
endif
156116

@@ -200,6 +160,8 @@ export UTILS_DIR ?= $(FLOW_HOME)/util
200160
export SCRIPTS_DIR ?= $(FLOW_HOME)/scripts
201161
export TEST_DIR ?= $(FLOW_HOME)/test
202162

163+
$(foreach line,$(shell $(SCRIPTS_DIR)/defaults.py),$(eval export $(line)))
164+
203165
PUBLIC=nangate45 sky130hd sky130hs asap7 ihp-sg13g2 gf180
204166

205167
ifneq ($(wildcard $(PLATFORM_HOME)/$(PLATFORM)),)
@@ -256,12 +218,7 @@ export OBJECTS_DIR = $(WORK_HOME)/objects/$(PLATFORM)/$(DESIGN_NICKNAME)/$(FLOW_
256218
export REPORTS_DIR = $(WORK_HOME)/reports/$(PLATFORM)/$(DESIGN_NICKNAME)/$(FLOW_VARIANT)
257219
export RESULTS_DIR = $(WORK_HOME)/results/$(PLATFORM)/$(DESIGN_NICKNAME)/$(FLOW_VARIANT)
258220

259-
# BLOCKS is ORFS specific and is used to trigger hierarchical flow,
260-
# MACROS is a space separated list of macros used in the design,
261-
# but not necessarily built by ORFS using the BLOCKS mechanism.
262-
export MACROS ?= $(BLOCKS)
263-
264-
ifdef BLOCKS
221+
ifneq ($(BLOCKS),)
265222
$(foreach block,$(BLOCKS),$(eval BLOCK_LEFS += ./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}.lef))
266223
$(foreach block,$(BLOCKS),$(eval BLOCK_LIBS += ./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/${block}.lib))
267224
$(foreach block,$(BLOCKS),$(eval BLOCK_GDS += ./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(block)/$(FLOW_VARIANT)/6_final.gds))
@@ -271,11 +228,12 @@ ifdef BLOCKS
271228
export ADDITIONAL_LIBS += $(BLOCK_LIBS)
272229
export ADDITIONAL_GDS += $(BLOCK_GDS)
273230
export GDS_FILES += $(BLOCK_GDS)
274-
ifdef CDL_FILES
231+
ifneq ($(CDL_FILES),)
275232
export CDL_FILES += $(BLOCK_CDL)
276233
endif
277234
endif
278235

236+
export RTLMP_FLOW ?= 1
279237
export RTLMP_RPT_DIR ?= $(OBJECTS_DIR)/rtlmp
280238
export RTLMP_RPT_FILE ?= partition.txt
281239
export RTLMP_BLOCKAGE_FILE ?= $(OBJECTS_DIR)/rtlmp/partition.txt.blockage
@@ -304,7 +262,7 @@ YOSYS_FLAGS += -v 3
304262

305263
#-------------------------------------------------------------------------------
306264
# setup all commands used within this flow
307-
export TIME_BIN ?= /usr/bin/time
265+
export TIME_BIN ?= env time
308266
TIME_CMD = $(TIME_BIN) -f 'Elapsed time: %E[h:]min:sec. CPU time: user %U sys %S (%P). Peak memory: %MKB.'
309267
TIME_TEST = $(shell $(TIME_CMD) echo foo 2>/dev/null)
310268
ifeq (,$(strip $(TIME_TEST)))
@@ -490,8 +448,7 @@ $(WRAPPED_LIBS):
490448
# |____/ |_| |_| \_| |_| |_| |_|_____|____/___|____/
491449
#
492450
.PHONY: synth
493-
synth: $(RESULTS_DIR)/1_synth.v \
494-
$(RESULTS_DIR)/1_synth.sdc
451+
synth: $(RESULTS_DIR)/1_synth.v
495452

496453
.PHONY: synth-report
497454
synth-report: synth
@@ -548,10 +505,6 @@ $(RESULTS_DIR)/1_synth.rtlil: $(YOSYS_DEPENDENCIES)
548505
$(RESULTS_DIR)/1_1_yosys.v: $(RESULTS_DIR)/1_synth.rtlil
549506
$(UNSET_AND_MAKE) do-yosys-keep-hierarchy do-yosys
550507

551-
$(RESULTS_DIR)/1_synth.sdc: $(SDC_FILE)
552-
mkdir -p $(RESULTS_DIR)
553-
cp $(SDC_FILE) $(RESULTS_DIR)/1_synth.sdc
554-
555508
.PHONY: do-synth
556509
do-synth:
557510
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR)
@@ -612,9 +565,11 @@ open_$(1): open_$(2)
612565
endef
613566

614567
define OPEN_GUI
615-
.PHONY: $(1)_$(2)
616-
$(1)_$(2):
617-
$(3)=$(RESULTS_DIR)/$(2) $(4) $(GUI_ARGS) $(SCRIPTS_DIR)/gui.tcl
568+
.PHONY: open_$(1) gui_$(1)
569+
open_$(1):
570+
$(2)=$(RESULTS_DIR)/$(1) $(OPENROAD_NO_EXIT_CMD) $(SCRIPTS_DIR)/open.tcl
571+
gui_$(1):
572+
$$(UNSET_AND_MAKE) GUI_SHOW=1 open_$(1)
618573
endef
619574

620575
# Separate dependency checking and doing a step. This can
@@ -659,7 +614,7 @@ do-$(1): $(OBJECTS_DIR)/copyright.txt
659614
@echo Running $(3).tcl, stage $(1)
660615
@(set -eo pipefail; \
661616
trap 'mv $(LOG_DIR)/$(1).tmp.log $(LOG_DIR)/$(1).log' EXIT; \
662-
$(OPENROAD_EXE) -exit -no_init $(SCRIPTS_DIR)/noop.tcl 2>&1 >$(LOG_DIR)/$(1).tmp.log; \
617+
$(OPENROAD_EXE) $(OPENROAD_ARGS) -exit $(SCRIPTS_DIR)/noop.tcl 2>&1 >$(LOG_DIR)/$(1).tmp.log; \
663618
$(TIME_CMD) $(OPENROAD_CMD) -no_splash $(SCRIPTS_DIR)/$(3).tcl -metrics $(LOG_DIR)/$(1).json 2>&1 | \
664619
tee -a $(abspath $(LOG_DIR)/$(1).tmp.log))
665620
endef
@@ -687,39 +642,19 @@ endef
687642
#-------------------------------------------------------------------------------
688643
$(eval $(call do-step,2_1_floorplan,$(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc $(TECH_LEF) $(SC_LEF) $(ADDITIONAL_LEFS) $(FOOTPRINT) $(SIG_MAP_FILE) $(FOOTPRINT_TCL),floorplan))
689644

690-
# STEP 2: IO Placement (random)
691-
#-------------------------------------------------------------------------------
692-
ifndef IS_CHIP
693645
$(eval $(call do-step,2_2_floorplan_io,$(RESULTS_DIR)/2_1_floorplan.odb $(IO_CONSTRAINTS),io_placement_random))
694-
else
695-
$(eval $(call do-copy,2_2_floorplan_io,2_1_floorplan.odb,$(IO_CONSTRAINTS)))
696-
endif
697646

698647
# STEP 3: Timing Driven Mixed Sized Placement
699648
#-------------------------------------------------------------------------------
700-
ifneq ($(MACRO_PLACEMENT)$(MACRO_PLACEMENT_TCL),)
701-
SKIP_TDMS:=1
702-
endif
703-
ifeq ($(RTLMP_FLOW), 1)
704-
SKIP_TDMS:=1
705-
endif
706-
ifneq ($(SKIP_TDMS), 1)
707649
$(eval $(call do-step,2_3_floorplan_tdms,$(RESULTS_DIR)/2_2_floorplan_io.odb $(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc $(LIB_FILES),tdms_place))
708-
else
709-
$(eval $(call do-copy,2_3_floorplan_tdms,2_2_floorplan_io.odb,$(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc $(LIB_FILES)))
710-
endif
711650

712651
# STEP 4: Macro Placement
713652
#-------------------------------------------------------------------------------
714653
$(eval $(call do-step,2_4_floorplan_macro,$(RESULTS_DIR)/2_3_floorplan_tdms.odb $(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc $(MACRO_PLACEMENT) $(MACRO_PLACEMENT_TCL),macro_place))
715654

716655
# STEP 5: Tapcell and Welltie insertion
717656
#-------------------------------------------------------------------------------
718-
ifeq ($(TAPCELL_TCL),)
719-
$(eval $(call do-copy,2_5_floorplan_tapcell,2_4_floorplan_macro.odb))
720-
else
721657
$(eval $(call do-step,2_5_floorplan_tapcell,$(RESULTS_DIR)/2_4_floorplan_macro.odb $(TAPCELL_TCL),tapcell))
722-
endif
723658

724659
# STEP 6: PDN generation
725660
#-------------------------------------------------------------------------------
@@ -754,13 +689,7 @@ place: $(RESULTS_DIR)/3_place.odb \
754689
#-------------------------------------------------------------------------------
755690
$(eval $(call do-step,3_1_place_gp_skip_io,$(RESULTS_DIR)/2_floorplan.odb $(RESULTS_DIR)/2_floorplan.sdc $(LIB_FILES),global_place_skip_io))
756691

757-
# STEP 2: IO placement (non-random)
758-
#-------------------------------------------------------------------------------
759-
ifndef IS_CHIP
760692
$(eval $(call do-step,3_2_place_iop,$(RESULTS_DIR)/3_1_place_gp_skip_io.odb $(IO_CONSTRAINTS),io_placement))
761-
else
762-
$(eval $(call do-copy,3_2_place_iop,3_1_place_gp_skip_io.odb,$(IO_CONSTRAINTS)))
763-
endif
764693

765694
# STEP 3: Global placement with placed IOs, timing-driven, and routability-driven.
766695
#-------------------------------------------------------------------------------
@@ -851,19 +780,9 @@ $(eval $(call do-step,5_1_grt,$(RESULTS_DIR)/4_cts.odb $(FASTROUTE_TCL) $(PRE_GL
851780

852781
# STEP 2: Run detailed route
853782
#-------------------------------------------------------------------------------
854-
ifeq ($(USE_WXL),)
855783
$(eval $(call do-step,5_2_route,$(RESULTS_DIR)/5_1_grt.odb,detail_route))
856-
else
857-
$(eval $(call do-step,5_2_route,$(RESULTS_DIR)/4_cts.odb,detail_route))
858-
endif
859784

860-
# SEP 3: Filler cell insertion
861-
# ------------------------------------------------------------------------------
862-
ifeq ($(FILL_CELLS),)
863-
$(eval $(call do-copy,5_3_fillcell,5_2_route.odb))
864-
else
865785
$(eval $(call do-step,5_3_fillcell,$(RESULTS_DIR)/5_2_route.odb,fillcell))
866-
endif
867786

868787
$(eval $(call do-copy,5_route,5_3_fillcell.odb))
869788

@@ -873,6 +792,10 @@ $(eval $(call do-copy,5_route,4_cts.sdc,,.sdc))
873792
do-route:
874793
$(UNSET_AND_MAKE) do-5_1_grt do-5_2_route do-5_3_fillcell do-5_route do-5_route.sdc
875794

795+
.PHONY: do-grt
796+
do-grt:
797+
$(UNSET_AND_MAKE) do-5_1_grt
798+
876799
.PHONY: clean_route
877800
clean_route:
878801
rm -rf output*/ results*.out.dmp layer_*.mps
@@ -923,13 +846,7 @@ elapsed:
923846
elapsed-all:
924847
@$(UTILS_DIR)/genElapsedTime.py -d $(shell find $(WORK_HOME)/logs/$(PLATFORM)/*/*/ -type d)
925848

926-
# ==============================================================================
927-
928-
ifeq ($(USE_FILL),1)
929849
$(eval $(call do-step,6_1_fill,$(RESULTS_DIR)/5_route.odb $(RESULTS_DIR)/5_route.sdc $(FILL_CONFIG),density_fill))
930-
else
931-
$(eval $(call do-copy,6_1_fill,5_route.odb))
932-
endif
933850

934851
$(eval $(call do-copy,6_1_fill,5_route.sdc,,.sdc))
935852

@@ -1096,10 +1013,10 @@ $(foreach file,$(RESULTS_DEF) $(RESULTS_GDS) $(RESULTS_OAS),klayout_$(file)): kl
10961013

10971014
.PHONY: gui_synth
10981015
gui_synth:
1099-
$(OPENROAD_GUI_CMD) $(GUI_ARGS) $(SCRIPTS_DIR)/sta-synth.tcl
1016+
$(OPENROAD_GUI_CMD) $(SCRIPTS_DIR)/sta-synth.tcl
11001017
.PHONY: open_synth
11011018
open_synth:
1102-
$(OPENROAD_NO_EXIT_CMD) $(GUI_ARGS) $(SCRIPTS_DIR)/sta-synth.tcl
1019+
$(OPENROAD_NO_EXIT_CMD) $(SCRIPTS_DIR)/sta-synth.tcl
11031020

11041021
$(eval $(call OPEN_GUI_SHORTCUT,floorplan,2_floorplan.odb))
11051022
$(eval $(call OPEN_GUI_SHORTCUT,place,3_place.odb))
@@ -1108,10 +1025,8 @@ $(eval $(call OPEN_GUI_SHORTCUT,route,5_route.odb))
11081025
$(eval $(call OPEN_GUI_SHORTCUT,grt,5_1_grt.odb))
11091026
$(eval $(call OPEN_GUI_SHORTCUT,final,6_final.odb))
11101027

1111-
$(foreach file,$(RESULTS_DEF),$(eval $(call OPEN_GUI,gui,$(file),DEF_FILE,$(OPENROAD_GUI_CMD))))
1112-
$(foreach file,$(RESULTS_ODB),$(eval $(call OPEN_GUI,gui,$(file),ODB_FILE,$(OPENROAD_GUI_CMD))))
1113-
$(foreach file,$(RESULTS_DEF),$(eval $(call OPEN_GUI,open,$(file),DEF_FILE,$(OPENROAD_NO_EXIT_CMD))))
1114-
$(foreach file,$(RESULTS_ODB),$(eval $(call OPEN_GUI,open,$(file),ODB_FILE,$(OPENROAD_NO_EXIT_CMD))))
1028+
$(foreach file,$(RESULTS_DEF),$(eval $(call OPEN_GUI,$(file),DEF_FILE)))
1029+
$(foreach file,$(RESULTS_ODB),$(eval $(call OPEN_GUI,$(file),ODB_FILE)))
11151030

11161031
# Write a def for the corresponding odb
11171032
$(foreach file,$(RESULTS_ODB),$(file).def): %.def:

flow/designs/asap7/aes-block/autotuner.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@
3535
"CELL_PAD_IN_SITES_GLOBAL_PLACEMENT": {
3636
"type": "int",
3737
"minmax": [
38-
0,
38+
1,
3939
5
4040
],
4141
"step": 1
4242
},
4343
"CELL_PAD_IN_SITES_DETAIL_PLACEMENT": {
4444
"type": "int",
4545
"minmax": [
46-
0,
46+
1,
4747
5
4848
],
4949
"step": 1

flow/designs/asap7/aes-block/block.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ export CORE_MARGIN = 2
1111
export PLACE_DENSITY = 0.70
1212

1313
export PLACE_PINS_ARGS = -annealing
14-
export HAS_IO_CONSTRAINTS = 0

flow/designs/asap7/aes-block/config.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ export PLACE_DENSITY = 0.65
1515

1616
export BLOCKS ?= aes_rcon aes_sbox
1717
export SYNTH_HIERARCHICAL = 1
18-
export RTLMP_FLOW = 1
1918

2019
export PLACE_PINS_ARGS = -annealing
21-
export HAS_IO_CONSTRAINTS = 0
2220

2321
# Generous routing at top level
2422
export MIN_ROUTING_LAYER = M2

0 commit comments

Comments
 (0)