Skip to content

Commit 8df62a9

Browse files
committed
Merge branch 'master' of https://github.com/The-OpenROAD-Project-private/OpenROAD-flow-scripts into secure-grt_restore_guides
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
2 parents 05a3eb5 + b75a511 commit 8df62a9

192 files changed

Lines changed: 98771 additions & 438180 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.

‎docs/user/FlowVariables.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ configuration file.
100100
| <a name="ADDITIONAL_GDS"></a>ADDITIONAL_GDS| Hardened macro GDS files listed here.| |
101101
| <a name="ADDITIONAL_LEFS"></a>ADDITIONAL_LEFS| Hardened macro LEF view files listed here. The LEF information of the macros is immutable and used throughout all stages. Stored in the .odb file.| |
102102
| <a name="ADDITIONAL_LIBS"></a>ADDITIONAL_LIBS| Hardened macro library files listed here. The library information is immutable and used throughout all stages. Not stored in the .odb file.| |
103+
| <a name="ASAP7_USE_VT"></a>ASAP7_USE_VT| A space separated list of VT options to use with the ASAP7 standard cell library: RVT, LVT, SLVT.| RVT|
103104
| <a name="BALANCE_ROWS"></a>BALANCE_ROWS| Balance rows during placement.| 0|
104105
| <a name="BLOCKS"></a>BLOCKS| Blocks used as hard macros in a hierarchical flow. Do note that you have to specify block-specific inputs file in the directory mentioned by Makefile.| |
105106
| <a name="BUFFER_PORTS_ARGS"></a>BUFFER_PORTS_ARGS| Specify arguments to the buffer_ports call during placement. Only used if DONT_BUFFER_PORTS=0.| |
@@ -127,6 +128,7 @@ configuration file.
127128
| <a name="DETAILED_METRICS"></a>DETAILED_METRICS| If set, then calls report_metrics prior to repair operations in the CTS and global route stages| 0|
128129
| <a name="DETAILED_ROUTE_ARGS"></a>DETAILED_ROUTE_ARGS| Add additional arguments for debugging purposes during detail route.| |
129130
| <a name="DETAILED_ROUTE_END_ITERATION"></a>DETAILED_ROUTE_END_ITERATION| Maximum number of iterations.| 64|
131+
| <a name="DETAIL_PLACEMENT_ARGS"></a>DETAIL_PLACEMENT_ARGS| Specify arguments to the detailed_placement call during placement.| |
130132
| <a name="DFF_LIB_FILES"></a>DFF_LIB_FILES| Technology mapping liberty files for flip-flops.| |
131133
| <a name="DFF_MAP_FILE"></a>DFF_MAP_FILE| Optional mapping file supplied to Yosys to map D flip-flops| |
132134
| <a name="DIE_AREA"></a>DIE_AREA| The die area specified as a list of lower-left and upper-right corners in microns (X1 Y1 X2 Y2).| |
@@ -161,6 +163,7 @@ configuration file.
161163
| <a name="KLAYOUT_TECH_FILE"></a>KLAYOUT_TECH_FILE| A mapping from LEF/DEF to GDS using the KLayout tool.| |
162164
| <a name="LATCH_MAP_FILE"></a>LATCH_MAP_FILE| Optional mapping file supplied to Yosys to map latches| |
163165
| <a name="LAYER_PARASITICS_FILE"></a>LAYER_PARASITICS_FILE| Path to per layer parasitics file. Defaults to $(PLATFORM_DIR)/setRC.tcl.| |
166+
| <a name="LEC_CHECK"></a>LEC_CHECK| Perform a formal equivalence check between before and after netlists. If this fails, report an issue to OpenROAD.| 0|
164167
| <a name="LIB_FILES"></a>LIB_FILES| A Liberty file of the standard cell library with PVT characterization, input and output characteristics, timing and power definitions for each cell.| |
165168
| <a name="MACRO_BLOCKAGE_HALO"></a>MACRO_BLOCKAGE_HALO| Distance beyond the edges of a macro that will also be covered by the blockage generated for that macro. Note that the default macro blockage halo comes from the largest of the specified MACRO_PLACE_HALO x or y values. This variable overrides that calculation.| |
166169
| <a name="MACRO_EXTENSION"></a>MACRO_EXTENSION| Sets the number of GCells added to the blockages boundaries from macros.| |
@@ -196,6 +199,7 @@ configuration file.
196199
| <a name="RECOVER_POWER"></a>RECOVER_POWER| Specifies how many percent of paths with positive slacks can be slowed for power savings [0-100].| 0|
197200
| <a name="REMOVE_ABC_BUFFERS"></a>REMOVE_ABC_BUFFERS (deprecated)| Remove abc buffers from the netlist. If timing repair in floorplanning is taking too long, use a SETUP/HOLD_SLACK_MARGIN to terminate timing repair early instead of using REMOVE_ABC_BUFFERS or set SKIP_LAST_GASP=1.| 0|
198201
| <a name="REMOVE_CELLS_FOR_EQY"></a>REMOVE_CELLS_FOR_EQY| String patterns directly passed to write_verilog -remove_cells <> for equivalence checks.| |
202+
| <a name="REMOVE_CELLS_FOR_LEC"></a>REMOVE_CELLS_FOR_LEC| String patterns directly passed to write_verilog -remove_cells <> for lec checks.| |
199203
| <a name="REPAIR_PDN_VIA_LAYER"></a>REPAIR_PDN_VIA_LAYER| Remove power grid vias which generate DRC violations after detailed routing.| |
200204
| <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|
201205
| <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|
@@ -386,6 +390,7 @@ configuration file.
386390
- [CELL_PAD_IN_SITES_DETAIL_PLACEMENT](#CELL_PAD_IN_SITES_DETAIL_PLACEMENT)
387391
- [CELL_PAD_IN_SITES_GLOBAL_PLACEMENT](#CELL_PAD_IN_SITES_GLOBAL_PLACEMENT)
388392
- [CLUSTER_FLOPS](#CLUSTER_FLOPS)
393+
- [DETAIL_PLACEMENT_ARGS](#DETAIL_PLACEMENT_ARGS)
389394
- [DONT_BUFFER_PORTS](#DONT_BUFFER_PORTS)
390395
- [EARLY_SIZING_CAP_RATIO](#EARLY_SIZING_CAP_RATIO)
391396
- [FLOORPLAN_DEF](#FLOORPLAN_DEF)
@@ -421,6 +426,7 @@ configuration file.
421426
- [DETAILED_METRICS](#DETAILED_METRICS)
422427
- [EQUIVALENCE_CHECK](#EQUIVALENCE_CHECK)
423428
- [HOLD_SLACK_MARGIN](#HOLD_SLACK_MARGIN)
429+
- [LEC_CHECK](#LEC_CHECK)
424430
- [MATCH_CELL_FOOTPRINT](#MATCH_CELL_FOOTPRINT)
425431
- [MAX_REPAIR_TIMING_ITER](#MAX_REPAIR_TIMING_ITER)
426432
- [POST_CTS_TCL](#POST_CTS_TCL)
@@ -493,6 +499,7 @@ configuration file.
493499

494500
## All stages variables
495501

502+
- [ASAP7_USE_VT](#ASAP7_USE_VT)
496503
- [KEEP_VARS](#KEEP_VARS)
497504
- [NUM_CORES](#NUM_CORES)
498505
- [OPENROAD_HIERARCHICAL](#OPENROAD_HIERARCHICAL)
@@ -539,6 +546,7 @@ configuration file.
539546
- [PROCESS](#PROCESS)
540547
- [RCX_RULES](#RCX_RULES)
541548
- [RECOVER_POWER](#RECOVER_POWER)
549+
- [REMOVE_CELLS_FOR_LEC](#REMOVE_CELLS_FOR_LEC)
542550
- [REPAIR_PDN_VIA_LAYER](#REPAIR_PDN_VIA_LAYER)
543551
- [RUN_LOG_NAME_STEM](#RUN_LOG_NAME_STEM)
544552
- [RUN_SCRIPT](#RUN_SCRIPT)

‎docs/user/InstructionsForAutoTuner.md‎

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -122,27 +122,28 @@ The order of the parameters matter. Arguments `--design`, `--platform` and
122122
The following commands should be run from `./tools/AutoTuner`.
123123
```
124124

125-
#### Tune only
126-
127-
* AutoTuner: `openroad_autotuner tune -h`
125+
#### Tune only
128126

129127
Example:
130128

131129
```shell
132-
openroad_autotuner --design gcd --platform sky130hd \
133-
--config ../../flow/designs/sky130hd/gcd/autotuner.json \
134-
tune --samples 5
130+
python3 -m autotuner.distributed \
131+
--design gcd \
132+
--platform sky130hd \
133+
--config ../../flow/designs/sky130hd/gcd/autotuner.json \
134+
tune --samples 5
135135
```
136-
#### Sweep only
137136

138-
* Parameter sweeping: `openroad_autotuner sweep -h`
137+
#### Sweep only
139138

140139
Example:
141140

142141
```shell
143-
openroad_autotuner --design gcd --platform sky130hd \
144-
--config src/autotuner/distributed-sweep-example.json \
145-
sweep
142+
python3 -m autotuner.distributed \
143+
--design gcd \
144+
--platform sky130hd \
145+
--config src/autotuner/distributed-sweep-example.json \
146+
sweep
146147
```
147148

148149
#### Plot images
@@ -159,6 +160,19 @@ The graph will show the progression of one metric (see list below) over the exec
159160
python3 utils/plot.py --results_dir <your-autotuner-result-path>
160161
```
161162

163+
#### Work Directory
164+
165+
Use `--work-dir` to specify a writable directory for outputs. This is passed to ORFS as `WORK_HOME`.
166+
167+
```shell
168+
python3 -m autotuner.distributed \
169+
--design gcd \
170+
--platform sky130hd \
171+
--config ../../flow/designs/sky130hd/gcd/autotuner.json \
172+
--work-dir /tmp/autotuner123 \
173+
tune --samples 5
174+
```
175+
162176
### Google Cloud Platform (GCP) distribution with Ray
163177

164178
GCP Setup Tutorial coming soon.
@@ -171,6 +185,7 @@ GCP Setup Tutorial coming soon.
171185
| `--platform` | Name of the platform for Autotuning. ||
172186
| `--config` | Configuration file that sets which knobs to use for Autotuning. ||
173187
| `--experiment` | Experiment name. This parameter is used to prefix the FLOW_VARIANT and to set the Ray log destination.| test |
188+
| `--work-dir` | Work directory for outputs (passed to ORFS as WORK_HOME). | Installation directory |
174189
| `--git_clean` | Clean binaries and build files. **WARNING**: may lose previous data. ||
175190
| `--git_clone` | Force new git clone. **WARNING**: may lose previous data. ||
176191
| `--git_clone_args` | Additional git clone arguments. ||

‎etc/DependencyInstaller.sh‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ _versionCompare() {
2020
}
2121

2222
_installORDependencies() {
23-
./tools/OpenROAD/etc/DependencyInstaller.sh ${OR_INSTALLER_ARGS}
23+
if [[ ${YOSYS_VER} == "" ]]; then
24+
YOSYS_VER=v$(grep 'yosys_ver =' tools/yosys/docs/source/conf.py | awk -F'"' '{print $2}')
25+
fi
26+
./tools/OpenROAD/etc/DependencyInstaller.sh ${OR_INSTALLER_ARGS} -yosys-ver="${YOSYS_VER}"
2427
}
2528

2629
_installPipCommon() {
@@ -306,6 +309,10 @@ Usage: $0 [-all|-base|-common] [-<ARGS>]
306309
# sudo or with root access.
307310
$0 -ci
308311
# Installs CI tools
312+
$0 -yosys-ver=VERSION
313+
# Installs specified version of Yosys.
314+
# By default, the Yosys version is
315+
# obtained from tools/yosys/docs/source/conf.py
309316
$0 -constant-build-dir
310317
# Use constant build directory, instead of
311318
# random one.
@@ -315,6 +322,7 @@ EOF
315322

316323
# default args
317324
OR_INSTALLER_ARGS="-eqy"
325+
YOSYS_VER=""
318326
# default prefix
319327
PREFIX=""
320328
# default option
@@ -355,6 +363,9 @@ while [ "$#" -gt 0 ]; do
355363
CI="yes"
356364
OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} -save-deps-prefixes=/etc/openroad_deps_prefixes.txt"
357365
;;
366+
-yosys-ver=*)
367+
YOSYS_VER=${1#*=}
368+
;;
358369
-prefix=*)
359370
OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} $1"
360371
PREFIX=${1#*=}

‎etc/DockerHelper.sh‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ _setup() {
7373
fromImage="${FROM_IMAGE_OVERRIDE:-$osBaseImage}"
7474
cp tools/OpenROAD/etc/DependencyInstaller.sh etc/InstallerOpenROAD.sh
7575
context="etc"
76-
buildArgs="--build-arg options=${options} ${noConstantBuildDir}"
76+
local yosys_ver
77+
yosys_ver=v$(grep 'yosys_ver =' tools/yosys/docs/source/conf.py | awk -F'"' '{print $2}')
78+
options+=" -yosys-ver=${yosys_ver}"
79+
buildArgs="--build-arg \"options=${options}\" ${noConstantBuildDir}"
7780
;;
7881
*)
7982
echo "Target ${target} not found" >&2
@@ -87,20 +90,20 @@ _setup() {
8790

8891
_create() {
8992
echo "Create docker image ${imagePath} using ${file}"
90-
${DOCKER_CMD} buildx build \
93+
eval ${DOCKER_CMD} buildx build \
9194
--file "${file}" \
9295
--tag "${imagePath}" \
93-
${buildArgs} \
96+
"${buildArgs}" \
9497
"${context}"
9598
rm -f etc/InstallerOpenROAD.sh
9699
}
97100

98101
_push() {
99-
if [[ -z ${username+x} ]]; then
102+
if [[ -z ${username+x} ]] && [[ ${dryRun} != 1 ]]; then
100103
echo "Missing required -username=<USER> argument"
101104
_help
102105
fi
103-
if [[ -z ${password+x} ]]; then
106+
if [[ -z ${password+x} ]] && [[ ${dryRun} != 1 ]]; then
104107
echo "Missing required -password=<PASS> argument"
105108
_help
106109
fi

‎flow/.gitignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
settings.mk
21
vars.sh
32
vars.gdb
43
vars.tcl

‎flow/Makefile‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# settings.mk is not under source control. Put variables into this
2-
# file to avoid having to adding the to the make command line.
1+
# Put variables into this file to avoid having to adding
2+
# the to the make command line.
3+
#
4+
# Out of ORFS trees can have their own settings.mk.
35
-include settings.mk
46

57
# ==============================================================================
@@ -389,6 +391,8 @@ endef
389391
# Custom target to go from synthesis to placement in a single OpenROAD run
390392
$(eval $(call do-step,1_3_floorplan_to_place, $(RESULTS_DIR)/1_synth.odb $(RESULTS_DIR)/1_synth.sdc,floorplan_to_place))
391393

394+
$(eval $(call OPEN_GUI_SHORTCUT,yosys,1_2_yosys.v))
395+
392396
.PHONY: floorplan_to_place
393397
floorplan_to_place: $(RESULTS_DIR)/1_synth.odb $(RESULTS_DIR)/1_synth.sdc
394398
$(UNSET_AND_MAKE) do-1_3_floorplan_to_place
@@ -777,6 +781,7 @@ $(eval $(call OPEN_GUI_SHORTCUT,final,6_final.odb))
777781

778782
$(foreach file,$(RESULTS_DEF),$(eval $(call OPEN_GUI,$(file),DEF_FILE)))
779783
$(foreach file,$(RESULTS_ODB),$(eval $(call OPEN_GUI,$(file),ODB_FILE)))
784+
$(foreach file,$(RESULTS_V),$(eval $(call OPEN_GUI,$(file),V_FILE)))
780785

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

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ export SDC_FILE = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/constraint.
88

99
export ABC_AREA = 1
1010

11-
export CORE_UTILIZATION = 40
11+
export CORE_UTILIZATION = 47
1212
export CORE_ASPECT_RATIO = 1
1313
export CORE_MARGIN = 2
14-
export PLACE_DENSITY = 0.53
1514

1615
export BLOCKS ?= aes_rcon aes_sbox
1716
export SYNTH_HIERARCHICAL = 1

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@
1212
"compare": "<="
1313
},
1414
"placeopt__design__instance__count__stdcell": {
15-
"value": 10573,
15+
"value": 10501,
1616
"compare": "<="
1717
},
1818
"detailedplace__design__violations": {
1919
"value": 0,
2020
"compare": "=="
2121
},
2222
"cts__design__instance__count__setup_buffer": {
23-
"value": 919,
23+
"value": 913,
2424
"compare": "<="
2525
},
2626
"cts__design__instance__count__hold_buffer": {
27-
"value": 923,
27+
"value": 1691,
2828
"compare": "<="
2929
},
3030
"cts__timing__setup__ws": {
31-
"value": -124.0,
31+
"value": -148.0,
3232
"compare": ">="
3333
},
3434
"cts__timing__setup__tns": {
35-
"value": -5920.0,
35+
"value": -11100.0,
3636
"compare": ">="
3737
},
3838
"cts__timing__hold__ws": {
@@ -48,11 +48,11 @@
4848
"compare": "<="
4949
},
5050
"globalroute__timing__setup__ws": {
51-
"value": -150.0,
51+
"value": -171.0,
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
55-
"value": -6750.0,
55+
"value": -8830.0,
5656
"compare": ">="
5757
},
5858
"globalroute__timing__hold__ws": {
@@ -64,7 +64,7 @@
6464
"compare": ">="
6565
},
6666
"detailedroute__route__wirelength": {
67-
"value": 52923,
67+
"value": 50927,
6868
"compare": "<="
6969
},
7070
"detailedroute__route__drc_errors": {
@@ -80,11 +80,11 @@
8080
"compare": "<="
8181
},
8282
"finish__timing__setup__ws": {
83-
"value": -116.0,
83+
"value": -97.2,
8484
"compare": ">="
8585
},
8686
"finish__timing__setup__tns": {
87-
"value": -3780.0,
87+
"value": -4660.0,
8888
"compare": ">="
8989
},
9090
"finish__timing__hold__ws": {

‎flow/designs/asap7/aes-mbff/config.mk‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ export TNS_END_PERCENT = 100
1616

1717
export CLUSTER_FLOPS = 1
1818
export ENABLE_DPO = 0
19+

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
55-
"value": -2470.0,
55+
"value": -2370.0,
5656
"compare": ">="
5757
},
5858
"globalroute__timing__hold__ws": {
@@ -80,11 +80,11 @@
8080
"compare": "<="
8181
},
8282
"finish__timing__setup__ws": {
83-
"value": -42.3,
83+
"value": -41.6,
8484
"compare": ">="
8585
},
8686
"finish__timing__setup__tns": {
87-
"value": -986.0,
87+
"value": -857.0,
8888
"compare": ">="
8989
},
9090
"finish__timing__hold__ws": {

0 commit comments

Comments
 (0)