Skip to content

Commit 51987e4

Browse files
committed
Merge remote-tracking branch 'origin/master' into HEAD
2 parents 7cc2fa8 + 387ac09 commit 51987e4

File tree

13 files changed

+214
-12
lines changed

13 files changed

+214
-12
lines changed

docs/user/FlowVariables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ configuration file.
9898
| <a name="GND_NETS_VOLTAGES"></a>GND_NETS_VOLTAGES| Used for IR Drop calculation.| |
9999
| <a name="GPL_ROUTABILITY_DRIVEN"></a>GPL_ROUTABILITY_DRIVEN| Specifies whether the placer should use routability driven placement.| |
100100
| <a name="GPL_TIMING_DRIVEN"></a>GPL_TIMING_DRIVEN| Specifies whether the placer should use timing driven placement.| |
101-
| <a name="GUI_NO_TIMING"></a>GUI_NO_TIMING| Skip loading timing for a faster GUI load.| |
101+
| <a name="GUI_TIMING"></a>GUI_TIMING| Load timing information when opening GUI. For large designs, this can be quite time consuming. Useful to disable when investigating non-timing aspects like floorplan, placement, routing, etc.| |
102102
| <a name="HOLD_SLACK_MARGIN"></a>HOLD_SLACK_MARGIN| Specifies a time margin for the slack when fixing hold violations. This option allows you to overfix.| |
103103
| <a name="IO_PLACER_H"></a>IO_PLACER_H| The metal layer on which to place the I/O pins horizontally (top and bottom of the die).| |
104104
| <a name="IO_PLACER_V"></a>IO_PLACER_V| The metal layer on which to place the I/O pins vertically (sides of the die).| |
@@ -292,7 +292,7 @@ configuration file.
292292
- [GENERATE_ARTIFACTS_ON_FAILURE](#GENERATE_ARTIFACTS_ON_FAILURE)
293293
- [GLOBAL_PLACEMENT_ARGS](#GLOBAL_PLACEMENT_ARGS)
294294
- [GND_NETS_VOLTAGES](#GND_NETS_VOLTAGES)
295-
- [GUI_NO_TIMING](#GUI_NO_TIMING)
295+
- [GUI_TIMING](#GUI_TIMING)
296296
- [HOLD_SLACK_MARGIN](#HOLD_SLACK_MARGIN)
297297
- [IR_DROP_LAYER](#IR_DROP_LAYER)
298298
- [KLAYOUT_TECH_FILE](#KLAYOUT_TECH_FILE)

docs/user/InstructionsForAutoTuner.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ Assuming the virtual environment is setup at `./tools/AutoTuner/autotuner_env`:
208208
./tools/AutoTuner/setup.sh
209209
python3 ./tools/AutoTuner/test/smoke_test_sweep.py
210210
python3 ./tools/AutoTuner/test/smoke_test_tune.py
211+
python3 ./tools/AutoTuner/test/smoke_test_sample_iteration.py
211212
```
212213

213214
## 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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,10 @@ $(eval $(call do-copy,5_route,4_cts.sdc,,.sdc))
797797
do-route:
798798
$(UNSET_AND_MAKE) do-5_1_grt do-5_2_route do-5_3_fillcell do-5_route do-5_route.sdc
799799

800+
.PHONY: do-grt
801+
do-grt:
802+
$(UNSET_AND_MAKE) do-5_1_grt
803+
800804
.PHONY: clean_route
801805
clean_route:
802806
rm -rf output*/ results*.out.dmp layer_*.mps

flow/designs/sky130hd/gcd/autotuner.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"_SDC_CLK_PERIOD": {
55
"type": "float",
66
"minmax": [
7-
3.0,
8-
4.0
7+
7.0,
8+
12.0
99
],
1010
"step": 0
1111
},

flow/scripts/generate_abstract.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
source $::env(SCRIPTS_DIR)/load.tcl
2+
erase_non_stage_variables generate_abstract
23

34
set stem [expr {[env_var_exists_and_non_empty ABSTRACT_SOURCE] ? $::env(ABSTRACT_SOURCE) : "6_final"}]
45

flow/scripts/open.tcl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ proc read_timing {input_file} {
5353
set _tmp [find_timing_paths]
5454
}
5555

56-
if {![env_var_equals GUI_NO_TIMING 1]} {
56+
if {[env_var_equals GUI_TIMING 1]} {
57+
puts "GUI_TIMING=1 reading timing, takes a little while for large designs..."
5758
read_timing $input_file
5859
}
5960

flow/scripts/variables.yaml

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ CORE_AREA:
8080
SKIP_REPORT_METRICS:
8181
description: >
8282
If set to 1, then metrics, report_metrics does nothing. Useful to speed up builds.
83+
stages:
84+
- floorplan
85+
- place
86+
- cts
87+
- grt
88+
- route
89+
- final
8390
PROCESS:
8491
description: >
8592
Technology node or process in use.
@@ -103,6 +110,14 @@ LIB_FILES:
103110
DONT_USE_CELLS:
104111
description: >
105112
Dont use cells eases pin access in detailed routing.
113+
SYNTH_GUT:
114+
description: >
115+
Load design and remove all internal logic before doing synthesis. This
116+
is useful when creating a mock .lef abstract that has a smaller area
117+
than the amount of logic would allow. bazel-orfs uses this to mock
118+
SRAMs, for instance.
119+
stages:
120+
- synth
106121
SYNTH_HIERARCHICAL:
107122
description: >
108123
Enable to Synthesis hierarchically, otherwise considered flat synthesis.
@@ -165,6 +180,11 @@ FLOORPLAN_DEF:
165180
Use the DEF file to initialize floorplan.
166181
stages:
167182
- floorplan
183+
REMOVE_ABC_BUFFERS:
184+
description: >
185+
Remove abc buffers from the netlist.
186+
stages:
187+
- floorplan
168188
PLACE_SITE:
169189
description: >
170190
Placement site for core cells defined in the technology LEF file.
@@ -216,6 +236,12 @@ MAKE_TRACKS:
216236
Tcl file that defines add routing tracks to a floorplan.
217237
stages:
218238
- floorplan
239+
IO_CONSTRAINTS:
240+
description: >
241+
File path to the IO constraints .tcl file.
242+
stages:
243+
- floorplan
244+
- place
219245
IO_PLACER_H:
220246
description: >
221247
The metal layer on which to place the I/O pins horizontally (top and bottom of the die).
@@ -228,12 +254,17 @@ IO_PLACER_V:
228254
stages:
229255
- floorplan
230256
- place
231-
GUI_NO_TIMING:
257+
GUI_TIMING:
232258
description: >
233-
Skip loading timing for a faster GUI load.
259+
Load timing information when opening GUI. For large designs, this can
260+
be quite time consuming. Useful to disable when investigating non-timing
261+
aspects like floorplan, placement, routing, etc.
262+
value: 1
234263
FILL_CELLS:
235264
description: >
236265
Fill cells are used to fill empty sites. If not set or empty, fill cell insertion is skipped.
266+
stages:
267+
- route
237268
TAP_CELL_NAME:
238269
description: >
239270
Name of the cell to use in tap cell insertion.
@@ -250,6 +281,12 @@ CELL_PAD_IN_SITES_DETAIL_PLACEMENT:
250281
- place
251282
- cts
252283
- grt
284+
PLACE_PINS_ARGS:
285+
description: >
286+
Arguments to place_pins
287+
stages:
288+
- place
289+
- floorplan
253290
PLACE_DENSITY:
254291
description: >
255292
The desired placement density of cells. It reflects how spread the cells would be on the core area.
@@ -324,13 +361,15 @@ MIN_ROUTING_LAYER:
324361
- place
325362
- grt
326363
- route
364+
- final
327365
MAX_ROUTING_LAYER:
328366
description: >
329367
The highest metal layer name to be used in routing.
330368
stages:
331369
- place
332370
- grt
333371
- route
372+
- final
334373
DETAILED_ROUTE_ARGS:
335374
description: >
336375
Add additional arguments for debugging purposes during detail route.
@@ -378,6 +417,16 @@ SDC_FILE:
378417
required: true
379418
description: >
380419
The path to design constraint (SDC) file.
420+
stages:
421+
- synth
422+
SDC_GUT:
423+
description: >
424+
Load design and remove all internal logic before doing synthesis. This
425+
is useful when creating a mock .lef abstract that has a smaller area
426+
than the amount of logic would allow. bazel-orfs uses this to mock
427+
SRAMs, for instance.
428+
stages:
429+
- synth
381430
ADDITIONAL_FILES:
382431
description: >
383432
Additional files to be added to `make issue` archive.
@@ -421,9 +470,13 @@ ABC_AREA:
421470
PWR_NETS_VOLTAGES:
422471
description: >
423472
Used for IR Drop calculation.
473+
stages:
474+
- final
424475
GND_NETS_VOLTAGES:
425476
description: >
426477
Used for IR Drop calculation.
478+
stages:
479+
- final
427480
BLOCKS:
428481
description: >
429482
Blocks used as hard macros in a hierarchical flow. Do note that you have to
@@ -526,3 +579,8 @@ USE_FILL:
526579
SEAL_GDS:
527580
description: >
528581
Seal macro to place around the design.
582+
ABSTRACT_SOURCE:
583+
description: >
584+
Which .odb file to use to create abstract
585+
stages:
586+
- generate_abstract

flow/test/test_helper.sh

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ case $PLATFORM in
9494
esac
9595

9696
if [ $RUN_AUTOTUNER -eq 1 ]; then
97-
# change directory to the root of the repo
98-
echo "Install and starting venv"
97+
# run the commands in ORFS root dir
98+
echo "[INFO FLW-0029] Installing dependencies in virtual environment."
9999
cd ../
100100
./tools/AutoTuner/installer.sh
101101
. ./tools/AutoTuner/setup.sh
102102

103-
# remove dashes
103+
# remove dashes and capitalize platform name
104104
PLATFORM=${PLATFORM//-/}
105105
# convert to uppercase
106106
PLATFORM=${PLATFORM^^}
@@ -111,13 +111,32 @@ if [ $RUN_AUTOTUNER -eq 1 ]; then
111111
echo "Running Autotuner smoke sweep test"
112112
python3 -m unittest tools.AutoTuner.test.smoke_test_sweep.${PLATFORM}SweepSmokeTest.test_sweep
113113

114-
echo "Running Autotuner ref file test (only once)"
114+
echo "Running Autotuner smoke tests for --sample and --iteration."
115+
python3 -m unittest tools.AutoTuner.test.smoke_test_sample_iteration.${PLATFORM}SampleIterationSmokeTest.test_sample_iteration
116+
115117
if [ "$PLATFORM" == "asap7" ] && [ "$DESIGN" == "gcd" ]; then
118+
echo "Running Autotuner ref file test (only once)"
116119
python3 -m unittest tools.AutoTuner.test.ref_file_check.RefFileCheck.test_files
117120
fi
118121

119122
echo "Running Autotuner smoke algorithm & evaluation test"
120123
python3 -m unittest tools.AutoTuner.test.smoke_test_algo_eval.${PLATFORM}AlgoEvalSmokeTest.test_algo_eval
124+
125+
# run this test last (because it modifies current path)
126+
echo "Running Autotuner remote test"
127+
if [ "$PLATFORM" == "asap7" ] && [ "$DESIGN" == "gcd" ]; then
128+
# Get the directory of the current script
129+
script_dir="$(dirname "${BASH_SOURCE[0]}")"
130+
cd "$script_dir"/../../
131+
latest_image=$(./etc/DockerTag.sh -dev)
132+
echo "ORFS_VERSION=$latest_image" > ./tools/AutoTuner/.env
133+
cd ./tools/AutoTuner
134+
docker compose up --wait
135+
docker compose exec ray-worker bash -c "cd /OpenROAD-flow-scripts/tools/AutoTuner/src/autotuner && \
136+
python3 distributed.py --design gcd --platform asap7 --server 127.0.0.1 --port 10001 \
137+
--config ../../../../flow/designs/asap7/gcd/autotuner.json tune --samples 1"
138+
docker compose down -v --remove-orphans
139+
fi
121140
fi
122141

123142
exit $ret

tools/AutoTuner/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ __pycache__/
99

1010
# Autotuner env
1111
autotuner_env
12+
.env

0 commit comments

Comments
 (0)