Skip to content

Commit 1f22878

Browse files
committed
Merge remote-tracking branch 'origin/master' into secure-opto-flow
2 parents cfe9afb + 449a6ad commit 1f22878

Some content is hidden

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

68 files changed

+400
-286
lines changed

docs/tutorials/FlowTutorial.md

Lines changed: 9 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -49,69 +49,25 @@ Use the `bash` shell to run commands and scripts.
4949

5050
#### OpenROAD-flow-scripts Installation
5151

52-
To install OpenROAD-flow-scripts, refer to the
52+
To install OpenROAD-flow-scripts, refer to the
5353
[Build or installing ORFS Dependencies](https://openroad-flow-scripts.readthedocs.io/en/latest/#build-or-installing-orfs-dependencies)
5454
documentation.
5555

5656
In general, we recommend using `Docker` for an efficient user
57-
experience. Install OpenROAD-flow-scripts using a docker as described
58-
here [Build from sources using Docker](../user/BuildWithDocker.md).
57+
experience. Please refere to the [Docker Shell](../user/DockerShell.md)
58+
documentation.
5959

6060
:::{Note}
61-
If you need to update an existing OpenROAD-flow-scripts installation,
62-
follow instructions from [here](../user/FAQS.md#how-do-i-update-openroad-flow-scripts).
61+
If you need a custom Docker image, you can build your own with the instructions
62+
provided at: [Build from sources using Docker](../user/BuildWithDocker.md).
6363
:::
6464

65-
OpenROAD-flow-scripts installation is complete.
66-
67-
#### Running OpenROAD-flow-scripts inside the Docker
68-
69-
Launch the docker with OpenROAD-flow-scripts container as follows:
70-
71-
```shell
72-
docker run --rm -it -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd)/flow:/OpenROAD-flow-scripts/flow openroad/flow-ubuntu22.04-builder
73-
```
74-
75-
:::{seealso}
76-
To launch OpenROAD GUI inside the docker, based on the OS, use the command from [here](../user/BuildWithDocker.md#enable-gui-support).
65+
:::{Note}
66+
If you need to update an existing OpenROAD-flow-scripts installation:
67+
- For local installs follow instructions from [here](../user/FAQS.md#how-do-i-update-openroad-flow-scripts).
68+
- For Docker run `docker pull openroad/orfs:latest` to update the image.
7769
:::
7870

79-
Once you are entered into OpenROAD-flow-scripts container run:
80-
81-
```shell
82-
source env.sh
83-
```
84-
85-
If your installation is successful, you will see the following message:
86-
87-
```
88-
OPENROAD: /OpenROAD-flow-scripts/tools/OpenROAD
89-
```
90-
91-
#### Verifying the Docker based Installation
92-
93-
To verify the installation run the built-in example design as follows:
94-
95-
```shell
96-
cd flow
97-
make
98-
```
99-
100-
A successful run end with the log:
101-
102-
```
103-
[INFO] Writing out GDS/OAS 'results/nangate45/gcd/base/6_1_merged.gds'
104-
Elapsed time: 0:10.44[h:]min:sec. CPU time: user 2.17 sys 0.54 (26%). Peak memory: 274184KB.
105-
cp results/nangate45/gcd/base/6_1_merged.gds results/nangate45/gcd/base/6_final.gds
106-
Log Elapsed seconds
107-
1_1_yosys 2
108-
3_3_place_gp 1
109-
4_1_cts 8
110-
5_2_route 10
111-
6_1_merge 10
112-
6_report 3
113-
```
114-
11571
## Configuring The Design
11672

11773
This section shows how to set up the necessary platform and design

docs/user/BuildWithDocker.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Build from sources using Docker
22

3+
:::{Note}
4+
This document describes how to build your own Docker image.
5+
If your goal is to use the latest version of OpenROAD-Flow-Scripts,
6+
please refer to the [Docker Shell](./DockerShell.md) documentation.
7+
:::
8+
39
## Prerequisites
410

511
- For this method you only need to install
@@ -31,9 +37,9 @@ This greatly helps to reduce the compilation time needed.
3137

3238
We recommend to use a Docker image of a supported OS
3339
and install OpenROAD using the pre-built binaries from
34-
Precision Innovations.
35-
You can start the container in an interactive mode using
36-
the command below.
40+
Precision Innovations.
41+
You can start the container in an interactive mode using
42+
the command below.
3743

3844
```shell
3945
docker run -it ubuntu:22.04
@@ -87,7 +93,7 @@ exit
8793
```
8894

8995
Alternatively you may also use the `docker_shell` utility as follows.
90-
It is important that you are in the `flow` directory.
96+
It is important that you are in the `flow` directory.
9197

9298
```shell
9399
cd flow
@@ -121,17 +127,17 @@ Then use:
121127
docker run --rm -it -e DISPLAY=<IP_LIKE_FROM_TUTORIAL>:0 --network host --privileged <IMAGE_NAME>
122128
```
123129

124-
Alternatively, you may also use the `docker_shell` utility for GUI as follows.
125-
It is important that you are in the `flow` directory.
130+
Alternatively, you may also use the `docker_shell` utility for GUI as follows.
131+
It is important that you are in the `flow` directory.
126132

127133
```shell
128134
cd flow
129135
util/docker_shell gui_final
130136
```
131137

132138
```{note}
133-
`docker_shell` is a helpful utility to automate the
134-
aforementioned Docker commands using the user's parameters.
139+
`docker_shell` is a helpful utility to automate the
140+
aforementioned Docker commands using the user's parameters.
135141
Do refer to the documentation [here](./DockerShell.md).
136142
```
137143

docs/user/DockerShell.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
Building example design using Docker image
22
==========================================
33

4-
The `docker_shell` script is used as a prefix to launch a command using a OpenROAD docker image.
4+
The `docker_shell` script is used to launch a command using a OpenROAD-flow-scripts docker image.
55

66
Also, the current working directory is mapped into the Docker image using the current user's credentials.
77

88
Build docker image
99
------------------
1010

11-
First build the docker image:
11+
You can skip this step if you would like to use the latest version from the master
12+
branch. If you are developing ORFS/OR, you should build your own image.
1213

1314
```
1415
cd OpenROAD-flow-scripts
1516
./build_openroad.sh
1617
```
1718

19+
Run ORFS using `docker_shell`
20+
-----------------------------
21+
1822
Build an example design and run the GUI:
1923

2024
```
@@ -33,7 +37,7 @@ If you need to use a different Docker image than default, override by using the
3337
environment variable:
3438

3539
```
36-
OR_IMAGE=openroad/flow-ubuntu22.04-builder:v1234 util/docker_shell make
40+
OR_IMAGE=openroad/orfs:v1234 util/docker_shell make
3741
```
3842

3943
If you have built your OpenROAD Docker image using prebuilt binaries,

docs/user/FlowVariables.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,12 @@ configuration file.
163163
| <a name="MACRO_WRAPPERS"></a>MACRO_WRAPPERS| The wrapper file that replaces existing macros with their wrapped version.| |
164164
| <a name="MAKE_TRACKS"></a>MAKE_TRACKS| Tcl file that defines add routing tracks to a floorplan.| |
165165
| <a name="MATCH_CELL_FOOTPRINT"></a>MATCH_CELL_FOOTPRINT| Enforce sizing operations to only swap cells that have the same layout boundary.| 0|
166+
| <a name="MAX_REPAIR_ANTENNAS_ITER_DRT"></a>MAX_REPAIR_ANTENNAS_ITER_DRT| Defines the maximum number of iterations post-detailed routing repair antennas will run.| 5|
167+
| <a name="MAX_REPAIR_ANTENNAS_ITER_GRT"></a>MAX_REPAIR_ANTENNAS_ITER_GRT| Defines the maximum number of iterations post global routing repair antennas will run.| 5|
166168
| <a name="MAX_ROUTING_LAYER"></a>MAX_ROUTING_LAYER| The highest metal layer name to be used in routing.| |
167169
| <a name="MIN_BUF_CELL_AND_PORTS"></a>MIN_BUF_CELL_AND_PORTS| Used to insert a buffer cell to pass through wires. Used in synthesis.| |
168170
| <a name="MIN_ROUTING_LAYER"></a>MIN_ROUTING_LAYER| The lowest metal layer name to be used in routing.| |
171+
| <a name="OPENROAD_HIERARCHICAL"></a>OPENROAD_HIERARCHICAL| Feature toggle to enable to run OpenROAD in hierarchical mode, otherwise considered flat. Will eventually be the default and this option will be retired.| 0|
169172
| <a name="PDN_TCL"></a>PDN_TCL| File path which has a set of power grid policies used by pdn to be applied to the design, such as layers to use, stripe width and spacing to generate the actual metal straps.| |
170173
| <a name="PLACE_DENSITY"></a>PLACE_DENSITY| The desired average placement density of cells: 1.0 = dense, 0.0 = widely spread. The intended effort is also communicated by this parameter. Use a low value for faster builds and higher value for better quality of results. If a too low value is used, the placer will not be able to place all cells and a recommended minimum placement density can be found in the logs. A too high value can lead to excessive runtimes, even timeouts and subtle failures in the flow after placement, such as in CTS or global routing when timing repair fails. The default is platform specific.| |
171174
| <a name="PLACE_DENSITY_LB_ADDON"></a>PLACE_DENSITY_LB_ADDON| Check the lower boundary of the PLACE_DENSITY and add PLACE_DENSITY_LB_ADDON if it exists.| |
@@ -233,6 +236,7 @@ configuration file.
233236
| <a name="SYNTH_MEMORY_MAX_BITS"></a>SYNTH_MEMORY_MAX_BITS| Maximum number of bits for memory synthesis.| 4096|
234237
| <a name="SYNTH_MINIMUM_KEEP_SIZE"></a>SYNTH_MINIMUM_KEEP_SIZE| For hierarchical synthesis, we keep modules of larger area than given by this variable and flatten smaller modules. The area unit used is the size of a basic nand2 gate from the platform's standard cell library. The default value is platform specific.| 0|
235238
| <a name="SYNTH_NETLIST_FILES"></a>SYNTH_NETLIST_FILES| Skips synthesis and uses the supplied netlist files. If the netlist files contains duplicate modules, which can happen when using hierarchical synthesis on indvidual netlist files and combining here, subsequent modules are silently ignored and only the first module is used.| |
239+
| <a name="SYNTH_RETIME_MODULES"></a>SYNTH_RETIME_MODULES| List of modules to apply retiming to. These modules must not get dissolved and as such they should either be the top module or be included in SYNTH_KEEP_MODULES. This is an experimental option and may cause adverse effects.| |
236240
| <a name="SYNTH_WRAPPED_OPERATORS"></a>SYNTH_WRAPPED_OPERATORS| Synthesize multiple architectural options for each arithmetic operator in the design. These options are available for switching among in later stages of the flow.| |
237241
| <a name="TAPCELL_TCL"></a>TAPCELL_TCL| Path to Endcap and Welltie cells file.| |
238242
| <a name="TAP_CELL_NAME"></a>TAP_CELL_NAME| Name of the cell to use in tap cell insertion.| |
@@ -269,6 +273,7 @@ configuration file.
269273
- [SYNTH_MEMORY_MAX_BITS](#SYNTH_MEMORY_MAX_BITS)
270274
- [SYNTH_MINIMUM_KEEP_SIZE](#SYNTH_MINIMUM_KEEP_SIZE)
271275
- [SYNTH_NETLIST_FILES](#SYNTH_NETLIST_FILES)
276+
- [SYNTH_RETIME_MODULES](#SYNTH_RETIME_MODULES)
272277
- [SYNTH_WRAPPED_OPERATORS](#SYNTH_WRAPPED_OPERATORS)
273278
- [TIEHI_CELL_AND_PORT](#TIEHI_CELL_AND_PORT)
274279
- [TIELO_CELL_AND_PORT](#TIELO_CELL_AND_PORT)
@@ -329,6 +334,7 @@ configuration file.
329334
- [SKIP_PIN_SWAP](#SKIP_PIN_SWAP)
330335
- [SKIP_REPORT_METRICS](#SKIP_REPORT_METRICS)
331336
- [SWAP_ARITH_OPERATORS](#SWAP_ARITH_OPERATORS)
337+
- [SYNTH_WRAPPED_OPERATORS](#SYNTH_WRAPPED_OPERATORS)
332338
- [TAPCELL_TCL](#TAPCELL_TCL)
333339
- [TIEHI_CELL_AND_PORT](#TIEHI_CELL_AND_PORT)
334340
- [TIELO_CELL_AND_PORT](#TIELO_CELL_AND_PORT)
@@ -355,6 +361,7 @@ configuration file.
355361
- [ROUTING_LAYER_ADJUSTMENT](#ROUTING_LAYER_ADJUSTMENT)
356362
- [SKIP_REPORT_METRICS](#SKIP_REPORT_METRICS)
357363
- [SWAP_ARITH_OPERATORS](#SWAP_ARITH_OPERATORS)
364+
- [SYNTH_WRAPPED_OPERATORS](#SYNTH_WRAPPED_OPERATORS)
358365

359366
## cts variables
360367

@@ -380,6 +387,8 @@ configuration file.
380387
- [SKIP_LAST_GASP](#SKIP_LAST_GASP)
381388
- [SKIP_PIN_SWAP](#SKIP_PIN_SWAP)
382389
- [SKIP_REPORT_METRICS](#SKIP_REPORT_METRICS)
390+
- [SWAP_ARITH_OPERATORS](#SWAP_ARITH_OPERATORS)
391+
- [SYNTH_WRAPPED_OPERATORS](#SYNTH_WRAPPED_OPERATORS)
383392
- [TNS_END_PERCENT](#TNS_END_PERCENT)
384393

385394
## grt variables
@@ -388,6 +397,7 @@ configuration file.
388397
- [DETAILED_METRICS](#DETAILED_METRICS)
389398
- [GLOBAL_ROUTE_ARGS](#GLOBAL_ROUTE_ARGS)
390399
- [HOLD_SLACK_MARGIN](#HOLD_SLACK_MARGIN)
400+
- [MAX_REPAIR_ANTENNAS_ITER_GRT](#MAX_REPAIR_ANTENNAS_ITER_GRT)
391401
- [MAX_ROUTING_LAYER](#MAX_ROUTING_LAYER)
392402
- [MIN_ROUTING_LAYER](#MIN_ROUTING_LAYER)
393403
- [PRE_GLOBAL_ROUTE_TCL](#PRE_GLOBAL_ROUTE_TCL)
@@ -400,6 +410,8 @@ configuration file.
400410
- [SKIP_LAST_GASP](#SKIP_LAST_GASP)
401411
- [SKIP_PIN_SWAP](#SKIP_PIN_SWAP)
402412
- [SKIP_REPORT_METRICS](#SKIP_REPORT_METRICS)
413+
- [SWAP_ARITH_OPERATORS](#SWAP_ARITH_OPERATORS)
414+
- [SYNTH_WRAPPED_OPERATORS](#SYNTH_WRAPPED_OPERATORS)
403415
- [TNS_END_PERCENT](#TNS_END_PERCENT)
404416

405417
## route variables
@@ -408,12 +420,15 @@ configuration file.
408420
- [DETAILED_ROUTE_END_ITERATION](#DETAILED_ROUTE_END_ITERATION)
409421
- [FILL_CELLS](#FILL_CELLS)
410422
- [MATCH_CELL_FOOTPRINT](#MATCH_CELL_FOOTPRINT)
423+
- [MAX_REPAIR_ANTENNAS_ITER_DRT](#MAX_REPAIR_ANTENNAS_ITER_DRT)
411424
- [MAX_ROUTING_LAYER](#MAX_ROUTING_LAYER)
412425
- [MIN_ROUTING_LAYER](#MIN_ROUTING_LAYER)
413426
- [REPORT_CLOCK_SKEW](#REPORT_CLOCK_SKEW)
414427
- [ROUTING_LAYER_ADJUSTMENT](#ROUTING_LAYER_ADJUSTMENT)
415428
- [SKIP_DETAILED_ROUTE](#SKIP_DETAILED_ROUTE)
416429
- [SKIP_REPORT_METRICS](#SKIP_REPORT_METRICS)
430+
- [SWAP_ARITH_OPERATORS](#SWAP_ARITH_OPERATORS)
431+
- [SYNTH_WRAPPED_OPERATORS](#SYNTH_WRAPPED_OPERATORS)
417432

418433
## final variables
419434

@@ -427,6 +442,8 @@ configuration file.
427442
- [ROUTING_LAYER_ADJUSTMENT](#ROUTING_LAYER_ADJUSTMENT)
428443
- [SKIP_DETAILED_ROUTE](#SKIP_DETAILED_ROUTE)
429444
- [SKIP_REPORT_METRICS](#SKIP_REPORT_METRICS)
445+
- [SWAP_ARITH_OPERATORS](#SWAP_ARITH_OPERATORS)
446+
- [SYNTH_WRAPPED_OPERATORS](#SYNTH_WRAPPED_OPERATORS)
430447

431448
## generate_abstract variables
432449

@@ -467,6 +484,7 @@ configuration file.
467484
- [KLAYOUT_TECH_FILE](#KLAYOUT_TECH_FILE)
468485
- [LIB_FILES](#LIB_FILES)
469486
- [MACRO_EXTENSION](#MACRO_EXTENSION)
487+
- [OPENROAD_HIERARCHICAL](#OPENROAD_HIERARCHICAL)
470488
- [PLATFORM](#PLATFORM)
471489
- [PLATFORM_TCL](#PLATFORM_TCL)
472490
- [PROCESS](#PROCESS)

etc/DependencyInstaller.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ else
1010
fi
1111

1212
# package versions
13-
klayoutVersion=0.28.17
13+
klayoutVersion=0.30.3
1414
verilatorVersion=5.026
15+
numThreads=$(nproc)
1516

1617
_versionCompare() {
1718
local a b IFS=. ; set -f
@@ -54,7 +55,7 @@ _installCommon() {
5455
pushd verilator
5556
autoconf
5657
./configure --prefix "${verilatorPrefix}"
57-
make -j`nproc`
58+
make -j "${numThreads}"
5859
make install
5960
popd
6061
rm -r verilator
@@ -162,17 +163,22 @@ _installUbuntuPackages() {
162163
if [ ! -f ${klayoutPrefix}/klayout ]; then
163164
_installKlayoutDependenciesUbuntuAarch64
164165
echo "Installing KLayout for aarch64 architecture"
165-
git clone https://github.com/KLayout/klayout.git
166+
git clone --depth=1 -b "v${klayoutVersion}" https://github.com/KLayout/klayout.git
166167
cd klayout
167-
./build.sh -bin "${klayoutPrefix}"
168+
./build.sh -bin "${klayoutPrefix}" -option -j "${numThreads}"
168169
else
169170
echo "Klayout is already installed"
170171
fi
171172
else
172173
if [[ $1 == 20.04 ]]; then
173-
klayoutChecksum=f78d41edf5bcfa5f1990bde1a9307e9e
174+
klayoutChecksum=e83be08033f2f69d83ab7bd494a7a858
175+
elif [[ $1 == 22.04 ]]; then
176+
klayoutChecksum=6e431b0a1a34c16eab9958a2c28f88bd
177+
elif [[ $1 == 24.04 ]]; then
178+
klayoutChecksum=2d186f0225dbac7ae2d790aa8fa57814
174179
else
175-
klayoutChecksum=54748a49e1ab53e14cf5bf95feb2f25a
180+
echo "Unrecognized version of Ubuntu $1. Please install KLayout manually"
181+
exit 1
176182
fi
177183
wget https://www.klayout.org/downloads/Ubuntu-${1%.*}/klayout_${klayoutVersion}-1_amd64.deb
178184
md5sum -c <(echo "${klayoutChecksum} klayout_${klayoutVersion}-1_amd64.deb") || exit 1
@@ -317,6 +323,10 @@ while [ "$#" -gt 0 ]; do
317323
OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} $1"
318324
constantBuildDir="true"
319325
;;
326+
-threads=*)
327+
OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} $1"
328+
numThreads=${1#*=}
329+
;;
320330
*)
321331
echo "unknown option: ${1}" >&2
322332
_help

flow/Makefile

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,8 @@ do-$(1)$(if $(4),$(4),):
414414
cp $(RESULTS_DIR)/$(2) $(RESULTS_DIR)/$(1)$(if $(4),$(4),.odb)
415415
endef
416416

417+
$(eval $(call do-step,1_3_synth,$(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc,synth_odb))
417418

418-
# STEP 1: Translate verilog to odb
419-
#-------------------------------------------------------------------------------
420419
$(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) $(DONT_USE_SC_LIB),floorplan))
421420

422421
$(eval $(call do-copy,2_floorplan,2_1_floorplan.sdc,,.sdc))
@@ -775,13 +774,7 @@ nuke: clean_test clean_issues
775774
$(foreach file,$(RESULTS_DEF) $(RESULTS_GDS) $(RESULTS_OAS),klayout_$(file)): klayout_%: $(OBJECTS_DIR)/klayout.lyt
776775
$(KLAYOUT_CMD) -nn $(OBJECTS_DIR)/klayout.lyt $(RESULTS_DIR)/$*
777776

778-
.PHONY: gui_synth
779-
gui_synth:
780-
$(OPENROAD_GUI_CMD) $(SCRIPTS_DIR)/sta-synth.tcl
781-
.PHONY: open_synth
782-
open_synth:
783-
$(OPENROAD_NO_EXIT_CMD) $(SCRIPTS_DIR)/sta-synth.tcl
784-
777+
$(eval $(call OPEN_GUI_SHORTCUT,synth,1_synth.odb))
785778
$(eval $(call OPEN_GUI_SHORTCUT,floorplan,2_floorplan.odb))
786779
$(eval $(call OPEN_GUI_SHORTCUT,place,3_place.odb))
787780
$(eval $(call OPEN_GUI_SHORTCUT,cts,4_cts.odb))

flow/designs/asap7/aes-block/constraint.sdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set clk_name clk
22
set clk_port_name clk
3-
set clk_period 475
3+
set clk_period 450
44
set clk_io_pct 0.2
55

66
set clk_port [get_ports $clk_port_name]

0 commit comments

Comments
 (0)