palaniappan-r
commited on
Add markdown sources
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- markdown/ORFS_docs/general/AddingNewDesign.md +109 -0
- markdown/ORFS_docs/general/CI.md +42 -0
- markdown/ORFS_docs/general/CODE_OF_CONDUCT.md +122 -0
- markdown/ORFS_docs/general/DeveloperGuide.md +7 -0
- markdown/ORFS_docs/general/DockerShell.md +62 -0
- markdown/ORFS_docs/general/FlowTutorial.md +2086 -0
- markdown/ORFS_docs/general/FlowVariables.md +308 -0
- markdown/ORFS_docs/general/Flow_QoR_CI.md +12 -0
- markdown/ORFS_docs/general/GettingInvolved.md +101 -0
- markdown/ORFS_docs/general/GitGuide.md +207 -0
- markdown/ORFS_docs/general/InstructionsForAutoTuner.md +211 -0
- markdown/ORFS_docs/general/Jenkins.md +10 -0
- markdown/ORFS_docs/general/Manpage.md +86 -0
- markdown/ORFS_docs/general/Metrics.md +66 -0
- markdown/ORFS_docs/general/Notebooks.md +19 -0
- markdown/ORFS_docs/general/PlatformBringUp.md +475 -0
- markdown/ORFS_docs/general/QoRDashboard.md +32 -0
- markdown/ORFS_docs/general/TutorialHome.md +5 -0
- markdown/ORFS_docs/general/UserGuide.md +44 -0
- markdown/ORFS_docs/general/mainREADME.md +142 -0
- markdown/ORFS_docs/installation/BuildLocally.md +56 -0
- markdown/ORFS_docs/installation/BuildWithDocker.md +151 -0
- markdown/ORFS_docs/installation/BuildWithPrebuilt.md +70 -0
- markdown/ORFS_docs/installation/BuildWithWSL.md +39 -0
- markdown/ORFS_docs/installation/FAQS.md +57 -0
- markdown/ORFS_docs/installation/SupportedOS.md +107 -0
- markdown/ORFS_docs/installation/index2.md +264 -0
- markdown/OR_docs/general/CI.md +59 -0
- markdown/OR_docs/general/CodingPractices.md +547 -0
- markdown/OR_docs/general/DatabaseMath.md +101 -0
- markdown/OR_docs/general/DeveloperGuide.md +326 -0
- markdown/OR_docs/general/GettingInvolved.md +87 -0
- markdown/OR_docs/general/GitGuide.md +207 -0
- markdown/OR_docs/general/Logger.md +456 -0
- markdown/OR_docs/general/README.md +367 -0
- markdown/OR_docs/general/README_2.md +84 -0
- markdown/OR_docs/general/ReadmeFormat.md +99 -0
- markdown/OR_docs/general/TclFormat.md +42 -0
- markdown/OR_docs/general/index.md +80 -0
- markdown/OR_docs/general/translator.md +245 -0
- markdown/OR_docs/installation/Build.md +106 -0
- markdown/OR_docs/installation/FAQS.md +14 -0
- markdown/OR_docs/tools/CODE_OF_CONDUCT.md +128 -0
- markdown/OR_docs/tools/README.md +367 -0
- markdown/OR_docs/tools/src/README.md +193 -0
- markdown/OR_docs/tools/src/ant/README.md +80 -0
- markdown/OR_docs/tools/src/cts/README.md +167 -0
- markdown/OR_docs/tools/src/dft/README.md +121 -0
- markdown/OR_docs/tools/src/dpl/README.md +178 -0
- markdown/OR_docs/tools/src/drt/README.md +252 -0
markdown/ORFS_docs/general/AddingNewDesign.md
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Adding New Designs to the ORFS
|
2 |
+
|
3 |
+
This section explains how to add verilog designs to ORFS
|
4 |
+
repository for a full RTL-GDS flow execution.
|
5 |
+
|
6 |
+
The following design example is based on the design `spm` that
|
7 |
+
implements a Single-port memory using `gf180` platform. This
|
8 |
+
procedure applies to any design for a given platform you choose.
|
9 |
+
|
10 |
+
**Note:** The commands refer to the base directory as
|
11 |
+
`OpenROAD-flow-scripts/flow` as the starting point for the flow.
|
12 |
+
|
13 |
+
**Step 1:** Create the Verilog source files directory based on
|
14 |
+
the top module name.
|
15 |
+
|
16 |
+
``` shell
|
17 |
+
cd designs/src
|
18 |
+
mkdir spm
|
19 |
+
cd spm
|
20 |
+
vi spm.v
|
21 |
+
```
|
22 |
+
|
23 |
+
Copy [this](https://raw.githubusercontent.com/The-OpenROAD-Project/OpenLane/master/designs/spm/src/spm.v)
|
24 |
+
verilog code into spm.v.
|
25 |
+
|
26 |
+
**Step 2:** Create `config.mk` to define design configuration.
|
27 |
+
|
28 |
+
``` shell
|
29 |
+
cd designs/gf180
|
30 |
+
mkdir spm
|
31 |
+
cd spm
|
32 |
+
vi config.mk
|
33 |
+
```
|
34 |
+
|
35 |
+
**Step 3:** Define key design parameters in `config.mk`.
|
36 |
+
|
37 |
+
```
|
38 |
+
export PLATFORM = gf180
|
39 |
+
|
40 |
+
export DESIGN_NAME = spm
|
41 |
+
|
42 |
+
export VERILOG_FILES = $(sort $(wildcard ./designs/src/$(DESIGN_NICKNAME)/*.v))
|
43 |
+
export SDC_FILE = ./designs/$(PLATFORM)/$(DESIGN_NICKNAME)/constraint.sdc
|
44 |
+
|
45 |
+
export CORE_UTILIZATION = 40
|
46 |
+
export PLACE_DENSITY = 0.60
|
47 |
+
|
48 |
+
export TNS_END_PERCENT = 100
|
49 |
+
```
|
50 |
+
|
51 |
+
To customize or add new variables to the `config.mk` refer to the
|
52 |
+
other built-in design examples or the flow variables list [here](./FlowVariables.md).
|
53 |
+
|
54 |
+
**Step 4:** Define SDC constraints.
|
55 |
+
|
56 |
+
``` shell
|
57 |
+
cd designs/gf180/spm
|
58 |
+
vi constraint.sdc
|
59 |
+
```
|
60 |
+
|
61 |
+
Edit as required to define design constraints.
|
62 |
+
|
63 |
+
```
|
64 |
+
current_design spm
|
65 |
+
|
66 |
+
set clk_name core_clock
|
67 |
+
set clk_port_name clk
|
68 |
+
set clk_period 10
|
69 |
+
set clk_io_pct 0.2
|
70 |
+
|
71 |
+
set clk_port [get_ports $clk_port_name]
|
72 |
+
|
73 |
+
create_clock -name $clk_name -period $clk_period $clk_port
|
74 |
+
|
75 |
+
set non_clock_inputs [lsearch -inline -all -not -exact [all_inputs] $clk_port]
|
76 |
+
|
77 |
+
set_input_delay [expr $clk_period * $clk_io_pct] -clock $clk_name $non_clock_inputs
|
78 |
+
set_output_delay [expr $clk_period * $clk_io_pct] -clock $clk_name [all_outputs]
|
79 |
+
```
|
80 |
+
|
81 |
+
Update only `current_design`, `clk_port_name` and `clk_period` as
|
82 |
+
per design requirements. Do not modify the remaining values for the
|
83 |
+
default template.
|
84 |
+
|
85 |
+
**Step 5:** Add the design name to `Makefile` to run the flow
|
86 |
+
with the `make` command.
|
87 |
+
|
88 |
+
``` shell
|
89 |
+
vi Makefile
|
90 |
+
```
|
91 |
+
|
92 |
+
Comment (#) any `DESIGN_CONFIG` if already enabled.
|
93 |
+
|
94 |
+
Add the following lines to `Makefile` and save the changes.
|
95 |
+
```
|
96 |
+
DESIGN_CONFIG=./designs/gf180/spm/config.mk
|
97 |
+
```
|
98 |
+
|
99 |
+
Run `make` command to run the flow from RTL to GDSII generation.
|
100 |
+
|
101 |
+
``` shell
|
102 |
+
make
|
103 |
+
```
|
104 |
+
|
105 |
+
If you do not want to change `Makefile`, you can simply run,
|
106 |
+
|
107 |
+
``` shell
|
108 |
+
make DESIGN_CONFIG=./designs/gf180/spm/config.mk
|
109 |
+
```
|
markdown/ORFS_docs/general/CI.md
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CI Guide
|
2 |
+
|
3 |
+
This document describes the pipelines available to the developers and code
|
4 |
+
maintainers in the [Jenkins server](https://jenkins.openroad.tools/). Note
|
5 |
+
that pipelines with the suffix `*-Private` are only available to code
|
6 |
+
maintainers and The OpenROAD Project members as they can contain confidential
|
7 |
+
information. Thus, to access Private pipelines one needs to have authorization
|
8 |
+
to access confidential data and be logged in the Jenkins website.
|
9 |
+
|
10 |
+
Below there is a list of the available features. Instructions on how to
|
11 |
+
navigate Jenkins to access these features are available
|
12 |
+
[here](https://docs.google.com/presentation/d/1kWHLjUBFcd0stnDaPNi_pt9WFrrsR7tQ95BGhT1yOvw/edit?usp=sharing).
|
13 |
+
|
14 |
+
- Find your build through Jenkins website or from GitHub.
|
15 |
+
- See test status: Pass/Fail.
|
16 |
+
- Log files for each test.
|
17 |
+
- Build artifacts to reproduce failures.
|
18 |
+
- HTML reports about code coverage and metrics.
|
19 |
+
|
20 |
+
## OpenROAD Flow
|
21 |
+
|
22 |
+
- OpenROAD-flow-script-Public [folder]
|
23 |
+
- `public_tests_all`
|
24 |
+
- Description: runs flow tests that finish in less than three hours.
|
25 |
+
- Target: master branch.
|
26 |
+
- `public_tests_all-pr`
|
27 |
+
- Description: runs flow tests that finish in less than three hours.
|
28 |
+
- Target: all open PRs.
|
29 |
+
- `publish-results-to-dashboard`
|
30 |
+
- Description: uploads metrics to dashboard website.
|
31 |
+
- Target: master branch.
|
32 |
+
- OpenROAD-flow-scripts-Nightly-Public
|
33 |
+
- Description: runs all flow tests including RTLMP designs.
|
34 |
+
- Target: master branch.
|
35 |
+
- OpenROAD-flow-scripts-Private [folder]
|
36 |
+
- `public_tests_small`
|
37 |
+
- Description: runs fast flow tests that finish in less than one hour.
|
38 |
+
- Target: all branches that are not filed as PR. CI will run for PR
|
39 |
+
branches on the public side after "Ready to Sync Public" workflow.
|
40 |
+
- OpenROAD-flow-scripts-All-Tests-Private
|
41 |
+
- Description: runs flow tests for private branches.
|
42 |
+
- Target: secure branches.
|
markdown/ORFS_docs/general/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Contributor Covenant Code of Conduct
|
2 |
+
|
3 |
+
## Our Pledge
|
4 |
+
|
5 |
+
We as members, contributors, and leaders pledge to make participation in our
|
6 |
+
community a harassment-free experience for everyone, regardless of age, body
|
7 |
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
8 |
+
identity and expression, level of experience, education, socio-economic status,
|
9 |
+
nationality, personal appearance, race, religion, or sexual identity
|
10 |
+
and orientation.
|
11 |
+
|
12 |
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
13 |
+
diverse, inclusive, and healthy community.
|
14 |
+
|
15 |
+
## Our Standards
|
16 |
+
|
17 |
+
Examples of behavior that contributes to a positive environment for our
|
18 |
+
community include:
|
19 |
+
|
20 |
+
* Demonstrating empathy and kindness toward other people
|
21 |
+
* Being respectful of differing opinions, viewpoints, and experiences
|
22 |
+
* Giving and gracefully accepting constructive feedback
|
23 |
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
24 |
+
and learning from the experience
|
25 |
+
* Focusing on what is best not just for us as individuals, but for the
|
26 |
+
overall community
|
27 |
+
|
28 |
+
Examples of unacceptable behavior include:
|
29 |
+
|
30 |
+
* The use of sexualized language or imagery, and sexual attention or
|
31 |
+
advances of any kind
|
32 |
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
33 |
+
* Public or private harassment
|
34 |
+
* Publishing others' private information, such as a physical or email
|
35 |
+
address, without their explicit permission
|
36 |
+
* Other conduct which could reasonably be considered inappropriate in a
|
37 |
+
professional setting
|
38 |
+
|
39 |
+
## Enforcement Responsibilities
|
40 |
+
|
41 |
+
Community leaders are responsible for clarifying and enforcing our standards of
|
42 |
+
acceptable behavior and will take appropriate and fair corrective action in
|
43 |
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
44 |
+
or harmful.
|
45 |
+
|
46 |
+
Community leaders have the right and responsibility to remove, edit, or reject
|
47 |
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
48 |
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
49 |
+
decisions when appropriate.
|
50 |
+
|
51 |
+
## Scope
|
52 |
+
|
53 |
+
This Code of Conduct applies within all community spaces, and also applies when
|
54 |
+
an individual is officially representing the community in public spaces.
|
55 |
+
Examples of representing our community include using an official e-mail address,
|
56 |
+
posting via an official social media account, or acting as an appointed
|
57 |
+
representative at an online or offline event.
|
58 |
+
|
59 |
+
## Enforcement
|
60 |
+
|
61 |
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
62 |
+
reported to the community leaders responsible for enforcement at
|
63 |
+
complaints@openroad.tools.
|
64 |
+
All complaints will be reviewed and investigated promptly and fairly.
|
65 |
+
|
66 |
+
All community leaders are obligated to respect the privacy and security of the
|
67 |
+
reporter of any incident.
|
68 |
+
|
69 |
+
## Enforcement Guidelines
|
70 |
+
|
71 |
+
Community leaders will follow these Community Impact Guidelines in determining
|
72 |
+
the consequences for any action they deem in violation of this Code of Conduct:
|
73 |
+
|
74 |
+
### 1. Correction
|
75 |
+
|
76 |
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
77 |
+
unprofessional or unwelcome in the community.
|
78 |
+
|
79 |
+
**Consequence**: A private, written warning from community leaders, providing
|
80 |
+
clarity around the nature of the violation and an explanation of why the
|
81 |
+
behavior was inappropriate. A public apology may be requested.
|
82 |
+
|
83 |
+
### 2. Warning
|
84 |
+
|
85 |
+
**Community Impact**: A violation through a single incident or series
|
86 |
+
of actions.
|
87 |
+
|
88 |
+
**Consequence**: A warning with consequences for continued behavior. No
|
89 |
+
interaction with the people involved, including unsolicited interaction with
|
90 |
+
those enforcing the Code of Conduct, for a specified period of time. This
|
91 |
+
includes avoiding interactions in community spaces as well as external channels
|
92 |
+
like social media. Violating these terms may lead to a temporary or
|
93 |
+
permanent ban.
|
94 |
+
|
95 |
+
### 3. Temporary Ban
|
96 |
+
|
97 |
+
**Community Impact**: A serious violation of community standards, including
|
98 |
+
sustained inappropriate behavior.
|
99 |
+
|
100 |
+
**Consequence**: A temporary ban from any sort of interaction or public
|
101 |
+
communication with the community for a specified period of time. No public or
|
102 |
+
private interaction with the people involved, including unsolicited interaction
|
103 |
+
with those enforcing the Code of Conduct, is allowed during this period.
|
104 |
+
Violating these terms may lead to a permanent ban.
|
105 |
+
|
106 |
+
### 4. Permanent Ban
|
107 |
+
|
108 |
+
**Community Impact**: Demonstrating a pattern of violation of community
|
109 |
+
standards, including sustained inappropriate behavior, harassment of an
|
110 |
+
individual, or aggression toward or disparagement of classes of individuals.
|
111 |
+
|
112 |
+
**Consequence**: A permanent ban from any sort of public interaction within
|
113 |
+
the community.
|
114 |
+
|
115 |
+
## Attribution
|
116 |
+
|
117 |
+
This Code of Conduct is adapted from the [Contributor Covenant version 2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).
|
118 |
+
|
119 |
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
120 |
+
enforcement ladder](https://github.com/mozilla/inclusion).
|
121 |
+
|
122 |
+
For answers to common questions about this code of conduct, see the FAQ [here](https://www.contributor-covenant.org/faq). Translations are available [here](https://www.contributor-covenant.org/translations).
|
markdown/ORFS_docs/general/DeveloperGuide.md
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Developer Guide
|
2 |
+
|
3 |
+
- Integrate a new platform to OpenROAD Flow: [Guide](./PlatformBringUp.md).
|
4 |
+
- Adding a new design: [Guide](../user/AddingNewDesign.md).
|
5 |
+
- Continuous Integration: [Guide](./CI.md).
|
6 |
+
- How do I update the codebase? There are different ways to update your codebase depending on the method you installed it. We provide detailed instructions in this [guide](../user/FAQS.md).
|
7 |
+
- How do I contribute? Follow our Git Quickstart guide [here](./GitGuide.md).
|
markdown/ORFS_docs/general/DockerShell.md
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Building example design using Docker image
|
2 |
+
==========================================
|
3 |
+
|
4 |
+
The `docker_shell` script is used as a prefix to launch a command using a OpenROAD docker image.
|
5 |
+
|
6 |
+
Also, the current working directory is mapped into the Docker image using the current user's credentials.
|
7 |
+
|
8 |
+
Build docker image
|
9 |
+
------------------
|
10 |
+
|
11 |
+
First build the docker image:
|
12 |
+
|
13 |
+
```
|
14 |
+
cd OpenROAD-flow-scripts
|
15 |
+
./build_openroad.sh
|
16 |
+
```
|
17 |
+
|
18 |
+
Build an example design and run the GUI:
|
19 |
+
|
20 |
+
```
|
21 |
+
cd flow
|
22 |
+
util/docker_shell make
|
23 |
+
util/docker_shell make gui_final
|
24 |
+
```
|
25 |
+
|
26 |
+
You can also launch an interactive bash session:
|
27 |
+
|
28 |
+
```
|
29 |
+
util/docker_shell bash
|
30 |
+
```
|
31 |
+
|
32 |
+
If you need to use a different Docker image than default, override by using the `docker_shell_IMAGE`
|
33 |
+
environment variable:
|
34 |
+
|
35 |
+
```
|
36 |
+
OR_IMAGE=openroad/flow-centos7-builder:v1234 util/docker_shell make
|
37 |
+
```
|
38 |
+
|
39 |
+
If you have built your OpenROAD Docker image using prebuilt binaries,
|
40 |
+
you might want to source custom paths for your modules as follows.
|
41 |
+
|
42 |
+
```
|
43 |
+
OR_IMAGE=openroad_prebuilt_image YOSYS_CMD=/oss-cad-suite/bin/yosys util/docker_shell make
|
44 |
+
```
|
45 |
+
|
46 |
+
Using `docker_shell` from outside of `OpenROAD-flow-scripts/flow` folder
|
47 |
+
------------------------------------------------------------------------
|
48 |
+
|
49 |
+
If you have designs you are keeping in a git source repository that is not
|
50 |
+
a fork of the OpenROAD-flow-scripts git repository, you can still use
|
51 |
+
the `docker_shell` script.
|
52 |
+
|
53 |
+
Two ways to use `docker_shell`
|
54 |
+
|
55 |
+
1. Simply invoke it from the ORFS location.
|
56 |
+
2. Copy the script into your source folder. This would allow you
|
57 |
+
to build and publish a Docker image to a private Docker repository
|
58 |
+
and lock the ORFS version to the version of your source code. This
|
59 |
+
gives you a way to deploy updates of ORFS
|
60 |
+
easily, publish a new Docker image, modify the copy of `docker_shell`
|
61 |
+
and create a pull request to possibly test your upgrade on your private
|
62 |
+
build serves.
|
markdown/ORFS_docs/general/FlowTutorial.md
ADDED
@@ -0,0 +1,2086 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# OpenROAD Flow Scripts Tutorial
|
2 |
+
|
3 |
+
## Introduction
|
4 |
+
|
5 |
+
This document describes a tutorial to run the complete
|
6 |
+
OpenROAD flow from RTL-to-GDS using [OpenROAD Flow
|
7 |
+
Scripts](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts).
|
8 |
+
It includes examples of useful design and manual usage in key flow
|
9 |
+
stages to help users gain a good understanding of the
|
10 |
+
[OpenROAD](https://openroad.readthedocs.io/en/latest/main/README.html)
|
11 |
+
application flow, data organization, GUI and commands.
|
12 |
+
|
13 |
+
This is intended for:
|
14 |
+
|
15 |
+
- Beginners or new users with some understanding of basic VLSI
|
16 |
+
design flow. Users will learn the basics of installation to use
|
17 |
+
OpenROAD-flow-scripts for the complete RTL-to-GDS flow from
|
18 |
+
[here](../index.md#getting-started-with-openroad-flow-scripts).
|
19 |
+
- Users already familiar with the OpenROAD application and flow but would
|
20 |
+
like to learn more about specific features and commands.
|
21 |
+
|
22 |
+
## User Guidelines
|
23 |
+
|
24 |
+
- This tutorial requires a specific directory structure built by
|
25 |
+
OpenROAD-flow-scripts (ORFS). Do not modify this structure or
|
26 |
+
underlying files since this will cause problems in the flow execution.
|
27 |
+
- User can run the full RTL-to-GDS flow and learn specific flow
|
28 |
+
sections independently. This allows users to learn the flow and tool
|
29 |
+
capabilities at their own pace, time and preference.
|
30 |
+
- Results shown, such as images or outputs of reports and logs, could
|
31 |
+
vary based on release updates. However, the main flow and command
|
32 |
+
structure should generally apply.
|
33 |
+
|
34 |
+
Note: Please submit any problem found under Issues in the GitHub repository
|
35 |
+
[here](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/issues).
|
36 |
+
|
37 |
+
## Getting Started
|
38 |
+
|
39 |
+
This section describes the environment setup to build OpenROAD-flow-scripts
|
40 |
+
and get ready to execute the RTL-to-GDS flow of the open-source
|
41 |
+
design `ibex` using the `sky130hd` technology.
|
42 |
+
|
43 |
+
`ibex` is a 32 bit RISC-V CPU core (`RV32IMC/EMC`) with a two-stage
|
44 |
+
pipeline.
|
45 |
+
|
46 |
+
### Setting Up The Environment
|
47 |
+
|
48 |
+
Use the `bash` shell to run commands and scripts.
|
49 |
+
|
50 |
+
#### OpenROAD-flow-scripts Installation
|
51 |
+
|
52 |
+
To install OpenROAD-flow-scripts, refer to the
|
53 |
+
[Build or installing ORFS Dependencies](https://openroad-flow-scripts.readthedocs.io/en/latest/#build-or-installing-orfs-dependencies)
|
54 |
+
documentation.
|
55 |
+
|
56 |
+
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).
|
59 |
+
|
60 |
+
:::{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).
|
63 |
+
:::
|
64 |
+
|
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-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).
|
77 |
+
:::
|
78 |
+
|
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 |
+
|
115 |
+
## Configuring The Design
|
116 |
+
|
117 |
+
This section shows how to set up the necessary platform and design
|
118 |
+
configuration files to run the complete RTL-to-GDS flow using
|
119 |
+
OpenROAD-flow-scripts for `ibex` design.
|
120 |
+
|
121 |
+
```shell
|
122 |
+
cd flow
|
123 |
+
```
|
124 |
+
|
125 |
+
### Platform Configuration
|
126 |
+
|
127 |
+
View the platform configuration file setup for default variables for
|
128 |
+
`sky130hd`.
|
129 |
+
|
130 |
+
```shell
|
131 |
+
less ./platforms/sky130hd/config.mk
|
132 |
+
```
|
133 |
+
|
134 |
+
The `config.mk` file has all the required variables for the `sky130`
|
135 |
+
platform and hence it is not recommended to change any variable
|
136 |
+
definition here. You can view the `sky130hd` platform configuration
|
137 |
+
[here](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/flow/platforms/sky130hd/config.mk).
|
138 |
+
|
139 |
+
Refer to the [Flow variables](../user/FlowVariables.md) document for
|
140 |
+
details on how to use platform and design specific environment variables
|
141 |
+
in OpenROAD-flow-scripts to customize and configure your design flow.
|
142 |
+
|
143 |
+
### Design Configuration
|
144 |
+
|
145 |
+
View the default design configuration of `ibex` design:
|
146 |
+
|
147 |
+
```shell
|
148 |
+
less ./designs/sky130hd/ibex/config.mk
|
149 |
+
```
|
150 |
+
|
151 |
+
You can view `ibex` design `config.mk`
|
152 |
+
[here](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/flow/designs/sky130hd/ibex/config.mk).
|
153 |
+
|
154 |
+
:::{Note} The following design-specific configuration variables are required
|
155 |
+
to specify main design inputs such as platform, top-level design name and
|
156 |
+
constraints. We will use default configuration variables for this tutorial.
|
157 |
+
:::
|
158 |
+
|
159 |
+
| Variable Name | Description |
|
160 |
+
|--------------------|------------------------------------------------------------------------------------------------------------------------------------------|
|
161 |
+
| `PLATFORM` | Specifies Process design kit. |
|
162 |
+
| `DESIGN_NAME` | The name of the top-level module of the design |
|
163 |
+
| `VERILOG_FILES` | The path to the design Verilog files or JSON files providing a description of modules (check `yosys -h write_json` for more details). |
|
164 |
+
| `SDC_FILE` | The path to design `.sdc` file |
|
165 |
+
| `CORE_UTILIZATION` | The core utilization percentage. |
|
166 |
+
| `PLACE_DENSITY` | The desired placement density of cells. It reflects how spread the cells would be on the core area. 1 = closely dense. 0 = widely spread |
|
167 |
+
|
168 |
+
:::{Note} To add a new design to the `flow`, refer to the document
|
169 |
+
[here](../user/AddingNewDesign.md). This step is for advanced users.
|
170 |
+
If you are a beginner, first understand the flow by completing this
|
171 |
+
tutorial and come back to this step later to add a new design.
|
172 |
+
:::
|
173 |
+
|
174 |
+
### Timing Constraints
|
175 |
+
|
176 |
+
View timing constraints specified in the `.sdc` file
|
177 |
+
[here](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/flow/designs/sky130hd/ibex/constraint.sdc).
|
178 |
+
|
179 |
+
```shell
|
180 |
+
less ./designs/sky130hd/ibex/constraint.sdc
|
181 |
+
```
|
182 |
+
|
183 |
+
For `ibex` design, we simply use the clock definition as follows as a
|
184 |
+
minimum required timing constraint.
|
185 |
+
|
186 |
+
```tcl
|
187 |
+
create_clock -name core_clock -period 17.4 [get_ports {clk_i}]
|
188 |
+
```
|
189 |
+
|
190 |
+
### Design Input Verilog
|
191 |
+
|
192 |
+
The Verilog input files are located in `./designs/src/ibex/`
|
193 |
+
|
194 |
+
The design is defined in `ibex_core.v` available
|
195 |
+
[here](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/flow/designs/src/ibex/ibex_core.v).
|
196 |
+
|
197 |
+
Refer to the `ibex` design `README.md`
|
198 |
+
[here](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/flow/designs/src/ibex/README.md).
|
199 |
+
|
200 |
+
## Running The Automated RTL-to-GDS Flow
|
201 |
+
|
202 |
+
This section describes the complete execution of the design flow from
|
203 |
+
RTL-to-GDS. The OpenROAD application executes the entire autonomous flow
|
204 |
+
using Tcl scripts that invoke open-sourced tools, from synthesis to the final
|
205 |
+
`.gds` file creation, without requiring human intervention. However, in this
|
206 |
+
tutorial, the user will learn both the automated and a few interactive ways
|
207 |
+
to run Tcl commands for important flow stages.
|
208 |
+
|
209 |
+
From the OpenROAD-flow-scripts directory, users can access individual flow
|
210 |
+
stages, respective tools and the corresponding `README.md` for tool commands,
|
211 |
+
configuration examples using the Tcl interface and other such details.
|
212 |
+
|
213 |
+
- [Synthesis](https://github.com/The-OpenROAD-Project/yosys/blob/master/README.md)
|
214 |
+
- [Database](https://openroad.readthedocs.io/en/latest/main/src/odb/README.html)
|
215 |
+
- [Floorplanning](https://openroad.readthedocs.io/en/latest/main/src/ifp/README.html)
|
216 |
+
- [Pin Placement](https://openroad.readthedocs.io/en/latest/main/src/ppl/README.html)
|
217 |
+
- [Chip-level Connections](https://openroad.readthedocs.io/en/latest/main/src/pad/README.html)
|
218 |
+
- [Macro Placement](https://openroad.readthedocs.io/en/latest/main/src/mpl/README.html)
|
219 |
+
- [Tapcell insertion](https://openroad.readthedocs.io/en/latest/main/src/tap/README.html)
|
220 |
+
- [PDN Analysis](https://openroad.readthedocs.io/en/latest/main/src/pdn/README.html)
|
221 |
+
- [IR Drop Analysis](https://openroad.readthedocs.io/en/latest/main/src/psm/README.html)
|
222 |
+
- [Global Placement](https://openroad.readthedocs.io/en/latest/main/src/gpl/README.html)
|
223 |
+
- [Timing Analysis](https://openroad.readthedocs.io/en/latest/main/src/sta/README.html)
|
224 |
+
- [Detailed Placement](https://openroad.readthedocs.io/en/latest/main/src/dpl/README.html)
|
225 |
+
- [Timing Optimization using Resizer](https://openroad.readthedocs.io/en/latest/main/src/rsz/README.html)
|
226 |
+
- [Clock Tree Synthesis](https://openroad.readthedocs.io/en/latest/main/src/cts/README.html)
|
227 |
+
- [Global Routing](https://openroad.readthedocs.io/en/latest/main/src/grt/README.html)
|
228 |
+
- [Antenna Rule Checker](https://openroad.readthedocs.io/en/latest/main/src/ant/README.html)
|
229 |
+
- [Detail Routing](https://openroad.readthedocs.io/en/latest/main/src/drt/README.html)
|
230 |
+
- [Metall Fill](https://openroad.readthedocs.io/en/latest/main/src/fin/README.html)
|
231 |
+
- [Parasitics Extraction](https://openroad.readthedocs.io/en/latest/main/src/rcx/README.html)
|
232 |
+
- [Layout Generation](https://www.klayout.de/)
|
233 |
+
|
234 |
+
### Design Goals
|
235 |
+
|
236 |
+
Run the `ibex` design in OpenROAD-flow-scripts automated flow from
|
237 |
+
RTL-to-GDS using `sky130hd`. Find `ibex` design details
|
238 |
+
[here](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/flow/designs/src/ibex/README.md)
|
239 |
+
and the design goals are:
|
240 |
+
|
241 |
+
- Area
|
242 |
+
|
243 |
+
```
|
244 |
+
Minimum Required Die size: 0 0 798 800 (in micron)
|
245 |
+
Core size: 2 2 796 798 (in micron)
|
246 |
+
```
|
247 |
+
|
248 |
+
- Timing
|
249 |
+
|
250 |
+
```
|
251 |
+
Clock period to meet timing: 17.4 (in ns)
|
252 |
+
```
|
253 |
+
|
254 |
+
`ibex` takes approximately 8 minutes on a machine with 8-cores and 16GB RAM.
|
255 |
+
The runtime will vary based on your configuration.
|
256 |
+
|
257 |
+
Change your current directory to the `flow` directory.
|
258 |
+
|
259 |
+
```shell
|
260 |
+
cd flow
|
261 |
+
```
|
262 |
+
|
263 |
+
Run the complete flow with:
|
264 |
+
|
265 |
+
```shell
|
266 |
+
make DESIGN_CONFIG=./designs/sky130hd/ibex/config.mk
|
267 |
+
```
|
268 |
+
|
269 |
+
As the flow executes, check out the OpenROAD-flow-scripts directory contents and their
|
270 |
+
significance.
|
271 |
+
|
272 |
+
OpenROAD-flow-scripts can generally restart from a previous partial run. If you have errors which prevent restarting the flow, you may try deleting all generated files and start a fresh run. Errors can occur if a tool crashes or is killed while writing a file. The files for `sky130hd/ibex` as an example can be deleted with:
|
273 |
+
|
274 |
+
```shell
|
275 |
+
make clean_all DESIGN_CONFIG=./designs/sky130hd/ibex/config.mk
|
276 |
+
```
|
277 |
+
|
278 |
+
You can also delete files related to individual stages of RTL to GDSII conversion like synthesis, floorplanning, macro placement, clock tree synthesis, routing and layout generation with `clean_synth`, `clean_floorplan`, `clean_place`, `clean_cts`, `clean_route`, and `clean_finish`, respectively.
|
279 |
+
|
280 |
+
|
281 |
+
### Viewing OpenROAD-flow-scripts Directory Structure And Results
|
282 |
+
|
283 |
+
Open a new tab in the terminal and explore the directory structure in
|
284 |
+
`flow` by typing `ls` command to view its contents:
|
285 |
+
|
286 |
+
```shell
|
287 |
+
designs logs Makefile objects platforms reports results scripts test util
|
288 |
+
```
|
289 |
+
|
290 |
+
Navigate through each of the sub-directories above to understand how
|
291 |
+
underlying files are organized.
|
292 |
+
|
293 |
+
- `designs/sky130hd/ibex`
|
294 |
+
Files include: designs make file and SDC file for the `sky130hd`
|
295 |
+
platform and other files for autotuner and metrics.
|
296 |
+
|
297 |
+
```
|
298 |
+
autotuner.json config.mk constraint_doe.sdc constraint.sdc metadata-base-ok.json rules.json
|
299 |
+
```
|
300 |
+
|
301 |
+
- `platforms`
|
302 |
+
Includes public PDKs supported by OpenROAD flow
|
303 |
+
|
304 |
+
```
|
305 |
+
asap7 nangate45 sky130hd sky130hs sky130io sky130ram
|
306 |
+
```
|
307 |
+
|
308 |
+
- `objects/sky130hd/ibex/base`
|
309 |
+
Includes ABC constraints and all the temporary library files used
|
310 |
+
for the completion flow
|
311 |
+
|
312 |
+
```
|
313 |
+
abc.constr klayout.lyt klayout_tech.lef lib
|
314 |
+
```
|
315 |
+
|
316 |
+
- `logs/sky130hd/ibex/base`
|
317 |
+
Logs directory, which contains log files for each flow stage.
|
318 |
+
|
319 |
+
| `logs` | | |
|
320 |
+
|------------------------|------------------------|-----------------------|
|
321 |
+
| `1_1_yosys.log` | `3_1_place_gp.log` | `5_2_route.log` |
|
322 |
+
| `2_1_floorplan.log` | `3_2_place_iop.log` | `6_1_merge.log` |
|
323 |
+
| `2_2_floorplan_io.log` | `3_3_resizer.log` | `6_report.log` |
|
324 |
+
| `2_3_tdms_place.log` | `3_4_opendp.log` | |
|
325 |
+
| `2_4_floorplan_macro.log` | `4_1_cts.log` | |
|
326 |
+
| `2_5_floorplan_tapcell.log` | `4_2_cts_fillcell.log` | |
|
327 |
+
| `2_6_floorplan_pdn.log` | `5_1_grt.log` | |
|
328 |
+
|
329 |
+
|
330 |
+
- `results/sky130hd/ibex/base`
|
331 |
+
Results directory which contains `.v/.sdc/.odb/.def/.spef` files
|
332 |
+
|
333 |
+
| `results` | | |
|
334 |
+
|-----------------------------|-------------------------|--------------------|
|
335 |
+
| `1_1_yosys.v` | `3_1_place_gp.odb` | `5_route.sdc` |
|
336 |
+
| `1_synth.sdc` | `3_2_place_iop.odb` | `6_1_fill.odb` |
|
337 |
+
| `1_synth.v` | `3_3_place_resized.odb` | `6_1_fill.sdc` |
|
338 |
+
| `2_1_floorplan.odb` | `3_4_place_dp.odb` | `6_1_merged.gds` |
|
339 |
+
| `2_2_floorplan_io.odb` | `3_place.odb` | `6_final.odb` |
|
340 |
+
| `2_3_floorplan_tdms.odb` | `3_place.sdc` | `6_final.gds` |
|
341 |
+
| `2_4_floorplan_macro.odb` | `4_1_cts.odb` | `6_final.sdc` |
|
342 |
+
| `2_5_floorplan_tapcell.odb` | `4_2_cts_fillcell.odb` | `6_final.spef` |
|
343 |
+
| `2_6_floorplan_pdn.odb` | `4_cts.odb` | `6_final.v` |
|
344 |
+
| `2_floorplan.odb` | `4_cts.sdc` | `output_guide.mod` |
|
345 |
+
| `2_floorplan.sdc` | `4_cts.v` | `route.guide` |
|
346 |
+
| `2_floorplan.v` | `5_route.odb` | `updated_clks.sdc` |
|
347 |
+
|
348 |
+
|
349 |
+
- `reports/sky130hd/ibex/base`
|
350 |
+
Reports directory, which contains congestion report, DRC
|
351 |
+
report, design statistics and antenna log for reference.
|
352 |
+
|
353 |
+
| `reports` | | |
|
354 |
+
|-------------------|---------------------|------------------------|
|
355 |
+
| `congestion.rpt` | `VDD.rpt` | `VSS.rpt` |
|
356 |
+
| `5_route_drc.rpt` | `final_clocks.webp` | `final_placement.webp` |
|
357 |
+
| `antenna.log` | `final_clocks.webp` | `final.webp` |
|
358 |
+
| `synth_stat.txt` | `synth_check.txt` | `final_resizer.webp` |
|
359 |
+
|
360 |
+
The table below briefly describes the reports directory files.
|
361 |
+
|
362 |
+
| File Name | Description |
|
363 |
+
|------------------------|----------------------------------------------------------|
|
364 |
+
| `congestion.rpt` | Gloabl routing congestion if occurred. |
|
365 |
+
| `5_route_drc.rpt` | DRC violations if occurred. |
|
366 |
+
| `final_clocks.webp` | OR extracted image reference after clock tree synthesis. |
|
367 |
+
| `final_resizer.webp` | OR extracted image reference after resizer. |
|
368 |
+
| `synth_check.txt` | Synthesis warning/error messages. |
|
369 |
+
| `antenna.log` | Antenna check log report. |
|
370 |
+
| `final_placement.webp` | Extracted image after final placement. |
|
371 |
+
| `final.webp` | Extracted image after routing. |
|
372 |
+
| `synth_stat.txt` | Post synthesis design statistics log saved here. |
|
373 |
+
|
374 |
+
The flow completes with the message below by creating a merged final GDS file.
|
375 |
+
|
376 |
+
```
|
377 |
+
[INFO] Writing out GDS/OAS
|
378 |
+
'results/sky130hd/ibex/base/6_1_merged.gds'
|
379 |
+
cp results/sky130hd/ibex/base/6_1_merged.gds
|
380 |
+
results/sky130hd/ibex/base/6_final.gds
|
381 |
+
```
|
382 |
+
|
383 |
+
## Viewing Results And Logs
|
384 |
+
|
385 |
+
OpenROAD-flow-scripts prepends a prefix to each flow stage, as shown below, to
|
386 |
+
indicate the position in the RTL-GDS flow. This makes it easier to
|
387 |
+
understand and debug each flow stage in case of failure.
|
388 |
+
|
389 |
+
View `ibex` design logs:
|
390 |
+
|
391 |
+
```shell
|
392 |
+
ls logs/sky130hd/ibex/base/
|
393 |
+
```
|
394 |
+
|
395 |
+
The log structure is as follows:
|
396 |
+
|
397 |
+
| `logs` | | |
|
398 |
+
|------------------------|------------------------|-----------------------|
|
399 |
+
| `1_1_yosys.log` | `3_1_place_gp.log` | `5_2_route.log` |
|
400 |
+
| `2_1_floorplan.log` | `3_2_place_iop.log` | `6_1_merge.log` |
|
401 |
+
| `2_2_floorplan_io.log` | `3_3_resizer.log` | `6_report.log` |
|
402 |
+
| `2_3_tdms_place.log` | `3_4_opendp.log` | |
|
403 |
+
| `2_4_floorplan_macro.log` | `4_1_cts.log` | |
|
404 |
+
| `2_5_floorplan_tapcell.log` | `4_2_cts_fillcell.log` | |
|
405 |
+
| `2_6_floorplan_pdn.log` | `5_1_grt.log` | |
|
406 |
+
|
407 |
+
### Area
|
408 |
+
|
409 |
+
View design area and its core utilization:
|
410 |
+
|
411 |
+
```
|
412 |
+
make gui_final
|
413 |
+
report_design_area
|
414 |
+
```
|
415 |
+
|
416 |
+
View the resulting area as:
|
417 |
+
|
418 |
+
```
|
419 |
+
Design area 191262 u^2 30% utilization.
|
420 |
+
```
|
421 |
+
|
422 |
+
### Timing
|
423 |
+
|
424 |
+
Users can view flow results using the command interface from the shell or
|
425 |
+
the OpenROAD GUI to visualize further and debug. Learn more about the
|
426 |
+
[GUI](https://openroad.readthedocs.io/en/latest/main/README.html#gui).
|
427 |
+
|
428 |
+
```shell
|
429 |
+
make gui_final
|
430 |
+
```
|
431 |
+
|
432 |
+
Use the following commands in the `Tcl Commands` section of GUI:
|
433 |
+
|
434 |
+
```tcl
|
435 |
+
report_worst_slack
|
436 |
+
report_tns
|
437 |
+
report_wns
|
438 |
+
```
|
439 |
+
|
440 |
+
Note the worst slack, total negative slack and worst negative slack:
|
441 |
+
|
442 |
+
```
|
443 |
+
worst slack -0.99
|
444 |
+
tns -1.29
|
445 |
+
wns -0.99
|
446 |
+
```
|
447 |
+
|
448 |
+
Learn more about visualizing and tracing time paths across the design
|
449 |
+
hierarchy refer to the OpenROAD [GUI](https://openroad.readthedocs.io/en/latest/main/README.html#gui).
|
450 |
+
|
451 |
+
### Power
|
452 |
+
|
453 |
+
Use the report command to view individual power components i.e.
|
454 |
+
sequential, combinational, macro and power consumed by I/O pads.
|
455 |
+
|
456 |
+
```tcl
|
457 |
+
report_power
|
458 |
+
```
|
459 |
+
|
460 |
+
The power output is as follows:
|
461 |
+
|
462 |
+
```
|
463 |
+
--------------------------------------------------------------------------
|
464 |
+
Group Internal Switching Leakage Total
|
465 |
+
Power Power Power Power
|
466 |
+
----------------------------------------------------------------
|
467 |
+
Sequential 5.58e-03 6.12e-04 1.67e-08 6.19e-03 19.0%
|
468 |
+
Combinational 9.23e-03 1.71e-02 4.90e-08 2.63e-02 81.0%
|
469 |
+
Macro 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.0%
|
470 |
+
Pad 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.0%
|
471 |
+
----------------------------------------------------------------
|
472 |
+
Total 1.48e-02 1.77e-02 6.57e-08 3.25e-02 100.0%
|
473 |
+
45.6% 54.4% 0.0%
|
474 |
+
```
|
475 |
+
|
476 |
+
## OpenROAD GUI
|
477 |
+
|
478 |
+
The GUI allows users to select, control, highlight and navigate the
|
479 |
+
design hierarchy and design objects (nets, pins, instances, paths, etc.)
|
480 |
+
through detailed visualization and customization options. Find details
|
481 |
+
on how to use the [GUI](https://openroad.readthedocs.io/en/latest/main/README.html#gui). All the windows
|
482 |
+
aside from the layout are docking windows that can be undocked. Also it
|
483 |
+
can be closed and reopened from the Windows menu.
|
484 |
+
|
485 |
+
|
486 |
+
Note: When you are using remote access, you will need to include -Y (or -X) option in your command to
|
487 |
+
enable X11 applications to function properly over the network. By using the command "ssh -Y" followed
|
488 |
+
by the remote servers' address or hostname, you can establish a secure connection and activate X11 forwarding.
|
489 |
+
This feature enables you to run graphical programs on the remote server and have their windows display
|
490 |
+
on your local machines desktop environment.
|
491 |
+
|
492 |
+
|
493 |
+
In this section, learn how to:
|
494 |
+
|
495 |
+
1. Visualize design hierarchy
|
496 |
+
2. Load ODB files for floorplan and layout visualization
|
497 |
+
3. Trace the synthesized clock tree to view hierarchy and buffers
|
498 |
+
4. Use heat maps to view congestion and observe the effect of placement
|
499 |
+
5. View and trace critical timing paths
|
500 |
+
6. Set display control options
|
501 |
+
7. Zoom to object from inspector
|
502 |
+
|
503 |
+
If you have completed the RTL-GDS flow, then proceed to view the final
|
504 |
+
GDS file under results directory `./results/sky130hd/ibex/base/`
|
505 |
+
|
506 |
+
For the `ibex` design uncomment the `DESIGN_CONFIG`
|
507 |
+
variable in the `Makefile` available [here](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/flow/Makefile).
|
508 |
+
|
509 |
+
```
|
510 |
+
# DESIGN_CONFIG=./designs/sky130hd/gcd/config.mk
|
511 |
+
DESIGN_CONFIG=./designs/sky130hd/ibex/config.mk
|
512 |
+
# DESIGN_CONFIG=./designs/sky130hd/aes/config.mk
|
513 |
+
```
|
514 |
+
|
515 |
+
```shell
|
516 |
+
make gui_final
|
517 |
+
```
|
518 |
+
|
519 |
+
### Viewing Layout Results
|
520 |
+
|
521 |
+
The `make gui_final` command target successively reads and loads the
|
522 |
+
technology `.odb` files and the parasitics and invokes the
|
523 |
+
GUI in these steps:
|
524 |
+
|
525 |
+
- Reads and loads `.odb` files.
|
526 |
+
- Loads `.spef` (parasitics).
|
527 |
+
|
528 |
+
The figure below shows the post-routed DEF for the `ibex` design.
|
529 |
+
|
530 |
+
![ibex_final_db](./images/ibex_final_db.webp)
|
531 |
+
|
532 |
+
### Visualizing Design Objects And Connectivity
|
533 |
+
|
534 |
+
Note the `Display Control` window on the LHS that shows buttons
|
535 |
+
for color, visibility and selection options for various design
|
536 |
+
objects: Layers, Nets, Instances, Blockages, Heatmaps, etc.
|
537 |
+
|
538 |
+
The Inspector window on the RHS allows users to inspect details of
|
539 |
+
selected design objects and the timing report.
|
540 |
+
|
541 |
+
Try selectively displaying (show/hide) various design objects through
|
542 |
+
the display control window and observing their impact on the display.
|
543 |
+
|
544 |
+
### Tracing The Clock Tree
|
545 |
+
|
546 |
+
View the synthesized clock tree for `ibex` design:
|
547 |
+
- From the top Toolbar Click `Windows` -> `Clock Tree Viewer`
|
548 |
+
|
549 |
+
![cts_viewer](./images/CTV_update.webp)
|
550 |
+
|
551 |
+
On RHS, click `Clock Tree Viewer` and top right corner, click
|
552 |
+
`Update` to view the synthesized clock tree of your design.
|
553 |
+
|
554 |
+
View clock tree structure below, the user needs to disable the metal
|
555 |
+
`Layers` section on LHS as shown below.
|
556 |
+
|
557 |
+
![ibex_clock_tree](./images/ibex_clock_tree.webp)
|
558 |
+
|
559 |
+
From the top Toolbar, click on the `Windows` menu to select/hide different
|
560 |
+
view options of Scripting, Display control, etc.
|
561 |
+
|
562 |
+
### Using Heat Maps
|
563 |
+
|
564 |
+
From the Menu Bar, Click on `Tools` -> `Heat Maps` -> `Placement Density` to view
|
565 |
+
congestion selectively on vertical and horizontal layers.
|
566 |
+
|
567 |
+
Expand `Heat Maps` -> `Placement Density` from the Display Control window
|
568 |
+
available on LHS of OpenROAD GUI.
|
569 |
+
|
570 |
+
View congestion on all layers between 50-100%:
|
571 |
+
|
572 |
+
In the `Placement density` setup pop-up window, Select `Minimum` -> `50.00%`
|
573 |
+
`Maximum` -> `100.00%`
|
574 |
+
|
575 |
+
![placement_heat_map](./images/placement_heatmap.webp)
|
576 |
+
|
577 |
+
From `Display Control`, select `Heat Maps` -> `Routing Congestion` as
|
578 |
+
follows:
|
579 |
+
|
580 |
+
![routing_heat_map](./images/routing_heatmap.webp)
|
581 |
+
|
582 |
+
From `Display Control`, select `Heat Maps` -> `Power Density` as
|
583 |
+
follows:
|
584 |
+
|
585 |
+
![power_heat_map](./images/power_heatmap.webp)
|
586 |
+
|
587 |
+
### Viewing Timing Report
|
588 |
+
|
589 |
+
Click `Timing` -> `Options` to view and traverse specific timing paths.
|
590 |
+
From Toolbar, click on the `Timing` icon, View `Timing Report` window added
|
591 |
+
at the right side (RHS) of GUI as shown below.
|
592 |
+
|
593 |
+
![Timing report option](./images/ibex_final_db.webp)
|
594 |
+
|
595 |
+
In `Timing Report` Select `Paths` -> `Update`, `Paths` should be integer
|
596 |
+
numbers. The number of timing paths should be displayed in the current
|
597 |
+
window as follows:
|
598 |
+
|
599 |
+
![Clock Path Update](./images/clock_path_update.webp)
|
600 |
+
|
601 |
+
Select `Setup` or `Hold` tabs and view required arrival times and
|
602 |
+
slack for each timing path segment.
|
603 |
+
|
604 |
+
For each `Setup` or `Hold` path group, path details have a specific `pin
|
605 |
+
name, Time, Delay, Slew and Load` value with the clock to register, register
|
606 |
+
to register and register to output data path.
|
607 |
+
|
608 |
+
### Using Rulers
|
609 |
+
|
610 |
+
A ruler can measure the distance between any two objects in the design or
|
611 |
+
metal layer length and width to be measured, etc.
|
612 |
+
|
613 |
+
Example of how to measure the distance between VDD and VSS power grid click on:
|
614 |
+
|
615 |
+
`Tools` -> `Ruler K`
|
616 |
+
|
617 |
+
![Ruler Tool](./images/ruler_tool.png)
|
618 |
+
|
619 |
+
Distance between VDD and VSS layer is `11.970`
|
620 |
+
|
621 |
+
### DRC Viewer
|
622 |
+
|
623 |
+
You can use the GUI to trace DRC violations and fix them.
|
624 |
+
|
625 |
+
View DRC violations post routing:
|
626 |
+
|
627 |
+
```shell
|
628 |
+
less ./reports/sky130hd/ibex/base/5_route_drc.rpt
|
629 |
+
```
|
630 |
+
|
631 |
+
Any DRC violations are logged in the `5_route_drc.rpt` file, which is
|
632 |
+
empty otherwise.
|
633 |
+
|
634 |
+
From OpenROAD GUI, Enable the menu options `Windows` -> `DRC Viewer`. A
|
635 |
+
`DRC viewer` window is added on the right side (RHS) of the GUI. From
|
636 |
+
`DRC Viewer` -> `Load` navigate to `5_route_drc.rpt`
|
637 |
+
|
638 |
+
![DRC Report Load](./images/drc_report_load.webp)
|
639 |
+
|
640 |
+
By selecting DRC violation details, designers can analyze and fix them. Here
|
641 |
+
user will learn how a DRC violation can be traced with the `gcd` design. Refer
|
642 |
+
to the following OpenROAD test case for more details.
|
643 |
+
|
644 |
+
```shell
|
645 |
+
cd ./flow/tutorials/scripts/drt/
|
646 |
+
openroad -gui
|
647 |
+
```
|
648 |
+
|
649 |
+
In the `Tcl Commands` section of GUI:
|
650 |
+
|
651 |
+
```tcl
|
652 |
+
source drc_issue.tcl
|
653 |
+
```
|
654 |
+
|
655 |
+
Post detail routing in the log, you can find the number of violations left
|
656 |
+
in the design:
|
657 |
+
|
658 |
+
```
|
659 |
+
[INFO DRT-0199] Number of violations = 7.
|
660 |
+
```
|
661 |
+
|
662 |
+
Based on `DRC Viewer` steps load `results/5_route_drc.rpt`. GUI as
|
663 |
+
follows
|
664 |
+
|
665 |
+
![gcd DRC issue load](./images/gcd_drc_issue.webp)
|
666 |
+
|
667 |
+
`X mark` in the design highlights DRC violations.
|
668 |
+
|
669 |
+
From `DRC Viewer` on RHS `expand` -> `Short`
|
670 |
+
|
671 |
+
This shows the number of `violations` in the design. Zoom the design
|
672 |
+
for a clean view of the violation:
|
673 |
+
|
674 |
+
![View DRC Violation](./images/view_violation.webp)
|
675 |
+
|
676 |
+
`output53` has overlaps and this causes the `short violation`.
|
677 |
+
|
678 |
+
Open the input DEF file `drc_cts.def` to check the source of the
|
679 |
+
overlap.
|
680 |
+
|
681 |
+
Note the snippet of DEF file where `output51` and `output53` have
|
682 |
+
the same placed coordinates and hence cause the placement violation.
|
683 |
+
|
684 |
+
```
|
685 |
+
- output51 sky130_fd_sc_hd__clkbuf_1 + PLACED ( 267260 136000 ) N ;
|
686 |
+
- output53 sky130_fd_sc_hd__clkbuf_1 + PLACED ( 267260 136000 ) N ;
|
687 |
+
```
|
688 |
+
|
689 |
+
Use the test case provided in `4_cts.def` with the changes applied for
|
690 |
+
updated coordinates as follows:
|
691 |
+
|
692 |
+
```
|
693 |
+
- output51 sky130_fd_sc_hd__clkbuf_1 + PLACED ( 267260 136000 ) N ;
|
694 |
+
- output53 sky130_fd_sc_hd__clkbuf_1 + PLACED ( 124660 266560 ) N ;
|
695 |
+
```
|
696 |
+
|
697 |
+
Close the current GUI and re-load the GUI with the updated DEF to see
|
698 |
+
fixed DRC violation in the design:
|
699 |
+
|
700 |
+
```shell
|
701 |
+
openroad -gui
|
702 |
+
source drc_fix.tcl
|
703 |
+
```
|
704 |
+
|
705 |
+
In the post detail routing log, the user can find the number of violations
|
706 |
+
left in the design:
|
707 |
+
|
708 |
+
```
|
709 |
+
[INFO DRT-0199] Number of violations = 0.
|
710 |
+
```
|
711 |
+
|
712 |
+
Routing completed with 0 violations.
|
713 |
+
|
714 |
+
### Tcl Command Interface
|
715 |
+
|
716 |
+
Execute OpenROAD-flow-scripts Tcl commands from the GUI. Type `help`
|
717 |
+
to view Tcl Commands available. In OpenROAD GUI, at the bottom,
|
718 |
+
`TCL commands` executable space is available to run the commands.
|
719 |
+
For example
|
720 |
+
|
721 |
+
View `design area`:
|
722 |
+
|
723 |
+
```tcl
|
724 |
+
report_design_area
|
725 |
+
```
|
726 |
+
|
727 |
+
Try the below timing report commands to view timing results interactively:
|
728 |
+
|
729 |
+
```tcl
|
730 |
+
report_wns
|
731 |
+
report_tns
|
732 |
+
report_worst_slack
|
733 |
+
```
|
734 |
+
|
735 |
+
### Customizing The GUI
|
736 |
+
|
737 |
+
Customize the GUI by creating your own widgets such as menu bars,
|
738 |
+
toolbar buttons, dialog boxes, etc.
|
739 |
+
|
740 |
+
Refer to the [GUI](https://openroad.readthedocs.io/en/latest/main/README.html#gui).
|
741 |
+
|
742 |
+
Create `Load_LEF` toolbar button in GUI to automatically load
|
743 |
+
specified `.lef` files.
|
744 |
+
|
745 |
+
```shell
|
746 |
+
openroad -gui
|
747 |
+
```
|
748 |
+
|
749 |
+
![Default GUI](./images/default_gui.webp)
|
750 |
+
|
751 |
+
To view `load_lef.tcl`, run the command:
|
752 |
+
|
753 |
+
```shell
|
754 |
+
less ./flow/tutorials/scripts/gui/load_lef.tcl
|
755 |
+
```
|
756 |
+
|
757 |
+
```tcl
|
758 |
+
proc load_lef_sky130 {} {
|
759 |
+
set FLOW_PATH [exec pwd]
|
760 |
+
read_lef $FLOW_PATH/../../../platforms/sky130hd/lef/sky130_fd_sc_hd.tlef
|
761 |
+
read_lef $FLOW_PATH/../../../platforms/sky130hd/lef/sky130_fd_sc_hd_merged.lef
|
762 |
+
}
|
763 |
+
create_toolbar_button -name "Load_LEF" -text "Load_LEF" -script {load_lef_sky130} -echo
|
764 |
+
```
|
765 |
+
|
766 |
+
From OpenROAD GUI `Tcl commands`:
|
767 |
+
|
768 |
+
```tcl
|
769 |
+
cd ./flow/tutorials/scripts/gui/
|
770 |
+
source load_lef.tcl
|
771 |
+
```
|
772 |
+
|
773 |
+
`Load_LEF` toolbar button added as follows:
|
774 |
+
|
775 |
+
![Load LEF toolbar button](./images/Load_LEF_button.webp)
|
776 |
+
|
777 |
+
From Toolbar menus, Click on `Load_LEF.` This loads the specified `sky130`
|
778 |
+
technology `.tlef` and `merged.lef` file in the current OpenROAD GUI
|
779 |
+
as follows:
|
780 |
+
|
781 |
+
![sky130 LEF file load](./images/sky130_lef_load.webp)
|
782 |
+
|
783 |
+
## Understanding and Analyzing OpenROAD Flow Stages and Results
|
784 |
+
|
785 |
+
The OpenROAD flow is fully automated and yet the user can usefully intervene
|
786 |
+
to explore, analyze and optimize your design flow for good PPA.
|
787 |
+
|
788 |
+
In this section, you will learn specific details of flow stages and
|
789 |
+
learn to explore various design configurations and optimizations to
|
790 |
+
target specific design goals, i.e., PPA (area, timing, power).
|
791 |
+
|
792 |
+
### Synthesis Explorations
|
793 |
+
|
794 |
+
#### Area And Timing Optimization
|
795 |
+
|
796 |
+
Explore optimization options using synthesis options: `ABC_AREA` and `ABC_SPEED`.
|
797 |
+
|
798 |
+
Set `ABC_AREA=1` for area optimization and `ABC_SPEED=1` for timing optimization.
|
799 |
+
Update design `config.mk` for each case and re-run the flow to view impact.
|
800 |
+
|
801 |
+
To view `ibex` design [config.mk](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/flow/designs/sky130hd/ibex/config.mk).
|
802 |
+
|
803 |
+
```
|
804 |
+
#Synthesis strategies
|
805 |
+
export ABC_AREA = 1
|
806 |
+
```
|
807 |
+
|
808 |
+
Run `make` command from `flow` directory as follows:
|
809 |
+
|
810 |
+
```shell
|
811 |
+
make DESIGN_CONFIG=./designs/sky130hd/gcd/config.mk
|
812 |
+
```
|
813 |
+
|
814 |
+
The `gcd` design synthesis results for area and speed optimizations are shown below:
|
815 |
+
|
816 |
+
| Synthesis Statistics | ABC_SPEED | ABC_AREA |
|
817 |
+
|-----------------------|--------------------------------------|--------------------------------------|
|
818 |
+
| `Number of wires` | 224 | 224 |
|
819 |
+
| `Number of wire bits` | 270 | 270 |
|
820 |
+
| `Number of cells` | 234 | 234 |
|
821 |
+
| `Chip area` | 2083.248000 | 2083.248000 |
|
822 |
+
| `Final Design Area` | Design area 4295 u^2 6% utilization. | Design area 4074 u^2 6% utilization. |
|
823 |
+
|
824 |
+
Note: Results for area optimization should be ideally checked after
|
825 |
+
floorplanning to verify the final impact. First, relax the `.sdc` constraint
|
826 |
+
and re-run to see area impact. Otherwise, the repair design command will
|
827 |
+
increase the area to meet timing regardless of the netlist produced earlier.
|
828 |
+
|
829 |
+
### Floorplanning
|
830 |
+
|
831 |
+
This section describes OpenROAD-flow-scripts floorplanning and
|
832 |
+
placement functions using the GUI.
|
833 |
+
|
834 |
+
#### Floorplan Initialization Based On Core And Die Area
|
835 |
+
|
836 |
+
Refer to the following OpenROAD built-in examples
|
837 |
+
[here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/ifp/test/init_floorplan1.tcl).
|
838 |
+
|
839 |
+
Run the following commands in the terminal in OpenROAD tool root directory to build and view the created
|
840 |
+
floorplan.
|
841 |
+
|
842 |
+
```shell
|
843 |
+
cd ../tools/OpenROAD/src/ifp/test/
|
844 |
+
openroad -gui
|
845 |
+
```
|
846 |
+
|
847 |
+
In `Tcl Commands` section GUI:
|
848 |
+
|
849 |
+
```tcl
|
850 |
+
source init_floorplan1.tcl
|
851 |
+
```
|
852 |
+
|
853 |
+
View the resulting die area "0 0 1000 1000" and core area "100 100 900 900"
|
854 |
+
in microns shown below:
|
855 |
+
|
856 |
+
![Absolute Floorplan](./images/absolute_die.webp)
|
857 |
+
|
858 |
+
#### Floorplan Based On Core Utilization
|
859 |
+
|
860 |
+
Refer to the following OpenROAD built-in examples
|
861 |
+
[here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/ifp/test/init_floorplan2.tcl).
|
862 |
+
|
863 |
+
Run the following commands in the terminal in OpenROAD tool root directory to view how the floorplan
|
864 |
+
initialized:
|
865 |
+
|
866 |
+
```shell
|
867 |
+
cd ../tools/OpenROAD/src/ifp/test/
|
868 |
+
openroad -gui
|
869 |
+
```
|
870 |
+
|
871 |
+
In the `Tcl Commands` section of the GUI:
|
872 |
+
|
873 |
+
```tcl
|
874 |
+
source init_floorplan2.tcl
|
875 |
+
```
|
876 |
+
|
877 |
+
View the resulting core utilization of 30 created following floorplan:
|
878 |
+
|
879 |
+
![Relative Floorplan](./images/core_util.webp)
|
880 |
+
|
881 |
+
### IO Pin Placement
|
882 |
+
|
883 |
+
Place pins on the boundary of the die on the track grid to minimize net
|
884 |
+
wirelengths. Pin placement also creates a metal shape for each pin using
|
885 |
+
min-area rules.
|
886 |
+
|
887 |
+
For designs with unplaced cells, the net wirelength is computed considering
|
888 |
+
the center of the die area as the unplaced cells position.
|
889 |
+
|
890 |
+
Find pin placement document [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/ppl/README.md).
|
891 |
+
|
892 |
+
Refer to the built-in examples [here](https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/ppl/test).
|
893 |
+
|
894 |
+
Launch openroad GUI by running the following command(s) in the terminal in OpenROAD tool root directory:
|
895 |
+
|
896 |
+
```shell
|
897 |
+
cd ../tools/OpenROAD/src/ppl/test/
|
898 |
+
openroad -gui
|
899 |
+
```
|
900 |
+
|
901 |
+
Run [place_pin4.tcl](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/ppl/test/place_pin4.tcl) script to view
|
902 |
+
pin placement.
|
903 |
+
|
904 |
+
From the GUI `Tcl commands` section:
|
905 |
+
|
906 |
+
```tcl
|
907 |
+
source place_pin4.tcl
|
908 |
+
```
|
909 |
+
|
910 |
+
View the resulting pin placement in GUI:
|
911 |
+
|
912 |
+
![place_pin](./images/place_pin.webp)
|
913 |
+
|
914 |
+
In OpenROAD GUI to enlarge `clk` pin placement, hold mouse right button
|
915 |
+
as follows and draw sqaure box in specific location:
|
916 |
+
|
917 |
+
![pin_zoom](./images/pin_zoom_RC.webp)
|
918 |
+
|
919 |
+
Now `clk` pin zoom to clear view as follows:
|
920 |
+
|
921 |
+
![pin_zoomed](./images/pin_zoomed.webp)
|
922 |
+
|
923 |
+
|
924 |
+
### Chip Level IO Pad Placement
|
925 |
+
|
926 |
+
In this section, you will generate an I/O pad ring for the `coyote` design
|
927 |
+
using a Tcl script.
|
928 |
+
|
929 |
+
ICeWall is a utility to place IO cells around the periphery of a design,
|
930 |
+
and associate the IO cells with those present in the netlist of the
|
931 |
+
design.
|
932 |
+
|
933 |
+
For I/O pad placement using ICeWall refer to the readme file
|
934 |
+
[here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/pad/README.md).
|
935 |
+
|
936 |
+
Refer to the built-in examples [here](https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/pad/test).
|
937 |
+
|
938 |
+
Launch openroad GUI by running the following command(s) in the terminal in OpenROAD tool root directory:
|
939 |
+
|
940 |
+
```shell
|
941 |
+
cd ../tools/OpenROAD/src/pad/test/
|
942 |
+
openroad -gui
|
943 |
+
```
|
944 |
+
|
945 |
+
Run [skywater130_coyote_tc.tcl](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/pad/test/skywater130_coyote_tc.tcl) script
|
946 |
+
to view IO pad placement.
|
947 |
+
|
948 |
+
From the GUI `Tcl commands` section:
|
949 |
+
|
950 |
+
```tcl
|
951 |
+
source skywater130_coyote_tc.tcl
|
952 |
+
```
|
953 |
+
|
954 |
+
View the resulting IO pad ring in GUI:
|
955 |
+
|
956 |
+
![coyote pad ring](./images/coyote_pad_ring.webp)
|
957 |
+
|
958 |
+
### Power Planning And Analysis
|
959 |
+
|
960 |
+
In this section, you will use the design `gcd` to create a
|
961 |
+
power grid and run power analysis.
|
962 |
+
|
963 |
+
Pdngen is used for power planning. Find the document [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/pdn/README.md).
|
964 |
+
|
965 |
+
Refer to the built-in examples [here](https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/pdn/test).
|
966 |
+
|
967 |
+
Launch openroad GUI by running the following command(s) in the terminal in OpenROAD tool root directory:
|
968 |
+
|
969 |
+
```shell
|
970 |
+
cd ../tools/OpenROAD/src/pdn/test
|
971 |
+
openroad -gui
|
972 |
+
```
|
973 |
+
|
974 |
+
Run [core_grid_snap.tcl](.(https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/pdn/test/core_grid_snap.tcl)
|
975 |
+
to generate power grid for `gcd` design.
|
976 |
+
|
977 |
+
```tcl
|
978 |
+
source core_grid_snap.tcl
|
979 |
+
```
|
980 |
+
View the resulting power plan for `gcd` design:
|
981 |
+
|
982 |
+
![gcd PDN GUI](./images/gcd_pdn_gui.webp)
|
983 |
+
|
984 |
+
#### IR Drop Analysis
|
985 |
+
IR drop is the voltage drop in the metal wires constituting the power
|
986 |
+
grid before it reaches the power pins of the standard cells. It becomes
|
987 |
+
very important to limit the IR drop as it affects the speed of the cells
|
988 |
+
and overall performance of the chip.
|
989 |
+
|
990 |
+
PDNSim is an open-source static IR analyzer.
|
991 |
+
|
992 |
+
Features:
|
993 |
+
|
994 |
+
- Report worst IR drop.
|
995 |
+
- Report worst current density over all nodes and wire segments in
|
996 |
+
the power distribution network, given a placed and PDN-synthesized design.
|
997 |
+
- Check for floating PDN stripes on the power and ground nets.
|
998 |
+
- Spice netlist writer for power distribution network wire segments.
|
999 |
+
|
1000 |
+
Refer to the built-in examples [here](https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/psm/test).
|
1001 |
+
|
1002 |
+
Launch openroad by running the following command(s) in the terminal in OpenROAD tool root directory:
|
1003 |
+
|
1004 |
+
```shell
|
1005 |
+
cd ../tools/OpenROAD/src/psm/test
|
1006 |
+
openroad
|
1007 |
+
```
|
1008 |
+
|
1009 |
+
Run [gcd_test_vdd.tcl](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/psm/test/gcd_test_vdd.tcl)
|
1010 |
+
to generate IR drop report for `gcd` design.
|
1011 |
+
|
1012 |
+
```tcl
|
1013 |
+
source gcd_test_vdd.tcl
|
1014 |
+
```
|
1015 |
+
|
1016 |
+
Find the IR drop report at the end of the log as follows:
|
1017 |
+
```
|
1018 |
+
########## IR report #################
|
1019 |
+
Worstcase voltage: 1.10e+00 V
|
1020 |
+
Average IR drop : 1.68e-04 V
|
1021 |
+
Worstcase IR drop: 2.98e-04 V
|
1022 |
+
######################################
|
1023 |
+
```
|
1024 |
+
|
1025 |
+
### Tapcell insertion
|
1026 |
+
|
1027 |
+
Tap cells are non-functional cells that can have a well tie, substrate
|
1028 |
+
tie or both. They are typically used when most or all of the standard
|
1029 |
+
cells in the library contain no substrate or well taps. Tap cells help
|
1030 |
+
tie the VDD and GND levels and thereby prevent drift and latch-up.
|
1031 |
+
|
1032 |
+
The end cap cell or boundary cell is placed at both the ends of each
|
1033 |
+
placement row to terminate the row. They protect the standard cell
|
1034 |
+
gate at the boundary from damage during manufacturing.
|
1035 |
+
|
1036 |
+
Tap cells are placed after the macro placement and power rail creation.
|
1037 |
+
This stage is called the pre-placement stage. Tap cells are placed in a
|
1038 |
+
regular interval in each row of placement. The maximum distance between
|
1039 |
+
the tap cells must be as per the DRC rule of that particular technology library.
|
1040 |
+
|
1041 |
+
The figures below show two examples of tapcell insertion. When only the
|
1042 |
+
`-tapcell_master` and `-endcap_master` masters are given, the tapcell placement
|
1043 |
+
is similar to Figure 1. When the remaining masters are give, the tapcell
|
1044 |
+
placement is similar to Figure 2.
|
1045 |
+
|
1046 |
+
Refer to the GUI figures to highlight well tap and end cap cells. The image
|
1047 |
+
does not differentiate and just shows a bunch of rectangles.
|
1048 |
+
|
1049 |
+
| <img src="./images/tapcell_example1.svg" width=450px> | <img src="./images/tapcell_example2.svg" width=450px> |
|
1050 |
+
|:--:|:--:|
|
1051 |
+
| Figure 1: Tapcell insertion representation | Figure 2: Tapcell insertion around macro representation |
|
1052 |
+
|
1053 |
+
Refer to the following built-in example [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/tap/test/gcd_nangate45.tcl)
|
1054 |
+
to learn about Tap/endcap cell insertion.
|
1055 |
+
|
1056 |
+
To view this in OpenROAD GUI by running the following command(s) in the terminal in OpenROAD tool root directory:
|
1057 |
+
|
1058 |
+
```shell
|
1059 |
+
cd ../tools/OpenROAD/src/tap/test/
|
1060 |
+
openroad -gui
|
1061 |
+
```
|
1062 |
+
|
1063 |
+
In the `Tcl Commands` section of GUI
|
1064 |
+
|
1065 |
+
```tcl
|
1066 |
+
source gcd_nangate45.tcl
|
1067 |
+
```
|
1068 |
+
|
1069 |
+
View the resulting tap cell insertion as follows:
|
1070 |
+
|
1071 |
+
![Tap_Cell_Insertion](./images/tapcell_insertion_view.webp)
|
1072 |
+
|
1073 |
+
### Tie Cells
|
1074 |
+
|
1075 |
+
The tie cell is a standard cell, designed specially to provide the high
|
1076 |
+
or low signal to the input (gate terminal) of any logic gate.
|
1077 |
+
Where ever netlist is having any pin connected to 0 logic or 1 logic
|
1078 |
+
(like .A(1'b0) or .IN(1'b1), a tie cell gets inserted there.
|
1079 |
+
|
1080 |
+
Refer to the following built-in example [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/ifp/test/tiecells.tcl)
|
1081 |
+
to learn about Tie cell insertion.
|
1082 |
+
|
1083 |
+
To check this in OpenROAD tool root directory:
|
1084 |
+
|
1085 |
+
```shell
|
1086 |
+
cd ../tools/OpenROAD/src/ifp/test/
|
1087 |
+
openroad
|
1088 |
+
source tiecells.tcl
|
1089 |
+
```
|
1090 |
+
|
1091 |
+
Refer the following verilog code which have tie high/low net.
|
1092 |
+
[here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/ifp/test/tiecells.v)
|
1093 |
+
```
|
1094 |
+
AND2_X1 u2 (.A1(r1q), .A2(1'b0), .ZN(u2z0));
|
1095 |
+
AND2_X1 u3 (.A1(u1z), .A2(1'b1), .ZN(u2z1));
|
1096 |
+
```
|
1097 |
+
With following `insert_tiecells` command:
|
1098 |
+
```
|
1099 |
+
insert_tiecells LOGIC0_X1/Z -prefix "TIE_ZERO_"
|
1100 |
+
insert_tiecells LOGIC1_X1/Z
|
1101 |
+
```
|
1102 |
+
During floorplan stage, those nets converted to tiecells as follows
|
1103 |
+
based on library(This is Nangate45 specific):
|
1104 |
+
```
|
1105 |
+
[INFO IFP-0030] Inserted 1 tiecells using LOGIC0_X1/Z.
|
1106 |
+
[INFO IFP-0030] Inserted 1 tiecells using LOGIC1_X1/Z.
|
1107 |
+
```
|
1108 |
+
|
1109 |
+
### Macro or Standard Cell Placement
|
1110 |
+
|
1111 |
+
#### Macro Placement
|
1112 |
+
|
1113 |
+
In this section, you will explore various placement options for macros
|
1114 |
+
and standard cells and study the impact on area and timing.
|
1115 |
+
|
1116 |
+
Refer to the following built-in example [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/gpl/test/macro01.tcl)
|
1117 |
+
to learn about macro placement.
|
1118 |
+
|
1119 |
+
Placement density impacts how widely standard cells are placed in the
|
1120 |
+
core area. To view this in OpenROAD GUI run the following command(s) in the terminal in OpenROAD tool root directory:
|
1121 |
+
|
1122 |
+
```shell
|
1123 |
+
cd ../tools/OpenROAD/src/gpl/test/
|
1124 |
+
openroad -gui
|
1125 |
+
```
|
1126 |
+
|
1127 |
+
In the `Tcl Commands` section of GUI
|
1128 |
+
|
1129 |
+
```tcl
|
1130 |
+
source macro01.tcl
|
1131 |
+
```
|
1132 |
+
|
1133 |
+
Read the resulting macro placement with a complete core view:
|
1134 |
+
|
1135 |
+
| <img src="./images/macro_place_full_view.webp" width=450px> | <img src="./images/macro_place_close_view.webp" width=450px> |
|
1136 |
+
|:--:|:--:|
|
1137 |
+
| Figure 1: With density 0.7 | Figure 2: Zoomed view of macro and std cell placement|
|
1138 |
+
|
1139 |
+
Reduce the placement density and observe the impact on placement, by
|
1140 |
+
running below command in `Tcl Commands` section of GUI:
|
1141 |
+
|
1142 |
+
```tcl
|
1143 |
+
global_placement -density 0.6
|
1144 |
+
```
|
1145 |
+
|
1146 |
+
Read the resulting macro placement with a complete core view:
|
1147 |
+
|
1148 |
+
| <img src="./images/placement_density_06_full.webp" width=450px> | <img src="./images/placement_density_06_zoomed.webp" width=450px> |
|
1149 |
+
|:--:|:--:|
|
1150 |
+
| Figure 1: With density 0.6 | Figure 2: Zoomed view of macro and std cell placement |
|
1151 |
+
|
1152 |
+
##### Macro Placement With Halo Spacing
|
1153 |
+
|
1154 |
+
Explore macro placement with halo spacing, refer to the example
|
1155 |
+
[here]((https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/mpl/test/).
|
1156 |
+
|
1157 |
+
Launch GUI by running the following command(s) in the terminal in OpenROAD tool root directory:
|
1158 |
+
```shell
|
1159 |
+
cd ../tools/OpenROAD/src/mpl/test
|
1160 |
+
openroad -gui
|
1161 |
+
```
|
1162 |
+
|
1163 |
+
In the `Tcl Commands` section of GUI:
|
1164 |
+
|
1165 |
+
```tcl
|
1166 |
+
source helpers.tcl
|
1167 |
+
source level3.tcl
|
1168 |
+
global_placement
|
1169 |
+
```
|
1170 |
+
|
1171 |
+
DEF file without halo spacing
|
1172 |
+
|
1173 |
+
![gcd without halo spacing](./images/without_halo.webp)
|
1174 |
+
|
1175 |
+
Now increase the halo width for better routing resources.
|
1176 |
+
|
1177 |
+
In the `Tcl Commands` section of GUI:
|
1178 |
+
|
1179 |
+
```tcl
|
1180 |
+
macro_placement -halo {0.5 0.5}
|
1181 |
+
```
|
1182 |
+
|
1183 |
+
Overlapping macros placed `0.5` micron H/V halo around macros.
|
1184 |
+
|
1185 |
+
![gcd with halo spacing](./images/with_halo.webp)
|
1186 |
+
|
1187 |
+
#### Defining Placement Density
|
1188 |
+
|
1189 |
+
To learn on placement density strategies for `ibex` design, go to
|
1190 |
+
`OpenROAD-flow-scripts/flow`. Type:
|
1191 |
+
|
1192 |
+
```shell
|
1193 |
+
openroad -gui
|
1194 |
+
```
|
1195 |
+
|
1196 |
+
Enter the following commands in the `Tcl Commands` section of GUI
|
1197 |
+
|
1198 |
+
```tcl
|
1199 |
+
read_lef ./platforms/sky130hd/lef/sky130_fd_sc_hd.tlef
|
1200 |
+
read_lef ./platforms/sky130hd/lef/sky130_fd_sc_hd_merged.lef
|
1201 |
+
read_def ./results/sky130hd/ibex/base/3_place.def
|
1202 |
+
```
|
1203 |
+
![ibex placement density 60](./images/ibex_pl_60.webp)
|
1204 |
+
|
1205 |
+
Change `CORE_UTILIZATION` and `PLACE_DENSITY` for the `ibex` design
|
1206 |
+
`config.mk` as follows.
|
1207 |
+
|
1208 |
+
View `ibex` design `config.mk`
|
1209 |
+
[here](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/flow/designs/sky130hd/ibex/config.mk).
|
1210 |
+
|
1211 |
+
```
|
1212 |
+
export CORE_UTILIZATION = 40
|
1213 |
+
export PLACE_DENSITY_LB_ADDON = 0.1
|
1214 |
+
```
|
1215 |
+
|
1216 |
+
Re-run the `ibex` design with the below command:
|
1217 |
+
|
1218 |
+
```shell
|
1219 |
+
make DESIGN_CONFIG=./designs/sky130hd/ibex/config.mk
|
1220 |
+
```
|
1221 |
+
|
1222 |
+
View the `ibex` design placement density heat map as shown below:
|
1223 |
+
|
1224 |
+
![ibex placement density 50](./images/ibex_pl_50.webp)
|
1225 |
+
|
1226 |
+
So from above, GUI understood that change in `CORE_UTILIZATION` from 20
|
1227 |
+
to 40 and placement density default 0.60 to 0.50 changes standard cell
|
1228 |
+
placement became widely spread.
|
1229 |
+
|
1230 |
+
### Timing Optimizations
|
1231 |
+
|
1232 |
+
#### Timing Optimization Using repair_design
|
1233 |
+
|
1234 |
+
The `repair_design` command inserts buffers on nets to repair `max
|
1235 |
+
slew, max capacitance and max fanout` violations and on long wires to
|
1236 |
+
reduce RC delay. It also resizes gates to normalize slews. Use
|
1237 |
+
`estimate_parasitics -placement` before `repair_design` to account
|
1238 |
+
for estimated post-placement parasitics.
|
1239 |
+
|
1240 |
+
Refer to the built-in example [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/rsz/test/repair_slew1.tcl).
|
1241 |
+
|
1242 |
+
Launch GUI by running the following command(s) in the terminal in OpenROAD tool root directory:
|
1243 |
+
|
1244 |
+
```shell
|
1245 |
+
cd ../tools/OpenROAD/src/rsz/test/
|
1246 |
+
openroad -gui
|
1247 |
+
```
|
1248 |
+
|
1249 |
+
Copy and paste the below commands in the `Tcl Commands` section of GUI.
|
1250 |
+
|
1251 |
+
```tcl
|
1252 |
+
source "helpers.tcl"
|
1253 |
+
source "hi_fanout.tcl"
|
1254 |
+
read_liberty Nangate45/Nangate45_typ.lib
|
1255 |
+
read_lef Nangate45/Nangate45.lef
|
1256 |
+
set def_file [make_result_file "repair_slew1.def"]
|
1257 |
+
write_hi_fanout_def $def_file 30
|
1258 |
+
read_def $def_file
|
1259 |
+
|
1260 |
+
create_clock -period 1 clk1
|
1261 |
+
set_wire_rc -layer metal3
|
1262 |
+
|
1263 |
+
estimate_parasitics -placement
|
1264 |
+
set_max_transition .05 [current_design]
|
1265 |
+
|
1266 |
+
puts "Found [sta::max_slew_violation_count] violations"
|
1267 |
+
```
|
1268 |
+
|
1269 |
+
The number of violations log as:
|
1270 |
+
|
1271 |
+
```
|
1272 |
+
Found 31 violations
|
1273 |
+
```
|
1274 |
+
|
1275 |
+
These violations were fixed by:
|
1276 |
+
|
1277 |
+
```tcl
|
1278 |
+
repair_design
|
1279 |
+
```
|
1280 |
+
|
1281 |
+
The log is as follows:
|
1282 |
+
|
1283 |
+
```
|
1284 |
+
[INFO RSZ-0058] Using max wire length 853um.
|
1285 |
+
[INFO RSZ-0039] Resized 1 instance.
|
1286 |
+
```
|
1287 |
+
|
1288 |
+
To view violation counts again:
|
1289 |
+
|
1290 |
+
```tcl
|
1291 |
+
puts "Found [sta::max_slew_violation_count] violations"
|
1292 |
+
```
|
1293 |
+
|
1294 |
+
The log follows:
|
1295 |
+
|
1296 |
+
```
|
1297 |
+
Found 0 violations
|
1298 |
+
```
|
1299 |
+
|
1300 |
+
`repair_design` fixed all 31 violations.
|
1301 |
+
|
1302 |
+
#### Timing Optimization Using repair_timing
|
1303 |
+
|
1304 |
+
The `repair_timing` command repairs setup and hold violations. It was
|
1305 |
+
run after clock tree synthesis with propagated clocks.
|
1306 |
+
|
1307 |
+
While repairing hold violations, buffers are not inserted since that may
|
1308 |
+
cause setup violations unless '-allow_setup_violations' is specified.
|
1309 |
+
Use `-slack_margin` to add additional slack margin.
|
1310 |
+
|
1311 |
+
#### Timing Optimization Based On Multiple Corners
|
1312 |
+
|
1313 |
+
OpenROAD supports multiple corner analysis to calculate worst-case setup
|
1314 |
+
and hold violations.
|
1315 |
+
|
1316 |
+
Setup time optimization is based on the slow corner or the best case when
|
1317 |
+
the launch clock arrives later than the data clock.
|
1318 |
+
Hold time optimization is based on the fast corner or the best case when
|
1319 |
+
the launch clock arrives earlier than the capture clock.
|
1320 |
+
|
1321 |
+
Refer to the following `gcd` design on `repair_timing` with fast and slow
|
1322 |
+
corners.
|
1323 |
+
|
1324 |
+
Refer to the built-in example [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/test/gcd_sky130hd_fast_slow.tcl).
|
1325 |
+
|
1326 |
+
Run the following commands in the terminal:
|
1327 |
+
```shell
|
1328 |
+
cd ../../test/
|
1329 |
+
openroad
|
1330 |
+
source gcd_sky130hd_fast_slow.tcl
|
1331 |
+
```
|
1332 |
+
|
1333 |
+
The resulting `worst slack`, `TNS`:
|
1334 |
+
|
1335 |
+
```
|
1336 |
+
report_worst_slack -min -digits 3
|
1337 |
+
worst slack 0.321
|
1338 |
+
report_worst_slack -max -digits 3
|
1339 |
+
worst slack -16.005
|
1340 |
+
report_tns -digits 3
|
1341 |
+
tns -529.496
|
1342 |
+
```
|
1343 |
+
|
1344 |
+
#### Fixing Setup Violations
|
1345 |
+
|
1346 |
+
To fix setup timing path violations, use `repair_timing -setup.`
|
1347 |
+
|
1348 |
+
Refer to the following built-in example to learn more about fixing setup
|
1349 |
+
timing violations.
|
1350 |
+
|
1351 |
+
Refer to the built-in example [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/rsz/test/repair_setup4.tcl).
|
1352 |
+
|
1353 |
+
Launch OpenROAD in an interactive mode by running the following command(s) in the terminal in OpenROAD tool root directory:
|
1354 |
+
|
1355 |
+
```shell
|
1356 |
+
cd ../tools/OpenROAD/src/rsz/test/
|
1357 |
+
openroad
|
1358 |
+
```
|
1359 |
+
|
1360 |
+
Copy and paste the following Tcl commands.
|
1361 |
+
|
1362 |
+
```tcl
|
1363 |
+
define_corners fast slow
|
1364 |
+
read_liberty -corner slow Nangate45/Nangate45_slow.lib
|
1365 |
+
read_liberty -corner fast Nangate45/Nangate45_fast.lib
|
1366 |
+
read_lef Nangate45/Nangate45.lef
|
1367 |
+
read_def repair_setup1.def
|
1368 |
+
create_clock -period 0.3 clk
|
1369 |
+
set_wire_rc -layer metal3
|
1370 |
+
estimate_parasitics -placement
|
1371 |
+
report_checks -fields input -digits 3
|
1372 |
+
```
|
1373 |
+
|
1374 |
+
View the generated timing report with the slack violation.
|
1375 |
+
|
1376 |
+
```
|
1377 |
+
Startpoint: r1 (rising edge-triggered flip-flop clocked by clk)
|
1378 |
+
Endpoint: r2 (rising edge-triggered flip-flop clocked by clk)
|
1379 |
+
Path Group: clk
|
1380 |
+
Path Type: max
|
1381 |
+
Corner: slow
|
1382 |
+
|
1383 |
+
Delay Time Description
|
1384 |
+
-----------------------------------------------------------
|
1385 |
+
0.000 0.000 clock clk (rise edge)
|
1386 |
+
0.000 0.000 clock network delay (ideal)
|
1387 |
+
0.000 0.000 ^ r1/CK (DFF_X1)
|
1388 |
+
0.835 0.835 ^ r1/Q (DFF_X1)
|
1389 |
+
0.001 0.836 ^ u1/A (BUF_X1)
|
1390 |
+
0.196 1.032 ^ u1/Z (BUF_X1)
|
1391 |
+
0.001 1.033 ^ u2/A (BUF_X1)
|
1392 |
+
0.121 1.154 ^ u2/Z (BUF_X1)
|
1393 |
+
0.001 1.155 ^ u3/A (BUF_X1)
|
1394 |
+
0.118 1.273 ^ u3/Z (BUF_X1)
|
1395 |
+
0.001 1.275 ^ u4/A (BUF_X1)
|
1396 |
+
0.118 1.393 ^ u4/Z (BUF_X1)
|
1397 |
+
0.001 1.394 ^ u5/A (BUF_X1)
|
1398 |
+
0.367 1.761 ^ u5/Z (BUF_X1)
|
1399 |
+
0.048 1.809 ^ r2/D (DFF_X1)
|
1400 |
+
1.809 data arrival time
|
1401 |
+
|
1402 |
+
0.300 0.300 clock clk (rise edge)
|
1403 |
+
0.000 0.300 clock network delay (ideal)
|
1404 |
+
0.000 0.300 clock reconvergence pessimism
|
1405 |
+
0.300 ^ r2/CK (DFF_X1)
|
1406 |
+
-0.155 0.145 library setup time
|
1407 |
+
0.145 data required time
|
1408 |
+
-----------------------------------------------------------
|
1409 |
+
0.145 data required time
|
1410 |
+
-1.809 data arrival time
|
1411 |
+
-----------------------------------------------------------
|
1412 |
+
-1.664 slack (VIOLATED)
|
1413 |
+
|
1414 |
+
```
|
1415 |
+
|
1416 |
+
Fix setup violation using:
|
1417 |
+
|
1418 |
+
```tcl
|
1419 |
+
repair_timing -setup
|
1420 |
+
```
|
1421 |
+
|
1422 |
+
The log is as follows:
|
1423 |
+
|
1424 |
+
```
|
1425 |
+
[INFO RSZ-0040] Inserted 4 buffers.
|
1426 |
+
[INFO RSZ-0041] Resized 16 instances.
|
1427 |
+
[WARNING RSZ-0062] Unable to repair all setup violations.
|
1428 |
+
```
|
1429 |
+
|
1430 |
+
Reduce the clock frequency by increasing the clock period to `0.9` and re-run
|
1431 |
+
`repair_timing` to fix the setup violation warnings. Such timing violations
|
1432 |
+
are automatically fixed by the `resizer` `post CTS` and `global routing.`
|
1433 |
+
|
1434 |
+
```yvl
|
1435 |
+
create_clock -period 0.9 clk
|
1436 |
+
repair_timing -setup
|
1437 |
+
```
|
1438 |
+
|
1439 |
+
To view timing logs post-repair timing, type:
|
1440 |
+
|
1441 |
+
```tcl
|
1442 |
+
report_checks -fields input -digits 3
|
1443 |
+
```
|
1444 |
+
|
1445 |
+
The log is as follows:
|
1446 |
+
|
1447 |
+
```
|
1448 |
+
Startpoint: r1 (rising edge-triggered flip-flop clocked by clk)
|
1449 |
+
Endpoint: r2 (rising edge-triggered flip-flop clocked by clk)
|
1450 |
+
Path Group: clk
|
1451 |
+
Path Type: max
|
1452 |
+
Corner: slow
|
1453 |
+
|
1454 |
+
Delay Time Description
|
1455 |
+
-----------------------------------------------------------
|
1456 |
+
0.000 0.000 clock clk (rise edge)
|
1457 |
+
0.000 0.000 clock network delay (ideal)
|
1458 |
+
0.000 0.000 ^ r1/CK (DFF_X1)
|
1459 |
+
0.264 0.264 v r1/Q (DFF_X1)
|
1460 |
+
0.002 0.266 v u1/A (BUF_X4)
|
1461 |
+
0.090 0.356 v u1/Z (BUF_X4)
|
1462 |
+
0.003 0.359 v u2/A (BUF_X8)
|
1463 |
+
0.076 0.435 v u2/Z (BUF_X8)
|
1464 |
+
0.003 0.438 v u3/A (BUF_X8)
|
1465 |
+
0.074 0.512 v u3/Z (BUF_X8)
|
1466 |
+
0.003 0.515 v u4/A (BUF_X8)
|
1467 |
+
0.077 0.592 v u4/Z (BUF_X8)
|
1468 |
+
0.005 0.597 v u5/A (BUF_X16)
|
1469 |
+
0.077 0.674 v u5/Z (BUF_X16)
|
1470 |
+
0.036 0.710 v r2/D (DFF_X1)
|
1471 |
+
0.710 data arrival time
|
1472 |
+
|
1473 |
+
0.900 0.900 clock clk (rise edge)
|
1474 |
+
0.000 0.900 clock network delay (ideal)
|
1475 |
+
0.000 0.900 clock reconvergence pessimism
|
1476 |
+
0.900 ^ r2/CK (DFF_X1)
|
1477 |
+
-0.172 0.728 library setup time
|
1478 |
+
0.728 data required time
|
1479 |
+
-----------------------------------------------------------
|
1480 |
+
0.728 data required time
|
1481 |
+
-0.710 data arrival time
|
1482 |
+
-----------------------------------------------------------
|
1483 |
+
0.019 slack (MET)
|
1484 |
+
```
|
1485 |
+
|
1486 |
+
#### Fixing Hold Violations
|
1487 |
+
|
1488 |
+
To fix hold violation for the design, command to use `repair_timing
|
1489 |
+
-hold`
|
1490 |
+
|
1491 |
+
Refer to the example [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/rsz/test/repair_hold10.tcl)
|
1492 |
+
to learn more about fixing hold violations.
|
1493 |
+
|
1494 |
+
Check hold violation post-global routing using the following Tcl
|
1495 |
+
commands. Run below steps in terminal in OpenROAD tool root directory:
|
1496 |
+
|
1497 |
+
```shell
|
1498 |
+
cd ../tools/OpenROAD/src/rsz/test/
|
1499 |
+
openroad -gui
|
1500 |
+
```
|
1501 |
+
|
1502 |
+
Copy and paste the below commands in the `Tcl Commands` section of GUI.
|
1503 |
+
|
1504 |
+
```tcl
|
1505 |
+
source helpers.tcl
|
1506 |
+
read_liberty sky130hd/sky130hd_tt.lib
|
1507 |
+
read_lef sky130hd/sky130hd.tlef
|
1508 |
+
read_lef sky130hd/sky130hd_std_cell.lef
|
1509 |
+
read_def repair_hold10.def
|
1510 |
+
create_clock -period 2 clk
|
1511 |
+
set_propagated_clock clk
|
1512 |
+
set_wire_rc -resistance 0.0001 -capacitance 0.00001
|
1513 |
+
set_routing_layers -signal met1-met5
|
1514 |
+
global_route
|
1515 |
+
estimate_parasitics -global_routing
|
1516 |
+
report_worst_slack -min
|
1517 |
+
```
|
1518 |
+
|
1519 |
+
Read the resulting worst slack as:
|
1520 |
+
|
1521 |
+
```
|
1522 |
+
worst slack -1.95
|
1523 |
+
```
|
1524 |
+
|
1525 |
+
The above worst slack was fixed with:
|
1526 |
+
|
1527 |
+
```tcl
|
1528 |
+
repair_timing -hold
|
1529 |
+
```
|
1530 |
+
|
1531 |
+
The log is as follows:
|
1532 |
+
|
1533 |
+
```
|
1534 |
+
[INFO RSZ-0046] Found 2 endpoints with hold violations.
|
1535 |
+
[INFO RSZ-0032] Inserted 5 hold buffers.
|
1536 |
+
```
|
1537 |
+
|
1538 |
+
Re-check the slack value after repair_timing. Type:
|
1539 |
+
|
1540 |
+
```tcl
|
1541 |
+
report_worst_slack -min
|
1542 |
+
```
|
1543 |
+
|
1544 |
+
The result worst slack value is as follows:
|
1545 |
+
|
1546 |
+
```
|
1547 |
+
worst slack 0.16
|
1548 |
+
```
|
1549 |
+
|
1550 |
+
Note that the worst slack is now met and the hold violation was fixed by
|
1551 |
+
the resizer.
|
1552 |
+
|
1553 |
+
### Clock Tree Synthesis
|
1554 |
+
|
1555 |
+
To perform clock tree synthesis `clock_tree_synthesis` flow command used.
|
1556 |
+
The OpenROAD-flow-scripts automatically generates a well-balanced clock tree post-placement.
|
1557 |
+
In this section, you will learn details about the building and visualize the
|
1558 |
+
clock tree.
|
1559 |
+
|
1560 |
+
Refer to the built-in example [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/cts/test/simple_test.tcl).
|
1561 |
+
|
1562 |
+
Launch OpenROAD GUI by running the following command(s) in the terminal in OpenROAD tool root directory:
|
1563 |
+
|
1564 |
+
```shell
|
1565 |
+
cd ../tools/OpenROAD/src/cts/test/
|
1566 |
+
openroad -gui
|
1567 |
+
```
|
1568 |
+
|
1569 |
+
To build the clock tree, run the following commands in `Tcl Commands` of
|
1570 |
+
GUI:
|
1571 |
+
|
1572 |
+
```tcl
|
1573 |
+
read_lef Nangate45/Nangate45.lef
|
1574 |
+
read_liberty Nangate45/Nangate45_typ.lib
|
1575 |
+
read_def "16sinks.def"
|
1576 |
+
create_clock -period 5 clk
|
1577 |
+
set_wire_rc -clock -layer metal3
|
1578 |
+
clock_tree_synthesis -root_buf CLKBUF_X3 \
|
1579 |
+
-buf_list CLKBUF_X3 \
|
1580 |
+
-wire_unit 20
|
1581 |
+
```
|
1582 |
+
|
1583 |
+
Layout view before CTS as follows:
|
1584 |
+
|
1585 |
+
![Layout before CTS](./images/Layout_before_CTS.webp)
|
1586 |
+
|
1587 |
+
Layout view after CTS can be viewed with `Update` option.
|
1588 |
+
|
1589 |
+
![Layout after CTS](./images/Layout_after_CTS.webp)
|
1590 |
+
|
1591 |
+
Here we explore how clock tree buffers are inserted to balance the clock
|
1592 |
+
tree structure.
|
1593 |
+
|
1594 |
+
Refer to the built-in example [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/cts/test/balance_levels.tcl).
|
1595 |
+
|
1596 |
+
Generate a clock- tree that is unbalanced first, then explore the
|
1597 |
+
creation of a well-balanced clock tree.
|
1598 |
+
|
1599 |
+
Launch OpenROAD GUI by running the following command(s) in the terminal in OpenROAD tool root directory:
|
1600 |
+
|
1601 |
+
```shell
|
1602 |
+
cd ../tools/OpenROAD/src/cts/test/
|
1603 |
+
openroad -gui
|
1604 |
+
```
|
1605 |
+
|
1606 |
+
Use the following commands in the `TCL commands` section of GUI:
|
1607 |
+
|
1608 |
+
```tcl
|
1609 |
+
source "helpers.tcl"
|
1610 |
+
source "cts-helpers.tcl"
|
1611 |
+
read_liberty Nangate45/Nangate45_typ.lib
|
1612 |
+
read_lef Nangate45/Nangate45.lef
|
1613 |
+
set block [make_array 300 200000 200000 150]
|
1614 |
+
sta::db_network_defined
|
1615 |
+
create_clock -period 5 clk
|
1616 |
+
set_wire_rc -clock -layer metal5
|
1617 |
+
```
|
1618 |
+
|
1619 |
+
The clock tree structure is as follows with unbalanced mode.
|
1620 |
+
|
1621 |
+
![Unbalanced Clock tree](./images/unbalanced_clock_tree.webp)
|
1622 |
+
|
1623 |
+
Use the `clock_tree_synthesis` command to balance this clock tree structure
|
1624 |
+
with buffers. See the format as follows.
|
1625 |
+
|
1626 |
+
```tcl
|
1627 |
+
clock_tree_synthesis -root_buf CLKBUF_X3 \
|
1628 |
+
-buf_list CLKBUF_X3 \
|
1629 |
+
-wire_unit 20 \
|
1630 |
+
-post_cts_disable \
|
1631 |
+
-sink_clustering_enable \
|
1632 |
+
-distance_between_buffers 100 \
|
1633 |
+
-sink_clustering_size 10 \
|
1634 |
+
-sink_clustering_max_diameter 60 \
|
1635 |
+
-balance_levels \
|
1636 |
+
-num_static_layers 1
|
1637 |
+
```
|
1638 |
+
|
1639 |
+
To view the balanced clock tree after CTS, in GUI Toolbar, select
|
1640 |
+
|
1641 |
+
`Clock Tree Viewer` and click `Update` to view the resulting clock
|
1642 |
+
tree in GUI as follows:
|
1643 |
+
|
1644 |
+
![Balanced Clock Tree](./images/balanced_clock_tree.webp)
|
1645 |
+
|
1646 |
+
#### Reporting Clock Skews
|
1647 |
+
|
1648 |
+
The OpenROAD-flow-scripts flow automatically fixes any skew issues that could potentially
|
1649 |
+
cause hold violations downstream in the timing path.
|
1650 |
+
|
1651 |
+
```tcl
|
1652 |
+
report_clock_skew
|
1653 |
+
```
|
1654 |
+
|
1655 |
+
For the `ibex` design, refer to the following logs to view clock skew reports.
|
1656 |
+
|
1657 |
+
```shell
|
1658 |
+
less logs/sky130hd/ibex/base/4_1_cts.log
|
1659 |
+
```
|
1660 |
+
|
1661 |
+
```
|
1662 |
+
cts pre-repair report_clock_skew
|
1663 |
+
--------------------------------------------------------------------------
|
1664 |
+
Clock core_clock
|
1665 |
+
Latency CRPR Skew
|
1666 |
+
_28453_/CLK ^
|
1667 |
+
5.92
|
1668 |
+
_29312_/CLK ^
|
1669 |
+
1.41 0.00 4.51
|
1670 |
+
```
|
1671 |
+
|
1672 |
+
```
|
1673 |
+
cts post-repair report_clock_skew
|
1674 |
+
--------------------------------------------------------------------------
|
1675 |
+
Clock core_clock
|
1676 |
+
Latency CRPR Skew
|
1677 |
+
_28453_/CLK ^
|
1678 |
+
5.92
|
1679 |
+
_29312_/CLK ^
|
1680 |
+
1.41 0.00 4.51
|
1681 |
+
```
|
1682 |
+
|
1683 |
+
```
|
1684 |
+
cts final report_clock_skew
|
1685 |
+
--------------------------------------------------------------------------
|
1686 |
+
Clock core_clock
|
1687 |
+
Latency CRPR Skew
|
1688 |
+
_27810_/CLK ^
|
1689 |
+
5.97
|
1690 |
+
_29266_/CLK ^
|
1691 |
+
1.41 0.00 4.56
|
1692 |
+
```
|
1693 |
+
|
1694 |
+
#### Reporting CTS Metrics
|
1695 |
+
|
1696 |
+
Run `report_cts` command to view useful metrics such as number of clock
|
1697 |
+
roots, number of buffers inserted, number of clock subnets and number of
|
1698 |
+
sinks.
|
1699 |
+
|
1700 |
+
Refer to the built-in examples [here](https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/cts/test).
|
1701 |
+
|
1702 |
+
Run these Tcl commands in the terminal in OpenROAD tool root directory:
|
1703 |
+
|
1704 |
+
```
|
1705 |
+
cd ../tools/OpenROAD/src/cts/test/
|
1706 |
+
openroad
|
1707 |
+
source post_cts_opt.tcl
|
1708 |
+
report_cts
|
1709 |
+
```
|
1710 |
+
|
1711 |
+
CTS metrics are as follows for the current design.
|
1712 |
+
|
1713 |
+
```
|
1714 |
+
[INFO CTS-0003] Total number of Clock Roots: 1.
|
1715 |
+
[INFO CTS-0004] Total number of Buffers Inserted: 35.
|
1716 |
+
[INFO CTS-0005] Total number of Clock Subnets: 35.
|
1717 |
+
[INFO CTS-0006] Total number of Sinks: 301.
|
1718 |
+
```
|
1719 |
+
|
1720 |
+
### Adding Filler Cells
|
1721 |
+
|
1722 |
+
Filler cells fills gaps between detail-placed instances to connect the
|
1723 |
+
power and ground rails in the rows. Filler cells have no logical
|
1724 |
+
connectivity. These cells are provided continuity in the rows for VDD
|
1725 |
+
and VSS nets and it also contains substrate nwell connection to improve
|
1726 |
+
substrate biasing.
|
1727 |
+
|
1728 |
+
`filler_masters` is a list of master/macro names to use for
|
1729 |
+
filling the gaps.
|
1730 |
+
|
1731 |
+
Refer to the following built-in example [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/dpl/test/fillers1.tcl)
|
1732 |
+
to learn about filler cell insertion.
|
1733 |
+
|
1734 |
+
To view this in OpenROAD GUI run the following command(s) in the terminal in OpenROAD tool root directory:
|
1735 |
+
|
1736 |
+
```shell
|
1737 |
+
cd ../tools/OpenROAD/src/grt/test/
|
1738 |
+
openroad -gui
|
1739 |
+
```
|
1740 |
+
|
1741 |
+
In the `Tcl Commands` section of GUI,run following commands:
|
1742 |
+
|
1743 |
+
```tcl
|
1744 |
+
source "helpers.tcl"
|
1745 |
+
read_lef "Nangate45/Nangate45.lef"
|
1746 |
+
read_def "gcd.def"
|
1747 |
+
```
|
1748 |
+
|
1749 |
+
Loaded DEF view without filler insertion:
|
1750 |
+
|
1751 |
+
![Without_Fill_Cell_Insertion](./images/wo_fillcell_insertion.webp)
|
1752 |
+
|
1753 |
+
Run following commands for filler cell insertion:
|
1754 |
+
```
|
1755 |
+
set filler_master [list FILLCELL_X1 FILLCELL_X2 FILLCELL_X4 FILLCELL_X8 FILLCELL_X16]
|
1756 |
+
filler_placement $filler_master
|
1757 |
+
```
|
1758 |
+
|
1759 |
+
View the resulting fill cell insertion as follows:
|
1760 |
+
|
1761 |
+
![Fill_Cell_Insertion](./images/fillcell_insertion.webp)
|
1762 |
+
|
1763 |
+
Filler cells removed with `remove_fillers` command.
|
1764 |
+
|
1765 |
+
### Global Routing
|
1766 |
+
|
1767 |
+
The global router analyzes available routing resources and automatically
|
1768 |
+
allocates them to avoid any H/V overflow violations for optimal routing.
|
1769 |
+
It generates a congestion report for GCells showing total resources, demand,
|
1770 |
+
utilization, location and the H/V violation status. If there are no violations
|
1771 |
+
reported then the design can proceed to detail routing.
|
1772 |
+
|
1773 |
+
Refer to the built-in example [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/grt/test/gcd.tcl).
|
1774 |
+
|
1775 |
+
Launch OpenROAD GUI by running the following command(s) in the terminal in OpenROAD tool root directory:
|
1776 |
+
|
1777 |
+
```shell
|
1778 |
+
cd ../tools/OpenROAD/src/grt/test/
|
1779 |
+
openroad -gui
|
1780 |
+
```
|
1781 |
+
|
1782 |
+
To run the global routing, run the following commands in `Tcl Commands` of
|
1783 |
+
GUI:
|
1784 |
+
|
1785 |
+
```tcl
|
1786 |
+
source gcd.tcl
|
1787 |
+
```
|
1788 |
+
|
1789 |
+
Routing resource and congestion analysis done with below log:
|
1790 |
+
```
|
1791 |
+
[INFO GRT-0096] Final congestion report:
|
1792 |
+
Layer Resource Demand Usage (%) Max H / Max V / Total Overflow
|
1793 |
+
---------------------------------------------------------------------------------------
|
1794 |
+
metal1 31235 1651 5.29% 0 / 0 / 0
|
1795 |
+
metal2 24628 1652 6.71% 0 / 0 / 0
|
1796 |
+
metal3 33120 40 0.12% 0 / 0 / 0
|
1797 |
+
metal4 15698 0 0.00% 0 / 0 / 0
|
1798 |
+
metal5 15404 0 0.00% 0 / 0 / 0
|
1799 |
+
metal6 15642 0 0.00% 0 / 0 / 0
|
1800 |
+
metal7 4416 0 0.00% 0 / 0 / 0
|
1801 |
+
metal8 4512 0 0.00% 0 / 0 / 0
|
1802 |
+
metal9 2208 0 0.00% 0 / 0 / 0
|
1803 |
+
metal10 2256 0 0.00% 0 / 0 / 0
|
1804 |
+
---------------------------------------------------------------------------------------
|
1805 |
+
Total 149119 3343 2.24% 0 / 0 / 0
|
1806 |
+
|
1807 |
+
[INFO GRT-0018] Total wirelength: 10598 um
|
1808 |
+
[INFO GRT-0014] Routed nets: 563
|
1809 |
+
```
|
1810 |
+
|
1811 |
+
View the resulting global routing in GUI as follows:
|
1812 |
+
|
1813 |
+
![Global Route](./images/global_route_gcd.webp)
|
1814 |
+
|
1815 |
+
### Detail Routing
|
1816 |
+
|
1817 |
+
TritonRoute is an open-source detailed router for modern industrial designs.
|
1818 |
+
The router consists of several main building blocks, including pin access
|
1819 |
+
analysis, track assignment, initial detailed routing, search and repair, and a DRC engine.
|
1820 |
+
|
1821 |
+
Refer to the built-in example [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/drt/test/gcd_nangate45.tcl).
|
1822 |
+
|
1823 |
+
Launch OpenROAD GUI by running the following command(s) in the terminal in OpenROAD tool root directory:
|
1824 |
+
|
1825 |
+
```shell
|
1826 |
+
cd ../tools/OpenROAD/src/drt/test/
|
1827 |
+
openroad -gui
|
1828 |
+
```
|
1829 |
+
|
1830 |
+
To run the detail routing, run the following commands in `Tcl Commands` of
|
1831 |
+
GUI:
|
1832 |
+
|
1833 |
+
```tcl
|
1834 |
+
read_lef Nangate45/Nangate45_tech.lef
|
1835 |
+
read_lef Nangate45/Nangate45_stdcell.lef
|
1836 |
+
read_def gcd_nangate45_preroute.def
|
1837 |
+
read_guides gcd_nangate45.route_guide
|
1838 |
+
set_thread_count [expr [exec getconf _NPROCESSORS_ONLN] / 4]
|
1839 |
+
detailed_route -output_drc results/gcd_nangate45.output.drc.rpt \
|
1840 |
+
-output_maze results/gcd_nangate45.output.maze.log \
|
1841 |
+
-verbose 1
|
1842 |
+
write_db gcd_nangate45.odb
|
1843 |
+
```
|
1844 |
+
|
1845 |
+
For successful routing, DRT will end with 0 violations.
|
1846 |
+
|
1847 |
+
Log as follows:
|
1848 |
+
|
1849 |
+
```
|
1850 |
+
[INFO DRT-0199] Number of violations = 0.
|
1851 |
+
[INFO DRT-0267] cpu time = 00:00:00, elapsed time = 00:00:00, memory = 674.22 (MB), peak = 686.08 (MB)
|
1852 |
+
Total wire length = 5680 um.
|
1853 |
+
Total wire length on LAYER metal1 = 19 um.
|
1854 |
+
Total wire length on LAYER metal2 = 2798 um.
|
1855 |
+
Total wire length on LAYER metal3 = 2614 um.
|
1856 |
+
Total wire length on LAYER metal4 = 116 um.
|
1857 |
+
Total wire length on LAYER metal5 = 63 um.
|
1858 |
+
Total wire length on LAYER metal6 = 36 um.
|
1859 |
+
Total wire length on LAYER metal7 = 32 um.
|
1860 |
+
Total wire length on LAYER metal8 = 0 um.
|
1861 |
+
Total wire length on LAYER metal9 = 0 um.
|
1862 |
+
Total wire length on LAYER metal10 = 0 um.
|
1863 |
+
Total number of vias = 2223.
|
1864 |
+
Up-via summary (total 2223):.
|
1865 |
+
|
1866 |
+
---------------
|
1867 |
+
active 0
|
1868 |
+
metal1 1151
|
1869 |
+
metal2 1037
|
1870 |
+
metal3 22
|
1871 |
+
metal4 7
|
1872 |
+
metal5 4
|
1873 |
+
metal6 2
|
1874 |
+
metal7 0
|
1875 |
+
metal8 0
|
1876 |
+
metal9 0
|
1877 |
+
---------------
|
1878 |
+
2223
|
1879 |
+
|
1880 |
+
|
1881 |
+
[INFO DRT-0198] Complete detail routing.
|
1882 |
+
```
|
1883 |
+
|
1884 |
+
View the resulting detail routing in GUI as follows:
|
1885 |
+
|
1886 |
+
![Detail Routing](./images/sky130_gcd_route.webp)
|
1887 |
+
|
1888 |
+
### Antenna Checker
|
1889 |
+
|
1890 |
+
Antenna Violation occurs when the antenna ratio exceeds a value specified
|
1891 |
+
in a Process Design Kit (PDK). The antenna ratio is the ratio of the gate
|
1892 |
+
area to the gate oxide area. The amount of charge collection is determined
|
1893 |
+
by the area/size of the conductor (gate area).
|
1894 |
+
|
1895 |
+
This tool checks antenna violations and generates a report to indicate violated nets.
|
1896 |
+
|
1897 |
+
Refer to the built-in example [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/ant/test/ant_check.tcl).
|
1898 |
+
|
1899 |
+
Launch OpenROAD by running the following command(s) in the terminal in OpenROAD tool root directory:
|
1900 |
+
|
1901 |
+
```shell
|
1902 |
+
cd ../tools/OpenROAD/src/ant/test/
|
1903 |
+
openroad
|
1904 |
+
```
|
1905 |
+
|
1906 |
+
To extract antenna violations, run the following commands:
|
1907 |
+
|
1908 |
+
```tcl
|
1909 |
+
read_lef ant_check.lef
|
1910 |
+
read_def ant_check.def
|
1911 |
+
|
1912 |
+
check_antennas -verbose
|
1913 |
+
puts "violation count = [ant::antenna_violation_count]"
|
1914 |
+
|
1915 |
+
# check if net50 has a violation
|
1916 |
+
set net "net50"
|
1917 |
+
puts "Net $net violations: [ant::check_net_violation $net]"
|
1918 |
+
```
|
1919 |
+
|
1920 |
+
The log as follows:
|
1921 |
+
|
1922 |
+
```
|
1923 |
+
[INFO ANT-0002] Found 1 net violations.
|
1924 |
+
[INFO ANT-0001] Found 2 pin violations.
|
1925 |
+
violation count = 1
|
1926 |
+
Net net50 violations: 1
|
1927 |
+
```
|
1928 |
+
|
1929 |
+
### Metal Fill
|
1930 |
+
|
1931 |
+
Metal fill is a mandatory step at advanced nodes to ensure manufacturability
|
1932 |
+
and high yield. It involves filling the empty or white spaces near the
|
1933 |
+
design with metal polygons to ensure regular planarization of the wafer.
|
1934 |
+
|
1935 |
+
This module inserts floating metal fill shapes to meet metal density
|
1936 |
+
design rules while obeying DRC constraints. It is driven by a json
|
1937 |
+
configuration file.
|
1938 |
+
|
1939 |
+
Command used as follows:
|
1940 |
+
```tcl
|
1941 |
+
density_fill -rules <json_file> [-area <list of lx ly ux uy>]
|
1942 |
+
```
|
1943 |
+
If -area is not specified, the core area will be used.
|
1944 |
+
|
1945 |
+
To run metal fill post route, run the following:
|
1946 |
+
```shell
|
1947 |
+
cd flow/tutorials/scripts/metal_fill
|
1948 |
+
openroad -gui
|
1949 |
+
source "helpers.tcl"
|
1950 |
+
read_db ./5_route.odb
|
1951 |
+
```
|
1952 |
+
Layout before adding metal fill is as follows:
|
1953 |
+
![Detail Routing](./images/sky130_gcd_route.webp)
|
1954 |
+
|
1955 |
+
To add metal fill, run the command:
|
1956 |
+
```tcl
|
1957 |
+
density_fill -rules ../../../platforms/sky130hd/fill.json
|
1958 |
+
```
|
1959 |
+
|
1960 |
+
Layout after adding metal fill insertion is as follows:
|
1961 |
+
![Metal Fill](./images/metal_fill_view.webp)
|
1962 |
+
|
1963 |
+
Metal fill view can enabled with `Misc` and enable `Fills` check box.
|
1964 |
+
|
1965 |
+
### Parasitics Extraction
|
1966 |
+
|
1967 |
+
OpenRCX is a Parasitic Extraction (PEX, or RCX) tool that works on OpenDB design APIs.
|
1968 |
+
It extracts routed designs based on the LEF/DEF layout model.
|
1969 |
+
|
1970 |
+
OpenRCX stores resistance, coupling capacitance and ground (i.e., grounded) capacitance
|
1971 |
+
on OpenDB objects with direct pointers to the associated wire and via db
|
1972 |
+
objects. Optionally, OpenRCX can generate a `.spef` file.
|
1973 |
+
|
1974 |
+
Refer to the built-in example [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/rcx/test/45_gcd.tcl).
|
1975 |
+
|
1976 |
+
Launch OpenROAD tool by running the following command(s) in the terminal in OpenROAD tool root directory:
|
1977 |
+
|
1978 |
+
```shell
|
1979 |
+
cd ../tools/OpenROAD/src/rcx/test/
|
1980 |
+
openroad
|
1981 |
+
```
|
1982 |
+
|
1983 |
+
To run parasitics for gcd design:
|
1984 |
+
```tcl
|
1985 |
+
source 45_gcd.tcl
|
1986 |
+
```
|
1987 |
+
|
1988 |
+
The log as follows:
|
1989 |
+
```
|
1990 |
+
[INFO ODB-0222] Reading LEF file: Nangate45/Nangate45.lef
|
1991 |
+
[INFO ODB-0223] Created 22 technology layers
|
1992 |
+
[INFO ODB-0224] Created 27 technology vias
|
1993 |
+
[INFO ODB-0225] Created 135 library cells
|
1994 |
+
[INFO ODB-0226] Finished LEF file: Nangate45/Nangate45.lef
|
1995 |
+
[INFO ODB-0127] Reading DEF file: 45_gcd.def
|
1996 |
+
[INFO ODB-0128] Design: gcd
|
1997 |
+
[INFO ODB-0130] Created 54 pins.
|
1998 |
+
[INFO ODB-0131] Created 1820 components and 4618 component-terminals.
|
1999 |
+
[INFO ODB-0132] Created 2 special nets and 3640 connections.
|
2000 |
+
[INFO ODB-0133] Created 350 nets and 978 connections.
|
2001 |
+
[INFO ODB-0134] Finished DEF file: 45_gcd.def
|
2002 |
+
[INFO RCX-0431] Defined process_corner X with ext_model_index 0
|
2003 |
+
[INFO RCX-0029] Defined extraction corner X
|
2004 |
+
[INFO RCX-0008] extracting parasitics of gcd ...
|
2005 |
+
[INFO RCX-0435] Reading extraction model file 45_patterns.rules ...
|
2006 |
+
[INFO RCX-0436] RC segment generation gcd (max_merge_res 0.0) ...
|
2007 |
+
[INFO RCX-0040] Final 2656 rc segments
|
2008 |
+
[INFO RCX-0439] Coupling Cap extraction gcd ...
|
2009 |
+
[INFO RCX-0440] Coupling threshhold is 0.1000 fF, coupling capacitance less than 0.1000 fF will be grounded.
|
2010 |
+
[INFO RCX-0043] 1954 wires to be extracted
|
2011 |
+
[INFO RCX-0442] 48% completion -- 954 wires have been extracted
|
2012 |
+
[INFO RCX-0442] 100% completion -- 1954 wires have been extracted
|
2013 |
+
[INFO RCX-0045] Extract 350 nets, 2972 rsegs, 2972 caps, 2876 ccs
|
2014 |
+
[INFO RCX-0015] Finished extracting gcd.
|
2015 |
+
[INFO RCX-0016] Writing SPEF ...
|
2016 |
+
[INFO RCX-0443] 350 nets finished
|
2017 |
+
[INFO RCX-0017] Finished writing SPEF ...
|
2018 |
+
```
|
2019 |
+
|
2020 |
+
`45_gcd.spef` viewed in `results` directory.
|
2021 |
+
|
2022 |
+
## Troubleshooting Problems
|
2023 |
+
|
2024 |
+
This section shows you how to troubleshoot commonly occurring problems
|
2025 |
+
with the flow or any of the underlying application tools.
|
2026 |
+
|
2027 |
+
### Debugging Problems in Global Routing
|
2028 |
+
|
2029 |
+
The global router has a few useful functionalities to understand
|
2030 |
+
high congestion issues in the designs.
|
2031 |
+
|
2032 |
+
Congestion heatmap can be used on any design, whether it has
|
2033 |
+
congestion or not. Viewing congestion explained [here](content:heat:maps).
|
2034 |
+
If the design has congestion issue, it ends with the error;
|
2035 |
+
```
|
2036 |
+
[ERROR GRT-0118] Routing congestion too high.
|
2037 |
+
```
|
2038 |
+
|
2039 |
+
Refer to the built-in example [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/grt/test/congestion5.tcl).
|
2040 |
+
|
2041 |
+
Launch OpenROAD GUI by running the following command(s) in the terminal in OpenROAD tool root directory:
|
2042 |
+
|
2043 |
+
```shell
|
2044 |
+
cd ../tools/OpenROAD/src/grt/test/
|
2045 |
+
openroad -gui
|
2046 |
+
```
|
2047 |
+
|
2048 |
+
To run the global routing, run the following commands in `Tcl Commands` of
|
2049 |
+
GUI:
|
2050 |
+
|
2051 |
+
```tcl
|
2052 |
+
source congestion5.tcl
|
2053 |
+
```
|
2054 |
+
|
2055 |
+
The design fail with routing congestion error as follows:
|
2056 |
+
![Routing_Congestion](./images/grt_congestion_error.webp)
|
2057 |
+
|
2058 |
+
In the GUI, you can go under `Heat Maps` and mark the
|
2059 |
+
`Routing Congestion` checkbox to visualize the congestion map.
|
2060 |
+
![congestion_heatmap](./images/congestion_heatmap_enable.webp)
|
2061 |
+
|
2062 |
+
#### Dump congestion information to a text file
|
2063 |
+
|
2064 |
+
You can create a text file with the congestion information of the
|
2065 |
+
GCells for further investigation on the GUI. To do that, add the
|
2066 |
+
`-congestion_report_file file_name` to the `global_route` command, as shown below:
|
2067 |
+
```tcl
|
2068 |
+
global_route -guide_file out.guide -congestion_report_file congest.rpt
|
2069 |
+
```
|
2070 |
+
|
2071 |
+
#### Visualization of overflowing GCells as markers
|
2072 |
+
|
2073 |
+
With the file created with the command described above, you can see more
|
2074 |
+
details about the congested GCell, like the total resources, utilization,
|
2075 |
+
location, etc. You can load the file following these steps:
|
2076 |
+
|
2077 |
+
- step 1: In the `DRC Viewer` window, click on `Load` and select the
|
2078 |
+
file with the congestion report.
|
2079 |
+
- step 2: A summary of the GCells with congestion is shown in the
|
2080 |
+
`DRC Viewer` window. Also, the markers are added to the GUI.
|
2081 |
+
![GCell_marker](./images/gcell_marker.webp)
|
2082 |
+
- step 3: For details on the routing resources information, use the `Inspector` window.
|
2083 |
+
![zoom_options](./images/zoom_options.webp)
|
2084 |
+
|
2085 |
+
By Clicking `zoom_to` options, you can enlarge the view as follows:
|
2086 |
+
![zoomto_gcell](./images/zoomto_gcell.webp)
|
markdown/ORFS_docs/general/FlowVariables.md
ADDED
@@ -0,0 +1,308 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Environment Variables for the OpenROAD Flow Scripts
|
2 |
+
|
3 |
+
|
4 |
+
Environment variables are used in the OpenROAD flow to define various
|
5 |
+
platform, design and tool specific variables to allow finer control and
|
6 |
+
user overrides at various flow stages. These are defined in the
|
7 |
+
`config.mk` file located in the platform and design specific directories.
|
8 |
+
|
9 |
+
### General variables for all stages
|
10 |
+
|
11 |
+
| Variable | Description |
|
12 |
+
|------------------|------------------------------------------------------------------------------------|
|
13 |
+
| `SKIP_REPORT_METRICS` | If set to 1, then metrics, report_metrics does nothing. Useful to speed up builds. |
|
14 |
+
|
15 |
+
## Platform
|
16 |
+
|
17 |
+
|
18 |
+
These variables must be defined in the platform specific config file
|
19 |
+
located in the OpenROAD-flow-scripts directory of
|
20 |
+
`./flow/platforms/<PLATFORM>/config.mk`
|
21 |
+
|
22 |
+
|
23 |
+
Note: The variable `PLATFORM_DIR` is set by default based on the `PLATFORM`
|
24 |
+
variable. For OpenROAD Flow Scripts we have the following public platforms:
|
25 |
+
|
26 |
+
|
27 |
+
- `sky130hd`
|
28 |
+
- `sky130hs`
|
29 |
+
- `nangate45`
|
30 |
+
- `asap7`
|
31 |
+
|
32 |
+
|
33 |
+
## Platform Specific Environment Variables
|
34 |
+
|
35 |
+
|
36 |
+
The table below lists the complete set of variables used in each of the
|
37 |
+
public platforms supported by the OpenROAD flow.
|
38 |
+
|
39 |
+
|
40 |
+
Note:
|
41 |
+
- = indicates default definition assigned by the tool
|
42 |
+
- ?= indicates that the variable value may be reassigned with design `config.mk`
|
43 |
+
|
44 |
+
|
45 |
+
| **Configuration Variable** | **sky130hd** | **sky130hs** | **nangate45** | **asap7** | **gf180** |
|
46 |
+
|--------------------------------------|--------------|--------------|---------------|-----------|-----------|
|
47 |
+
| Library Setup | | | | | |
|
48 |
+
| `PROCESS` | = | = | = | = | = |
|
49 |
+
| `TECH_LEF` | = | = | = | = | = |
|
50 |
+
| `SC_LEF` | = | = | = | = | = |
|
51 |
+
| `LIB_FILES` | = | = | = | = | = |
|
52 |
+
| `GDS_FILES` | = | = | = | = | = |
|
53 |
+
| `DONT_USE_CELLS` | = | = | = | = | = |
|
54 |
+
| Synthesis | | | | | |
|
55 |
+
| `LATCH_MAP_FILE` | = | = | = | = | = |
|
56 |
+
| `CLKGATE_MAP_FILE` | = | = | = | = | = |
|
57 |
+
| `ADDER_MAP_FILE` | ?= | ?= | ?= | ?= | ?= |
|
58 |
+
| `TIEHI_CELL_AND_PORT` | = | = | = | = | = |
|
59 |
+
| `TIELO_CELL_AND_PORT` | = | = | = | = | = |
|
60 |
+
| `MIN_BUF_CELL_AND_PORTS` | = | = | = | = | = |
|
61 |
+
| `ABC_CLOCK_PERIOD_IN_PS` | ?= | ?= | ?= | ?= | ?= |
|
62 |
+
| `ABC_DRIVER_CELL` | = | = | = | = | = |
|
63 |
+
| `ABC_LOAD_IN_FF` | = | = | = | = | = |
|
64 |
+
| Floorplan | | | | | |
|
65 |
+
| `PLACE_SITE` | = | = | = | = | = |
|
66 |
+
| `MAKE_TRACKS` | = | = | = | = | = |
|
67 |
+
| `TAPCELL_TCL` | = | = | = | = | = |
|
68 |
+
| `MACRO_PLACE_HALO` | ?= | ?= | ?= | ?= | ?= |
|
69 |
+
| `MACRO_PLACE_CHANNEL` | ?= | ?= | ?= | ?= | ?= |
|
70 |
+
| `PDN_TCL` | ?= | ?= | ?= | ?= | ?= |
|
71 |
+
| `IO_PLACER_H` | = | = | = | = | ?= |
|
72 |
+
| `IO_PLACER_V` | = | = | = | = | ?= |
|
73 |
+
| Placement | | | | | |
|
74 |
+
| `CELL_PAD_IN_SITES_GLOBAL_PLACEMENT` | ?= | ?= | ?= | ?= | ?= |
|
75 |
+
| `CELL_PAD_IN_SITES_DETAIL_PLACEMENT` | ?= | ?= | ?= | ?= | ?= |
|
76 |
+
| `PLACE_DENSITY` | ?= | ?= | ?= | ?= | ?= |
|
77 |
+
| `WIRE_RC_LAYER` | = | = | = | = | = |
|
78 |
+
| Clock Tree Synthesis | | | | | |
|
79 |
+
| `CTS_BUF_CELL` | = | = | = | = | = |
|
80 |
+
| `CTS_BUF_DISTANCE` | N/A | N/A | N/A | = | = |
|
81 |
+
| `FILL_CELLS` | = | = | = | = | = |
|
82 |
+
| `SKIP_GATE_CLONING` | ?= | ?= | ?= | ?= | ?= |
|
83 |
+
| `SKIP_PIN_SWAP` | ?= | ?= | ?= | ?= | ?= |
|
84 |
+
| `TNS_END_PERCENT` | ?= | ?= | | ?= | ?= |
|
85 |
+
| `EQUIVALENCE_CHECK` | ?= | ?= | ?= | ?= | ?= |
|
86 |
+
| `REMOVE_CELLS_FOR_EQY` | ?= | ?= | ?= | ?= | ?= |
|
87 |
+
| Routing | | | | | |
|
88 |
+
| `KLAYOUT_TECH_FILE` | = | = | = | = | = |
|
89 |
+
| `MAX_ROUTING_LAYER` | = | = | = | = | ?= |
|
90 |
+
| `MIN_ROUTING_LAYER` | = | = | = | = | ?= |
|
91 |
+
| `RCX_RULES` | = | = | = | = | = |
|
92 |
+
| `RECOVER_POWER` | ?= | ?= | ?= | ?= | ?= |
|
93 |
+
|
94 |
+
|
95 |
+
### Library Setup
|
96 |
+
|
97 |
+
|
98 |
+
| Variable | Description |
|
99 |
+
|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
|
100 |
+
| `PROCESS` | Technology node or process in use. |
|
101 |
+
| `CORNER` | Library to select based on corner BC/TC/WC. |
|
102 |
+
| `TECH_LEF` | A technology LEF file of the PDK that includes all relevant information regarding metal layers, vias, and spacing requirements. |
|
103 |
+
| `SC_LEF` | Path to technology standard cell LEF file. |
|
104 |
+
| `GDS_FILES` | Path to platform GDS files. |
|
105 |
+
| `LIB_FILES` | A Liberty file of the standard cell library with PVT characterization, input and output characteristics, timing and power definitions for each cell. |
|
106 |
+
| `DONT_USE_CELLS` | Dont use cells eases pin access in detailed routing. |
|
107 |
+
|
108 |
+
|
109 |
+
### Synthesis
|
110 |
+
|
111 |
+
|
112 |
+
| Variable | Description |
|
113 |
+
|--------------------------|--------------------------------------------------------------------------------------------|
|
114 |
+
| `SYNTH_HIERARCHICAL` | Enable to Synthesis hierarchically, otherwise considered flat synthesis. |
|
115 |
+
| `LATCH_MAP_FILE` | List of latches treated as a black box by Yosys. |
|
116 |
+
| `CLKGATE_MAP_FILE` | List of cells for gating clock treated as a black box by Yosys. |
|
117 |
+
| `ADDER_MAP_FILE` | List of adders treated as a black box by Yosys. |
|
118 |
+
| `TIEHI_CELL_AND_PORT` | Tie high cells used in Yosys synthesis to replace a logical 1 in the Netlist. |
|
119 |
+
| `TIELO_CELL_AND_PORT` | Tie low cells used in Yosys synthesis to replace a logical 0 in the Netlist. |
|
120 |
+
| `MIN_BUF_CELL_AND_PORTS` | Used to insert a buffer cell to pass through wires. Used in synthesis. |
|
121 |
+
| `ABC_CLOCK_PERIOD_IN_PS` | Clock period to be used by STA during synthesis. Default value read from `constraint.sdc`. |
|
122 |
+
| `ABC_DRIVER_CELL` | Default driver cell used during ABC synthesis. |
|
123 |
+
| `ABC_LOAD_IN_FF` | During synthesis set_load value used. |
|
124 |
+
| `MAX_UNGROUP_SIZE` | For hierarchical synthesis, we ungroup modules of size given by this variable. |
|
125 |
+
|
126 |
+
|
127 |
+
### Floorplan
|
128 |
+
|
129 |
+
|
130 |
+
| Variable | Description |
|
131 |
+
|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
132 |
+
| `FLOORPLAN_DEF` | Use the DEF file to initialize floorplan. |
|
133 |
+
| `PLACE_SITE` | Placement site for core cells defined in the technology LEF file. |
|
134 |
+
| `TAPCELL_TCL` | Path to Endcap and Welltie cells file. |
|
135 |
+
| `RTLMP_FLOW` | Enable the Hierarchical RTLMP flow. By default it is disabled. |
|
136 |
+
| `MACRO_HALO` | Specifies keep out distance from macro, in X and Y, to standard cell row. |
|
137 |
+
| `MACRO_PLACEMENT` | Specifies the path of a file on how to place certain macros manually using read_macro_placement. |
|
138 |
+
| `MACRO_PLACEMENT_TCL` | Specifies the path of a TCL file on how to place certain macros manually. |
|
139 |
+
| `MACRO_PLACE_HALO` | horizontal/vertical halo around macros (microns). Used by automatic macro placement. |
|
140 |
+
| `MACRO_PLACE_CHANNEL` | horizontal/vertical channel width between macros (microns). Used by automatic macro placement when `RTLMP_FLOW` is disabled. Imagine channel=10 and halo=5. Then macros must be 10 apart but standard cells must be 5 away from a macro.|
|
141 |
+
| `MACRO_BLOCKAGE_HALO` | Blockage width overridden from default calculation. |
|
142 |
+
| `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. |
|
143 |
+
| `MAKE_TRACKS` | Tcl file that defines add routing tracks to a floorplan. |
|
144 |
+
| `IO_PLACER_H` | The metal layer on which to place the I/O pins horizontally (top and bottom of the die). |
|
145 |
+
| `IO_PLACER_V` | The metal layer on which to place the I/O pins vertically (sides of the die). |
|
146 |
+
| `GUI_NO_TIMING` | Skip loading timing for a faster GUI load. |
|
147 |
+
|
148 |
+
|
149 |
+
### Placement
|
150 |
+
|
151 |
+
|
152 |
+
| Variable | Description |
|
153 |
+
|--------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
|
154 |
+
| `HAS_IO_CONSTRAINTS` | Skip the initial non-IO based global placement if IO constraints are present. |
|
155 |
+
| `CELL_PAD_IN_SITES_GLOBAL_PLACEMENT` | Cell padding on both sides in site widths to ease routability during global placement. |
|
156 |
+
| `CELL_PAD_IN_SITES_DETAIL_PLACEMENT` | Cell padding on both sides in site widths to ease routability in detail placement. |
|
157 |
+
| `PLACE_DENSITY` | The desired placement density of cells. It reflects how spread the cells would be on the core area. 1.0 = closely dense. 0.0 = widely spread. |
|
158 |
+
| `PLACE_DENSITY_LB_ADDON` | Check the lower boundary of the PLACE_DENSITY and add PLACE_DENSITY_LB_ADDON if it exists. |
|
159 |
+
| `REPAIR_PDN_VIA_LAYER` | Remove power grid vias which generate DRC violations after detailed routing. |
|
160 |
+
| `GLOBAL_PLACEMENT_ARGS` | Use additional tuning parameters during global placement other than default args defined in gloabl_place.tcl. |
|
161 |
+
| `ENABLE_DPO` | Enable detail placement with improve_placement feature. |
|
162 |
+
| `DPO_MAX_DISPLACEMENT` | Specifies how far an instance can be moved when optimizing. |
|
163 |
+
| `GPL_TIMING_DRIVEN` | Specifies whether the placer should use timing driven placement. |
|
164 |
+
| `GPL_ROUTABILITY_DRIVEN` | Specifies whether the placer should use routability driven placement. |
|
165 |
+
| `CAP_MARGIN` | Specifies a capacitance margin when fixing max capacitance violations. This option allow you to overfix. |
|
166 |
+
| `SLEW_MARGIN` | Specifies a slew margin when fixing max slew violations. This option allow you to overfix. |
|
167 |
+
|
168 |
+
|
169 |
+
### Clock Tree Synthesis (CTS)
|
170 |
+
|
171 |
+
|
172 |
+
| Variable | Description |
|
173 |
+
|-----------------------|--------------------------------------------------------------------------------------------------------------|
|
174 |
+
| `CTS_ARGS` | Override `clock_tree_synthesis` arguments |
|
175 |
+
| `CTS_BUF_CELL` | The buffer cell used in the clock tree. |
|
176 |
+
| `FILL_CELLS` | Fill cells are used to fill empty sites. |
|
177 |
+
| `HOLD_SLACK_MARGIN` | Specifies a time margin for the slack when fixing hold violations. This option allow you to overfix. |
|
178 |
+
| `SETUP_SLACK_MARGIN` | Specifies a time margin for the slack when fixing setup violations. |
|
179 |
+
| `SKIP_GATE_CLONING` | Do not use gate cloning transform to fix timing violations (default: use gate cloning) |
|
180 |
+
| `SKIP_PIN_SWAP` | Do not use pin swapping as a transform to fix timing violations (default: use pin swapping) |
|
181 |
+
| `TNS_END_PERCENT` | Specifies how many percent of violating paths to fix [0-100]. Worst path will always be fixed |
|
182 |
+
| `EQUIVALENCE_CHECK` | Enable running equivalence checks with to verify logical correctness of repair_timing |
|
183 |
+
| `REMOVE_CELLS_FOR_EQY`| String patterns directly passed to write_verilog -remove_cells <> for equivalence checks |
|
184 |
+
| `SKIP_CTS_REPAIR_TIMING`| Skipping CTS repair, which can take a long time, can be useful in architectural exploration or when getting CI up and running |
|
185 |
+
|
186 |
+
### Routing
|
187 |
+
|
188 |
+
|
189 |
+
| Variable | Description |
|
190 |
+
|-----------------------|---------------------------------------------------------------------------------------------------|
|
191 |
+
| `MIN_ROUTING_LAYER` | The lowest metal layer name to be used in routing. |
|
192 |
+
| `MAX_ROUTING_LAYER` | The highest metal layer name to be used in routing. |
|
193 |
+
| `DETAILED_ROUTE_ARGS` | Add additional arguments for debugging purpose during detail route. |
|
194 |
+
| `MACRO_EXTENSION` | Sets the number of GCells added to the blockages boundaries from macros. |
|
195 |
+
| `RECOVER_POWER` | Specifies how many percent of paths with positive slacks can be slowed for power savings [0-100]. |
|
196 |
+
|
197 |
+
|
198 |
+
### Extraction
|
199 |
+
|
200 |
+
|
201 |
+
| Variable | Description |
|
202 |
+
|---------------------|-------------------------------------------------------|
|
203 |
+
| `RCX_RULES` | RC Extraction rules file path. |
|
204 |
+
| `SET_RC_TCL` | Metal & Via RC definition file path. |
|
205 |
+
| `FILL_CONFIG` | JSON rule file for metal fill during chip finishing. |
|
206 |
+
| `KLAYOUT_TECH_FILE` | A mapping from LEF/DEF to GDS using the KLayout tool. |
|
207 |
+
| `IR_DROP_LAYER` | Default metal layer to report IR drop. |
|
208 |
+
|
209 |
+
|
210 |
+
## Design Specific Configuration Variables
|
211 |
+
|
212 |
+
|
213 |
+
### Required Variables
|
214 |
+
|
215 |
+
|
216 |
+
Following minimum design variables must be defined in the design configuration
|
217 |
+
file for each design located in the OpenROAD-flow-scripts directory of
|
218 |
+
`./flow/designs/<PLATFORM>/<DESIGN_NAME>/config.mk`
|
219 |
+
|
220 |
+
|
221 |
+
| Variable | Description |
|
222 |
+
|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
223 |
+
| `PLATFORM` | Specifies process design kit or technology node to be used. |
|
224 |
+
| `DESIGN_NAME` | The name of the top-level module of the design. |
|
225 |
+
| `VERILOG_FILES` | The path to the design Verilog files or JSON files providing a description of modules (check `yosys -h write_json` for more details). |
|
226 |
+
| `SDC_FILE` | The path to design constraint (SDC) file. |
|
227 |
+
|
228 |
+
|
229 |
+
### Optional Variables
|
230 |
+
|
231 |
+
|
232 |
+
These are optional variables that may be over-ridden/appended with
|
233 |
+
default value from the platform `config.mk` by defining in the design
|
234 |
+
configuration file.
|
235 |
+
|
236 |
+
|
237 |
+
#### Synthesis
|
238 |
+
|
239 |
+
|
240 |
+
| Variable | Description |
|
241 |
+
|--------------------------|----------------------------------------------------------------------------------------------------|
|
242 |
+
| `ADDITIONAL_FILES` | Additional files to be added to `make issue` archive |
|
243 |
+
| `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. |
|
244 |
+
| `ADDITIONAL_LIBS` | Hardened macro library files listed here. The library information is immutable and used throughout all stages. Not stored in the .odb file. |
|
245 |
+
| `ADDITIONAL_GDS` | Hardened macro GDS files listed here. |
|
246 |
+
| `VERILOG_INCLUDE_DIRS` | Specifies the include directories for the Verilog input files. |
|
247 |
+
| `CORNER` | PVT corner library selection. Only available for ASAP7 and GF180 PDK. |
|
248 |
+
| `DESIGN_NICKNAME` | DESIGN_NICKNAME just changes the directory name that ORFS outputs to be DESIGN_NICKNAME instead of DESIGN_NAME in case DESIGN_NAME is unwieldy or conflicts with a difference design. |
|
249 |
+
| `ABC_AREA` | Strategies for Yosys ABC synthesis: Area/Speed. Default ABC_SPEED. |
|
250 |
+
| `PWR_NETS_VOLTAGES` | Used for IR Drop calculation. |
|
251 |
+
| `GND_NETS_VOLTAGES` | Used for IR Drop calculation. |
|
252 |
+
| `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](../main/flow/Makefile) |
|
253 |
+
| `CDL_FILES` | Insert additional Circuit Description Language (`.cdl`) netlist files. |
|
254 |
+
| `DFF_LIB_FILES` | Technology mapping liberty files for flip-flops. |
|
255 |
+
| `DONT_USE_LIBS` | Set liberty files as `dont_use`. |
|
256 |
+
| `PRESERVE_CELLS` | Mark modules to keep from getting removed in flattening. |
|
257 |
+
| `SYNTH_ARGS` | Optional synthesis variables for yosys. |
|
258 |
+
| `VERILOG_TOP_PARAMS` | Apply toplevel params (if exist). |
|
259 |
+
|
260 |
+
#### Floorplan
|
261 |
+
|
262 |
+
|
263 |
+
| Variable | Description |
|
264 |
+
|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
265 |
+
| `CORE_UTILIZATION` | The core utilization percentage (0-100). Overrides `DIE_AREA` and `CORE_AREA`. |
|
266 |
+
| `CORE_ASPECT_RATIO` | The core aspect ratio (height / width). This values is ignored if `CORE_UTILIZATION` undefined. |
|
267 |
+
| `CORE_MARGIN` | The margin between the core area and die area, in multiples of SITE heights. The margin is applied to each side. This variable is ignored if `CORE_UTILIZATION` is undefined. |
|
268 |
+
| `DIE_AREA` | The die area specified as a list of lower-left and upper-right corners in microns (X1 Y1 X2 Y2). This variable is ignored if `CORE_UTILIZATION` and `CORE_ASPECT_RATIO` are defined. |
|
269 |
+
| `CORE_AREA` | The core area specified as a list of lower-left and upper-right corners in microns (X1 Y1 X2 Y2). This variable is ignored if `CORE_UTILIZATION` and `CORE_ASPECT_RATIO` are defined. |
|
270 |
+
| `RESYNTH_AREA_RECOVER` | Enable re-synthesis for area reclaim. |
|
271 |
+
| `RESYNTH_TIMING_RECOVER` | Enable re-synthesis for timing optimization. |
|
272 |
+
| `MACRO_HALO_X` | Set macro halo for x-direction. Only available for ASAP7 PDK. |
|
273 |
+
| `MACRO_HALO_Y` | Set macro halo for y-direction. Only available for ASAP7 PDK. |
|
274 |
+
|
275 |
+
## Placement
|
276 |
+
|
277 |
+
|
278 |
+
| Variable | Description |
|
279 |
+
|--------------------------|----------------------------------------------------------------------------------------------------|
|
280 |
+
| `MACRO_WRAPPERS` | The wrapper file that replace existing macros with their wrapped version. |
|
281 |
+
|
282 |
+
|
283 |
+
## Clock Tree Synthesis
|
284 |
+
|
285 |
+
|
286 |
+
| Variable | Description |
|
287 |
+
|--------------------------|----------------------------------------------------------------------------------------------------|
|
288 |
+
| `CTS_BUF_DISTANCE` | Distance (in microns) between buffers. |
|
289 |
+
| `CTS_CLUSTER_DIAMETER` | Maximum diameter (in microns) of sink cluster. Default 20. |
|
290 |
+
| `CTS_CLUSTER_SIZE` | Maximum number of sinks per cluster. Default 50.
|
291 |
+
|
292 |
+
|
293 |
+
## Routing
|
294 |
+
|
295 |
+
|
296 |
+
| Variable | Description |
|
297 |
+
|--------------------------|----------------------------------------------------------------------------------------------------|
|
298 |
+
| `FASTROUTE_TCL` | Specifies a Tcl scripts with commands to run before FastRoute. |
|
299 |
+
|
300 |
+
|
301 |
+
## GDS Streamout
|
302 |
+
|
303 |
+
|
304 |
+
| Variable | Description |
|
305 |
+
|--------------------------|----------------------------------------------------------------------------------------------------|
|
306 |
+
| `USE_FILL` | Whether to perform metal density filling. Default 0 (=off). |
|
307 |
+
| `SEAL_GDS` | Seal macro to place around the design. |
|
308 |
+
|
markdown/ORFS_docs/general/Flow_QoR_CI.md
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# OpenROAD QoR and CI Metrics
|
2 |
+
|
3 |
+
## OpenROAD Dashboard
|
4 |
+
|
5 |
+
The [OpenROAD Dashboard](QoRDashboard.md) provides an easy way to explore
|
6 |
+
Quality-of-Results (QoR) over time and describes flow-QoR metrics, such as timing, area, power, etc.
|
7 |
+
|
8 |
+
## Jenkins CI
|
9 |
+
|
10 |
+
We use Jenkins as our continuous integration (CI) tool.
|
11 |
+
You may use it to find out metrics regarding regression tests.
|
12 |
+
See more about accessing and taking advantage of our CI [here](Jenkins.md).
|
markdown/ORFS_docs/general/GettingInvolved.md
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Getting Involved
|
2 |
+
|
3 |
+
Thank you for taking the time to read this document and to contribute.
|
4 |
+
The OpenROAD project will not reach all of its objectives without help!
|
5 |
+
|
6 |
+
Possible ways to contribute in the scope of OpenROAD Flow:
|
7 |
+
|
8 |
+
- Open-source PDK information
|
9 |
+
- Open-source Designs
|
10 |
+
- Useful scripts
|
11 |
+
- Star our project and repos so we can see the number of people
|
12 |
+
who are interested
|
13 |
+
|
14 |
+
## Licensing Contributions
|
15 |
+
|
16 |
+
As much as possible, all contributions should be licensed using the BSD3
|
17 |
+
license. You can propose another license if you must, but contributions
|
18 |
+
made with BSD3 fit best with the spirit of OpenROAD's permissive open-source
|
19 |
+
philosophy. We do have exceptions in the project, but over time we hope
|
20 |
+
that all contributions will be BSD3, or some other permissive license such as MIT
|
21 |
+
or Apache2.0.
|
22 |
+
|
23 |
+
## Contributing Open Source PDK information and Designs
|
24 |
+
|
25 |
+
If you have new design or PDK information to contribute, please add this
|
26 |
+
to the repo
|
27 |
+
[OpenROAD-flow-scripts](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/).
|
28 |
+
In the
|
29 |
+
[flow directory](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/tree/master/flow)
|
30 |
+
you will see a directory for
|
31 |
+
[designs](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/tree/master/flow/designs)
|
32 |
+
with Makefiles to run them, and one for PDK
|
33 |
+
[platforms](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/tree/master/flow/platforms)
|
34 |
+
used by the designs. If you add a new PDK platform, be sure to add at
|
35 |
+
least one design that uses it.
|
36 |
+
|
37 |
+
## Contributing Scripts and Code
|
38 |
+
|
39 |
+
We follow the [Google C++ style guide](https://google.github.io/styleguide/cppguide.html).
|
40 |
+
If you find code in our project that does *not* follow this guide, then within each file that
|
41 |
+
you edit, follow the style in that file.
|
42 |
+
|
43 |
+
Please pay careful attention to the
|
44 |
+
[tool checklist](https://openroad.readthedocs.io/en/latest/contrib/DeveloperGuide.html#tool-checklist) for all code. If you want
|
45 |
+
to add or improve functionality in OpenROAD, please start with the
|
46 |
+
top-level [app](https://github.com/The-OpenROAD-Project/OpenROAD/) repo. You
|
47 |
+
can see in the `src` directory that submodules exist pointing to tested
|
48 |
+
versions of the other relevant repos in the project. Please look at the
|
49 |
+
tool workflow in the developer guide [document](DeveloperGuide.md)
|
50 |
+
to work with the app and its submodule repos in an efficient way.
|
51 |
+
|
52 |
+
Please run clang-format on all the C++ source files that you change, before
|
53 |
+
committing. In the root directory of the OpenROAD repository there is the
|
54 |
+
file `.clang-format` that defines all coding formatting rules.
|
55 |
+
|
56 |
+
Please pay attention to the
|
57 |
+
[test directory](https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/test)
|
58 |
+
and be sure to add tests for any code changes that you make, using open-source
|
59 |
+
PDK and design information. We provide the `nangate45` PDK in
|
60 |
+
the OpenROAD-flow-scripts repo to help with this. Pull requests with
|
61 |
+
code changes are unlikely to be accepted without accompanying test
|
62 |
+
cases. There are many
|
63 |
+
[examples](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/test/gcd_nangate45.tcl)
|
64 |
+
tests. Each repo has a test directory as well with tests you should run
|
65 |
+
and add to if you modify something in one of the submodules.
|
66 |
+
|
67 |
+
For changes that claim to improve QoR or PPA, please run many tests and
|
68 |
+
ensure that the improvement is not design-specific. There are designs in
|
69 |
+
the
|
70 |
+
[OpenROAD-flow-scripts](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/)
|
71 |
+
repo which can be used unless the improvement is technology-specific.
|
72 |
+
|
73 |
+
Do not add runtime or build dependencies without serious thought. For a
|
74 |
+
project like OpenROAD with many application subcomponents, the software
|
75 |
+
architecture can quickly get out of control. Changes with lots of new
|
76 |
+
dependencies which are not necessary are less likely to be integrated.
|
77 |
+
|
78 |
+
If you want to add Tcl code to define a new tool command, look at [pdngen](https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/pdn)
|
79 |
+
as an example of how to do so. Take a look at the
|
80 |
+
[CMakeLists file](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/CMakeLists.txt)
|
81 |
+
which automatically sources the Tcl code and the
|
82 |
+
[Tcl file](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/pdn/src/pdn.tcl)
|
83 |
+
itself.
|
84 |
+
|
85 |
+
To accept contributions, we require each commit to be made with a DCO (Developer
|
86 |
+
Certificate of Origin) attached.
|
87 |
+
When you commit you add the `-s` flag to your commit. For example:
|
88 |
+
|
89 |
+
``` shell
|
90 |
+
git commit -s -m "test dco with -s"
|
91 |
+
```
|
92 |
+
|
93 |
+
This will append a statement to your commit comment that attests to the DCO. GitHub
|
94 |
+
has built in the `-s` option to its command line since use of this is so
|
95 |
+
pervasive. The promise is very basic, certifying that you know that you
|
96 |
+
have the right to commit the code. Please read the [full statement
|
97 |
+
here](https://developercertificate.org/).
|
98 |
+
|
99 |
+
## Questions
|
100 |
+
|
101 |
+
Please refer to our [FAQs](../user/FAQS.md).
|
markdown/ORFS_docs/general/GitGuide.md
ADDED
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Git Quickstart
|
2 |
+
|
3 |
+
This tutorial serves as a quickstart to Git and contributing to our repository. If you have not already set up OpenROAD-flow-scripts, please follow the instructions [here](../../index.md#build-or-installing-orfs-dependencies).
|
4 |
+
|
5 |
+
```{tip} This basic tutorial gives instruction for basic password Git authentication.
|
6 |
+
If you would like to setup SSH authentication, please follow this [guide](https://help.github.com/set-up-git-redirect).
|
7 |
+
```
|
8 |
+
|
9 |
+
## Forking
|
10 |
+
|
11 |
+
You will need your own fork to work on the code. Go to the `OpenROAD-flow-scripts` project
|
12 |
+
[page](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts) and hit the `Fork` button. You will
|
13 |
+
want to clone your fork to your machine:
|
14 |
+
|
15 |
+
```shell
|
16 |
+
git clone https://github.com/your-user-name/OpenROAD-flow-scripts.git
|
17 |
+
cd OpenROAD-flow-scripts
|
18 |
+
git remote add upstream https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts.git
|
19 |
+
git fetch upstream
|
20 |
+
```
|
21 |
+
|
22 |
+
This creates the directory `OpenROAD-flow-scripts` and connects your repository to
|
23 |
+
the upstream (master project) *OpenROAD-flow-scripts* repository.
|
24 |
+
|
25 |
+
## Creating a branch
|
26 |
+
|
27 |
+
You want your master branch to reflect only production-ready code, so create a
|
28 |
+
feature branch for making your changes. For example:
|
29 |
+
|
30 |
+
```shell
|
31 |
+
git checkout master && git branch shiny-new-feature
|
32 |
+
git checkout shiny-new-feature
|
33 |
+
# Or equivalently,
|
34 |
+
git checkout master && checkout -b shiny-new-feature
|
35 |
+
```
|
36 |
+
|
37 |
+
This changes your working directory to the shiny-new-feature branch. Keep any
|
38 |
+
changes in this branch specific to one bug or feature so it is clear
|
39 |
+
what the branch brings to OpenROAD-flow-scripts. You can have many shiny-new-features
|
40 |
+
and switch in between them using the git checkout command.
|
41 |
+
|
42 |
+
When creating this branch, make sure your master branch is up to date with
|
43 |
+
the latest upstream master version. To update your local master branch, you
|
44 |
+
can do:
|
45 |
+
|
46 |
+
```shell
|
47 |
+
git checkout master
|
48 |
+
git pull upstream master
|
49 |
+
```
|
50 |
+
|
51 |
+
When you want to update the feature branch with changes in master after
|
52 |
+
you created the branch, check the section on
|
53 |
+
[updating a PR](#updating-your-pull-request).
|
54 |
+
|
55 |
+
## Committing your code
|
56 |
+
Keep style fixes to a separate commit to make your pull request more readable. Once you've made changes, you can see them by typing:
|
57 |
+
|
58 |
+
```shell
|
59 |
+
git status
|
60 |
+
```
|
61 |
+
|
62 |
+
If you have created a new file, it is not being tracked by git. Add it by typing:
|
63 |
+
```shell
|
64 |
+
git add path/to/file-to-be-added.py
|
65 |
+
```
|
66 |
+
|
67 |
+
Doing `git status` again should give something like:
|
68 |
+
```shell
|
69 |
+
# On branch shiny-new-feature
|
70 |
+
#
|
71 |
+
# modified: /relative/path/to/file-you-added.py
|
72 |
+
#
|
73 |
+
```
|
74 |
+
|
75 |
+
Finally, commit your changes to your local repository with an explanatory commit
|
76 |
+
message. Do note the `-s` option is needed for developer signoff.
|
77 |
+
```shell
|
78 |
+
git commit -s -m "your commit message goes here"
|
79 |
+
```
|
80 |
+
|
81 |
+
## Pushing your changes
|
82 |
+
|
83 |
+
When you want your changes to appear publicly on your GitHub page, push your
|
84 |
+
forked feature branch's commits:
|
85 |
+
|
86 |
+
```shell
|
87 |
+
git push origin shiny-new-feature
|
88 |
+
```
|
89 |
+
|
90 |
+
Here `origin` is the default name given to your remote repository on GitHub.
|
91 |
+
You can see the remote repositories:
|
92 |
+
|
93 |
+
```shell
|
94 |
+
git remote -v
|
95 |
+
```
|
96 |
+
|
97 |
+
If you added the upstream repository as described above you will see something
|
98 |
+
like:
|
99 |
+
|
100 |
+
```shell
|
101 |
+
origin https://github.com/your-user-name/OpenROAD-flow-scripts.git (fetch)
|
102 |
+
origin https://github.com/your-user-name/OpenROAD-flow-scripts.git (push)
|
103 |
+
upstream https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts.git (fetch)
|
104 |
+
upstream https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts.git (push)
|
105 |
+
```
|
106 |
+
|
107 |
+
Now your code is on GitHub, but it is not yet a part of the OpenROAD-flow-scripts project. For that to
|
108 |
+
happen, a pull request needs to be submitted on GitHub.
|
109 |
+
|
110 |
+
## Review your code
|
111 |
+
|
112 |
+
When you're ready to ask for a code review, file a pull request. Before you do, once
|
113 |
+
again make sure that you have followed all the guidelines outlined in the [Developer's Guide](./DeveloperGuide.md)
|
114 |
+
regarding code style, tests, performance tests, and documentation. You should also
|
115 |
+
double check your branch changes against the branch it was based on:
|
116 |
+
|
117 |
+
1. Navigate to your repository on GitHub -- https://github.com/your-user-name/OpenROAD-flow-scripts
|
118 |
+
1. Click on `Branches`
|
119 |
+
1. Click on the `Compare` button for your feature branch
|
120 |
+
1. Select the `base` and `compare` branches, if necessary. This will be `master` and
|
121 |
+
`shiny-new-feature`, respectively.
|
122 |
+
|
123 |
+
## Submitting the pull request
|
124 |
+
|
125 |
+
If everything looks good, you are ready to make a pull request. A pull request is how
|
126 |
+
code from a local repository becomes available to the GitHub community and can be looked
|
127 |
+
at and eventually merged into the master version. This pull request and its associated
|
128 |
+
changes will eventually be committed to the master branch and available in the next
|
129 |
+
release. To submit a pull request:
|
130 |
+
|
131 |
+
1. Navigate to your repository on GitHub
|
132 |
+
1. Click on the ``Compare & pull request`` button
|
133 |
+
1. You can then click on ``Commits`` and ``Files Changed`` to make sure everything looks
|
134 |
+
okay one last time
|
135 |
+
1. Write a description of your changes in the ``Preview Discussion`` tab
|
136 |
+
1. Click ``Send Pull Request``.
|
137 |
+
|
138 |
+
This request then goes to the repository maintainers, and they will review
|
139 |
+
the code.
|
140 |
+
|
141 |
+
## Updating your pull request
|
142 |
+
|
143 |
+
Based on the review you get on your pull request, you will probably need to make
|
144 |
+
some changes to the code. In that case, you can make them in your branch,
|
145 |
+
add a new commit to that branch, push it to GitHub, and the pull request will be
|
146 |
+
automatically updated. Pushing them to GitHub again is done by:
|
147 |
+
|
148 |
+
```shell
|
149 |
+
git push origin shiny-new-feature
|
150 |
+
```
|
151 |
+
|
152 |
+
This will automatically update your pull request with the latest code and restart the
|
153 |
+
[Continuous Integration](./CI.md) tests.
|
154 |
+
|
155 |
+
Another reason you might need to update your pull request is to solve conflicts
|
156 |
+
with changes that have been merged into the master branch since you opened your
|
157 |
+
pull request.
|
158 |
+
|
159 |
+
To do this, you need to `merge upstream master` in your branch:
|
160 |
+
|
161 |
+
```shell
|
162 |
+
git checkout shiny-new-feature
|
163 |
+
git fetch upstream
|
164 |
+
git merge upstream/master
|
165 |
+
```
|
166 |
+
|
167 |
+
If there are no conflicts (or they could be fixed automatically), a file with a
|
168 |
+
default commit message will open, and you can simply save and quit this file.
|
169 |
+
|
170 |
+
If there are merge conflicts, you need to solve those conflicts. See
|
171 |
+
this [article](https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/)
|
172 |
+
for an explanation on how to do this.
|
173 |
+
Once the conflicts are merged and the files where the conflicts were solved are
|
174 |
+
added, you can run ``git commit`` to save those fixes.
|
175 |
+
|
176 |
+
If you have uncommitted changes at the moment you want to update the branch with
|
177 |
+
master, you will need to ``stash`` them prior to updating.
|
178 |
+
|
179 |
+
```{seealso}
|
180 |
+
See the stash [docs](https://git-scm.com/book/en/v2/Git-Tools-Stashing-and-Cleaning).
|
181 |
+
```
|
182 |
+
This will effectively store your changes and they can be reapplied after updating.
|
183 |
+
|
184 |
+
After the feature branch has been updated locally, you can now update your pull
|
185 |
+
request by pushing to the branch on GitHub:
|
186 |
+
|
187 |
+
```shell
|
188 |
+
git push origin shiny-new-feature
|
189 |
+
```
|
190 |
+
|
191 |
+
## Tips for a successful pull request
|
192 |
+
|
193 |
+
If you have made it to the `Review your code` phase, one of the core contributors may
|
194 |
+
take a look. Please note however that a handful of people are responsible for reviewing
|
195 |
+
all of the contributions, which can often lead to bottlenecks.
|
196 |
+
|
197 |
+
To improve the chances of your pull request being reviewed, you should:
|
198 |
+
|
199 |
+
- **Reference an open issue** for non-trivial changes to clarify the PR's purpose
|
200 |
+
- **Ensure you have appropriate tests**. These should be the first part of any PR
|
201 |
+
- **Keep your pull requests as simple as possible**. Larger PRs take longer to review
|
202 |
+
- **Ensure that CI is in a green state**. Reviewers may not even look otherwise
|
203 |
+
- **Keep updating your pull request**, either by request or every few days
|
204 |
+
|
205 |
+
## Acknowledgements
|
206 |
+
|
207 |
+
This page has been adapted from [pandas Developer Guide](https://pandas.pydata.org/docs/development/contributing.html).
|
markdown/ORFS_docs/general/InstructionsForAutoTuner.md
ADDED
@@ -0,0 +1,211 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Instructions for AutoTuner with Ray
|
2 |
+
|
3 |
+
_AutoTuner_ is a "no-human-in-loop" parameter tuning framework for commercial and academic RTL-to-GDS flows.
|
4 |
+
AutoTuner provides a generic interface where users can define parameter configuration as JSON objects.
|
5 |
+
This enables AutoTuner to easily support various tools and flows. AutoTuner also utilizes [METRICS2.1](https://github.com/ieee-ceda-datc/datc-rdf-Metrics4ML) to capture PPA
|
6 |
+
of individual search trials. With the abundant features of METRICS2.1, users can explore various reward functions that steer the flow autotuning to different PPA goals.
|
7 |
+
|
8 |
+
AutoTuner provides two main functionalities as follows.
|
9 |
+
* Automatic hyperparameter tuning framework for OpenROAD-flow-script (ORFS)
|
10 |
+
* Parametric sweeping experiments for ORFS
|
11 |
+
|
12 |
+
|
13 |
+
AutoTuner contains top-level Python script for ORFS, each of which implements a different search algorithm. Current supported search algorithms are as follows.
|
14 |
+
* Random/Grid Search
|
15 |
+
* Population Based Training ([PBT](https://www.deepmind.com/blog/population-based-training-of-neural-networks))
|
16 |
+
* Tree Parzen Estimator ([HyperOpt](https://hyperopt.github.io/hyperopt))
|
17 |
+
* Bayesian + Multi-Armed Bandit ([AxSearch](https://ax.dev/))
|
18 |
+
* Tree Parzen Estimator + Covariance Matrix Adaptation Evolution Strategy ([Optuna](https://optuna.org/))
|
19 |
+
* Evolutionary Algorithm ([Nevergrad](https://github.com/facebookresearch/nevergrad))
|
20 |
+
|
21 |
+
User-defined coefficient values (`coeff_perform`, `coeff_power`, `coeff_area`) of three objectives to set the direction of tuning are written in the script. Each coefficient is expressed as a global variable at the `get_ppa` function in `PPAImprov` class in the script (`coeff_perform`, `coeff_power`, `coeff_area`). Efforts to optimize each of the objectives are proportional to the specified coefficients.
|
22 |
+
|
23 |
+
|
24 |
+
## Setting up AutoTuner
|
25 |
+
|
26 |
+
To setup AutoTuner, make sure you have a virtual environment set up with
|
27 |
+
Python 3.9.X. There are plenty of ways to do this, we recommend using
|
28 |
+
[Miniconda](https://docs.conda.io/en/latest/miniconda.html),
|
29 |
+
which is a free minimal installer for the package manager `conda`.
|
30 |
+
|
31 |
+
```shell
|
32 |
+
# set up conda environment
|
33 |
+
conda create -n autotuner_env python=3.9
|
34 |
+
conda activate autotuner_env
|
35 |
+
|
36 |
+
# install requirements
|
37 |
+
pip install -r ./tools/AutoTuner/requirements.txt
|
38 |
+
```
|
39 |
+
|
40 |
+
## Input JSON structure
|
41 |
+
|
42 |
+
Sample JSON [file](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/flow/designs/sky130hd/aes/autotuner.json) for Sky130HD `aes` design:
|
43 |
+
|
44 |
+
Alternatively, here is a minimal example to get started:
|
45 |
+
|
46 |
+
```json
|
47 |
+
{
|
48 |
+
"_SDC_FILE_PATH": "constraint.sdc",
|
49 |
+
"_SDC_CLK_PERIOD": {
|
50 |
+
"type": "float",
|
51 |
+
"minmax": [
|
52 |
+
1.0,
|
53 |
+
3.7439
|
54 |
+
],
|
55 |
+
"step": 0
|
56 |
+
},
|
57 |
+
"CORE_MARGIN": {
|
58 |
+
"type": "int",
|
59 |
+
"minmax": [
|
60 |
+
2,
|
61 |
+
2
|
62 |
+
],
|
63 |
+
"step": 0
|
64 |
+
},
|
65 |
+
}
|
66 |
+
```
|
67 |
+
|
68 |
+
* `"_SDC_FILE_PATH"`, `"_SDC_CLK_PERIOD"`, `"CORE_MARGIN"`: Parameter names for sweeping/tuning.
|
69 |
+
* `"type"`: Parameter type ("float" or "int") for sweeping/tuning
|
70 |
+
* `"minmax"`: Min-to-max range for sweeping/tuning. The unit follows the default value of each technology std cell library.
|
71 |
+
* `"step"`: Parameter step within the minmax range. Step 0 for type "float" means continuous step for sweeping/tuning. Step 0 for type "int" means the constant parameter.
|
72 |
+
|
73 |
+
## Tunable / sweepable parameters
|
74 |
+
|
75 |
+
Tables of parameters that can be swept/tuned in technology platforms supported by ORFS.
|
76 |
+
Any variable that can be set from the command line can be used for tune or sweep.
|
77 |
+
|
78 |
+
For SDC you can use:
|
79 |
+
|
80 |
+
* `_SDC_FILE_PATH`
|
81 |
+
- Path relative to the current JSON file to the SDC file.
|
82 |
+
* `_SDC_CLK_PERIOD`
|
83 |
+
- Design clock period. This will create a copy of `_SDC_FILE_PATH` and modify the clock period.
|
84 |
+
* `_SDC_UNCERTAINTY`
|
85 |
+
- Clock uncertainty. This will create a copy of `_SDC_FILE_PATH` and modify the clock uncertainty.
|
86 |
+
* `_SDC_IO_DELAY`
|
87 |
+
- I/O delay. This will create a copy of `_SDC_FILE_PATH` and modify the I/O delay.
|
88 |
+
|
89 |
+
|
90 |
+
For Global Routing parameters that are set on `fastroute.tcl` you can use:
|
91 |
+
|
92 |
+
* `_FR_FILE_PATH`
|
93 |
+
- Path relative to the current JSON file to the `fastroute.tcl` file.
|
94 |
+
* `_FR_LAYER_ADJUST`
|
95 |
+
- Layer adjustment. This will create a copy of `_FR_FILE_PATH` and modify the layer adjustment for all routable layers, i.e., from `$MIN_ROUTING_LAYER` to `$MAX_ROUTING_LAYER`.
|
96 |
+
* `_FR_LAYER_ADJUST_NAME`
|
97 |
+
- Layer adjustment for layer NAME. This will create a copy of `_FR_FILE_PATH` and modify the layer adjustment only for the layer NAME.
|
98 |
+
* `_FR_GR_SEED`
|
99 |
+
- Global route random seed. This will create a copy of `_FR_FILE_PATH` and modify the global route random seed.
|
100 |
+
|
101 |
+
|
102 |
+
## How to use
|
103 |
+
|
104 |
+
### General Information
|
105 |
+
|
106 |
+
The `distributed.py` script uses Ray's job scheduling and management to
|
107 |
+
fully utilize available hardware resources from a single server
|
108 |
+
configuration, on-premies or over the cloud with multiple CPUs.
|
109 |
+
The two modes of operation: `sweep`, where every possible parameter
|
110 |
+
combination in the search space is tested; and `tune`, where we use
|
111 |
+
Ray's Tune feature to intelligently search the space and optimize
|
112 |
+
hyperparameters using one of the algorithms listed above. The `sweep`
|
113 |
+
mode is useful when we want to isolate or test a single or very few
|
114 |
+
parameters. On the other hand, `tune` is more suitable for finding
|
115 |
+
the best combination of a complex and large number of flow
|
116 |
+
parameters. Both modes rely on user-specified search space that is
|
117 |
+
defined by a `.json` file, they use the same syntax and format,
|
118 |
+
though some features may not be available for sweeping.
|
119 |
+
|
120 |
+
```{note}
|
121 |
+
The order of the parameters matter. Arguments `--design`, `--platform` and
|
122 |
+
`--config` are always required and should precede <mode>.
|
123 |
+
```
|
124 |
+
|
125 |
+
#### Tune only
|
126 |
+
|
127 |
+
* AutoTuner: `python3 distributed.py tune -h`
|
128 |
+
|
129 |
+
Example:
|
130 |
+
|
131 |
+
```shell
|
132 |
+
python3 distributed.py --design gcd --platform sky130hd \
|
133 |
+
--config ../designs/sky130hd/gcd/autotuner.json \
|
134 |
+
tune
|
135 |
+
```
|
136 |
+
#### Sweep only
|
137 |
+
|
138 |
+
* Parameter sweeping: `python3 distributed.py sweep -h`
|
139 |
+
|
140 |
+
Example:
|
141 |
+
|
142 |
+
```shell
|
143 |
+
python3 distributed.py --design gcd --platform sky130hd \
|
144 |
+
--config distributed-sweep-example.json \
|
145 |
+
sweep
|
146 |
+
```
|
147 |
+
|
148 |
+
|
149 |
+
### Google Cloud Platform (GCP) distribution with Ray
|
150 |
+
|
151 |
+
GCP Setup Tutorial coming soon.
|
152 |
+
|
153 |
+
|
154 |
+
### List of input arguments
|
155 |
+
| Argument | Description |
|
156 |
+
|-------------------------------|-------------------------------------------------------------------------------------------------------|
|
157 |
+
| `--design` | Name of the design for Autotuning. |
|
158 |
+
| `--platform` | Name of the platform for Autotuning. |
|
159 |
+
| `--config` | Configuration file that sets which knobs to use for Autotuning. |
|
160 |
+
| `--experiment` | Experiment name. This parameter is used to prefix the FLOW_VARIANT and to set the Ray log destination.|
|
161 |
+
| `--resume` | Resume previous run. |
|
162 |
+
| `--git_clean` | Clean binaries and build files. **WARNING**: may lose previous data. |
|
163 |
+
| `--git_clone` | Force new git clone. **WARNING**: may lose previous data. |
|
164 |
+
| `--git_clone_args` | Additional git clone arguments. |
|
165 |
+
| `--git_latest` | Use latest version of OpenROAD app. |
|
166 |
+
| `--git_or_branch` | OpenROAD app branch to use. |
|
167 |
+
| `--git_orfs_branch` | OpenROAD-flow-scripts branch to use. |
|
168 |
+
| `--git_url` | OpenROAD-flow-scripts repo URL to use. |
|
169 |
+
| `--build_args` | Additional arguments given to ./build_openroad.sh |
|
170 |
+
| `--algorithm` | Search algorithm to use for Autotuning. |
|
171 |
+
| `--eval` | Evalaute function to use with search algorithm. \ |
|
172 |
+
| `--samples` | Number of samples for tuning. |
|
173 |
+
| `--iterations` | Number of iterations for tuning. |
|
174 |
+
| `--resources_per_trial` | Number of CPUs to request for each tuning job. |
|
175 |
+
| `--reference` | Reference file for use with PPAImprov. |
|
176 |
+
| `--perturbation` | Perturbation interval for PopulationBasedTraining |
|
177 |
+
| `--seed` | Random seed. |
|
178 |
+
| `--jobs` | Max number of concurrent jobs. |
|
179 |
+
| `--openroad_threads` | Max number of threads usable. |
|
180 |
+
| `--server` | The address of Ray server to connect. |
|
181 |
+
| `--port` | The port of Ray server to connect. |
|
182 |
+
| `-v` or `--verbose` | Verbosity Level. [0: Only ray status, 1: print stderr, 2: print stdout on top of what is in level 0 and 1. ] |
|
183 |
+
| | |
|
184 |
+
### GUI
|
185 |
+
|
186 |
+
Basically, progress is displayed at the terminal where you run, and when all runs are finished, the results are displayed.
|
187 |
+
You could find the "Best config found" on the screen.
|
188 |
+
|
189 |
+
To use TensorBoard GUI, run `tensorboard --logdir=./<logpath>`. While TensorBoard is running, you can open the webpage `http://localhost:6006/` to see the GUI.
|
190 |
+
|
191 |
+
We show three different views possible at the end, namely: `Table View`, `Scatter Plot Matrix View` and `Parallel Coordinate View`.
|
192 |
+
|
193 |
+
![Table View](../images/Autotuner_Table_view.webp)
|
194 |
+
<p style="text-align: center;">Table View</p>
|
195 |
+
|
196 |
+
![Scatter Plot Matrix View](../images/Autotuner_scatter_plot_matrix_view.webp)
|
197 |
+
<p style="text-align: center;">Scatter Plot Matrix View</p>
|
198 |
+
|
199 |
+
![Parallel Coordinate View](../images/Autotuner_best_parameter_view.webp)
|
200 |
+
<p style="text-align: center;">Parallel Coordinate View (best run is in green)</p>
|
201 |
+
|
202 |
+
|
203 |
+
## Citation
|
204 |
+
|
205 |
+
Please cite the following paper.
|
206 |
+
|
207 |
+
* J. Jung, A. B. Kahng, S. Kim and R. Varadarajan, "METRICS2.1 and Flow Tuning in the IEEE CEDA Robust Design Flow and OpenROAD", [(.pdf)](https://vlsicad.ucsd.edu/Publications/Conferences/388/c388.pdf), [(.pptx)](https://vlsicad.ucsd.edu/Publications/Conferences/388/c388.pptx), [(.mp4)](https://vlsicad.ucsd.edu/Publications/Conferences/388/c388.mp4), Proc. ACM/IEEE International Conference on Computer-Aided Design, 2021.
|
208 |
+
|
209 |
+
## Acknowledgments
|
210 |
+
|
211 |
+
AutoTuner has been developed by UCSD with the OpenROAD Project.
|
markdown/ORFS_docs/general/Jenkins.md
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Jenkins Continuous Integration
|
2 |
+
|
3 |
+
The Jenkins website is at [https://jenkins.openroad.tools/](https://jenkins.openroad.tools/).
|
4 |
+
For an in-depth tutorial on how to access the CI metrics, please see
|
5 |
+
the [link](https://docs.google.com/presentation/d/1kWHLjUBFcd0stnDaPNi_pt9WFrrsR7tQ95BGhT1yOvw/)
|
6 |
+
|
7 |
+
```{Note}
|
8 |
+
This document is not static is constantly being updated due to changes
|
9 |
+
in the functionality of Jenkins.
|
10 |
+
```
|
markdown/ORFS_docs/general/Manpage.md
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Utilities
|
2 |
+
|
3 |
+
The utility module contains the `man` command.
|
4 |
+
|
5 |
+
## Commands
|
6 |
+
|
7 |
+
```{note}
|
8 |
+
- Parameters in square brackets `[-param param]` are optional.
|
9 |
+
- Parameters without square brackets `-param2 param2` are required.
|
10 |
+
```
|
11 |
+
|
12 |
+
## Man installation
|
13 |
+
|
14 |
+
The `man` command can be installed optionally as part of the OpenROAD
|
15 |
+
binary. For more instructions, please refer to [here](manREADME.md).
|
16 |
+
|
17 |
+
### Man
|
18 |
+
|
19 |
+
The `man` command in OpenROAD is similar in functionality to Unix
|
20 |
+
(and Unix-like operating systems such as Linux) . It is used to
|
21 |
+
display the manual pages for various applications, tools and error
|
22 |
+
messages. These manual pages provide detailed information about how
|
23 |
+
to use a particular command or function, along with its syntax and options.
|
24 |
+
|
25 |
+
This can be used for a range of commands in different levels as follows:
|
26 |
+
- Level 1: Top-level openroad command (e.g. `man openroad`)
|
27 |
+
- Level 2: Individual module commands (e.g. `man clock_tree_synthesis`)
|
28 |
+
- Level 3: Info, error, warning messages (e.g. `man CTS-0001`)
|
29 |
+
|
30 |
+
```tcl
|
31 |
+
man
|
32 |
+
name
|
33 |
+
[-manpath manpath]
|
34 |
+
[-no_pager]
|
35 |
+
```
|
36 |
+
|
37 |
+
#### Options
|
38 |
+
|
39 |
+
| Switch Name | Description |
|
40 |
+
| ----- | ----- |
|
41 |
+
| `name` | Name of the command/message to query. |
|
42 |
+
| `-manpath` | Include optional path to man pages (e.g. ~/OpenROAD/docs/cat). |
|
43 |
+
| `-no_pager` | This flag determines whether you wish to see all of the man output at once. Default value is `False`, which shows a buffered output. |
|
44 |
+
|
45 |
+
## Example scripts
|
46 |
+
|
47 |
+
You may run various commands or message IDs for man pages.
|
48 |
+
```
|
49 |
+
man openroad
|
50 |
+
man clock_tree_synthesis
|
51 |
+
man CTS-0005
|
52 |
+
```
|
53 |
+
|
54 |
+
## Regression tests
|
55 |
+
|
56 |
+
There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests).
|
57 |
+
|
58 |
+
For information regarding the Man page test framework, refer to this
|
59 |
+
[link](../../docs/src/test/README.md).
|
60 |
+
|
61 |
+
You should also be aware of the [README](../../docs/contrib/ReadmeFormat.md) and [Tcl](../../docs/contrib/TclFormat.md) format enforced to ensure
|
62 |
+
accurate parsing of man pages.
|
63 |
+
|
64 |
+
Simply run the following script:
|
65 |
+
|
66 |
+
```shell
|
67 |
+
./test/regression
|
68 |
+
```
|
69 |
+
|
70 |
+
## Limitations
|
71 |
+
|
72 |
+
## FAQs
|
73 |
+
|
74 |
+
Check out
|
75 |
+
[GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+utl) about this tool.
|
76 |
+
|
77 |
+
## References
|
78 |
+
|
79 |
+
## Authors
|
80 |
+
|
81 |
+
MAN command is written by Jack Luar with guidance from members of the OpenROAD team,
|
82 |
+
including: Cho Moon, Matt Liberty.
|
83 |
+
|
84 |
+
## License
|
85 |
+
|
86 |
+
BSD 3-Clause License. See [LICENSE](../../LICENSE) file.
|
markdown/ORFS_docs/general/Metrics.md
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Metrics
|
2 |
+
|
3 |
+
The [OpenROAD-flow-scripts](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts)
|
4 |
+
repository contains source files (e.g., LEF/DEF, Verilog, SDC, Liberty,
|
5 |
+
RC extraction) and configuration files (e.g. `config.mk`) that enable the user to run
|
6 |
+
a small set of example designs through our complete RTL-to-GDS flow.
|
7 |
+
|
8 |
+
To keep track of the quality of the results, we maintain inside each
|
9 |
+
design folder two files:
|
10 |
+
|
11 |
+
1. `metadata-base-ok.json` which contains all the relevant
|
12 |
+
information extracted from the "golden" execution of the flow (i.e.,
|
13 |
+
last known good result).
|
14 |
+
|
15 |
+
2. `rules.json` which holds a set of rules that we use to
|
16 |
+
evaluate new executions when a change is made.
|
17 |
+
|
18 |
+
## Checking against golden
|
19 |
+
|
20 |
+
The evaluation checks for key metrics (e.g., worst slack, number of
|
21 |
+
DRCs) to ensure that changes do not degrade too much with respect to the
|
22 |
+
"golden" values.
|
23 |
+
|
24 |
+
After you make a significant change, e.g., fixing a bug in a piece of
|
25 |
+
code, or changing some configuration variable
|
26 |
+
(`PLACE_DENSITY`), you should review the results and compare
|
27 |
+
them with the "golden". To perform the check, you will need to run the
|
28 |
+
following command:
|
29 |
+
|
30 |
+
``` shell
|
31 |
+
cd OpenROAD-flow-scripts/flow
|
32 |
+
# the clean_metadata is only required if you need to re-run
|
33 |
+
make [clean_metadata] metadata
|
34 |
+
```
|
35 |
+
|
36 |
+
If the command above yields any error message, please review to
|
37 |
+
make sure the change in metrics is expected and justifiable. If so,
|
38 |
+
proceed to the next section to update the "golden" reference.
|
39 |
+
|
40 |
+
## Update process
|
41 |
+
|
42 |
+
Update of the reference files is mandatory if any metrics became worse
|
43 |
+
than the values limited by the `rules.json` (see previous
|
44 |
+
section on how to perform the check). Also, it is a good idea to update
|
45 |
+
the "golden" files if your changes have improved a metric, to ensure that
|
46 |
+
the improvement will not be lost in the future.
|
47 |
+
|
48 |
+
To update all the reference files:
|
49 |
+
|
50 |
+
``` shell
|
51 |
+
cd OpenROAD-flow-scripts/flow
|
52 |
+
make update_ok
|
53 |
+
```
|
54 |
+
|
55 |
+
In case you have a special reason to only update one of the files, you
|
56 |
+
can do so with the following commands:
|
57 |
+
|
58 |
+
``` shell
|
59 |
+
# update metadata-base-ok.json file for the design
|
60 |
+
make update_metadata
|
61 |
+
|
62 |
+
# update rules.json file for the design
|
63 |
+
# this will use the current (+ a padding) metadata-base-ok.json
|
64 |
+
# the padding ensures that small changes do not break the flow
|
65 |
+
make update_rules
|
66 |
+
```
|
markdown/ORFS_docs/general/Notebooks.md
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Colab Quickstart
|
2 |
+
|
3 |
+
Notebook-based packaging offers three main benefits:
|
4 |
+
1. Colab is completely free to use and can be accessed from any web browser.
|
5 |
+
1. Colab notebooks can be easily shared with others, making it a great
|
6 |
+
tool for teams to collaborate and manage OpenROAD design runs.
|
7 |
+
1. The notebook can easily be modified to be used for on-premise servers or
|
8 |
+
notebook-based cloud providers such as LambdaLabs/Paperspace.
|
9 |
+
|
10 |
+
We provide two notebooks for a quickstart to OpenROAD-flow-scripts functionality
|
11 |
+
as follows:
|
12 |
+
|
13 |
+
## OpenROAD-flow-scripts Automated RTL-GDSII Flow
|
14 |
+
|
15 |
+
The notebook for the automated flow for `gcd` design in `nangate45` technology node can be found [here](https://colab.research.google.com/drive/1bfcvqOnbw8q7FmSONLw8q7-yBVvKsQot).
|
16 |
+
|
17 |
+
## AutoTuner Flow
|
18 |
+
|
19 |
+
The notebook for the OpenROAD-flow-scripts AutoTuner flow for `gcd` design in `sky130hd` technology node can be found [here](https://colab.research.google.com/drive/1wye0osn34YVWPvTrfBTftjOfGOtF3ABe).
|
markdown/ORFS_docs/general/PlatformBringUp.md
ADDED
@@ -0,0 +1,475 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Guide to Integrate a New Platform into the OpenROAD Flow
|
2 |
+
|
3 |
+
## Overview
|
4 |
+
|
5 |
+
This document is a guide for foundry and third party IP providers to
|
6 |
+
easily integrate and test a new technology in to the OpenROAD RTL to GDS
|
7 |
+
flow. OpenROAD allows you to integrate any PDK (Process Design Kit) for any
|
8 |
+
feature size and implement a fully open-sourced RTL-GDSII flow (synthesizable
|
9 |
+
Verilog to merged GDSII). The OpenROAD flow has been validated for feature
|
10 |
+
sizes down to 7nm and used to design and tapeout over 600 ASIC and SoCs
|
11 |
+
to date.
|
12 |
+
|
13 |
+
## Prerequisites
|
14 |
+
|
15 |
+
To build and add a new platform for OpenROAD, key technology and library
|
16 |
+
components must be provided based on the technology node. These are generally
|
17 |
+
available as part of the standard design kit provided by a foundry or a
|
18 |
+
third-party IP provider.
|
19 |
+
|
20 |
+
They include :
|
21 |
+
|
22 |
+
* A standard cell library
|
23 |
+
* GDS files of all standard cells in the library (or a way to generate
|
24 |
+
them from the layout files, e.g., Magic VLSI layout tool).
|
25 |
+
* A technology LEF file of the PDK being used that includes all relevant
|
26 |
+
information regarding metal layers, vias, and spacing requirements.
|
27 |
+
* See `flow/platforms/nangate45/lef/NangateOpenCellLibrary.tech.lef`
|
28 |
+
as an example tech LEF file.
|
29 |
+
* A macro LEF file of the standard cell kit that includes MACRO definitions
|
30 |
+
of every cell, pin designations (input/output/inout).
|
31 |
+
* See `flow/platforms/nangate45/lef/NangateOpenCellLibrary.macro.lef`
|
32 |
+
as an example macro LEF file.
|
33 |
+
* A Liberty file of the standard cell library with PVT characterization,
|
34 |
+
input and output characteristics, timing and power definitions for
|
35 |
+
each cell.
|
36 |
+
* See `flow/platforms/nangate45/lib/NangateOpenCellLibrary_typical.lib`
|
37 |
+
as an example liberty file.
|
38 |
+
* For KLayout: A mapping from LEF/DEF to GDS `layers:datatypes`
|
39 |
+
|
40 |
+
Adding a new platform additionally requires the following:
|
41 |
+
|
42 |
+
* A validated installation of the OpenROAD flow scripts is available. See
|
43 |
+
instructions [here](../index.md#build-or-installing-orfs-dependencies).
|
44 |
+
* A general knowledge of VLSI design and RTL to GDS flows. OpenROAD
|
45 |
+
implements a fully-automated RTL-GDSII but it requires familiarity with
|
46 |
+
the OpenROAD flow scripts to debug problems.
|
47 |
+
|
48 |
+
## Adding a New Platform to OpenROAD
|
49 |
+
|
50 |
+
### Setup
|
51 |
+
|
52 |
+
This section describes the necessary files and directories needed to build
|
53 |
+
the platform. All files and directories made/edited are independent of
|
54 |
+
each other unless otherwise stated.
|
55 |
+
|
56 |
+
### Makefile
|
57 |
+
|
58 |
+
Make the following edits to the Makefile (located in `flow/Makefile`)
|
59 |
+
so that OpenROAD can run the flow on a design using the new platform.
|
60 |
+
|
61 |
+
At the beginning of the Makefile, there is a block of `DESIGN_CONFIG`
|
62 |
+
variables that are commented out. These variables tell OpenROAD which
|
63 |
+
design to run and on what platform. `DESIGN_CONFIG` specifically points
|
64 |
+
to a `config.mk` file located in the designs directory for the respective
|
65 |
+
platform. It is not required to add a `DESIGN_CONFIG` variable for a design
|
66 |
+
in the respective platform directly into the Makefile. It is merely a
|
67 |
+
convenience to add a `DESIGN_CONFIG` variable in the `Makefile` and can
|
68 |
+
instead be set when invoking make. OpenROAD has multiple Verilog designs
|
69 |
+
already made which can be used with any platform (see `flow/designs/src`
|
70 |
+
for a list of usable designs). For example, a `DESIGN_CONFIG` variable
|
71 |
+
using the `gcd` design on a new platform would look as follows:
|
72 |
+
|
73 |
+
```{code-block} Makefile
|
74 |
+
:caption: Makefile
|
75 |
+
DESIGN_CONFIG=./designs/MyNewPlatform/gcd/config.mk
|
76 |
+
```
|
77 |
+
|
78 |
+
The `config.mk` file will be generated later in the [Design
|
79 |
+
Directory](content:design:directory) section of this document.
|
80 |
+
|
81 |
+
### Platform Directory
|
82 |
+
|
83 |
+
Create a directory for the new technology inside `flow/platforms` to contain
|
84 |
+
the necessary files for the OpenROAD flow.
|
85 |
+
|
86 |
+
``` shell
|
87 |
+
mkdir flow/platforms/MyNewPlatform
|
88 |
+
```
|
89 |
+
(content:design:directory)=
|
90 |
+
### Design Directory
|
91 |
+
|
92 |
+
The design directory contains the configuration files for all the designs of
|
93 |
+
a specific platform. Create a directory for the new platform in flow/designs
|
94 |
+
to contain the relevant files and directories for all the designs for the
|
95 |
+
flow in that specific platform. Each design requires its own `config.mk`
|
96 |
+
and `constraint.sdc` files.
|
97 |
+
|
98 |
+
:::{tip}
|
99 |
+
Follow the steps below to create the necessary directories and files.
|
100 |
+
Note gcd is just an example and not a required name.
|
101 |
+
|
102 |
+
``` shell
|
103 |
+
mkdir -p flow/designs/MyNewPlatform/gcd
|
104 |
+
touch flow/designs/MyNewPlatform/gcd/config.mk
|
105 |
+
touch flow/designs/MyNewPlatform/gcd/constraint.sdc
|
106 |
+
```
|
107 |
+
This creates two directories MyNewPlatform and `gcd` and two empty files
|
108 |
+
`config.mk` and `constraint.sdc` in `flow/designs/MyNewPlatform/gcd`.
|
109 |
+
:::
|
110 |
+
|
111 |
+
### Platform Configuration
|
112 |
+
|
113 |
+
This section describes the necessary files in the platform directory needed
|
114 |
+
for the OpenROAD flow. Specifically the `config.mk` file in the platform
|
115 |
+
directory has all of the configuration variables that the flow uses. Refer
|
116 |
+
to the OpenROAD-flow-scripts documentation for a full list of configuration
|
117 |
+
variables that can be set.
|
118 |
+
Refer to the [Flow variables](../user/FlowVariables.md) document for details on how to use
|
119 |
+
environment variables in OpenROAD-flow-scripts to configure platform and design specific parameters.
|
120 |
+
|
121 |
+
For an example of a platform `config.mk` file, refer to
|
122 |
+
`flow/platforms/sky130hd/config.mk.`
|
123 |
+
|
124 |
+
### Design Configuration
|
125 |
+
|
126 |
+
This section describes files in the design directory.
|
127 |
+
|
128 |
+
### `config.mk`
|
129 |
+
|
130 |
+
The `config.mk` file describes design-specific variables.
|
131 |
+
|
132 |
+
For Example:
|
133 |
+
|
134 |
+
```
|
135 |
+
DESIGN_NAME
|
136 |
+
PLATFORM
|
137 |
+
VERILOG_FILES
|
138 |
+
SDC_FILE
|
139 |
+
CORE_UTILIZATION
|
140 |
+
CORE_ASPECT_RATIO
|
141 |
+
CORE_MARGIN
|
142 |
+
PLACE_DENSITY
|
143 |
+
```
|
144 |
+
|
145 |
+
Alternatively, `DIE_AREA` and `CORE_AREA` can be specified instead of
|
146 |
+
`CORE_UTILIZATION`, `CORE_ASPECT_RATIO`, and `CORE_MARGIN`. For a complete
|
147 |
+
descriptor of all variables see [here](../user/FlowVariables.md).
|
148 |
+
|
149 |
+
Following is a sample `config.mk` file for the `gcd` design:
|
150 |
+
|
151 |
+
```{code-block} shell
|
152 |
+
:caption: config.mk
|
153 |
+
export DESIGN_NAME = gcd
|
154 |
+
export PLATFORM = sky130hd
|
155 |
+
|
156 |
+
export VERILOG_FILES = $(sort $(wildcard ./designs/src/$(DESIGN_NAME)/*.v))
|
157 |
+
|
158 |
+
export SDC_FILE = ./designs/$(PLATFORM)/$(DESIGN_NAME)/constraint.sdc
|
159 |
+
|
160 |
+
export CORE_UTILIZATION = 30
|
161 |
+
export CORE_ASPECT_RATIO = 1
|
162 |
+
export CORE_MARGIN = 2
|
163 |
+
export PLACE_DENSITY = 0.70
|
164 |
+
```
|
165 |
+
|
166 |
+
### `constraint.sdc`
|
167 |
+
|
168 |
+
The `constraint.sdc` file defines timing constraints for the design. The
|
169 |
+
`create_clock` command allows you to define clocks that are either connected
|
170 |
+
to nets or are virtual and can be customized. The units for `create_clock`
|
171 |
+
need to be consistent with the liberty time units. Here’s an example of
|
172 |
+
a `constraint.sdc` file which defines a clock `clk` with a period of 8.4
|
173 |
+
nanoseconds (nanoseconds being consistent with the liberty time units).
|
174 |
+
|
175 |
+
```{code-block} tcl
|
176 |
+
:caption: constraint.sdc
|
177 |
+
create_clock [get_ports clk] -period 8.4 #Units are in nanoseconds
|
178 |
+
```
|
179 |
+
|
180 |
+
Refer to the
|
181 |
+
[OpenSTA](https://github.com/The-OpenROAD-Project/OpenSTA/blob/master/doc/OpenSTA.pdf)
|
182 |
+
User Guide for the full documentation of the `create_clock` command.
|
183 |
+
|
184 |
+
### Liberty, LEF, and GDS Files
|
185 |
+
|
186 |
+
The liberty, LEF, and GDS files do not technically have to reside inside the
|
187 |
+
platform directory of respective technology as long as the paths set in the
|
188 |
+
`config.mk` file point to the correct files. However, it is good practice to
|
189 |
+
have all relevant files in one localized directory. The `.lib`, `.lef`, and
|
190 |
+
`.gds` reside in directories named respectively for the specific technology.
|
191 |
+
|
192 |
+
For example:
|
193 |
+
``` shell
|
194 |
+
mdkir flow/platforms/MyNewPlatform/lib
|
195 |
+
mdkir flow/platforms/MyNewPlatform/lef
|
196 |
+
mdkir flow/platforms/MyNewPlatform/gds
|
197 |
+
```
|
198 |
+
|
199 |
+
A merged GDS file may be used instead of adding every individual `.gds`
|
200 |
+
file from the standard cell library.
|
201 |
+
|
202 |
+
Once the liberty file, tech and macro LEF files, and either the merged
|
203 |
+
standard cell GDS or individual standard cell GDS files have been generated,
|
204 |
+
place them in their respective directories and set the `lib`, `lef`, and
|
205 |
+
`gds` variables in the platform `config.mk` file to the correct paths.
|
206 |
+
|
207 |
+
### Clock Gates
|
208 |
+
|
209 |
+
Yosys cannot (currently) infer clock gates automatically. However, users can
|
210 |
+
manually instantiate clock gates in their RTL using a generic interface. The
|
211 |
+
purpose of this interface is to separate platform-specific RTL (also called
|
212 |
+
"hardened" RTL) from platform-independent RTL (generic RTL).
|
213 |
+
|
214 |
+
This file is only required if you want to instantiate clock gates in your
|
215 |
+
design.
|
216 |
+
|
217 |
+
To create this module, a gated clock standard cell is required. This standard
|
218 |
+
cell is used to create the generic module `OPENROAD_CLKGATE`, as shown below.
|
219 |
+
|
220 |
+
```{code-block} verilog
|
221 |
+
:caption: cells_clkgate.v
|
222 |
+
module OPENROAD_CLKGATE (CK, E, GCK);
|
223 |
+
input CK;
|
224 |
+
input E;
|
225 |
+
output GCK;
|
226 |
+
|
227 |
+
<clkgate_std_cell> latch (.CLK(CK), .GATE(E), .GCLK(GCK));
|
228 |
+
endmodule
|
229 |
+
```
|
230 |
+
|
231 |
+
An example instantiation of this module in a user design is shown below.
|
232 |
+
|
233 |
+
```{code-block} verilog
|
234 |
+
:caption: buffer.v
|
235 |
+
// This is not a platform file, this is an example user design
|
236 |
+
|
237 |
+
module buffer (clk, enable, in, out);
|
238 |
+
|
239 |
+
input clk, enable;
|
240 |
+
input [7:0] in,
|
241 |
+
output [7:0] out
|
242 |
+
|
243 |
+
reg [15:0] buffer_reg;
|
244 |
+
wire gck; // Gated clock
|
245 |
+
|
246 |
+
OPENROAD_CLKGATE clkgate (.CK(clk), .E(enable), .GCK(gck));
|
247 |
+
|
248 |
+
// Buffer does not change if enable is low
|
249 |
+
always @(posedge gck) begin
|
250 |
+
buffer_reg[15:8] <= in;
|
251 |
+
buffer_reg[ 7:0] <= buffer_reg[15:8];
|
252 |
+
end
|
253 |
+
|
254 |
+
assign out = buffer_reg[ 7:0];
|
255 |
+
|
256 |
+
```
|
257 |
+
|
258 |
+
### Latches
|
259 |
+
|
260 |
+
Yosys can automatically infer latches from RTL, however it requires a behavioral
|
261 |
+
Verilog module. Example latch definitions are provided below. `DLATCH_P` is an
|
262 |
+
active-high level-sensitive latch and `DLATCH_N` is an active-low
|
263 |
+
level-sensitive latch.
|
264 |
+
|
265 |
+
This file is only required if you want to infer latches for your design.
|
266 |
+
|
267 |
+
```{code-block} verilog
|
268 |
+
:caption: cells_latch.v
|
269 |
+
module $_DLATCH_P_(input E, input D, output Q);
|
270 |
+
<d_latch_std_cell> _TECHMAP_REPLACE_ (
|
271 |
+
.D (D),
|
272 |
+
.G (E),
|
273 |
+
.Q (Q)
|
274 |
+
);
|
275 |
+
endmodule
|
276 |
+
|
277 |
+
module $_DLATCH_N_(input E, input D, output Q);
|
278 |
+
<d_latch_std_cell> _TECHMAP_REPLACE_ (
|
279 |
+
.D (D),
|
280 |
+
.GN (E),
|
281 |
+
.Q (Q)
|
282 |
+
);
|
283 |
+
endmodule
|
284 |
+
```
|
285 |
+
|
286 |
+
### FastRoute Configuration
|
287 |
+
|
288 |
+
FastRoute is the tool used to global-route the design. FastRoute requires a
|
289 |
+
Tcl file to set which routing layers will be used for signals, adjust routing
|
290 |
+
layer resources, set which routing heuristic to use when routing, etc. It’s
|
291 |
+
recommended to use the default `fastroute.tcl` due to its simplicity and
|
292 |
+
effectiveness. Following is the default FastRoute configuration file.
|
293 |
+
|
294 |
+
```{code-block} tcl
|
295 |
+
:caption: fastroute.tcl
|
296 |
+
set_global_routing_layer_adjustment $::env(MIN_ROUTING_LAYER)-$::env(MAX_ROUTING_LAYER) 0.5
|
297 |
+
set_routing_layers -signal $::env(MIN_ROUTING_LAYER)-$::env(MAX_ROUTING_LAYER)
|
298 |
+
```
|
299 |
+
|
300 |
+
The first command, `set_global_routing_layer_adjustment`, adjusts the
|
301 |
+
routing resources of the design. This effectively reduces the number of
|
302 |
+
routing tracks that the global router assumes to exist. By setting it to
|
303 |
+
the value of 0.5, this reduced the routing resources of all routing layers
|
304 |
+
to 50% which can help with congestion and reduce the challenges for detail
|
305 |
+
routing. The second command, `set_routing_layers`, sets the minimum and
|
306 |
+
maximum routing layers for signal nets by using the `-signal` option.
|
307 |
+
|
308 |
+
More customization can be done to increase the efficiency of global and
|
309 |
+
detail route. Refer to the [FastRoute documentation](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/grt/README.md)
|
310 |
+
|
311 |
+
### Metal Tracks Configuration
|
312 |
+
|
313 |
+
OpenROAD requires a metal track configuration file for use in
|
314 |
+
floorplanning. For each metal layer, the x and y offset as well as the x and
|
315 |
+
y pitch are defined. To find the pitch and offset for both x and y, refer
|
316 |
+
to the `LAYER` definition section for each metal in the tech LEF. Following
|
317 |
+
is a generalized metal tracks configuration file with five metal tracks
|
318 |
+
defined. **Units are in microns**.
|
319 |
+
|
320 |
+
```{code-block} tcl
|
321 |
+
:caption: make_tracks.tcl
|
322 |
+
make_tracks metal1 -x_offset 0.24 -x_pitch 0.82 -y_offset 0.24 -y_pitch 0.82
|
323 |
+
make_tracks metal2 -x_offset 0.28 -x_pitch 0.82 -y_offset 0.28 -y_pitch 0.82
|
324 |
+
make_tracks metal3 -x_offset 0.28 -x_pitch 0.82 -y_offset 0.28 -y_pitch 0.82
|
325 |
+
make_tracks metal4 -x_offset 0.28 -x_pitch 0.82 -y_offset 0.28 -y_pitch 0.82
|
326 |
+
make_tracks metal5 -x_offset 0.28 -x_pitch 0.82 -y_offset 0.28 -y_pitch 0.82
|
327 |
+
```
|
328 |
+
|
329 |
+
Following is the `LAYER` definition for `metal1` in the `sky130hd` tech LEF.
|
330 |
+
```
|
331 |
+
LAYER met1
|
332 |
+
TYPE ROUTING ;
|
333 |
+
DIRECTION HORIZONTAL ;
|
334 |
+
|
335 |
+
PITCH 0.34 ;
|
336 |
+
OFFSET 0.17 ;
|
337 |
+
|
338 |
+
WIDTH 0.14 ; # Met1 1
|
339 |
+
# SPACING 0.14 ; # Met1 2
|
340 |
+
# SPACING 0.28 RANGE 3.001 100 ; # Met1 3b
|
341 |
+
SPACINGTABLE
|
342 |
+
PARALLELRUNLENGTH 0
|
343 |
+
WIDTH 0 0.14
|
344 |
+
WIDTH 3 0.28 ;
|
345 |
+
AREA 0.083 ; # Met1 6
|
346 |
+
THICKNESS 0.35 ;
|
347 |
+
MINENCLOSEDAREA 0.14 ;
|
348 |
+
|
349 |
+
ANTENNAMODEL OXIDE1 ;
|
350 |
+
ANTENNADIFFSIDEAREARATIO PWL ( ( 0 400 ) ( 0.0125 400 ) ( 0.0225 2609 ) ( 22.5 11600 ) ) ;
|
351 |
+
|
352 |
+
EDGECAPACITANCE 40.567E-6 ;
|
353 |
+
CAPACITANCE CPERSQDIST 25.7784E-6 ;
|
354 |
+
DCCURRENTDENSITY AVERAGE 2.8 ; # mA/um Iavg_max at Tj = 90oC
|
355 |
+
ACCURRENTDENSITY RMS 6.1 ; # mA/um Irms_max at Tj = 90oC
|
356 |
+
MAXIMUMDENSITY 70 ;
|
357 |
+
DENSITYCHECKWINDOW 700 700 ;
|
358 |
+
DENSITYCHECKSTEP 70 ;
|
359 |
+
|
360 |
+
RESISTANCE RPERSQ 0.125 ;
|
361 |
+
END met1
|
362 |
+
```
|
363 |
+
|
364 |
+
In the example above, the x and y pitch for `met1` would be 0.34 and the
|
365 |
+
x and y offset would be 0.17.
|
366 |
+
|
367 |
+
### PDN Configuration
|
368 |
+
|
369 |
+
PDN is a utility that simplifies adding a power grid into the floorplan. With
|
370 |
+
specifications given in the PDN configuration file, like which layer to use,
|
371 |
+
stripe width and spacing, the utility can generate the metal straps used
|
372 |
+
for the power grid. To create and configure a power grid, refer to the
|
373 |
+
[PDN documentation](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/pdn/README.md).
|
374 |
+
|
375 |
+
### Tapcell Configuration
|
376 |
+
|
377 |
+
The tapcell configuration file is used to insert tapcells and endcaps into
|
378 |
+
the design. Refer to the [Tapcell](https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/tap) documentation
|
379 |
+
on how to construct this file.
|
380 |
+
|
381 |
+
### setRC Configuration
|
382 |
+
|
383 |
+
`setRC` allows the user to define resistances and capacitances for layers
|
384 |
+
and vias using the `set_layer_rc` command. There is also a command that
|
385 |
+
allows you to set the resistance and capacitance of routing wires using
|
386 |
+
the `set_wire_rc`. The units `set_wire_rc` is expecting are per-unit-length
|
387 |
+
values. Often, per-unit-length values are available in the PDK user guide. For
|
388 |
+
`set_layer_rc`, Liberty units need to be used. Following is a generic example
|
389 |
+
of a `setRC` configuration file which sets the resistance and capacitance
|
390 |
+
of five metal layers, four vias, one signal wire, and one clock wire.
|
391 |
+
|
392 |
+
```{code-block} tcl
|
393 |
+
:caption: setRC.tcl
|
394 |
+
set_layer_rc -layer M1 -capacitance 1.449e-04 -resistance 8.929e-04
|
395 |
+
set_layer_rc -layer M2 -capacitance 1.331e-04 -resistance 8.929e-04
|
396 |
+
set_layer_rc -layer M3 -capacitance 1.464e-04 -resistance 1.567e-04
|
397 |
+
set_layer_rc -layer M4 -capacitance 1.297e-04 -resistance 1.567e-04
|
398 |
+
set_layer_rc -layer M5 -capacitance 1.501e-04 -resistance 1.781e-05
|
399 |
+
|
400 |
+
set_layer_rc -via V1 -resistance 9.249146E-3
|
401 |
+
set_layer_rc -via V2 -resistance 4.5E-3
|
402 |
+
set_layer_rc -via V3 -resistance 3.368786E-3
|
403 |
+
set_layer_rc -via V4 -resistance 0.376635E-3
|
404 |
+
|
405 |
+
set_wire_rc -signal -layer M2
|
406 |
+
set_wire_rc -clock -layer M5
|
407 |
+
```
|
408 |
+
|
409 |
+
### KLayout
|
410 |
+
|
411 |
+
KLayout is used in the OpenROAD flow to provide GDS merging, DRC, and
|
412 |
+
LVS. Two files are required for KLayout and they are generated within the
|
413 |
+
KLayout GUI. Install KLayout on the host machine since it is not included
|
414 |
+
in the OpenROAD build process. Then create the properties and tech files
|
415 |
+
as explained below.
|
416 |
+
|
417 |
+
### KLayout tech file
|
418 |
+
|
419 |
+
Follow these steps to generate the KLayout tech file:
|
420 |
+
|
421 |
+
1. Open KLayout in a terminal.
|
422 |
+
2. Go to Tools -> Manage Technologies.
|
423 |
+
3. Click the + in the bottom left corner to create a new technology.
|
424 |
+
4. Set the name for the technology in the box that pops up. You should now see the technology name in the list on the left hand side.
|
425 |
+
5. Expand the technology by hitting the arrow and click on General.
|
426 |
+
6. Set the base path your platform directory and load the `.lyp` layer properties file that was generated earlier.
|
427 |
+
7. On the left hand side under your new technology click Reader Options and then click LEF/DEF on the top bar.
|
428 |
+
8. In the LEF+Macro Files section, you add the LEF files by clicking the + button on the right hand side of the box.
|
429 |
+
1. **Note**: Only add your original merged LEF file. Make sure it includes the full path to the LEF file.
|
430 |
+
9. In the Production section, scroll down and add the layer map file by hitting the Load File button.
|
431 |
+
1. **Note**: Make sure it includes the full path.
|
432 |
+
10. Above in the same section, change the layer name suffix and GDS data type to correspond with the layer map.
|
433 |
+
11. Generate the `.lyt` file by right clicking on the new technology name and click on Export Technology.
|
434 |
+
12. Save with the extension `.lyt`.
|
435 |
+
|
436 |
+
### KLayout properties file
|
437 |
+
|
438 |
+
The properties file is not required to obtain a GDS and is merely used for styling purposes inside. Follow these steps to generate the KLayout properties file:
|
439 |
+
|
440 |
+
1. Open KLayout.
|
441 |
+
2. Install the `tf_import` package.
|
442 |
+
1. Inside KLayout, go to Tools.
|
443 |
+
2. Manage Packages.
|
444 |
+
3. Install New Packages.
|
445 |
+
4. Select `tf_import`.
|
446 |
+
1. If the source of the package is from GitHub, then the file “” needs to be edited to include “source stdio”.
|
447 |
+
3. Re-start KLayout.
|
448 |
+
4. File -> Import some LEF. Does not matter what LEF; you will just get an error message without one..
|
449 |
+
1. Once selected, go to Options at the bottom left.
|
450 |
+
2. Select your layer map file under the Production tab.
|
451 |
+
3. Go to the LEF+Macro Files tab, then add under Additional LEF files, the merged (original) LEF file in your platform directory.
|
452 |
+
4. Under Macro Layout Files, add the GDS file in your platform directory.
|
453 |
+
5. File -> Import Cadence tech file.
|
454 |
+
1. You have to select a tech file (found in the PDK, usually inside the Virtuoso folder).
|
455 |
+
2. KLayout also needs a `.drf` file which is automatically included if it resides in the same directory the cadence tech file was found in (found in the PDK’s Virtuoso folder)..
|
456 |
+
6. File -> Save Layer Properties.
|
457 |
+
1. Save as a `.lyp` file in your platform directory.
|
458 |
+
|
459 |
+
## Validating the New Platform
|
460 |
+
|
461 |
+
To validate the new platform, simply run a design through the flow using
|
462 |
+
the new platform. The Makefile should already include the `DESIGN_CONFIG`
|
463 |
+
variables for the new platform which were generated in the Setup section
|
464 |
+
of the document. Simply uncomment a `DESIGN_CONFIG` variable for the new
|
465 |
+
platform in the Makefile, save, and then run `make` in the terminal to run
|
466 |
+
the design through the flow. Try a small design first (i.e. `gcd`) so that
|
467 |
+
run time is small and you can identify and fix errors faster.
|
468 |
+
|
469 |
+
## Authors/Contributors
|
470 |
+
|
471 |
+
* James Stine - Oklahoma State University
|
472 |
+
* Teo Ene - Oklahoma State University
|
473 |
+
* Ricardo Hernandez - Oklahoma State University
|
474 |
+
* Ryan Ridley - Oklahoma State University
|
475 |
+
* Indira Iyer - OpenROAD Project Consultant
|
markdown/ORFS_docs/general/QoRDashboard.md
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Using the OpenROAD Dashboard to track and analyze Quality of Results
|
2 |
+
|
3 |
+
The metrics dashboard [(https://dashboard.theopenroadproject.org/)](https://dashboard.theopenroadproject.org/)
|
4 |
+
is tailored for RTL-to-GDS flow stages, targeting different designs across
|
5 |
+
various platforms. The dashboard comprises two main pages: the trends
|
6 |
+
page and the comparison page.
|
7 |
+
|
8 |
+
## Trends
|
9 |
+
|
10 |
+
The trends page allows users to visualize metric trends through
|
11 |
+
interactive graphs, enabling the selection of platforms, designs,
|
12 |
+
and metrics for each platform. This feature aids in tracking the
|
13 |
+
fluctuations of metrics over time.
|
14 |
+
|
15 |
+
![Trends](../images/trends.webp)
|
16 |
+
|
17 |
+
## Comparison
|
18 |
+
|
19 |
+
The comparison page lets users compare metrics between branches
|
20 |
+
or commits for a specific platform and its designs. The comparison is
|
21 |
+
shown as a table showcasing the differences between the
|
22 |
+
base source and the test source. This page also offers deeper insights,
|
23 |
+
like the platform summary table that presents statistical trends for
|
24 |
+
different designs within a platform and a summary table that
|
25 |
+
provides insights for the set of selected designs, with added
|
26 |
+
functionality for filtering.
|
27 |
+
|
28 |
+
![Comparison](../images/comparison.webp)
|
29 |
+
|
30 |
+
These pages combine to create a comprehensive dashboard facilitating
|
31 |
+
data-driven decision-making and performance optimization in the
|
32 |
+
design flow.
|
markdown/ORFS_docs/general/TutorialHome.md
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# OpenROAD-flow-scripts tutorial
|
2 |
+
|
3 |
+
The links to the main flow tutorial, where we go through each step of
|
4 |
+
the RTL-GDSII flow are as [follows](FlowTutorial.md). We have also provided
|
5 |
+
Google Colab packaging for ease of experimentation [here](Notebooks.md).
|
markdown/ORFS_docs/general/UserGuide.md
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# User Guide
|
2 |
+
|
3 |
+
The OpenROAD Project uses three tools to perform automated RTL-to-GDS layout generation:
|
4 |
+
|
5 |
+
1. [yosys](https://github.com/The-OpenROAD-Project/yosys): Logic
|
6 |
+
Synthesis
|
7 |
+
2. [OpenROAD](https://github.com/The-OpenROAD-Project/OpenROAD):
|
8 |
+
Floorplanning through Detailed Routing
|
9 |
+
3. [KLayout](https://www.klayout.de/): GDS merge, DRC and LVS (public
|
10 |
+
PDKs)
|
11 |
+
|
12 |
+
To automate RTL-to-GDS we provide
|
13 |
+
[OpenROAD Flow](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts),
|
14 |
+
which contains scripts that integrate the three tools.
|
15 |
+
|
16 |
+
## Code Organization
|
17 |
+
|
18 |
+
The [OpenROAD Flow](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts)
|
19 |
+
repository serves as an example RTL-to-GDS flow using the OpenROAD
|
20 |
+
tools. The script `build_openroad.sh` in the repository will
|
21 |
+
automatically build the OpenROAD toolchain.
|
22 |
+
|
23 |
+
The two main directories are:
|
24 |
+
|
25 |
+
1. `tools/`: contains the source code for the entire yosys and
|
26 |
+
[OpenROAD App](https://github.com/The-OpenROAD-Project/OpenROAD)
|
27 |
+
(both via submodules) as well as other tools required for the flow.
|
28 |
+
3. `flow/`: contains reference recipes and scripts to run designs
|
29 |
+
through the flow. It also contains public platforms and test
|
30 |
+
designs.
|
31 |
+
|
32 |
+
## Setup
|
33 |
+
|
34 |
+
See [Getting Started](../index.md#getting-started-with-openroad-flow-scripts) guide.
|
35 |
+
|
36 |
+
## Using the OpenROAD Flow
|
37 |
+
|
38 |
+
See the documentation [here](../tutorials/FlowTutorial.md) for details about the
|
39 |
+
flow and how to run designs through the flow.
|
40 |
+
|
41 |
+
## Using the OpenROAD App
|
42 |
+
|
43 |
+
See the documentation [here](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/README.md) for details about the app and
|
44 |
+
the available features and commands.
|
markdown/ORFS_docs/general/mainREADME.md
ADDED
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# OpenROAD Flow
|
2 |
+
|
3 |
+
[![Build Status](https://jenkins.openroad.tools/buildStatus/icon?job=OpenROAD-flow-scripts-Public%2Fpublic_tests_all%2Fmaster)](https://jenkins.openroad.tools/view/Public/job/OpenROAD-flow-scripts-Public/job/public_tests_all/job/master/)
|
4 |
+
[![Docs](https://readthedocs.org/projects/openroad-flow-scripts/badge/?version=latest)](https://openroad-flow-scripts.readthedocs.io/en/latest/?badge=latest)
|
5 |
+
|
6 |
+
OpenROAD-flow-scripts (ORFS) is a fully autonomous, RTL-GDSII flow
|
7 |
+
for rapid architecture and design space exploration, early prediction
|
8 |
+
of QoR and detailed physical design implementation. However, ORFS
|
9 |
+
also enables manual intervention for finer user control of individual
|
10 |
+
flow stages through Tcl commands and Python APIs.
|
11 |
+
|
12 |
+
```{mermaid}
|
13 |
+
:align: center
|
14 |
+
|
15 |
+
%%{init: { 'logLevel': 'debug', 'theme': 'dark'
|
16 |
+
} }%%
|
17 |
+
timeline
|
18 |
+
title RTL-GDSII Using OpenROAD-flow-scripts
|
19 |
+
Synthesis
|
20 |
+
: Inputs [RTL, SDC, .lib, .lef]
|
21 |
+
: Logic Synthesis (Yosys)
|
22 |
+
: Output files [Netlist, SDC]
|
23 |
+
Floorplan
|
24 |
+
: Floorplan Initialization
|
25 |
+
: IO placement (random)
|
26 |
+
: Timing-driven mixed-size placement
|
27 |
+
: Macro placement
|
28 |
+
: Tapcell and welltie insertion
|
29 |
+
: PDN generation
|
30 |
+
Placement
|
31 |
+
: Global placement without placed IOs
|
32 |
+
: IO placement (optimized)
|
33 |
+
: Global placement with placed IOs
|
34 |
+
: Resizing and buffering
|
35 |
+
: Detailed placement
|
36 |
+
CTS : Clock Tree Synthesis
|
37 |
+
: Timing optimization
|
38 |
+
: Filler cell insertion
|
39 |
+
Routing
|
40 |
+
: Global Routing
|
41 |
+
: Detailed Routing
|
42 |
+
Finishing
|
43 |
+
: Metal Fill insertion
|
44 |
+
: Signoff timing report
|
45 |
+
: Generate GDSII (KLayout)
|
46 |
+
: DRC/LVS check (KLayout)
|
47 |
+
```
|
48 |
+
|
49 |
+
## Tool Installation
|
50 |
+
|
51 |
+
### Docker Based Installation
|
52 |
+
|
53 |
+
To ease dependency installation issues, ORFS uses docker images.
|
54 |
+
Docker image includes ORFS binaries, applications as well as all
|
55 |
+
required dependencies. All of the flow tools are encapsulated
|
56 |
+
inside the container image.
|
57 |
+
|
58 |
+
If `Docker` is not installed already, install latest docker tool
|
59 |
+
based on OS from [here](https://docs.docker.com/engine/install/).
|
60 |
+
|
61 |
+
To manage docker as non-root user and verify that you can run
|
62 |
+
`docker` commands without `sudo` must complete steps from
|
63 |
+
[here](https://docs.docker.com/engine/install/linux-postinstall/).
|
64 |
+
|
65 |
+
#### Build ORFS with Docker
|
66 |
+
|
67 |
+
Document for detailed steps on docker based installation found
|
68 |
+
[here](./docs/user/BuildWithDocker.md).
|
69 |
+
|
70 |
+
### Pre-built Binaries
|
71 |
+
|
72 |
+
You can download, set up and run ORFS easily with pre-built
|
73 |
+
binaries, including OpenROAD, Yosys and Klayout. See instructions
|
74 |
+
[here](./docs/user/BuildWithPrebuilt.md).
|
75 |
+
|
76 |
+
> **Thanks** to [Precision Innovations](https://precisioninno.com/) for
|
77 |
+
> providing and supporting OpenROAD based binaries.
|
78 |
+
|
79 |
+
> **Note** Only the latest version of OpenROAD is guaranteed to work with
|
80 |
+
> the latest version of ORFS.
|
81 |
+
|
82 |
+
> **Disclaimer** The versions of OpenROAD, Yosys and Klayout provided by
|
83 |
+
> other third-party vendors are not guaranteed to work with ORFS.
|
84 |
+
|
85 |
+
### Build from sources locally
|
86 |
+
|
87 |
+
Document for detailed local build from sources and installation steps found [here](./docs/user/BuildLocally.md).
|
88 |
+
|
89 |
+
## Using the Flow
|
90 |
+
|
91 |
+
- For details about the OpenROAD and the available features and
|
92 |
+
individual flows commands, see the documentation
|
93 |
+
[here](https://openroad.readthedocs.io/en/latest/).
|
94 |
+
- For details about automated flow setup, see ORFS docs
|
95 |
+
[here](https://openroad-flow-scripts.readthedocs.io/en/latest/user/GettingStarted.html).
|
96 |
+
- Flow tutorial to run the complete OpenROAD based flow from
|
97 |
+
RTL-GDSII, see the tutorial
|
98 |
+
[here](https://openroad-flow-scripts.readthedocs.io/en/latest/tutorials/FlowTutorial.html).
|
99 |
+
- To watch ORFS flow tutorial videos, check
|
100 |
+
[here](https://theopenroadproject.org/video).
|
101 |
+
|
102 |
+
## Citing this Work
|
103 |
+
|
104 |
+
If you use this software in any published work, we would appreciate a citation!
|
105 |
+
Please use the following references:
|
106 |
+
|
107 |
+
```
|
108 |
+
@article{ajayi2019openroad,
|
109 |
+
title={OpenROAD: Toward a Self-Driving, Open-Source Digital Layout Implementation Tool Chain},
|
110 |
+
author={Ajayi, T and Blaauw, D and Chan, TB and Cheng, CK and Chhabria, VA and Choo, DK and Coltella, M and Dobre, S and Dreslinski, R and Foga{\c{c}}a, M and others},
|
111 |
+
journal={Proc. GOMACTECH},
|
112 |
+
pages={1105--1110},
|
113 |
+
year={2019}
|
114 |
+
}
|
115 |
+
```
|
116 |
+
|
117 |
+
A copy of this paper is available
|
118 |
+
[here](http://people.ece.umn.edu/users/sachin/conf/gomactech19.pdf) (PDF).
|
119 |
+
|
120 |
+
```
|
121 |
+
@inproceedings{ajayi2019toward,
|
122 |
+
title={Toward an open-source digital flow: First learnings from the openroad project},
|
123 |
+
author={Ajayi, Tutu and Chhabria, Vidya A and Foga{\c{c}}a, Mateus and Hashemi, Soheil and Hosny, Abdelrahman and Kahng, Andrew B and Kim, Minsoo and Lee, Jeongsup and Mallappa, Uday and Neseem, Marina and others},
|
124 |
+
booktitle={Proceedings of the 56th Annual Design Automation Conference 2019},
|
125 |
+
pages={1--4},
|
126 |
+
year={2019}
|
127 |
+
}
|
128 |
+
```
|
129 |
+
|
130 |
+
A copy of this paper is available
|
131 |
+
[here](https://vlsicad.ucsd.edu/Publications/Conferences/371/c371.pdf) (PDF).
|
132 |
+
|
133 |
+
If you like the tools, please give us a star on our GitHub repos!
|
134 |
+
|
135 |
+
## License
|
136 |
+
|
137 |
+
The OpenROAD-flow-scripts repository (build and run scripts) has a BSD 3-Clause License.
|
138 |
+
The flow relies on several tools, platforms and designs that each have their own licenses:
|
139 |
+
|
140 |
+
- Find the tool license at: `OpenROAD-flow-scripts/tools/{tool}/` or `OpenROAD-flow-scripts/tools/OpenROAD/src/{tool}/`.
|
141 |
+
- Find the platform license at: `OpenROAD-flow-scripts/flow/platforms/{platform}/`.
|
142 |
+
- Find the design license at: `OpenROAD-flow-scripts/flow/designs/src/{design}/`.
|
markdown/ORFS_docs/installation/BuildLocally.md
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Build from sources locally
|
2 |
+
|
3 |
+
## Clone and Install Dependencies
|
4 |
+
|
5 |
+
The `setup.sh` script installs all of the dependencies, including OpenROAD dependencies, if they are not already installed.
|
6 |
+
|
7 |
+
Supported configurations are: CentOS 7, Ubuntu 20.04, Ubuntu 22.04, RHEL 8,
|
8 |
+
Debian 10 and Debian 11.
|
9 |
+
|
10 |
+
``` shell
|
11 |
+
git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts
|
12 |
+
cd OpenROAD-flow-scripts
|
13 |
+
sudo ./setup.sh
|
14 |
+
```
|
15 |
+
|
16 |
+
## Build
|
17 |
+
|
18 |
+
``` shell
|
19 |
+
./build_openroad.sh --local
|
20 |
+
```
|
21 |
+
:::{Note}
|
22 |
+
There is a `build_openroad.log` file that is generated with every
|
23 |
+
build in the main directory. In case of filing issues, it can be uploaded
|
24 |
+
in the "Relevant log output" section of OpenROAD-flow-scripts repo
|
25 |
+
[issue form](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/issues/new?assignees=&labels=&template=bug_report_with_orfs.yml).
|
26 |
+
:::
|
27 |
+
|
28 |
+
## Verify Installation
|
29 |
+
|
30 |
+
The binaries should be available on your `$PATH` after setting
|
31 |
+
up the environment. The `make` command runs from RTL-GDSII generation for default design `gcd` with `nangate45` PDK.
|
32 |
+
|
33 |
+
``` shell
|
34 |
+
source ./env.sh
|
35 |
+
yosys -help
|
36 |
+
openroad -help
|
37 |
+
cd flow
|
38 |
+
make
|
39 |
+
```
|
40 |
+
|
41 |
+
You can view final layout images in OpenROAD GUI using this command.
|
42 |
+
|
43 |
+
``` shell
|
44 |
+
make gui_final
|
45 |
+
```
|
46 |
+
|
47 |
+
![gcd_final.webp](../images/gcd_final.webp)
|
48 |
+
|
49 |
+
## Compiling and debugging in Visual Studio Code
|
50 |
+
|
51 |
+
Set up environment variables using `dev_env.sh`, then start Visual Studio Code. Please ensure [CMake plugins](https://code.visualstudio.com/docs/cpp/cmake-linux) are installed.
|
52 |
+
|
53 |
+
``` shell
|
54 |
+
. ./dev_env.sh
|
55 |
+
code tools/OpenROAD/
|
56 |
+
```
|
markdown/ORFS_docs/installation/BuildWithDocker.md
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Build from sources using Docker
|
2 |
+
|
3 |
+
## Prerequisites
|
4 |
+
|
5 |
+
- For this method you only need to install
|
6 |
+
[Docker](https://docs.docker.com/engine/install) on your machine.
|
7 |
+
- Ensure that you have sufficient memory allocated to the Virtual Machine (VM)
|
8 |
+
as per our system [requirements](../index.md#system-requirements). Refer to
|
9 |
+
this [Docker guide](https://docs.docker.com/config/containers/resource_constraints/) for setting CPU cores and memory limits.
|
10 |
+
|
11 |
+
:::{Warning}
|
12 |
+
The `build_openroad.sh` will use the host number of CPUs to compile `openroad`.
|
13 |
+
|
14 |
+
Please check your Docker daemon setup to make sure all host CPUs are
|
15 |
+
available. If you are not sure, you can check with the command below. If
|
16 |
+
the output number is different from the number of CPUs from your machine,
|
17 |
+
then is recommended that you restrict the number of CPUs used by the scripts
|
18 |
+
(see instructions below).
|
19 |
+
:::
|
20 |
+
|
21 |
+
``` shell
|
22 |
+
docker run --rm ubuntu:22.04 nproc
|
23 |
+
```
|
24 |
+
|
25 |
+
### Build Using Docker from pre-built binaries
|
26 |
+
|
27 |
+
Courtesy of [Precision Innovations](https://precisioninno.com/),
|
28 |
+
they release `.deb` installers of OpenROAD for Ubuntu
|
29 |
+
and Debian on a regular basis.
|
30 |
+
This greatly helps to reduce the compilation time needed.
|
31 |
+
|
32 |
+
We recommend to use a Docker image of a supported OS
|
33 |
+
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.
|
37 |
+
|
38 |
+
```shell
|
39 |
+
docker run -it ubuntu:22.04
|
40 |
+
```
|
41 |
+
|
42 |
+
Now you are ready to install the prebuilt binaries.
|
43 |
+
Please refer to the instructions for installing prebuilt binaries
|
44 |
+
[here](./BuildWithPrebuilt.md).
|
45 |
+
|
46 |
+
### Build Using Docker from sources
|
47 |
+
|
48 |
+
Alternatively, if you would like the latest commits from the OpenROAD repositories,
|
49 |
+
do follow the instructions below.
|
50 |
+
|
51 |
+
|
52 |
+
#### Clone and Build
|
53 |
+
|
54 |
+
The following instructions build the docker image with Ubuntu 22.04 as the base OS:
|
55 |
+
|
56 |
+
|
57 |
+
``` shell
|
58 |
+
git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts
|
59 |
+
cd OpenROAD-flow-scripts
|
60 |
+
./build_openroad.sh
|
61 |
+
```
|
62 |
+
|
63 |
+
You can restrict the number of CPUs with the `-t|--threads N` argument:
|
64 |
+
|
65 |
+
``` shell
|
66 |
+
./build_openroad.sh --threads N
|
67 |
+
```
|
68 |
+
|
69 |
+
## Verify Installation
|
70 |
+
|
71 |
+
The binaries are only available from inside a Docker container. Here is an example of starting a container from the created Docker image.
|
72 |
+
|
73 |
+
``` shell
|
74 |
+
docker run --rm -it -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd)/flow:/OpenROAD-flow-scripts/flow openroad/flow-ubuntu22.04-builder
|
75 |
+
```
|
76 |
+
|
77 |
+
Then, inside docker:
|
78 |
+
|
79 |
+
``` shell
|
80 |
+
source ./env.sh
|
81 |
+
yosys -help
|
82 |
+
openroad -help
|
83 |
+
cd flow
|
84 |
+
make
|
85 |
+
exit
|
86 |
+
```
|
87 |
+
|
88 |
+
Alternatively you may also use the `docker_shell` utility as follows.
|
89 |
+
It is important that you are in the `flow` directory.
|
90 |
+
|
91 |
+
```shell
|
92 |
+
cd flow
|
93 |
+
util/docker_shell make
|
94 |
+
```
|
95 |
+
|
96 |
+
## Enable GUI support
|
97 |
+
|
98 |
+
To use the GUI feature you will need to start the docker with the
|
99 |
+
following command,
|
100 |
+
|
101 |
+
For Ubuntu/Debian OS users:
|
102 |
+
|
103 |
+
```
|
104 |
+
docker run --rm -it \
|
105 |
+
-u $(id -u ${USER}):$(id -g ${USER}) \
|
106 |
+
-v $(pwd)/flow:/OpenROAD-flow-scripts/flow \
|
107 |
+
-e DISPLAY=${DISPLAY} \
|
108 |
+
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
109 |
+
-v ${HOME}/.Xauthority:/.Xauthority \
|
110 |
+
--network host \
|
111 |
+
--security-opt seccomp=unconfined \
|
112 |
+
openroad/flow-$OS_NAME-builder
|
113 |
+
```
|
114 |
+
|
115 |
+
Running GUI with Docker on Mac OS X users, refer [here](https://cntnr.io/running-guis-with-docker-on-mac-os-x-a14df6a76efc).
|
116 |
+
|
117 |
+
Then use:
|
118 |
+
|
119 |
+
```
|
120 |
+
docker run --rm -it -e DISPLAY=<IP_LIKE_FROM_TUTORIAL>:0 --network host --privileged <IMAGE_NAME>
|
121 |
+
```
|
122 |
+
|
123 |
+
Alternatively, you may also use the `docker_shell` utility for GUI as follows.
|
124 |
+
It is important that you are in the `flow` directory.
|
125 |
+
|
126 |
+
```shell
|
127 |
+
cd flow
|
128 |
+
util/docker_shell gui_final
|
129 |
+
```
|
130 |
+
|
131 |
+
```{note}
|
132 |
+
`docker_shell` is a helpful utility to automate the
|
133 |
+
aforementioned Docker commands using the user's parameters.
|
134 |
+
Do refer to the documentation [here](./DockerShell.md).
|
135 |
+
```
|
136 |
+
|
137 |
+
## Build Docker Image for Different OS
|
138 |
+
|
139 |
+
The following instructions build the docker image with a parameterized OS
|
140 |
+
in two stages. These are for CI and developers that wish to use an OS other
|
141 |
+
than Ubuntu 22.04; regular users should use the steps from previous sections.
|
142 |
+
The dev stage installs all dependencies and packages required to run OpenROAD
|
143 |
+
and OpenROAD Flow Scripts. The build stage generates all binaries needed to run
|
144 |
+
the flow (i.e., `openroad` and `yosys`).
|
145 |
+
|
146 |
+
``` shell
|
147 |
+
git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts
|
148 |
+
cd OpenROAD-flow-scripts
|
149 |
+
./etc/DockerHelper.sh create -target=dev -os=$OS_NAME
|
150 |
+
./etc/DockerHelper.sh create -target=builder -os=$OS_NAME
|
151 |
+
```
|
markdown/ORFS_docs/installation/BuildWithPrebuilt.md
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Using Pre-built Binaries
|
2 |
+
|
3 |
+
## Install Klayout and Yosys
|
4 |
+
Please ensure the Klayout version (denoted with `klayoutVersion` variable) is consistent with the one used in [DependencyInstaller script](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/etc/DependencyInstaller.sh).
|
5 |
+
|
6 |
+
Instructions for installing:
|
7 |
+
- [Klayout>=0.28.8](https://www.klayout.de/build.html)
|
8 |
+
- [Yosys>=0.39](https://github.com/YosysHQ/oss-cad-suite-build/blob/master/README.md#installation)
|
9 |
+
|
10 |
+
```{tip} Unfortunately KLayout maintainers do not provide Debian 10/11 compatible packages. You can follow the build-from-sources instruction (Version >=0.25) and Ubuntu 22 instructions [here](https://www.klayout.de/build.html#:~:text=Building%20KLayout%20on%20Linux%20(Version%20%3E%3D%200.25)).
|
11 |
+
```
|
12 |
+
|
13 |
+
## Install OpenROAD
|
14 |
+
Download pre-built binaries with self-contained dependencies
|
15 |
+
included from the Precision Innovations' GitHub releases
|
16 |
+
[here](https://github.com/Precision-Innovations/OpenROAD/releases).
|
17 |
+
|
18 |
+
Thanks to [Precision Innovations](https://precisioninno.com/) for hosting and maintaining these binaries.
|
19 |
+
|
20 |
+
The following platforms are supported currently:
|
21 |
+
- Ubuntu 20.04/22.04
|
22 |
+
- Debian 10/11
|
23 |
+
|
24 |
+
Use the following steps to download:
|
25 |
+
|
26 |
+
Step 1: Click on the [Precision Innovations Github releases link](https://github.com/Precision-Innovations/OpenROAD/releases).
|
27 |
+
|
28 |
+
Step 2: Download the artifacts for your distribution.
|
29 |
+
|
30 |
+
Step 3: Run the install command based on platform use package installer.
|
31 |
+
For example Ubuntu 20.04 use:
|
32 |
+
|
33 |
+
```shell
|
34 |
+
sudo apt install ./openroad_2.0_amd64-ubuntu20.04.deb
|
35 |
+
```
|
36 |
+
|
37 |
+
## Install Klayout and Yosys
|
38 |
+
Please ensure the Klayout version (denoted with `klayoutVersion` variable) is consistent with the one used in [DependencyInstaller script](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/etc/DependencyInstaller.sh).
|
39 |
+
|
40 |
+
Instructions for installing:
|
41 |
+
- [Klayout>=0.28.8](https://www.klayout.de/build.html)
|
42 |
+
- [Yosys>=0.39](https://github.com/YosysHQ/oss-cad-suite-build/blob/master/README.md#installation)
|
43 |
+
|
44 |
+
```{tip} Unfortunately KLayout maintainers do not provide Debian 10/11 compatible packages. You can follow the build-from-sources instruction (Version >=0.25) and Ubuntu 22 instructions [here](https://www.klayout.de/build.html#:~:text=Building%20KLayout%20on%20Linux%20(Version%20%3E%3D%200.25)).
|
45 |
+
```
|
46 |
+
|
47 |
+
|
48 |
+
## Verify Installation
|
49 |
+
You may clone the OpenROAD-flow-scripts repository non-recursively.
|
50 |
+
|
51 |
+
```
|
52 |
+
git clone https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts.git
|
53 |
+
```
|
54 |
+
|
55 |
+
Export path variables accordingly.
|
56 |
+
|
57 |
+
```
|
58 |
+
# these variables are used in flow/Makefile. Do make sure the yosys path is sourced.
|
59 |
+
export OPENROAD_EXE=$(command -v openroad)
|
60 |
+
export YOSYS_CMD=$(command -v yosys)
|
61 |
+
|
62 |
+
# only if KLayout is built from source
|
63 |
+
export LD_LIBRARY_PATH="<klayout_location>/bin:$PATH"
|
64 |
+
|
65 |
+
yosys -help
|
66 |
+
openroad -help
|
67 |
+
cd flow
|
68 |
+
make
|
69 |
+
make gui_final
|
70 |
+
```
|
markdown/ORFS_docs/installation/BuildWithWSL.md
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Build with WSL
|
2 |
+
Windows Subsystem for Linux, or WSL for short is a way for you to mount a Linux-based OS onto your Windows machine, allowing you to build OpenROAD-flow-scripts both locally and via Docker.
|
3 |
+
|
4 |
+
## Install WSL
|
5 |
+
Instructions to install WSL can be found [here](https://learn.microsoft.com/en-us/windows/wsl/install). You may use any kernel supported, such as: CentOS 7, Ubuntu 20.04, Ubuntu 22.04, RHEL 8, Debian 10 and Debian 11.
|
6 |
+
|
7 |
+
We recommend that users follow the Docker build by continuing onto the guide below. However, if you wish to install locally, you may follow the build locally instructions [here](./BuildLocally.md).
|
8 |
+
|
9 |
+
> **TIP**: You may delete your WSL kernel using this [guide](https://pureinfotech.com/remove-linux-distro-wsl/).
|
10 |
+
|
11 |
+
|
12 |
+
## Docker configuration
|
13 |
+
This section assumes you have set up Docker for Windows already. If not, please refer to the Docker official website for instructions [here](https://docs.docker.com/desktop/install/windows-install/).
|
14 |
+
|
15 |
+
You need to enable the following options to allow WSL to use Docker.
|
16 |
+
|
17 |
+
General > Use the WSL 2 Based engine (should be default selection)
|
18 |
+
![WSL1](../images/wsl_1.webp)
|
19 |
+
|
20 |
+
Resources > WSL integration > Enable integration with my default WSL distro and select "Ubuntu-22.04", or the distribution you installed.
|
21 |
+
![WSL2](../images/wsl_2.webp)
|
22 |
+
|
23 |
+
## Accessing WSL
|
24 |
+
You may access WSL from the app named "Ubuntu 22.04 LTS". Run the following:
|
25 |
+
```
|
26 |
+
sudo apt-get update; sudo apt-get upgrade; sudo apt install -y build-essential python3 python3-venv python3-pip make
|
27 |
+
```
|
28 |
+
Verify if Docker is running
|
29 |
+
```
|
30 |
+
docker run hello-world
|
31 |
+
```
|
32 |
+
You should see:
|
33 |
+
|
34 |
+
```
|
35 |
+
Hello from Docker!
|
36 |
+
This message shows that your installation appears to be working correctly.
|
37 |
+
```
|
38 |
+
|
39 |
+
If everything is successful up to this point, congratulations! You are now ready to follow the [Docker guide](./BuildWithDocker.md) as you have configured a Linux system with necessary dependencies.
|
markdown/ORFS_docs/installation/FAQS.md
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# FAQs
|
2 |
+
|
3 |
+
If you cannot find your question/answer here, please file a GitHub issue to
|
4 |
+
the appropriate repository or start a discussion.
|
5 |
+
|
6 |
+
- Issues and bugs:
|
7 |
+
- OpenROAD Flow: <https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/issues>
|
8 |
+
- OpenROAD with OpenROAD Flow Scripts: <https://github.com/The-OpenROAD-Project/OpenROAD/issues>
|
9 |
+
- Discussions:
|
10 |
+
- OpenROAD Flow: <https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/discussions>
|
11 |
+
|
12 |
+
## How can I contribute?
|
13 |
+
|
14 |
+
Thank you for your willingness to contribute. Please see the
|
15 |
+
[Getting Involved](../contrib/GettingInvolved) guide.
|
16 |
+
|
17 |
+
## How do I update OpenROAD-flow-scripts?
|
18 |
+
|
19 |
+
Depending on how you installed OpenROAD-flow-scripts, there are different ways of updating. Regardless, here are the common first steps:
|
20 |
+
|
21 |
+
```shell
|
22 |
+
cd OpenROAD-flow-scripts
|
23 |
+
git checkout master
|
24 |
+
git pull
|
25 |
+
```
|
26 |
+
|
27 |
+
Now your local copy of ORFS should be up-to-date. The next step is to build it again with the following command:
|
28 |
+
|
29 |
+
For WSL/docker based installation, run:
|
30 |
+
```shell
|
31 |
+
./build_openroad.sh --clean
|
32 |
+
```
|
33 |
+
|
34 |
+
For local installation, run:
|
35 |
+
```shell
|
36 |
+
./build_openroad.sh --local --clean
|
37 |
+
```
|
38 |
+
|
39 |
+
For pre-built binaries, you can run the flow after `git pull` is done.
|
40 |
+
|
41 |
+
:::{tip}
|
42 |
+
For development purposes, it is a good practice to work on branches and leave master untouched.
|
43 |
+
- If the branch already exists: `git checkout <BRANCH> && git merge master`
|
44 |
+
- If the branch does not exist: `git checkout -b <BRANCH> && git merge master`
|
45 |
+
:::
|
46 |
+
|
47 |
+
## How do I update the design reference files?
|
48 |
+
|
49 |
+
See how to update using the Metrics [guide](../contrib/Metrics.md).
|
50 |
+
|
51 |
+
## How do I get better search results?
|
52 |
+
|
53 |
+
As quoted from [ReadTheDocs](https://docs.readthedocs.io/en/stable/server-side-search/syntax.html#special-queries), this documentation is powered by [Simple Query String](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html#) from [Elasticsearch](https://www.elastic.co/elasticsearch/). Here are some helpful patterns:
|
54 |
+
|
55 |
+
- Exact phrase search: `"global_route"`
|
56 |
+
- Prefix query: `GRT-*`, `BUF*`, `report_*`
|
57 |
+
- Fuzziness: `~N` (tilde followed by a number) after a word indicates edit distance. Helpful if the exact spelling is unknown. For example: `test~2`, `reportfilename~2`
|
markdown/ORFS_docs/installation/SupportedOS.md
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Welcome to OpenROAD's documentation!
|
2 |
+
|
3 |
+
The OpenROAD ("Foundations and Realization of Open, Accessible Design")
|
4 |
+
project was launched in June 2018 within the DARPA IDEA program. OpenROAD
|
5 |
+
aims to bring down the barriers of cost, expertise and unpredictability that
|
6 |
+
currently block designers' access to hardware implementation in advanced
|
7 |
+
technologies. The project team (Qualcomm, Arm and multiple universities and
|
8 |
+
partners, led by UC San Diego) is developing a fully autonomous, open-source
|
9 |
+
tool chain for digital SoC layout generation, focusing on
|
10 |
+
the RTL-to-GDSII phase of system-on-chip design. Thus,
|
11 |
+
OpenROAD holistically attacks the multiple facets of today's design cost
|
12 |
+
crisis: engineering resources, design tool licenses, project schedule,
|
13 |
+
and risk.
|
14 |
+
|
15 |
+
The IDEA program targets no-human-in-loop (NHIL) design, with 24-hour
|
16 |
+
turnaround time and zero loss of power-performance-area (PPA) design quality.
|
17 |
+
|
18 |
+
The NHIL target requires tools to adapt and auto-tune successfully to flow
|
19 |
+
completion, without (or, with minimal) human intervention. Machine
|
20 |
+
intelligence augments human expertise through efficient modeling and
|
21 |
+
prediction of flow and optimization outcomes throughout the synthesis, placement
|
22 |
+
and routing process. This is complemented by development of metrics
|
23 |
+
and machine learning infrastructure.
|
24 |
+
|
25 |
+
The 24-hour runtime target implies that problems must be strategically
|
26 |
+
decomposed throughout the design process, with clustered and partitioned
|
27 |
+
subproblems being solved and recomposed through intelligent distribution
|
28 |
+
and management of computational resources. This ensures that the NHIL design
|
29 |
+
optimization is performed within its available `[threads * hours]` "box" of
|
30 |
+
resources. Decomposition that enables parallel and distributed search over
|
31 |
+
cloud resources incurs a quality-of-results loss, but this is subsequently
|
32 |
+
recovered through improved flow predictability and enhanced optimization.
|
33 |
+
|
34 |
+
For a technical description of the OpenROAD flow, please refer to our DAC-2019 paper:
|
35 |
+
[Toward an Open-Source Digital Flow: First Learnings from the OpenROAD Project](https://vlsicad.ucsd.edu/Publications/Conferences/371/c371.pdf).
|
36 |
+
The paper is also available from [ACM Digital Library](https://dl.acm.org/doi/10.1145/3316781.3326334).
|
37 |
+
Other publications and presentations are
|
38 |
+
linked [here](https://theopenroadproject.org/publications/).
|
39 |
+
|
40 |
+
## Documentation
|
41 |
+
|
42 |
+
The OpenROAD Project has two releases:
|
43 |
+
|
44 |
+
- Application ([github](https://github.com/The-OpenROAD-Project/OpenROAD)) ([docs](main/README.md)): The application is a standalone binary for digital place and route that can be used by any other RTL-GDSII flow controller.
|
45 |
+
- Flow ([github](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts)) ([docs](https://openroad-flow-scripts.readthedocs.io/en/latest/)): This is the native OpenROAD flow that consists of a set of integrated scripts for an autonomous RTL-GDSII flow using OpenROAD and other open-source tools.
|
46 |
+
|
47 |
+
## Supported Operating Systems
|
48 |
+
|
49 |
+
Note that depending on the installation method, we have varying levels of
|
50 |
+
support for various operating systems.
|
51 |
+
|
52 |
+
Legend:
|
53 |
+
- `Y` for supported.
|
54 |
+
- `-` for unsupported.
|
55 |
+
|
56 |
+
| Operating System | Local Installation | Prebuilt Binaries | Docker Installation | Windows Subsystem for Linux |
|
57 |
+
| --- | --- | --- | --- | --- |
|
58 |
+
| Ubuntu 20.04 | `Y` | `Y` | `Y` | `-` |
|
59 |
+
| Ubuntu 22.04 | `Y` | `Y` | `Y` | `-` |
|
60 |
+
| CentOS 7 | `Y` | `-` | `Y` | `-` |
|
61 |
+
| CentOS 8 | `Y` | `-` | `Y` | `-` |
|
62 |
+
| Debian 10 | `Y` | `Y` | `Y` | `-` |
|
63 |
+
| Debian 11 | `Y` | `Y` | `Y` | `-` |
|
64 |
+
| RHEL | `Y` | `-` | `Y` | `-` |
|
65 |
+
| Windows 10 and above | `-` | `-` | `Y` | `Y` |
|
66 |
+
| macOS | `Y*` | `-` | `Y` | `-` |
|
67 |
+
|
68 |
+
```{warning}
|
69 |
+
For macOS, local compilation for the modules `par` and `mpl2` are not
|
70 |
+
fully supported due to an upstream issue with `or-tools`. We recommend
|
71 |
+
Docker installation wherever possible.
|
72 |
+
```
|
73 |
+
|
74 |
+
## Code of conduct
|
75 |
+
|
76 |
+
Please read our code of conduct [here](main/CODE_OF_CONDUCT.md).
|
77 |
+
|
78 |
+
## How to contribute
|
79 |
+
|
80 |
+
If you are willing to **contribute**, see the
|
81 |
+
[Getting Involved](contrib/GettingInvolved.md) section.
|
82 |
+
|
83 |
+
If you are a **developer** with EDA background, learn more about how you
|
84 |
+
can use OpenROAD as the infrastructure for your tools in the
|
85 |
+
[Developer Guide](contrib/DeveloperGuide.md) section.
|
86 |
+
|
87 |
+
OpenROAD uses Git for version control and contributions.
|
88 |
+
Get familiarised with a quickstart tutorial to contribution [here](contrib/GitGuide.md).
|
89 |
+
|
90 |
+
## How to get in touch
|
91 |
+
|
92 |
+
We maintain the following channels for communication:
|
93 |
+
|
94 |
+
- Project homepage and news: <https://theopenroadproject.org>
|
95 |
+
- Twitter: <https://twitter.com/OpenROAD_EDA>
|
96 |
+
- Issues and bugs:
|
97 |
+
- OpenROAD: <https://github.com/The-OpenROAD-Project/OpenROAD/issues>
|
98 |
+
- Discussions:
|
99 |
+
- OpenROAD: <https://github.com/The-OpenROAD-Project/OpenROAD/discussions>
|
100 |
+
- Inquiries: openroad@eng.ucsd.edu
|
101 |
+
|
102 |
+
See also our [FAQs](user/FAQS.md).
|
103 |
+
|
104 |
+
## Site Map
|
105 |
+
|
106 |
+
```{tableofcontents}
|
107 |
+
```
|
markdown/ORFS_docs/installation/index2.md
ADDED
@@ -0,0 +1,264 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Welcome to the OpenROAD Flow Scripts documentation!
|
2 |
+
|
3 |
+
The OpenROAD ("Foundations and Realization of Open, Accessible Design")
|
4 |
+
project was launched in June 2018 within the DARPA IDEA program. OpenROAD
|
5 |
+
aims to bring down the barriers of cost, expertise and unpredictability that
|
6 |
+
currently block designers access to hardware implementation in advanced
|
7 |
+
technologies. The project team (Qualcomm, Arm and multiple universities and
|
8 |
+
partners, led by UC San Diego) is developing a fully autonomous, open-source
|
9 |
+
tool chain for digital SoC layout generation, focusing on the RTL-to-GDSII
|
10 |
+
phase of system-on-chip design. Thus, OpenROAD holistically attacks the
|
11 |
+
multiple facets of today's design cost crisis: engineering resources,
|
12 |
+
design tool licenses, project schedule, and risk.
|
13 |
+
|
14 |
+
The IDEA program targets no-human-in-loop (NHIL) design, with 24-hour
|
15 |
+
turnaround time and zero loss of power-performance-area (PPA) design quality.
|
16 |
+
|
17 |
+
The NHIL target requires tools to adapt and auto-tune successfully to
|
18 |
+
flow completion, without (or, with minimal) human intervention. Machine
|
19 |
+
intelligence augments human expertise through efficient modeling and
|
20 |
+
prediction of flow and optimization outcomes throughout the synthesis,
|
21 |
+
placement and routing process. This is complemented by development of
|
22 |
+
metrics and machine learning infrastructure.
|
23 |
+
|
24 |
+
The 24-hour runtime target implies that problems must be strategically
|
25 |
+
decomposed throughout the design process, with clustered and partitioned
|
26 |
+
subproblems being solved and recomposed through intelligent distribution
|
27 |
+
and management of computational resources. This ensures that the NHIL design
|
28 |
+
optimization is performed within its available `[threads * hours]` "box" of
|
29 |
+
resources. Decomposition that enables parallel and distributed search over
|
30 |
+
cloud resources incurs a quality-of-results loss, but this is subsequently
|
31 |
+
recovered through improved flow predictability and enhanced optimization.
|
32 |
+
|
33 |
+
Learn more about the project at our website and our resources page
|
34 |
+
[here](https://theopenroadproject.org/resources/).
|
35 |
+
|
36 |
+
## Getting Started with OpenROAD Flow Scripts
|
37 |
+
|
38 |
+
OpenROAD Flow is a full RTL-to-GDS flow built entirely on open-source tools.
|
39 |
+
The project aims for automated, no-human-in-the-loop digital circuit design
|
40 |
+
with 24-hour turnaround time. For more information, refer to our repository
|
41 |
+
[README](mainREADME.md).
|
42 |
+
|
43 |
+
```{tip}
|
44 |
+
See these [tips](user/FAQS.md#how-do-i-get-better-search-results) to help improve your search results.
|
45 |
+
```
|
46 |
+
|
47 |
+
### Setup
|
48 |
+
|
49 |
+
#### Supported Operating Systems
|
50 |
+
|
51 |
+
Note that depending on the installation method, we have varying levels of
|
52 |
+
support for various operating systems.
|
53 |
+
|
54 |
+
Legend:
|
55 |
+
- `Y` for supported.
|
56 |
+
- `-` for unsupported.
|
57 |
+
|
58 |
+
| Operating System | Local Installation | Prebuilt Binaries | Docker Installation | Windows Subsystem for Linux |
|
59 |
+
| --- | --- | --- | --- | --- |
|
60 |
+
| Ubuntu 20.04 | `Y` | `Y` | `Y` | `-` |
|
61 |
+
| Ubuntu 22.04 | `Y` | `Y` | `Y` | `-` |
|
62 |
+
| CentOS 7 | `Y` | `-` | `Y` | `-` |
|
63 |
+
| CentOS 8 | `Y` | `-` | `Y` | `-` |
|
64 |
+
| Debian 10 | `Y` | `Y` | `Y` | `-` |
|
65 |
+
| Debian 11 | `Y` | `Y` | `Y` | `-` |
|
66 |
+
| RHEL | `Y` | `-` | `Y` | `-` |
|
67 |
+
| Windows 10 and above | `-` | `-` | `Y` | `Y` |
|
68 |
+
| macOS | `Y*` | `-` | `Y` | `-` |
|
69 |
+
|
70 |
+
```{warning}
|
71 |
+
For macOS, local compilation for the modules `par` and `mpl2` are not
|
72 |
+
fully supported due to an upstream issue with `or-tools`. We recommend
|
73 |
+
Docker installation wherever possible.
|
74 |
+
```
|
75 |
+
|
76 |
+
|
77 |
+
#### System Requirements
|
78 |
+
|
79 |
+
To build the binaries and run `gcd` through the flow:
|
80 |
+
|
81 |
+
- Minimum: 1 CPU core and 8GB RAM.
|
82 |
+
- Recommended: 4 CPU cores and 16GB of RAM.
|
83 |
+
|
84 |
+
```{note}
|
85 |
+
`gcd` is a small design, and thus requires less computational power.
|
86 |
+
Larger designs may require better hardware.
|
87 |
+
|
88 |
+
```
|
89 |
+
#### Build or Installing ORFS Dependencies
|
90 |
+
|
91 |
+
We support four major ways of installation:
|
92 |
+
|
93 |
+
- [Docker](./user/BuildWithDocker.md)
|
94 |
+
- [Pre-built Binaries](./user/BuildWithPrebuilt.md)
|
95 |
+
- [Windows Subsystem for Linux (WSL)](./user/BuildWithWSL.md)
|
96 |
+
- [Local Installation](./user/BuildLocally.md)
|
97 |
+
|
98 |
+
You may also choose and use the build script to customise your build process.
|
99 |
+
See more in the next section.
|
100 |
+
|
101 |
+
##### Build Command and options
|
102 |
+
|
103 |
+
``` shell
|
104 |
+
./build_openroad.sh --help
|
105 |
+
```
|
106 |
+
|
107 |
+
Options for `./build_openroad.sh` script
|
108 |
+
| Argument | Description |
|
109 |
+
|-------------------------------|---------------------------------------------------------------------------------------|
|
110 |
+
| `-h` or `--help` | Print help message. |
|
111 |
+
| `-o` or `--local` | Build locally instead of building a Docker image. |
|
112 |
+
| `-l` or `--latest` | Use the head of branch --or_branch or 'master' by default for tools/OpenROAD. |
|
113 |
+
| `--or_branch BRANCH_NAME` | Use the head of branch BRANCH for tools/OpenROAD. |
|
114 |
+
| `--or_repo REPO_URL` | Use a fork at REPO-URL (https/ssh) for tools/OpenROAD. |
|
115 |
+
| `--no_init` | Skip initializing submodules. |
|
116 |
+
| `-t N` or `--threads N` | Use N cpus when compiling software. |
|
117 |
+
| `-n` or `--nice` | Nice all jobs. Use all cpus unless `--threads` is also given, then use N threads. |
|
118 |
+
| `--yosys-args-overwrite` | Do not use default flags set by this scrip during Yosys compilation. |
|
119 |
+
| `--yosys-args STRING` | Aditional compilation flags for Yosys compilation. |
|
120 |
+
| `--openroad-args-overwrite` | Do not use default flags set by this script during OpenROAD app compilation. |
|
121 |
+
| `--openroad-args STRING` | Aditional compilation flags for OpenROAD app compilation. |
|
122 |
+
| `--lsoracle-enable` | Compile LSOracle. Disable by default as it is not currently used on the flow. |
|
123 |
+
| `--lsoracle-args-overwrite` | Do not use default flags set by this scrip during LSOracle compilation. |
|
124 |
+
| `--lsoracle-args STRING` | Aditional compilation flags for LSOracle compilation. |
|
125 |
+
| `--install-path PATH` | Path to install tools. Default is `${INSTALL_PATH}`. |
|
126 |
+
| `--clean` | Call git clean interactively before compile. Useful to remove old build files. |
|
127 |
+
| `--clean-force` | Call git clean before compile. WARNING: this option will not ask for confirmation. Useful to remove old build files. |
|
128 |
+
| `-c` or `--copy-platforms` | Only applicable for docker builds. Copy platforms to inside docker image. |
|
129 |
+
| `--docker-args-overwrite` | Only applicable for docker builds. Do not use default flags set by this script for Docker builds. |
|
130 |
+
| `--docker-args STRING` | Only applicable for docker builds. Additional compilation flags for Docker build. |
|
131 |
+
|
132 |
+
|
133 |
+
### Running a Design
|
134 |
+
|
135 |
+
Sample design configurations are available in the `designs` directory.
|
136 |
+
You can select a design using either of the following methods:
|
137 |
+
|
138 |
+
1. The flow
|
139 |
+
[Makefile](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/flow/Makefile)
|
140 |
+
contains a list of sample design configurations at the top of the
|
141 |
+
file. Uncomment the respective line to select the design.
|
142 |
+
2. Specify the design using the shell environment. For example:
|
143 |
+
|
144 |
+
```shell
|
145 |
+
make DESIGN_CONFIG=./designs/nangate45/swerv/config.mk
|
146 |
+
# or
|
147 |
+
export DESIGN_CONFIG=./designs/nangate45/swerv/config.mk
|
148 |
+
make
|
149 |
+
```
|
150 |
+
|
151 |
+
By default, the `gcd` design is selected using the
|
152 |
+
`nangate45` platform. The resulting GDS will be available at
|
153 |
+
`flow/results/nangate45/gcd/6_final.gds`. The flow should take only a few
|
154 |
+
minutes to produce a GDS for this design. We recommend implementing this
|
155 |
+
design first to validate your flow and tool setup.
|
156 |
+
|
157 |
+
### Design exploration and automatic parameter tuning
|
158 |
+
|
159 |
+
AutoTuner is an automatic parameter tuning framework capable of performing
|
160 |
+
automatic parameter tuning framework for commercial and academic RTL-to-GDS
|
161 |
+
flows. The two main functionalities that AutoTuner provides are:
|
162 |
+
|
163 |
+
- Automatic hyperparameter tuning framework for OpenROAD-flow-scripts
|
164 |
+
- Parametric sweeping experiments for OpenROAD-flow-scripts
|
165 |
+
|
166 |
+
```{tip}
|
167 |
+
Refer to the detailed [instructions here](./user/InstructionsForAutoTuner.md) for AutoTuner.
|
168 |
+
|
169 |
+
```
|
170 |
+
|
171 |
+
### Adding a Design
|
172 |
+
|
173 |
+
To add a new design to the `flow` directory, refer to the document [here](./user/AddingNewDesign.md).
|
174 |
+
|
175 |
+
### Platforms
|
176 |
+
|
177 |
+
OpenROAD-flow-scripts supports Verilog to GDS for the following open platforms:
|
178 |
+
|
179 |
+
- ASAP7
|
180 |
+
- Nangate45 / FreePDK45
|
181 |
+
- SKY130
|
182 |
+
- GF180
|
183 |
+
|
184 |
+
These platforms have a permissive license which allows us to
|
185 |
+
redistribute the PDK and OpenROAD platform-specific files. The platform
|
186 |
+
files and license(s) are located in `platforms/{platform}`.
|
187 |
+
|
188 |
+
OpenROAD-flow-scripts also supports the following proprietary platforms:
|
189 |
+
|
190 |
+
- GF55
|
191 |
+
- GF12
|
192 |
+
- Intel22
|
193 |
+
- Intel16
|
194 |
+
- TSMC65
|
195 |
+
|
196 |
+
The PDKs and platform-specific files for these kits cannot be provided
|
197 |
+
due to NDA restrictions. However, if you are able to access these
|
198 |
+
platforms, you can create the necessary platform-specific files
|
199 |
+
yourself.
|
200 |
+
|
201 |
+
Once the platform is set up, you can create a new design configuration with
|
202 |
+
information about the design. See sample configurations in the `design`
|
203 |
+
directory.
|
204 |
+
Refer to the [Flow variables](./user/FlowVariables.md) document for details on how to use
|
205 |
+
environment variables in OpenROAD-flow-scripts to configure platform and design specific parameters.
|
206 |
+
|
207 |
+
#### Adding a Platform
|
208 |
+
|
209 |
+
Refer to the [platform bring up](./contrib/PlatformBringUp.md) documentation
|
210 |
+
to set up a new platform for OpenROAD-flow-scripts.
|
211 |
+
|
212 |
+
### Implement the Design
|
213 |
+
|
214 |
+
Run `make` to perform Verilog to GDS. The final output will be located
|
215 |
+
at `flow/results/{platform}/{design_name}/6_final.gds`
|
216 |
+
|
217 |
+
### Miscellaneous
|
218 |
+
|
219 |
+
#### Smoke-test harness for top-level Verilog designs
|
220 |
+
|
221 |
+
1. Drop your Verilog files into `designs/src/harness`
|
222 |
+
2. Start the workflow:
|
223 |
+
|
224 |
+
```{tip}
|
225 |
+
Start with a very small submodule in your design that has only a few pins.
|
226 |
+
```
|
227 |
+
|
228 |
+
```shell
|
229 |
+
make DESIGN_NAME=TopLevelName DESIGN_CONFIG=$(pwd)/designs/harness.mk
|
230 |
+
```
|
231 |
+
|
232 |
+
## How to contribute
|
233 |
+
|
234 |
+
If you are willing to **contribute**, see the
|
235 |
+
[Getting Involved](contrib/GettingInvolved.md) section.
|
236 |
+
|
237 |
+
If you are a **developer** with EDA background, learn more about how you
|
238 |
+
can use OpenROAD as the infrastructure for your tools in the
|
239 |
+
[Developer Guide](contrib/DeveloperGuide.md) section.
|
240 |
+
|
241 |
+
## How to get in touch
|
242 |
+
|
243 |
+
We maintain the following channels for communication:
|
244 |
+
|
245 |
+
- Project homepage and news: <https://theopenroadproject.org>
|
246 |
+
- Twitter: <https://twitter.com/OpenROAD_EDA>
|
247 |
+
- Issues and bugs:
|
248 |
+
- OpenROAD Flow: <https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/issues>
|
249 |
+
- OpenROAD with OpenROAD Flow Scripts: <https://github.com/The-OpenROAD-Project/OpenROAD/issues/>
|
250 |
+
- Discussions:
|
251 |
+
- OpenROAD Flow: <https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/discussions>
|
252 |
+
- Inquiries: openroad@ucsd.edu
|
253 |
+
|
254 |
+
See also our [FAQs](user/FAQS.md).
|
255 |
+
|
256 |
+
## Code of conduct
|
257 |
+
|
258 |
+
Please read our code of conduct [here](./contrib/CODE_OF_CONDUCT.md).
|
259 |
+
|
260 |
+
## Site Map
|
261 |
+
|
262 |
+
```{tableofcontents}
|
263 |
+
|
264 |
+
```
|
markdown/OR_docs/general/CI.md
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# CI Guide
|
2 |
+
|
3 |
+
This document describes the pipelines available to the developers and code
|
4 |
+
maintainers in the [Jenkins server](https://jenkins.openroad.tools/). Note
|
5 |
+
that pipelines with the suffix `*-Private` are only available to code
|
6 |
+
maintainers and The OpenROAD Project members as they can contain confidential
|
7 |
+
information. Thus, to access Private pipelines one needs to have authorization
|
8 |
+
to access confidential data and be logged in the Jenkins website.
|
9 |
+
|
10 |
+
Below there is a list of the available features. Instructions on how to
|
11 |
+
navigate Jenkins to access these features are available
|
12 |
+
[here](https://docs.google.com/presentation/d/1kWHLjUBFcd0stnDaPNi_pt9WFrrsR7tQ95BGhT1yOvw/edit?usp=sharing).
|
13 |
+
|
14 |
+
- Find your build through Jenkins website or from GitHub.
|
15 |
+
- See test status: Pass/Fail.
|
16 |
+
- Log files for each test.
|
17 |
+
- Build artifacts to reproduce failures.
|
18 |
+
- HTML reports about code coverage and metrics.
|
19 |
+
|
20 |
+
## OpenROAD App
|
21 |
+
|
22 |
+
- OpenROAD-Coverage-Public
|
23 |
+
- Description: run dynamic code coverage tool `lconv`.
|
24 |
+
- Target: master branch.
|
25 |
+
- Report link [here](https://jenkins.openroad.tools/job/OpenROAD-Coverage-Public/Dynamic_20Code_20Coverage/).
|
26 |
+
- OpenROAD-Coverity-Public
|
27 |
+
- Description: compile and submit builds to Coverity static code analysis
|
28 |
+
tool.
|
29 |
+
- Target: master branch.
|
30 |
+
- Report link [here](https://scan.coverity.com/projects/the-openroad-project-openroad).
|
31 |
+
- OpenROAD-Nightly-Public
|
32 |
+
- Description: `openroad` unit tests, docker builds, ISPD 2018 and 2019
|
33 |
+
benchmarks for DRT and large unit tests of GPL.
|
34 |
+
- Target: master branch.
|
35 |
+
- OpenROAD-Public
|
36 |
+
- Description: `openroad` unit tests and docker builds.
|
37 |
+
- Target: all branches and open PRs.
|
38 |
+
- OpenROAD-Special-Private
|
39 |
+
- Description: for developer testing, runs ISPD 2018 and 2019 benchmarks
|
40 |
+
for DRT and large unit tests of GPL.
|
41 |
+
- Target branches: `TR_*`, `secure-TR_*`, `TR-*`, `secure-TR-*`.
|
42 |
+
- OpenROAD-Private
|
43 |
+
- Description: `openroad` unit tests and docker builds.
|
44 |
+
- Target: all branches. Note that PRs will be run on public side after
|
45 |
+
"Ready to Sync Public" workflow.
|
46 |
+
|
47 |
+
|
48 |
+
## OpenROAD Flow
|
49 |
+
|
50 |
+
- Information about OpenROAD Flow CI jobs can be found [here](https://openroad-flow-scripts.readthedocs.io/en/latest/contrib/CI.html)
|
51 |
+
|
52 |
+
## OpenLane
|
53 |
+
|
54 |
+
- OpenLane-MPW-CI-Public
|
55 |
+
- Description: test projects to older MPW shuttles with newer OpenLane versions.
|
56 |
+
- [Repo link](https://github.com/The-OpenROAD-Project/OpenLane-MPW-CI).
|
57 |
+
- OpenLane-Public
|
58 |
+
- Description: test OpenLane with latest commit from OpenROAD.
|
59 |
+
- [Repo link](https://github.com/The-OpenROAD-Project/OpenLane).
|
markdown/OR_docs/general/CodingPractices.md
ADDED
@@ -0,0 +1,547 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Coding Practices
|
2 |
+
|
3 |
+
List of coding practices.
|
4 |
+
|
5 |
+
:::{Note}
|
6 |
+
This is a compilation of many idioms in OpenROAD code that are considered undesirable.
|
7 |
+
:::
|
8 |
+
|
9 |
+
## C++
|
10 |
+
|
11 |
+
### Practice #1
|
12 |
+
|
13 |
+
Don't comment out code, instead remove it.
|
14 |
+
`git` provides a complete history of
|
15 |
+
the code if you want to look backwards. Huge chunks of commented-out
|
16 |
+
code make it difficult to read.
|
17 |
+
|
18 |
+
### Practice #2
|
19 |
+
|
20 |
+
Don't use prefixes on function names or variables. That's what
|
21 |
+
namespaces are for.
|
22 |
+
|
23 |
+
``` cpp
|
24 |
+
namespace fr {
|
25 |
+
class frConstraint
|
26 |
+
class frLef58CutClassConstraint
|
27 |
+
class frShortConstraint
|
28 |
+
class frNonSufficientMetalConstraint
|
29 |
+
class frOffGridConstraint
|
30 |
+
class frMinEnclosedAreaConstraint
|
31 |
+
class frMinStepConstraint
|
32 |
+
class frMinimumcutConstraint
|
33 |
+
class frAreaConstraint
|
34 |
+
class frMinWidthConstraint
|
35 |
+
class frLef58SpacingEndOfLineWithinEndToEndConstraint
|
36 |
+
class frLef58SpacingEndOfLineWithinParallelEdgeConstraint
|
37 |
+
class frLef58SpacingEndOfLineWithinMaxMinLengthConstraint
|
38 |
+
class frLef58SpacingEndOfLineWithinConstraint
|
39 |
+
class frLef58SpacingEndOfLineConstraint
|
40 |
+
}
|
41 |
+
```
|
42 |
+
|
43 |
+
### Practice #3
|
44 |
+
|
45 |
+
Namespaces should be all lower case and short. This is an example of a
|
46 |
+
poor choice: `namespace TritonCTS`
|
47 |
+
|
48 |
+
### Practice #4
|
49 |
+
|
50 |
+
Don't use `extern` on function definitions. It is pointless
|
51 |
+
in a world with prototypes.
|
52 |
+
|
53 |
+
``` cpp
|
54 |
+
namespace fr {
|
55 |
+
extern frCoord getGCELLGRIDX();
|
56 |
+
extern frCoord
|
57 |
+
getGCELLGRIDY();
|
58 |
+
extern frCoord getGCELLOFFSETX();
|
59 |
+
extern frCoord
|
60 |
+
getGCELLOFFSETY();
|
61 |
+
}
|
62 |
+
```
|
63 |
+
|
64 |
+
### Practice #5
|
65 |
+
|
66 |
+
Don't use prefixes on file names. That's what directories are for.
|
67 |
+
|
68 |
+
``` shell
|
69 |
+
frDRC.h frDRC_init.cpp frDRC_main.cpp frDRC_setup.cpp frDRC_util.cpp
|
70 |
+
```
|
71 |
+
|
72 |
+
### Practice #6
|
73 |
+
|
74 |
+
Don't name variables `theThingy`, `curThingy` or `myThingy`. It is just
|
75 |
+
distracting extraneous verbiage. Just use `thingy`.
|
76 |
+
|
77 |
+
``` cpp
|
78 |
+
float currXSize;
|
79 |
+
float currYSize;
|
80 |
+
float currArea;
|
81 |
+
float currWS;
|
82 |
+
float currWL;
|
83 |
+
float currWLnoWts;
|
84 |
+
```
|
85 |
+
|
86 |
+
### Practice #7
|
87 |
+
|
88 |
+
Do not use global variables. All state should be inside of classes.
|
89 |
+
Global variables make multi-threading next to impossible and preclude
|
90 |
+
having multiple copies of a tool running in the same process. The only
|
91 |
+
global variable in `openroad` should be the singleton that Tcl commands
|
92 |
+
reference.
|
93 |
+
|
94 |
+
``` cpp
|
95 |
+
extern std::string DEF_FILE;
|
96 |
+
extern std::string GUIDE_FILE;
|
97 |
+
extern std::string OUTGUIDE_FILE;
|
98 |
+
extern std::string LEF_FILE;
|
99 |
+
extern std::string OUTTA_FILE;
|
100 |
+
extern std::string OUT_FILE;
|
101 |
+
extern std::string DBPROCESSNODE;
|
102 |
+
extern std::string OUT_MAZE_FILE;
|
103 |
+
extern std::string DRC_RPT_FILE;
|
104 |
+
extern int MAX_THREADS ;
|
105 |
+
extern int VERBOSE ;
|
106 |
+
extern int BOTTOM_ROUTING_LAYER;
|
107 |
+
extern bool ALLOW_PIN_AS_FEEDTHROUGH;
|
108 |
+
extern bool USENONPREFTRACKS;
|
109 |
+
extern bool USEMINSPACING_OBS;
|
110 |
+
extern bool RESERVE_VIA_ACCESS;
|
111 |
+
extern bool ENABLE_BOUNDARY_MAR_FIX;
|
112 |
+
```
|
113 |
+
|
114 |
+
### Practice #8
|
115 |
+
|
116 |
+
Do not use strings (names) to refer to database or sta objects except in
|
117 |
+
user interface code. DEF, SDC, and Verilog all use different names for
|
118 |
+
netlist instances and nets, so the names will not always match.
|
119 |
+
|
120 |
+
### Practice #9
|
121 |
+
|
122 |
+
Do not use continue. Wrap the body in an if instead.
|
123 |
+
|
124 |
+
``` cpp
|
125 |
+
// instead of
|
126 |
+
for(dbInst* inst : block->getInsts() ) {
|
127 |
+
// Skip for standard cells
|
128 |
+
if (inst->getBBox()->getDY() <= cellHeight) { continue; }
|
129 |
+
// code
|
130 |
+
}
|
131 |
+
// use
|
132 |
+
for(dbInst* inst : block->getInsts() ){
|
133 |
+
// Skip for standard cells
|
134 |
+
if (inst->getBBox()->getDY() > cellHeight) {
|
135 |
+
// code
|
136 |
+
}
|
137 |
+
}
|
138 |
+
```
|
139 |
+
|
140 |
+
### Practice #10
|
141 |
+
|
142 |
+
Don't put magic numbers in the code. Use a variable with a name that
|
143 |
+
captures the intent. Document the units if they exist.
|
144 |
+
|
145 |
+
``` cpp
|
146 |
+
referenceHpwl_= 446000000;
|
147 |
+
coeffV = 1.36;
|
148 |
+
coeffV = 1.2;
|
149 |
+
double nearest_dist = 99999999999;
|
150 |
+
if (dist < rowHeight * 2) {}
|
151 |
+
for(int i = 9; i > -1; i--) {}
|
152 |
+
if(design_util > 0.6 || num_fixed_nodes > 0) div = 1;
|
153 |
+
avail_region_area += (theRect->xUR - theRect->xLL - (int)theRect->xUR % 200 + (int)t heRect->xLL % 200 - 200) * (theRect->yUR - theRect->yLL - (int)theRect->yUR % 2000 + (int)theRect->yLL % 2000 - 2000);
|
154 |
+
```
|
155 |
+
|
156 |
+
### Practice #11
|
157 |
+
|
158 |
+
Don't copy code fragments. Write functions.
|
159 |
+
|
160 |
+
``` cpp
|
161 |
+
// 10x
|
162 |
+
int x_pos = (int)floor(theCell->x_coord / wsite + 0.5);
|
163 |
+
// 15x
|
164 |
+
int y_pos = (int)floor(y_coord / rowHeight + 0.5);
|
165 |
+
|
166 |
+
// This
|
167 |
+
nets[newnetID]->netIDorg = netID;
|
168 |
+
nets[newnetID]->numPins = numPins;
|
169 |
+
nets[newnetID]->deg = pinInd;
|
170 |
+
nets[newnetID]->pinX = (short *)malloc(pinInd* sizeof(short));
|
171 |
+
nets[newnetID]->pinY = (short *)malloc(pinInd* sizeof(short));
|
172 |
+
nets[newnetID]->pinL = (short *)malloc(pinInd* sizeof(short));
|
173 |
+
nets[newnetID]->alpha = alpha;
|
174 |
+
|
175 |
+
// Should factor out the array lookup.
|
176 |
+
Net *net = nets[newnetID];
|
177 |
+
net->netIDorg = netID;
|
178 |
+
net->numPins = numPins;
|
179 |
+
net->deg = pinInd;
|
180 |
+
net->pinX = (short*)malloc(pinInd* sizeof(short));
|
181 |
+
net->pinY = (short *)malloc(pinInd* sizeof(short));
|
182 |
+
net->pinL = (short *)malloc(pinInd* sizeof(short));
|
183 |
+
net->alpha = alpha;
|
184 |
+
|
185 |
+
// Same here:
|
186 |
+
if (grid[j][k].group != UINT_MAX) {
|
187 |
+
if (grid[j][k].isValid) {
|
188 |
+
if (groups[grid[j][k].group].name == theGroup->name)
|
189 |
+
area += wsite * rowHeight;
|
190 |
+
}
|
191 |
+
}
|
192 |
+
```
|
193 |
+
|
194 |
+
### Practice #12
|
195 |
+
|
196 |
+
Don't use logical operators to test for null pointers.
|
197 |
+
|
198 |
+
``` cpp
|
199 |
+
if (!net) {
|
200 |
+
// code
|
201 |
+
}
|
202 |
+
|
203 |
+
// should be
|
204 |
+
if (net != nullptr) {
|
205 |
+
// code
|
206 |
+
}
|
207 |
+
```
|
208 |
+
|
209 |
+
### Practice #13
|
210 |
+
|
211 |
+
Don't use `malloc`. Use `new`. We are writing C++, not C.
|
212 |
+
|
213 |
+
### Practice #14
|
214 |
+
|
215 |
+
Don't use C style arrays. There is no bounds checks for them so they
|
216 |
+
invite subtle memory errors to unwitting programmers who fail to use
|
217 |
+
`valgrind`. Use `std::vector` or `std::array`.
|
218 |
+
|
219 |
+
### Practice #15
|
220 |
+
|
221 |
+
Break long functions into smaller ones, preferably that fit on one
|
222 |
+
screen.
|
223 |
+
|
224 |
+
### Practice #16
|
225 |
+
|
226 |
+
Don't reinvent functions like `round`, `floor`, `abs`, `min`, `max`. Use the std
|
227 |
+
versions.
|
228 |
+
|
229 |
+
``` cpp
|
230 |
+
int size_x = (int)floor(theCell->width / wsite + 0.5);
|
231 |
+
```
|
232 |
+
|
233 |
+
### Practice #17
|
234 |
+
|
235 |
+
Don't use C's stdlib.h `abs`, `fabs` or `fabsf`. They fail miserably if the
|
236 |
+
wrong arg type is passed to them. Use `std::abs`.
|
237 |
+
|
238 |
+
### Practice #18
|
239 |
+
|
240 |
+
Fold code common to multiple loops into the same loop. Each of these
|
241 |
+
functions loops over every instance like this:
|
242 |
+
|
243 |
+
``` cpp
|
244 |
+
legal &= row_check(log);
|
245 |
+
legal &= site_check(log);
|
246 |
+
for(int i = 0; i < cells.size(); i++) {
|
247 |
+
cell* theCell = &cells[i];
|
248 |
+
legal &= power_line_check(log);
|
249 |
+
legal &= edge_check(log);
|
250 |
+
legal &= placed_check(log);
|
251 |
+
legal &= overlap_check(log);
|
252 |
+
}
|
253 |
+
// with this loop
|
254 |
+
for(int i = 0; i < cells.size(); i++) {
|
255 |
+
cell* theCell = &cells[i];
|
256 |
+
}
|
257 |
+
```
|
258 |
+
|
259 |
+
Instead make one pass over the instances doing each check.
|
260 |
+
|
261 |
+
### Practice #19
|
262 |
+
|
263 |
+
Don't use `== true`, or `== false`. Boolean expressions already have a
|
264 |
+
value of true or false.
|
265 |
+
|
266 |
+
``` cpp
|
267 |
+
if(found.first == true) {
|
268 |
+
// code
|
269 |
+
}
|
270 |
+
// is simply
|
271 |
+
if(found.first) {
|
272 |
+
// code
|
273 |
+
}
|
274 |
+
// and
|
275 |
+
if(found.first == false) {
|
276 |
+
// code
|
277 |
+
}
|
278 |
+
// is simply
|
279 |
+
if(!found.first) {
|
280 |
+
// code
|
281 |
+
}
|
282 |
+
```
|
283 |
+
|
284 |
+
### Practice #20
|
285 |
+
|
286 |
+
Don't nest if statements. Use `&&` on the clauses instead.
|
287 |
+
|
288 |
+
``` cpp
|
289 |
+
if(grid[j][k].group != UINT_MAX)
|
290 |
+
if(grid[j][k].isValid == true)
|
291 |
+
if(groups[grid[j][k].group].name == theGroup->name)
|
292 |
+
```
|
293 |
+
|
294 |
+
is simply
|
295 |
+
|
296 |
+
``` cpp
|
297 |
+
if(grid[j][k].group != UINT_MAX
|
298 |
+
&& grid[j][k].isValid
|
299 |
+
&& groups[grid[j][k].group].name == theGroup->name)
|
300 |
+
```
|
301 |
+
|
302 |
+
### Practice #21
|
303 |
+
|
304 |
+
Don't call return at the end of a function that does not return a
|
305 |
+
value.
|
306 |
+
|
307 |
+
### Practice #22
|
308 |
+
|
309 |
+
Don't use `<>` to include anything but system headers. Your
|
310 |
+
project's headers should never be in `<>`.
|
311 |
+
1. [GCC Include Syntax](https://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html)
|
312 |
+
1. [StackOverflow discussion on "filename" vs \<filename\>](https://stackoverflow.com/questions/21593/what-is-the-difference-between-include-filename-and-include-filename)
|
313 |
+
|
314 |
+
These are all wrong:
|
315 |
+
|
316 |
+
``` cpp
|
317 |
+
#include <odb/db.h>
|
318 |
+
#include <sta/liberty/Liberty.hh>
|
319 |
+
#include <odb/db.h>
|
320 |
+
#include <odb/dbTypes.h>
|
321 |
+
#include <odb/defin.h>
|
322 |
+
#include <odb/defout.h>
|
323 |
+
#include <odb/lefin.h>
|
324 |
+
```
|
325 |
+
|
326 |
+
### Practice #23
|
327 |
+
|
328 |
+
Don't make "include the kitchen sink" headers and include them in
|
329 |
+
every source file. This is convenient but slows the builds down
|
330 |
+
for everyone. Make each source file include just the headers it actually
|
331 |
+
needs.
|
332 |
+
|
333 |
+
``` cpp
|
334 |
+
// Types.hpp
|
335 |
+
#include <sta/liberty/Liberty.hh>
|
336 |
+
#include <odb/db.h>
|
337 |
+
#include <odb/dbTypes.h>
|
338 |
+
// It should be obvious that every source file is not reading def.
|
339 |
+
#include <odb/defin.h>
|
340 |
+
// or writing it.
|
341 |
+
#include <odb/defout.h>
|
342 |
+
#include <odb/lefin.h>
|
343 |
+
#include "db_sta/dbNetwork.hh"
|
344 |
+
#include "db_sta/dbSta.hh"
|
345 |
+
```
|
346 |
+
|
347 |
+
Note this example also incorrectly uses `<>'s` around OpenROAD headers.
|
348 |
+
|
349 |
+
Header files should only include files to support the header. Include
|
350 |
+
files necessary for code in the code file, not the header.
|
351 |
+
|
352 |
+
In the example below NONE of the system files listed are necessary for
|
353 |
+
the header file.
|
354 |
+
|
355 |
+
``` cpp
|
356 |
+
#include <stdio.h>
|
357 |
+
#include <stdlib.h>
|
358 |
+
#include <math.h>
|
359 |
+
#include <limits.h>
|
360 |
+
|
361 |
+
unsigned num_nets = 1000;
|
362 |
+
unsigned num_terminals = 64;
|
363 |
+
unsigned verbose = 0;
|
364 |
+
float alpha1 = 1;
|
365 |
+
float alpha2 = 0.45;
|
366 |
+
float alpha3 = 0;
|
367 |
+
float alpha4 = 0;
|
368 |
+
float margin = 1.1;
|
369 |
+
unsigned seed = 0;
|
370 |
+
unsigned root_idx = 0;
|
371 |
+
unsigned dist = 2;
|
372 |
+
float beta = 1.4;
|
373 |
+
bool runOneNet = false;
|
374 |
+
unsigned net_num = 0;
|
375 |
+
```
|
376 |
+
|
377 |
+
### Practice #24
|
378 |
+
|
379 |
+
Use class declarations if you are only referring to objects by pointer
|
380 |
+
instead of including their complete class definition. This can vastly
|
381 |
+
reduce the code the compiler has to process.
|
382 |
+
|
383 |
+
``` cpp
|
384 |
+
class Network;
|
385 |
+
// instead of
|
386 |
+
#include "Network.hh"
|
387 |
+
```
|
388 |
+
|
389 |
+
### Practice #25
|
390 |
+
|
391 |
+
Use pragma once instead of `#define` to protect headers from being read
|
392 |
+
more than once. The #define symbol has to be unique, which is difficult
|
393 |
+
to guarantee.
|
394 |
+
|
395 |
+
``` cpp
|
396 |
+
// Instead of:
|
397 |
+
#ifndef __MACRO_PLACER_HASH_UTIL__
|
398 |
+
#define __MACRO_PLACER_HASH_UTIL__
|
399 |
+
#endif
|
400 |
+
// use
|
401 |
+
#pragma once
|
402 |
+
```
|
403 |
+
|
404 |
+
### Practice #26
|
405 |
+
|
406 |
+
Don't put `using namespace` inside a function.
|
407 |
+
|
408 |
+
### Practice #27
|
409 |
+
|
410 |
+
Don't nest namespaces.
|
411 |
+
|
412 |
+
### Practice #28
|
413 |
+
|
414 |
+
Avoid `using namespace`. It increases the likelihood of conflicts
|
415 |
+
and doesn't explicity declare what in the namespace is being used. Use
|
416 |
+
`using namespace::symbol;` instead. And especially do not use `using namespace std`.
|
417 |
+
|
418 |
+
The following is especially confused because it is trying to "use" the
|
419 |
+
symbols in code that are already in the MacroPlace namespace.
|
420 |
+
|
421 |
+
``` cpp
|
422 |
+
using namespace MacroPlace;
|
423 |
+
|
424 |
+
namespace MacroPlace { }
|
425 |
+
```
|
426 |
+
|
427 |
+
### Practice #29
|
428 |
+
|
429 |
+
Use `nullptr` instead of `NULL`. This is the C++
|
430 |
+
approved version of the ancient C `#define`.
|
431 |
+
|
432 |
+
### Practice #30
|
433 |
+
|
434 |
+
Use range iteration. C++ iterators are ugly and verbose.
|
435 |
+
|
436 |
+
``` cpp
|
437 |
+
// Instead of
|
438 |
+
odb::dbSet::iterator nIter;
|
439 |
+
for (nIter = nets.begin(); nIter != nets.end(); ++nIter) {
|
440 |
+
odb::dbNet* currNet = *nIter;
|
441 |
+
// code
|
442 |
+
}
|
443 |
+
// use
|
444 |
+
for (odb::dbNet* currNet : nets) {
|
445 |
+
// code
|
446 |
+
}
|
447 |
+
```
|
448 |
+
|
449 |
+
### Practice #31
|
450 |
+
|
451 |
+
Don't use end of line comments unless they are very short.
|
452 |
+
|
453 |
+
``` cpp
|
454 |
+
for (int x = firstTile._x; x <= lastTile._x; x++) { // Setting capacities of edges completely inside the adjust region according the percentage of reduction
|
455 |
+
// code
|
456 |
+
}
|
457 |
+
```
|
458 |
+
|
459 |
+
### Practice #32
|
460 |
+
|
461 |
+
Don't `std::pow` for powers of 2 or for decimal constants.
|
462 |
+
|
463 |
+
``` cpp
|
464 |
+
// This
|
465 |
+
double newCapPerSqr = (_options->getCapPerSqr() * std::pow(10.0, -12));
|
466 |
+
// Should be
|
467 |
+
double newCapPerSqr = _options->getCapPerSqr() * 1E-12;
|
468 |
+
|
469 |
+
// This
|
470 |
+
unsigned numberOfTopologies = std::pow(2, numberOfNodes);
|
471 |
+
// Should be
|
472 |
+
unsigned numberOfTopologies = 1 << numberOfNodes;
|
473 |
+
```
|
474 |
+
|
475 |
+
## Git
|
476 |
+
|
477 |
+
### Practice #33
|
478 |
+
|
479 |
+
Don't put /'s in `.gitignore` directory names.
|
480 |
+
`test/`
|
481 |
+
|
482 |
+
### Practice #34
|
483 |
+
|
484 |
+
Don't put file names in `.gitignore` ignored directories.
|
485 |
+
`test/results` `test/results/diffs`
|
486 |
+
|
487 |
+
### Practice #35
|
488 |
+
|
489 |
+
Don't list compile artifacts in `.gitignore`. They all end
|
490 |
+
up in the build directory so each file type does not have to appear in
|
491 |
+
`.gitignore`.
|
492 |
+
|
493 |
+
All of the following are to be avoided:
|
494 |
+
|
495 |
+
#### Compiled Object files
|
496 |
+
|
497 |
+
`*.slo *.lo *.o *.obj`
|
498 |
+
|
499 |
+
#### Precompiled Headers
|
500 |
+
|
501 |
+
`*.gch *.pch`
|
502 |
+
|
503 |
+
#### Compiled Dynamic libraries
|
504 |
+
|
505 |
+
`*.so *.dylib *.dll`
|
506 |
+
|
507 |
+
#### Fortran module files
|
508 |
+
|
509 |
+
`*.mod *.smod`
|
510 |
+
|
511 |
+
#### Compiled Static libraries
|
512 |
+
|
513 |
+
`*.lai *.la *.a *.lib`
|
514 |
+
|
515 |
+
## CMake
|
516 |
+
|
517 |
+
### Practice #35
|
518 |
+
|
519 |
+
Don't change compile flags in `cmake` files. These are set at the top
|
520 |
+
level and should not be overridden.
|
521 |
+
|
522 |
+
``` cmake
|
523 |
+
set(CMAKE_CXX_FLAGS "-O3")
|
524 |
+
set(CMAKE_CXX_FLAGS_DEBUG "-g -ggdb")
|
525 |
+
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
526 |
+
```
|
527 |
+
|
528 |
+
### Practice #36
|
529 |
+
|
530 |
+
Don't put /'s in CMake directory names. CMake knows they are directories.
|
531 |
+
|
532 |
+
``` cmake
|
533 |
+
target_include_directories( ABKCommon PUBLIC ${ABKCOMMON_HOME} src/ )
|
534 |
+
```
|
535 |
+
|
536 |
+
### Practice #37
|
537 |
+
|
538 |
+
Don't use `glob`. Explictly list the files in a group.
|
539 |
+
|
540 |
+
``` cmake
|
541 |
+
# Instead of
|
542 |
+
file(GLOB_RECURSE SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
|
543 |
+
# should be
|
544 |
+
list(REMOVE_ITEM SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp)
|
545 |
+
list(REMOVE_ITEM SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/Parameters.h)
|
546 |
+
list(REMOVE_ITEM SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/Parameters.cpp)
|
547 |
+
```
|
markdown/OR_docs/general/DatabaseMath.md
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Database Math 101
|
2 |
+
|
3 |
+
## Introduction
|
4 |
+
|
5 |
+
DEF defines the units it uses with the `UNITS` command.
|
6 |
+
|
7 |
+
```
|
8 |
+
UNITS DISTANCE MICRONS 1000 ;
|
9 |
+
```
|
10 |
+
|
11 |
+
Typically the units are 1000 or 2000 database units (DBU) per micron.
|
12 |
+
DBUs are integers, so the distance resolution is typically 0.001 um or
|
13 |
+
1nm.
|
14 |
+
|
15 |
+
OpenDB uses an `int` to represent a DBU, which on most hardware is 4
|
16 |
+
bytes. This means a database coordinate can be $\pm 2147483647$, which is
|
17 |
+
about $2 \cdot 10^9$ units, corresponding to $2 \cdot 10^6$ or $2$ meters.
|
18 |
+
|
19 |
+
## Datatype Choice
|
20 |
+
|
21 |
+
This section is important as we cover important math considerations for
|
22 |
+
your datatype choice when dealing with large numbers.
|
23 |
+
|
24 |
+
### Why not pure int?
|
25 |
+
|
26 |
+
Since chip coordinates cannot be negative, it would make sense to use an
|
27 |
+
`unsigned int` to represent a distance. This conveys the fact that it
|
28 |
+
can never be negative and doubles the maximum possible distance that can
|
29 |
+
be represented. The problem, however, is that doing subtraction with unsigned numbers
|
30 |
+
is dangerous because the differences can be negative. An unsigned
|
31 |
+
negative number looks like a very very big number. So this is a very bad
|
32 |
+
idea and leads to bugs.
|
33 |
+
|
34 |
+
Note that calculating an area with `int` values is problematic. An
|
35 |
+
`int * int` does not fit in an `int`. **Our suggestion is to use `int64_t`
|
36 |
+
in this situation.** Although `long` "works", its size is implementation-dependent.
|
37 |
+
|
38 |
+
### Why not double?
|
39 |
+
|
40 |
+
It has been noticed that some programs use `double` to calculate distances.
|
41 |
+
This can be problematic, as `double` have a mantissa of 52 bits, which means that
|
42 |
+
the largest possible integer value that can be represented without loss is $5\cdot 10^{15}$.
|
43 |
+
This is 12 bits less than the largest possible integer value that can be represented
|
44 |
+
by an `int64_t`. As a result, if you are doing an area calculation on a large chip
|
45 |
+
that is more than $\sqrt{5\cdot 10^{15}} = 7\cdot 10^7\ DBU$ on a side, the mantissa of the
|
46 |
+
double will overflow and the result will be truncated.
|
47 |
+
|
48 |
+
Not only is a `double` less capable than an `int64_t`, but using it
|
49 |
+
tells any reader of the code that the value can be a real number, such as
|
50 |
+
$104.23$. So it is extremely misleading.
|
51 |
+
|
52 |
+
### Use int only for LEF/DEF Distances
|
53 |
+
|
54 |
+
Circling back to LEF, we see that unlike DEF the distances are real
|
55 |
+
numbers like 1.3 even though LEF also has a distance unit statement. We
|
56 |
+
suspect this is a historical artifact of a mistake made in the early
|
57 |
+
definition of the LEF file format. The reason it is a mistake is because
|
58 |
+
decimal fractions cannot be represented exactly in binary floating-point.
|
59 |
+
For example, $1.1 = 1.00011001100110011...$, a continued fraction.
|
60 |
+
|
61 |
+
OpenDB uses `int` to represent LEF distances, just as with DEF. This solves
|
62 |
+
the problem by multiplying distances by a decimal constant (distance
|
63 |
+
units) to convert the distance to an integer. In the future I would like
|
64 |
+
to see OpenDB use a `dbu` typedef instead of `int` everywhere.
|
65 |
+
|
66 |
+
### Why not float?
|
67 |
+
|
68 |
+
We have also noticed RePlAce, OpenDP, TritonMacroPlace and OpenNPDN all using
|
69 |
+
`double` or `float` to represent distances. This can be problematic, as
|
70 |
+
floating-point numbers cannot always represent exact fractions. As a result,
|
71 |
+
these tools need to `round` or `floor` the results of their calculations, which
|
72 |
+
can introduce errors. Additionally, some of these tools reinvent the wheel
|
73 |
+
by implementing their own rounding functions, as we shall see in the example below.
|
74 |
+
This can lead to inconsistencies and is highly discouraged.
|
75 |
+
|
76 |
+
```cpp
|
77 |
+
(int) x_coord + 0.5
|
78 |
+
```
|
79 |
+
|
80 |
+
Worse than using a `double` is using a `float`, because the mantissa
|
81 |
+
is only 23 bits, so the maximum exactly representable integer is $8\cdot 10^6$.
|
82 |
+
This makes it even less capable than an `int`.
|
83 |
+
|
84 |
+
When a value has to be snapped to a grid such as the pitch of a layer,
|
85 |
+
the calculation can be done with a simple divide using `int`, which
|
86 |
+
`floor` the result. For example, to snap a coordinate to the pitch of a
|
87 |
+
layer the following can be used:
|
88 |
+
|
89 |
+
``` cpp
|
90 |
+
int x, y;
|
91 |
+
inst->getOrigin(x, y);
|
92 |
+
int pitch = layer->getPitch();
|
93 |
+
int x_snap = (x / pitch) * pitch;
|
94 |
+
```
|
95 |
+
|
96 |
+
The use of rounding in existing code that uses floating-point
|
97 |
+
representations is to compensate for the inability to represent floating-point
|
98 |
+
fractions exactly. Results like $5.99999999992$ need to be "fixed".
|
99 |
+
This problem does not exist if fixed-point arithmetic is used.
|
100 |
+
|
101 |
+
|
markdown/OR_docs/general/DeveloperGuide.md
ADDED
@@ -0,0 +1,326 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Developer Guide
|
2 |
+
|
3 |
+
## Tool Philosophy
|
4 |
+
|
5 |
+
OpenROAD is a tool to build a chip from synthesizable RTL (Verilog) to
|
6 |
+
completed physical layout (manufacturable, tapeout-clean GDSII).
|
7 |
+
|
8 |
+
The unifying principle behind the design of OpenROAD is for all of the
|
9 |
+
tools to reside in one tool, with one process, and one database. All
|
10 |
+
tools in the flow should use Tcl commands exclusively to control them
|
11 |
+
instead of external "configuration files". File-based communication
|
12 |
+
between tools and forking processes is strongly discouraged. This
|
13 |
+
architecture streamlines the construction of a flexible tool flow and
|
14 |
+
minimizes the overhead of invoking each tool in the flow.
|
15 |
+
|
16 |
+
## Tool File Organization
|
17 |
+
|
18 |
+
Every tool follows the following file structure, grouping sources, tests
|
19 |
+
and headers together.
|
20 |
+
|
21 |
+
- `src/`
|
22 |
+
This folder contains the source files for individual tools.
|
23 |
+
|
24 |
+
| `src` | Purpose |
|
25 |
+
|-----------------|--------------|
|
26 |
+
| `CMakeLists.txt` | `add_subdirectory` for each tool|
|
27 |
+
| `tool/src` | sources and private headers |
|
28 |
+
| `tool/src/CMakeLists.txt` | tool specific CMake file |
|
29 |
+
| `tool/include/tool` | exported headers |
|
30 |
+
| `tool/test` | tool tests |
|
31 |
+
| `tool/regression` | tool unit tests|
|
32 |
+
|
33 |
+
- OpenROAD repository:
|
34 |
+
This folder contains the top-level files for overall compilation. OpenROAD uses [swig](https://swig.org/) that acts as a wrapper for C/C++ programs to be callable in higher-level languages, such as Python and Tcl.
|
35 |
+
|
36 |
+
| `OpenROAD` | Purpose |
|
37 |
+
|-----------------|--------------|
|
38 |
+
| `CMakeLists.txt` | top-level CMake file |
|
39 |
+
| `src/Main.cc` | main file |
|
40 |
+
| `src/OpenROAD.cc` | OpenROAD class functions |
|
41 |
+
| `src/OpenROAD.i` | top-level swig, includes, tool swig files |
|
42 |
+
| `src/OpenROAD.tcl` | basic read/write lef/def/db commands |
|
43 |
+
| `include/ord/OpenROAD.hh` | OpenROAD top-level class, has instances of tools |
|
44 |
+
|
45 |
+
Some tools such as OpenSTA are submodules, which are simply
|
46 |
+
subdirectories in `src/` that are pointers to the git submodule. They are
|
47 |
+
intentionally not segregated into a separate module.
|
48 |
+
|
49 |
+
The use of submodules for new code integrated into OpenROAD is strongly
|
50 |
+
discouraged. Submodules make changes to the underlying infrastructure
|
51 |
+
(e.g., OpenSTA) difficult to propagate across the dependent submodule
|
52 |
+
repositories.
|
53 |
+
|
54 |
+
Where external/third-party code that a tool depends on should be placed
|
55 |
+
depends on the nature of the dependency.
|
56 |
+
|
57 |
+
- Libraries - code packaged as a linkable library. Examples are `tcl`,
|
58 |
+
`boost`, `zlib`, `eigen`, `lemon`, `spdlog`.
|
59 |
+
|
60 |
+
These should be installed in the build environment and linked by
|
61 |
+
OpenROAD. Document these dependencies in the top-level `README.md` file.
|
62 |
+
The `Dockerfile` should be updated to illustrate where to find the library
|
63 |
+
and how to install it. Adding libraries to the build environment requires
|
64 |
+
coordination with system administrators, so that continuous integration hosts ensure
|
65 |
+
that environments include the dependency. Advance notification
|
66 |
+
should also be given to the development team so that their private build
|
67 |
+
environments can be updated.
|
68 |
+
|
69 |
+
Each tool CMake file builds a library that is linked by the OpenROAD
|
70 |
+
application. The tools should not define a `main()` function. If the
|
71 |
+
tool is Tcl only and has no C++ code, it does not need to have a CMake
|
72 |
+
file. Tool CMake files should **not** include the following:
|
73 |
+
|
74 |
+
- `cmake_minimum_required`
|
75 |
+
- `GCC_COVERAGE_COMPILE_FLAGS`
|
76 |
+
- `GCC_COVERAGE_LINK_FLAGS`
|
77 |
+
- `CMAKE_CXX_FLAGS`
|
78 |
+
- `CMAKE_EXE_LINKER_FLAGS`
|
79 |
+
|
80 |
+
None of the tools have commands to read or write LEF, DEF, Verilog or
|
81 |
+
database files. For consistency, these functions are all provided by the OpenROAD
|
82 |
+
framework.
|
83 |
+
|
84 |
+
Tools should package all of their state in a single class. An instance of each
|
85 |
+
tool class resides in the top-level OpenROAD object. This allows
|
86 |
+
multiple tools to exist at the same time. If any tool keeps state in
|
87 |
+
global variables (even static), then only one tool can exist at a time. Many
|
88 |
+
of the tools being integrated were not built with this goal in mind and
|
89 |
+
will only work on one design at a time.
|
90 |
+
|
91 |
+
Each tool should use a unique namespace for all of its code. The same
|
92 |
+
namespace should be used for Tcl functions, including those defined by a
|
93 |
+
swig interface file. Internal Tcl commands stay inside the namespace,
|
94 |
+
and user visible Tcl commands should be defined in the global namespace.
|
95 |
+
User commands should be simple Tcl commands such as `global_placement`
|
96 |
+
that do not create tool instances that must be based to the commands.
|
97 |
+
Defining Tcl commands for a tool class is fine for internal commands, but not
|
98 |
+
for user visible commands. Commands have an implicit argument of the
|
99 |
+
current OpenROAD class object. Functions to get individual tools from
|
100 |
+
the OpenROAD object can be defined.
|
101 |
+
|
102 |
+
## Initialization (C++ tools only)
|
103 |
+
|
104 |
+
The OpenROAD class has pointers to each tool, with functions to get each
|
105 |
+
tool. Each tool has (at a minimum) a function to make an instance of the
|
106 |
+
tool class, an initialization function that is called after all of
|
107 |
+
the tools have been made, and a function to delete the tool. This small
|
108 |
+
header does **not** include the class definition for the tool so that
|
109 |
+
the OpenROAD framework does not have to know anything about the tool
|
110 |
+
internals or include a gigantic header file.
|
111 |
+
|
112 |
+
`MakeTool.hh` defines the following:
|
113 |
+
|
114 |
+
``` cpp
|
115 |
+
Tool *makeTool();
|
116 |
+
void initTool(OpenRoad *openroad);
|
117 |
+
void deleteTool(Tool *tool);
|
118 |
+
```
|
119 |
+
|
120 |
+
The `OpenRoad::init()` function calls all of the `makeTool` functions and
|
121 |
+
then all of the `initTool()` functions. The `init` functions are called from
|
122 |
+
the bottom of the tool dependencies. Each `init` function grabs the state
|
123 |
+
it needs out of the `OpenRoad` instance.
|
124 |
+
|
125 |
+
## Commands
|
126 |
+
|
127 |
+
Tools should provide Tcl commands to control them. Tcl object based tool
|
128 |
+
interfaces are not user-friendly. Define Tcl procedures that take
|
129 |
+
keyword arguments that reference the `OpenRoad` object to get tool state.
|
130 |
+
OpenSTA has Tcl utilities to parse keyword arguments
|
131 |
+
(`sta::parse_keyword_args`). See `OpenSTA/tcl/*.tcl` for
|
132 |
+
examples. Use swig to define internal functions to C++ functionality.
|
133 |
+
|
134 |
+
Tcl files can be included by encoding them in CMake into a string that
|
135 |
+
is evaluated at run time (See [`Resizer::init()`](../main/src/rsz/src/Resizer.cc)).
|
136 |
+
|
137 |
+
:::{Note}
|
138 |
+
Please refer to the top-level Tcl formatting [guide](TclFormat.md).
|
139 |
+
Our top-level Tcl files, in particular, have to be formatted in this specific
|
140 |
+
manner because of the automatic parsing used to convert the READMEs into
|
141 |
+
manpages.
|
142 |
+
:::
|
143 |
+
|
144 |
+
## Errors
|
145 |
+
|
146 |
+
Tools should report errors to the user using the `ord::error` function
|
147 |
+
defined in `include/openroad/Error.hh`. `ord::error` throws
|
148 |
+
`ord::Exception`. The variables `ord::exit_on_error` and
|
149 |
+
`ord::file_continue_on_error` control how the error is handled. If
|
150 |
+
`ord::exit_on_error` is `true` then OpenROAD reports the error and exits. If
|
151 |
+
the error is encountered while reading a file with the `source` or
|
152 |
+
`read_sdc` commands and `ord::file_continue_on_error` is `false` then no
|
153 |
+
other commands are read from the file. The default value is `false` for both
|
154 |
+
variables.
|
155 |
+
|
156 |
+
## Test
|
157 |
+
|
158 |
+
Each "tool" has a `/test` directory containing a script named
|
159 |
+
`regression` to run "unit" tests. With no arguments it should run
|
160 |
+
default unit tests.
|
161 |
+
|
162 |
+
No database files should be in tests. Read LEF/DEF/Verilog to make a
|
163 |
+
database.
|
164 |
+
|
165 |
+
The regression script should not depend on the current working
|
166 |
+
directory. It should be able to be run from any directory. Use filenames
|
167 |
+
relative to the script name rather the current working directory.
|
168 |
+
|
169 |
+
Regression scripts should print a concise summary of test failures. The
|
170 |
+
regression script should return an exit code of 0 if there are no
|
171 |
+
errors and 1 if there are errors. The script should **not** print
|
172 |
+
thousands of lines of internal tool information.
|
173 |
+
|
174 |
+
Regression scripts should pass the `-no_init` option to `openroad` so that
|
175 |
+
a user's `init` file is not sourced before the tests runs.
|
176 |
+
|
177 |
+
Regression scripts should add output files or directories to
|
178 |
+
`.gitignore` so that running does not leave the source repository
|
179 |
+
"dirty".
|
180 |
+
|
181 |
+
The Nangate45 open-source library data used by many tests is in
|
182 |
+
`test/Nangate45`. Use the following command to add a link in the tool command:
|
183 |
+
|
184 |
+
``` shell
|
185 |
+
cd src/<tool>/test
|
186 |
+
ln -s ../../../test/Nangate45
|
187 |
+
```
|
188 |
+
|
189 |
+
After the link is installed, the test script can read the Liberty file
|
190 |
+
with the command shown below.
|
191 |
+
|
192 |
+
``` tcl
|
193 |
+
read_liberty Nangate45/Nangate45_typ.lib
|
194 |
+
```
|
195 |
+
|
196 |
+
## Building
|
197 |
+
|
198 |
+
Instructions for building are available [here](../user/Build.md).
|
199 |
+
|
200 |
+
## Example of Adding a Tool to OpenROAD
|
201 |
+
|
202 |
+
The patch file "AddTool.patch" illustrates how to add a tool to
|
203 |
+
OpenROAD. Use the following commands to add a sample tool:
|
204 |
+
|
205 |
+
``` shell
|
206 |
+
# first, update existing config files
|
207 |
+
patch -p1 < docs/misc/AddTool.patch
|
208 |
+
|
209 |
+
# next, create the additional source files of the tool using this command
|
210 |
+
patch -p1 < docs/misc/AddToolFiles.patch
|
211 |
+
|
212 |
+
# finally, create the regression tests as follows
|
213 |
+
cd src/tool/test
|
214 |
+
ln -s ../../../test/regression.tcl regression.tcl
|
215 |
+
```
|
216 |
+
|
217 |
+
This adds a directory `OpenRoad/src/tool` that
|
218 |
+
illustrates a tool named "Tool" that uses the file structure described above
|
219 |
+
and defines a command to run the tool with keyword and flag arguments as
|
220 |
+
illustrated below:
|
221 |
+
|
222 |
+
```tcl
|
223 |
+
> toolize foo
|
224 |
+
Helping 23/6
|
225 |
+
Gotta positional_argument1 foo
|
226 |
+
Gotta param1 0.000000
|
227 |
+
Gotta flag1 false
|
228 |
+
|
229 |
+
> toolize -flag1 -key1 2.0 bar
|
230 |
+
Helping 23/6
|
231 |
+
Gotta positional_argument2 bar
|
232 |
+
Gotta param1 2.000000
|
233 |
+
Gotta flag1 true
|
234 |
+
|
235 |
+
> help toolize
|
236 |
+
toolize [-key1 key1] [-flag1] positional_argument1
|
237 |
+
```
|
238 |
+
|
239 |
+
## Documentation
|
240 |
+
|
241 |
+
Tool commands should be documented in the top-level OpenROAD `README.md`
|
242 |
+
file. Detailed documentation should be the `tool/README.md` file.
|
243 |
+
|
244 |
+
:::{Note}
|
245 |
+
Please refer to the README formatting [guide](ReadmeFormat.md).
|
246 |
+
Our top-level READMEs, in particular, have to be formatted in this specific
|
247 |
+
manner because of the automatic parsing used to convert the READMEs into
|
248 |
+
manpages.
|
249 |
+
:::
|
250 |
+
|
251 |
+
## Tool Flow Namespace
|
252 |
+
|
253 |
+
Tool namespaces are usually three-lettered lowercase letters.
|
254 |
+
|
255 |
+
- Verilog to DB (dbSTA)
|
256 |
+
- OpenDB: Open Database ([odb](../main/src/odb/README.md))
|
257 |
+
- TritonPart: constraints-driven paritioner ([par](../main/src/par/README.md))
|
258 |
+
- Floorplan Initialization ([ifp](../main/src/ifp/README.md))
|
259 |
+
- ICeWall chip-level connections ([pad](../main/src/pad/README.md))
|
260 |
+
- I/O Placement ([ppl](../main/src/ppl/README.md))
|
261 |
+
- PDN Generation ([pdn](../main/src/pdn/README.md))
|
262 |
+
- Tapcell and Welltie Insertion ([tap](../main/src/tap/README.md))
|
263 |
+
- Triton Macro Placer ([mpl](../main/src/mpl/README.md))
|
264 |
+
- Hierarchical Automatic Macro Placer ([mpl2](../main/src/mpl2/README.md))
|
265 |
+
- RePlAce Global Placer ([gpl](../main/src/gpl/README.md))
|
266 |
+
- Gate resizing and buffering ([rsz](../main/src/rsz/README.md))
|
267 |
+
- Detailed placement ([dpl](../main/src/dpl/README.md))
|
268 |
+
- Clock tree synthesis ([cts](../main/src/cts/README.md))
|
269 |
+
- FastRoute Global routing ([grt](../main/src/grt/README.md))
|
270 |
+
- Antenna check and diode insertion ([ant](../main/src/ant/README.md))
|
271 |
+
- TritonRoute Detailed routing ([drt](../main/src/drt/README.md))
|
272 |
+
- Metal fill insertion ([fin](../main/src/fin/README.md))
|
273 |
+
- Design for Test ([dft](../main/src/dft/README.md))
|
274 |
+
- OpenRCX Parasitic Extraction ([rcx](../main/src/rcx/README.md))
|
275 |
+
- OpenSTA timing/power analyzer ([sta](https://github.com/The-OpenROAD-Project/OpenSTA/blob/master/README.md)
|
276 |
+
- Graphical User Interface ([gui](../main/src/gui/README.md))
|
277 |
+
- Static IR analyzer ([psm](../main/src/psm/README.md))
|
278 |
+
|
279 |
+
## Tool Checklist
|
280 |
+
|
281 |
+
Tools should make every attempt to minimize external dependencies.
|
282 |
+
Linking libraries other than those currently in use complicates the
|
283 |
+
builds and sacrifices the portability of OpenROAD. OpenROAD should be
|
284 |
+
portable to many different compiler/operating system versions and
|
285 |
+
dependencies make this vastly more complicated.
|
286 |
+
|
287 |
+
1. OpenROAD submodules reference tool `openroad` branch head. No git `develop`, `openroad_app`, or `openroad_build` branches.
|
288 |
+
1. Submodules used by more than one tool belong in `src/`, not duplicated in each tool repo.
|
289 |
+
1. `CMakeLists.txt` does not use add_compile_options include_directories link_directories link_libraries. Use target\_ versions instead. See tips [here](https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1).
|
290 |
+
1. `CMakeLists.txt` does not use glob. Use explicit lists of source files and headers instead.
|
291 |
+
1. `CMakeLists.txt` does not define `CFLAGS` `CMAKE_CXX_FLAGS` `CMAKE_CXX_FLAGS_DEBUG` `CMAKE_CXX_FLAGS_RELEASE`. Let the top level and defaults control these.
|
292 |
+
1. No `main.cpp` or main procedure.
|
293 |
+
1. No compiler warnings for GCC or Clang with optimization enabled.
|
294 |
+
1. Does not call `flute::readLUT` (called once by `openroad`).
|
295 |
+
1. Tcl command(s) documented in top level `README.md` in flow order.
|
296 |
+
1. Command line tool documentation in tool README.
|
297 |
+
1. Conforms to Tcl command naming standards (no camel case).
|
298 |
+
1. Does not read configuration files. Use command arguments or support commands.
|
299 |
+
1. `.clang-format` at tool root directory to aid foreign programmers.
|
300 |
+
1. No `jenkins/`, `Jenkinsfile`, `Dockerfile` in tool directory.
|
301 |
+
1. `regression` script named `test/regression` with no arguments that runs tests. Not `tests/regression-tcl.sh`, not `test/run_tests.py` etc.
|
302 |
+
1. `regression` script should run independent of current directory. For example, `../test/regression` should work.
|
303 |
+
1. `regression` should only print test results or summary, not belch 1000s of lines of output.
|
304 |
+
1. Test scripts use OpenROAD tcl commands (not `itcl`, not internal accessors).
|
305 |
+
1. `regression` script should only write files in a directory that is in the tool's `.gitignore` so the hierarchy does not have modified files in it as a result or running the regressions.
|
306 |
+
1. Regressions report no memory errors with `valgrind` (stretch goal).
|
307 |
+
1. Regressions report no memory leaks with `valgrind` (difficult).
|
308 |
+
1. Ensure the top-level README and Tcl format are compliant.
|
309 |
+
|
310 |
+
## Code Linting and Formatting
|
311 |
+
OpenROAD uses both `clang-tidy` and `clang-format` to perform automatic linting and formatting whenever a pull request is submitted. To run these locally, please first setup Clang Tooling using this [guide](https://clang.llvm.org/docs/HowToSetupToolingForLLVM.html). Thereafter, you may run these commands:
|
312 |
+
|
313 |
+
```shell
|
314 |
+
cmake . -B build # generate build files
|
315 |
+
# typically only run these commands on files you changed.
|
316 |
+
clang-tidy -p ./build source_file.cpp
|
317 |
+
clang-format -i -style=file:.clang-format source_file.cpp
|
318 |
+
```
|
319 |
+
|
320 |
+
## Guidelines
|
321 |
+
|
322 |
+
1. Internally, the code should use `int` for all database units and `int64_t`
|
323 |
+
for all area calculations. Refer to this [link](DatabaseMath.md) for a more
|
324 |
+
detailed writeup on the reasons why this approach is preferred. The only
|
325 |
+
place that the database distance units should appear in any program
|
326 |
+
should be in the user interface, as microns are easier for humans than DBUs.
|
markdown/OR_docs/general/GettingInvolved.md
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Getting Involved
|
2 |
+
|
3 |
+
Thank you for taking the time to read this document and to contribute.
|
4 |
+
The OpenROAD project will not reach all of its objectives without help!
|
5 |
+
|
6 |
+
Possible ways to contribute to the OpenROAD application:
|
7 |
+
|
8 |
+
- Tool improvements
|
9 |
+
- New tools
|
10 |
+
- Improvements to documentation, including this document
|
11 |
+
- Star our project and repos so we can see the number of people
|
12 |
+
who are interested
|
13 |
+
|
14 |
+
## Licensing Contributions
|
15 |
+
|
16 |
+
As much as possible, all contributions should be licensed using the BSD3
|
17 |
+
license. You can propose another license if you must, but contributions
|
18 |
+
made with BSD3 fit best with the spirit of OpenROAD's permissive open-source
|
19 |
+
philosophy. We do have exceptions in the project, but over time we hope
|
20 |
+
that all contributions will be BSD3, or some other permissive license such as MIT
|
21 |
+
or Apache2.0.
|
22 |
+
|
23 |
+
## Contributing Scripts and Code
|
24 |
+
|
25 |
+
We follow the [Google C++ style guide](https://google.github.io/styleguide/cppguide.html).
|
26 |
+
If you find code in our project that does *not* follow this guide, then within each file that
|
27 |
+
you edit, follow the style in that file.
|
28 |
+
|
29 |
+
Please pay careful attention to the
|
30 |
+
[tool checklist](DeveloperGuide.md#tool-checklist) for all code. If you want
|
31 |
+
to add or improve functionality in OpenROAD, please start with the
|
32 |
+
top-level [app](https://github.com/The-OpenROAD-Project/OpenROAD/) repo. You
|
33 |
+
can see in the `src` directory that submodules exist pointing to tested
|
34 |
+
versions of the other relevant repos in the project. Please look at the
|
35 |
+
tool workflow in the developer guide [document](DeveloperGuide.md)
|
36 |
+
to work with the app and its submodule repos in an efficient way.
|
37 |
+
|
38 |
+
Please run clang-format on all the C++ source files that you change, before
|
39 |
+
committing. In the root directory of the OpenROAD repository there is the
|
40 |
+
file `.clang-format` that defines all coding formatting rules.
|
41 |
+
|
42 |
+
Please pay attention to the
|
43 |
+
[test directory](https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/test)
|
44 |
+
and be sure to add tests for any code changes that you make, using open-source
|
45 |
+
PDK and design information. We provide the `nangate45` PDK in
|
46 |
+
the OpenROAD-flow-scripts repo to help with this. Pull requests with
|
47 |
+
code changes are unlikely to be accepted without accompanying test
|
48 |
+
cases. There are many
|
49 |
+
[examples](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/test/gcd_nangate45.tcl)
|
50 |
+
tests. Each repo has a test directory as well with tests you should run
|
51 |
+
and add to if you modify something in one of the submodules.
|
52 |
+
|
53 |
+
For changes that claim to improve QoR or PPA, please run many tests and
|
54 |
+
ensure that the improvement is not design-specific. There are designs in
|
55 |
+
the
|
56 |
+
[OpenROAD-flow-scripts](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/)
|
57 |
+
repo which can be used unless the improvement is technology-specific.
|
58 |
+
|
59 |
+
Do not add runtime or build dependencies without serious thought. For a
|
60 |
+
project like OpenROAD with many application subcomponents, the software
|
61 |
+
architecture can quickly get out of control. Changes with lots of new
|
62 |
+
dependencies which are not necessary are less likely to be integrated.
|
63 |
+
|
64 |
+
If you want to add Tcl code to define a new tool command, look at [pdngen](https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/pdn)
|
65 |
+
as an example of how to do so. Take a look at the
|
66 |
+
[CMake file](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/CMakeLists.txt)
|
67 |
+
which automatically sources the Tcl code and the
|
68 |
+
[Tcl file](https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/pdn/src/pdn.tcl)
|
69 |
+
itself.
|
70 |
+
|
71 |
+
To accept contributions, we require each commit to be made with a DCO (Developer
|
72 |
+
Certificate of Origin) attached.
|
73 |
+
When you commit you add the `-s` flag to your commit. For example:
|
74 |
+
|
75 |
+
``` shell
|
76 |
+
git commit -s -m "test dco with -s"
|
77 |
+
```
|
78 |
+
|
79 |
+
This will append a statement to your commit comment that attests to the DCO. GitHub
|
80 |
+
has built in the `-s` option to its command line since use of this is so
|
81 |
+
pervasive. The promise is very basic, certifying that you know that you
|
82 |
+
have the right to commit the code. Please read the [full statement
|
83 |
+
here](https://developercertificate.org/).
|
84 |
+
|
85 |
+
## Questions
|
86 |
+
|
87 |
+
Please refer to our [FAQs](../user/FAQS.md).
|
markdown/OR_docs/general/GitGuide.md
ADDED
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Git Quickstart
|
2 |
+
|
3 |
+
This tutorial serves as a quickstart to Git and contributing to our repository. If you have not already set up OpenROAD, please follow the instructions [here](../user/Build.md).
|
4 |
+
|
5 |
+
```{tip} This basic tutorial gives instruction for basic password Git authentication.
|
6 |
+
If you would like to setup SSH authentication, please follow this [guide](https://help.github.com/set-up-git-redirect).
|
7 |
+
```
|
8 |
+
|
9 |
+
## Forking
|
10 |
+
|
11 |
+
You will need your own fork to work on the code. Go to the `OpenROAD` project
|
12 |
+
[page](https://github.com/The-OpenROAD-Project/OpenROAD) and hit the `Fork` button. You will
|
13 |
+
want to clone your fork to your machine:
|
14 |
+
|
15 |
+
```shell
|
16 |
+
git clone https://github.com/your-user-name/OpenROAD.git
|
17 |
+
cd OpenROAD
|
18 |
+
git remote add upstream https://github.com/The-OpenROAD-Project/OpenROAD.git
|
19 |
+
git fetch upstream
|
20 |
+
```
|
21 |
+
|
22 |
+
This creates the directory `OpenROAD` and connects your repository to
|
23 |
+
the upstream (master project) *OpenROAD* repository.
|
24 |
+
|
25 |
+
## Creating a branch
|
26 |
+
|
27 |
+
You want your master branch to reflect only production-ready code, so create a
|
28 |
+
feature branch for making your changes. For example:
|
29 |
+
|
30 |
+
```shell
|
31 |
+
git checkout master && git branch shiny-new-feature
|
32 |
+
git checkout shiny-new-feature
|
33 |
+
# Or equivalently,
|
34 |
+
git checkout master && checkout -b shiny-new-feature
|
35 |
+
```
|
36 |
+
|
37 |
+
This changes your working directory to the shiny-new-feature branch. Keep any
|
38 |
+
changes in this branch specific to one bug or feature so it is clear
|
39 |
+
what the branch brings to OpenROAD. You can have many shiny-new-features
|
40 |
+
and switch in between them using the git checkout command.
|
41 |
+
|
42 |
+
When creating this branch, make sure your master branch is up to date with
|
43 |
+
the latest upstream master version. To update your local master branch, you
|
44 |
+
can do:
|
45 |
+
|
46 |
+
```shell
|
47 |
+
git checkout master
|
48 |
+
git pull upstream master
|
49 |
+
```
|
50 |
+
|
51 |
+
When you want to update the feature branch with changes in master after
|
52 |
+
you created the branch, check the section on
|
53 |
+
[updating a PR](#updating-your-pull-request).
|
54 |
+
|
55 |
+
## Committing your code
|
56 |
+
Keep style fixes to a separate commit to make your pull request more readable. Once you've made changes, you can see them by typing:
|
57 |
+
|
58 |
+
```shell
|
59 |
+
git status
|
60 |
+
```
|
61 |
+
|
62 |
+
If you have created a new file, it is not being tracked by git. Add it by typing:
|
63 |
+
```shell
|
64 |
+
git add path/to/file-to-be-added.py
|
65 |
+
```
|
66 |
+
|
67 |
+
Doing `git status` again should give something like:
|
68 |
+
```shell
|
69 |
+
# On branch shiny-new-feature
|
70 |
+
#
|
71 |
+
# modified: /relative/path/to/file-you-added.py
|
72 |
+
#
|
73 |
+
```
|
74 |
+
|
75 |
+
Finally, commit your changes to your local repository with an explanatory commit
|
76 |
+
message. Do note the `-s` option is needed for developer signoff.
|
77 |
+
```shell
|
78 |
+
git commit -s -m "your commit message goes here"
|
79 |
+
```
|
80 |
+
|
81 |
+
## Pushing your changes
|
82 |
+
|
83 |
+
When you want your changes to appear publicly on your GitHub page, push your
|
84 |
+
forked feature branch's commits:
|
85 |
+
|
86 |
+
```shell
|
87 |
+
git push origin shiny-new-feature
|
88 |
+
```
|
89 |
+
|
90 |
+
Here `origin` is the default name given to your remote repository on GitHub.
|
91 |
+
You can see the remote repositories:
|
92 |
+
|
93 |
+
```shell
|
94 |
+
git remote -v
|
95 |
+
```
|
96 |
+
|
97 |
+
If you added the upstream repository as described above you will see something
|
98 |
+
like:
|
99 |
+
|
100 |
+
```shell
|
101 |
+
origin https://github.com/your-user-name/OpenROAD.git (fetch)
|
102 |
+
origin https://github.com/your-user-name/OpenROAD.git (push)
|
103 |
+
upstream https://github.com/The-OpenROAD-Project/OpenROAD.git (fetch)
|
104 |
+
upstream https://github.com/The-OpenROAD-Project/OpenROAD.git (push)
|
105 |
+
```
|
106 |
+
|
107 |
+
Now your code is on GitHub, but it is not yet a part of the OpenROAD project. For that to
|
108 |
+
happen, a pull request needs to be submitted on GitHub.
|
109 |
+
|
110 |
+
## Review your code
|
111 |
+
|
112 |
+
When you're ready to ask for a code review, file a pull request. Before you do, once
|
113 |
+
again make sure that you have followed all the guidelines outlined in the [Developer's Guide](./DeveloperGuide.md)
|
114 |
+
regarding code style, tests, performance tests, and documentation. You should also
|
115 |
+
double check your branch changes against the branch it was based on:
|
116 |
+
|
117 |
+
1. Navigate to your repository on GitHub -- https://github.com/your-user-name/OpenROAD
|
118 |
+
1. Click on `Branches`
|
119 |
+
1. Click on the `Compare` button for your feature branch
|
120 |
+
1. Select the `base` and `compare` branches, if necessary. This will be `master` and
|
121 |
+
`shiny-new-feature`, respectively.
|
122 |
+
|
123 |
+
## Submitting the pull request
|
124 |
+
|
125 |
+
If everything looks good, you are ready to make a pull request. A pull request is how
|
126 |
+
code from a local repository becomes available to the GitHub community and can be looked
|
127 |
+
at and eventually merged into the master version. This pull request and its associated
|
128 |
+
changes will eventually be committed to the master branch and available in the next
|
129 |
+
release. To submit a pull request:
|
130 |
+
|
131 |
+
1. Navigate to your repository on GitHub
|
132 |
+
1. Click on the ``Compare & pull request`` button
|
133 |
+
1. You can then click on ``Commits`` and ``Files Changed`` to make sure everything looks
|
134 |
+
okay one last time
|
135 |
+
1. Write a description of your changes in the ``Preview Discussion`` tab
|
136 |
+
1. Click ``Send Pull Request``.
|
137 |
+
|
138 |
+
This request then goes to the repository maintainers, and they will review
|
139 |
+
the code.
|
140 |
+
|
141 |
+
## Updating your pull request
|
142 |
+
|
143 |
+
Based on the review you get on your pull request, you will probably need to make
|
144 |
+
some changes to the code. In that case, you can make them in your branch,
|
145 |
+
add a new commit to that branch, push it to GitHub, and the pull request will be
|
146 |
+
automatically updated. Pushing them to GitHub again is done by:
|
147 |
+
|
148 |
+
```shell
|
149 |
+
git push origin shiny-new-feature
|
150 |
+
```
|
151 |
+
|
152 |
+
This will automatically update your pull request with the latest code and restart the
|
153 |
+
[Continuous Integration](./CI.md) tests.
|
154 |
+
|
155 |
+
Another reason you might need to update your pull request is to solve conflicts
|
156 |
+
with changes that have been merged into the master branch since you opened your
|
157 |
+
pull request.
|
158 |
+
|
159 |
+
To do this, you need to `merge upstream master` in your branch:
|
160 |
+
|
161 |
+
```shell
|
162 |
+
git checkout shiny-new-feature
|
163 |
+
git fetch upstream
|
164 |
+
git merge upstream/master
|
165 |
+
```
|
166 |
+
|
167 |
+
If there are no conflicts (or they could be fixed automatically), a file with a
|
168 |
+
default commit message will open, and you can simply save and quit this file.
|
169 |
+
|
170 |
+
If there are merge conflicts, you need to solve those conflicts. See
|
171 |
+
this [article](https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/)
|
172 |
+
for an explanation on how to do this.
|
173 |
+
Once the conflicts are merged and the files where the conflicts were solved are
|
174 |
+
added, you can run ``git commit`` to save those fixes.
|
175 |
+
|
176 |
+
If you have uncommitted changes at the moment you want to update the branch with
|
177 |
+
master, you will need to ``stash`` them prior to updating.
|
178 |
+
|
179 |
+
```{seealso}
|
180 |
+
See the stash [docs](https://git-scm.com/book/en/v2/Git-Tools-Stashing-and-Cleaning).
|
181 |
+
```
|
182 |
+
This will effectively store your changes and they can be reapplied after updating.
|
183 |
+
|
184 |
+
After the feature branch has been updated locally, you can now update your pull
|
185 |
+
request by pushing to the branch on GitHub:
|
186 |
+
|
187 |
+
```shell
|
188 |
+
git push origin shiny-new-feature
|
189 |
+
```
|
190 |
+
|
191 |
+
## Tips for a successful pull request
|
192 |
+
|
193 |
+
If you have made it to the `Review your code` phase, one of the core contributors may
|
194 |
+
take a look. Please note however that a handful of people are responsible for reviewing
|
195 |
+
all of the contributions, which can often lead to bottlenecks.
|
196 |
+
|
197 |
+
To improve the chances of your pull request being reviewed, you should:
|
198 |
+
|
199 |
+
- **Reference an open issue** for non-trivial changes to clarify the PR's purpose
|
200 |
+
- **Ensure you have appropriate tests**. These should be the first part of any PR
|
201 |
+
- **Keep your pull requests as simple as possible**. Larger PRs take longer to review
|
202 |
+
- **Ensure that CI is in a green state**. Reviewers may not even look otherwise
|
203 |
+
- **Keep updating your pull request**, either by request or every few days
|
204 |
+
|
205 |
+
## Acknowledgements
|
206 |
+
|
207 |
+
This page has been adapted from [pandas Developer Guide](https://pandas.pydata.org/docs/development/contributing.html).
|
markdown/OR_docs/general/Logger.md
ADDED
@@ -0,0 +1,456 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Using the Logging Infrastructure
|
2 |
+
|
3 |
+
OpenROAD uses [spdlog](https://isocpp.org/blog/2014/11/spdlog) as part
|
4 |
+
of logging infrastructure in order to ensure a clear, consistent
|
5 |
+
messaging and complete messaging interface. A wrapper formats the prefix
|
6 |
+
in the recommended messaging style and limit. A message format is as
|
7 |
+
follows:
|
8 |
+
|
9 |
+
``` text
|
10 |
+
<tool id>-<message id> <Message body>.
|
11 |
+
```
|
12 |
+
|
13 |
+
For example,
|
14 |
+
|
15 |
+
``` text
|
16 |
+
[INFO ODB-0127] Reading DEF file: ./results/asap7/aes/base/4_cts.def
|
17 |
+
```
|
18 |
+
|
19 |
+
All output from OpenROAD tools should be directed through the logging
|
20 |
+
API to ensure that redirection, file logging and execution control flow
|
21 |
+
are handled consistently. This also includes messages from any third-party
|
22 |
+
tool. Use the 'ord' message ID for third-party tools.
|
23 |
+
|
24 |
+
The logging infrastructure also supports generating a
|
25 |
+
[JSON](https://www.json.org) file containing design metrics (e.g., area or
|
26 |
+
slack). This output is directed to a user-specified file. The OpenROAD
|
27 |
+
application has a `-metrics` command line argument to specify the file.
|
28 |
+
|
29 |
+
## Handling Messages
|
30 |
+
|
31 |
+
OpenROAD supports multiple levels of severity for message outputs:
|
32 |
+
critical, error, warning, information and debug. These are supported by
|
33 |
+
automatic calls to the logger which will then prefix the appropriate
|
34 |
+
severity type to the message.
|
35 |
+
|
36 |
+
## C++20 Requirements
|
37 |
+
|
38 |
+
In C++20 the logger messages are checked during compile time which introduces
|
39 |
+
restrictions around rutime format strings. See [docs](https://fmt.dev/latest/api.html#compile-time-format-string-checks).
|
40 |
+
|
41 |
+
OpenROAD uses `spdlog` which uses `fmt_lib` under the hood. Below is an example of
|
42 |
+
what is no longer allowed.
|
43 |
+
|
44 |
+
In order to make use of runtime format strings, we have introduced a
|
45 |
+
`FMT_RUNTIME` macro in Logger.h. You should use this macro any time you
|
46 |
+
pass a dynamic string as the format string
|
47 |
+
|
48 |
+
```c++
|
49 |
+
logger_->info("{} {}", a, b); // OK
|
50 |
+
|
51 |
+
void blah(std::string template& a) {
|
52 |
+
logger_->info(a, c); // Illegal
|
53 |
+
logger_->info(FMT_RUNTIME(a), c); // Ok
|
54 |
+
}
|
55 |
+
```
|
56 |
+
|
57 |
+
## Messaging Guidelines
|
58 |
+
|
59 |
+
In addition to the proper use of message types, follow the guidelines
|
60 |
+
below to compose messages for clarity, consistency and other guidelines:
|
61 |
+
|
62 |
+
### Grammar
|
63 |
+
|
64 |
+
Start with a capital letter and end with a period, besides well-known
|
65 |
+
exceptions. Use capital letters for file formats and tool proper names, e.g.,
|
66 |
+
LEF, DEF, SPICE, FLUTE.
|
67 |
+
|
68 |
+
After the first word's capitalization, do not use capital letters
|
69 |
+
(aside from obvious exceptions, such as RSMT, hCut, etc.).
|
70 |
+
|
71 |
+
Do not use exclamations. Severity must be communicated by message
|
72 |
+
severity and clear implied or explicit action.
|
73 |
+
|
74 |
+
Avoid long, verbose messages. Use commas to list and separate clauses in
|
75 |
+
messages.
|
76 |
+
|
77 |
+
Spellcheck all messages using American English spellings.
|
78 |
+
|
79 |
+
Use ellipsis `...` only to indicate a pause, as when some tool is
|
80 |
+
running or being initialized.
|
81 |
+
|
82 |
+
### Abbreviations and Shortcuts
|
83 |
+
|
84 |
+
Use single-word versions when well-accepted / well-understood by users
|
85 |
+
and developers. Examples:
|
86 |
+
`stdcell, cutline, wirelength, flipchip, padring, bondpad, wirebond, libcell, viarule`.
|
87 |
+
|
88 |
+
Do not abbreviate or truncate English words; expand for the sake of clarity.
|
89 |
+
|
90 |
+
``` text
|
91 |
+
Incorrect: Num, #; Tot.
|
92 |
+
```
|
93 |
+
``` text
|
94 |
+
Correct: Number; Total
|
95 |
+
```
|
96 |
+
|
97 |
+
Use acceptable, well-understood abbreviations for brevity. Examples:
|
98 |
+
`db, tech, lib, inst, term, params, etc`.
|
99 |
+
|
100 |
+
Avoid contractions of action words:
|
101 |
+
|
102 |
+
``` text
|
103 |
+
Incorrect: Can't, Can not; Don't
|
104 |
+
```
|
105 |
+
``` text
|
106 |
+
Correct: Cannot; Do not
|
107 |
+
```
|
108 |
+
|
109 |
+
### Actionability
|
110 |
+
|
111 |
+
Messages should communicate a clear, implied or explicit action
|
112 |
+
that is necessary for flow continuation or improved quality of results.
|
113 |
+
|
114 |
+
``` text
|
115 |
+
Example:
|
116 |
+
A value for core_area must be specified in the footprint specification, or in the environment variable CORE_AREA.
|
117 |
+
```
|
118 |
+
|
119 |
+
### Clarity
|
120 |
+
|
121 |
+
Messages must be clear and complete, so as to communicate
|
122 |
+
necessary and sufficient information and actions. Elaborate specific variables,
|
123 |
+
options, and/or parameters to avoid any ambiguity.
|
124 |
+
|
125 |
+
``` text
|
126 |
+
Example:
|
127 |
+
Unrecognized argument $arg, should be one of -pitch, -bump_pin_name, -spacing_to_edge, -cell_name, -bumps_per_tile, -rdl_layer, -rdl_width, -rdl_spacing.
|
128 |
+
```
|
129 |
+
|
130 |
+
Specify objects clearly in the local context:
|
131 |
+
|
132 |
+
``` text
|
133 |
+
Example:
|
134 |
+
cutWithin is smaller than cutSpacing for ADJACENTCUTS on layer {}. Please check your rule definition.
|
135 |
+
|
136 |
+
Incomplete:
|
137 |
+
Warning: {} does not have viaDef aligned with layer.
|
138 |
+
```
|
139 |
+
|
140 |
+
Make any assumptions or use of default values explicit:
|
141 |
+
|
142 |
+
``` text
|
143 |
+
Example:
|
144 |
+
No net slacks found.
|
145 |
+
Timing-driven mode disabled.
|
146 |
+
|
147 |
+
Incomplete, missing default:
|
148 |
+
Utilization exceeds 100%.
|
149 |
+
```
|
150 |
+
|
151 |
+
Use simple language, and avoid repetitions:
|
152 |
+
|
153 |
+
``` text
|
154 |
+
Example:
|
155 |
+
Missing orientation for cell $cell_ref.
|
156 |
+
|
157 |
+
Incorrect:
|
158 |
+
No orientation available for orientation of $cell_ref.
|
159 |
+
```
|
160 |
+
|
161 |
+
### Message Types
|
162 |
+
|
163 |
+
OpenROAD supports the following levels of severity through the logger:
|
164 |
+
report, debug, information, warning, error and critical.
|
165 |
+
|
166 |
+
#### Report
|
167 |
+
|
168 |
+
Report messages are output by the tool in the form of a report to the user. Examples
|
169 |
+
include timing paths or power analysis results.
|
170 |
+
|
171 |
+
Example report message:
|
172 |
+
|
173 |
+
``` text
|
174 |
+
Path startpoint: $startpoint
|
175 |
+
```
|
176 |
+
|
177 |
+
#### Debug
|
178 |
+
|
179 |
+
Debug messages are only of use to tool developers and not to end users.
|
180 |
+
These messages are not shown unless explicitly enabled.
|
181 |
+
|
182 |
+
#### Information
|
183 |
+
|
184 |
+
Information messages may be used to report metrics, quality of
|
185 |
+
results, or program status to the user. Any message which indicates
|
186 |
+
runtime problems, such as potential faulty input or other internal
|
187 |
+
program issues, should be issued at a higher status level.
|
188 |
+
|
189 |
+
Example information messages:
|
190 |
+
|
191 |
+
``` text
|
192 |
+
Number of input ports: 47
|
193 |
+
|
194 |
+
Running optimization iteration 2
|
195 |
+
|
196 |
+
Current cell site utilization: 57.1567%
|
197 |
+
```
|
198 |
+
|
199 |
+
#### Warning
|
200 |
+
|
201 |
+
Warnings should be used to indicate atypical runtime conditions that
|
202 |
+
may affect quality, but not correctness, of the output. Any conditions
|
203 |
+
that affect correctness should be issued at a higher status level.
|
204 |
+
|
205 |
+
Example warning messages:
|
206 |
+
|
207 |
+
``` text
|
208 |
+
Core area utilization is greater than 90%. The generated cell placement may not be routable.
|
209 |
+
|
210 |
+
14 outputs are not constrained for max capacitance.
|
211 |
+
|
212 |
+
Pin 'A[0]' on instance 'mem01' does not contain antenna information and will not be checked for antenna violations.
|
213 |
+
```
|
214 |
+
|
215 |
+
#### Error
|
216 |
+
|
217 |
+
Error messages should be used to indicate correctness problems.
|
218 |
+
Problems with command arguments are a good example of where error messages
|
219 |
+
are appropriate. Errors
|
220 |
+
exit the current command by throwing an exception that is converted to
|
221 |
+
an error in Tcl. Errors that occur while reading a command file stop
|
222 |
+
execution of the script commands.
|
223 |
+
|
224 |
+
Example error messages:
|
225 |
+
|
226 |
+
``` text
|
227 |
+
Invalid selection: net 'test0' does not exist in the design.
|
228 |
+
|
229 |
+
Cell placement cannot be run before floorplanning.
|
230 |
+
|
231 |
+
Argument 'max_routing_layer' expects an integer value from 1 to 10.
|
232 |
+
```
|
233 |
+
|
234 |
+
#### Critical
|
235 |
+
|
236 |
+
Critical messages should be used to indicate correctness problems
|
237 |
+
that the program is not able to work around or ignore, and that require
|
238 |
+
immediate exiting of the program (abort).
|
239 |
+
|
240 |
+
Example critical messages:
|
241 |
+
|
242 |
+
``` text
|
243 |
+
Database 'chip' has been corrupted and is not recoverable.
|
244 |
+
|
245 |
+
Unable to allocate heap memory for array 'vertexIndices'. The required memory size may exceed host machine limits.
|
246 |
+
|
247 |
+
Assertion failed: 'nodeVisited == false' on line 122 of example.cpp. Please file a Github issue and attach a testcase.
|
248 |
+
```
|
249 |
+
|
250 |
+
## Coding
|
251 |
+
|
252 |
+
Each status message requires:
|
253 |
+
|
254 |
+
- The three letter tool ID
|
255 |
+
- The message ID
|
256 |
+
- The message string
|
257 |
+
- Optionally, additional arguments to fill in placeholders in the
|
258 |
+
message string
|
259 |
+
|
260 |
+
Reporting is simply printing and does not require a tool or message ID.
|
261 |
+
The tool ID comes from a fixed enumeration of all the tools in the
|
262 |
+
system. This enumeration is in `Logger.h`. New abbreviations should be
|
263 |
+
added after discussion with the OpenROAD system architects. The abbreviation
|
264 |
+
matches the C++ namespace for the tool.
|
265 |
+
|
266 |
+
Message IDs are integers. They are expected to be unique for each tool.
|
267 |
+
This has the benefit that a message can be mapped to the source code
|
268 |
+
unambiguously even if the text is not unique. Maintaining this invariant
|
269 |
+
is the tool owner's responsibility. To ensure that the IDs are unique,
|
270 |
+
each tool should maintain a file named 'messages.txt' in the top-level
|
271 |
+
tool directory, listing the message IDs along with the format string.
|
272 |
+
When code that uses a message ID is removed, the ID should be retired by
|
273 |
+
removing it from 'messages.txt'. See the utility
|
274 |
+
`etc/find_messages.py` to scan a tool directory and write a
|
275 |
+
`messages.txt` file.
|
276 |
+
|
277 |
+
Spdlog comes with the `fmt` library which supports message formatting in a
|
278 |
+
python or [C++20 like style](https://en.cppreference.com/w/cpp/utility/format/formatter#Standard_format_specification).
|
279 |
+
|
280 |
+
The message string should not include the tool ID or message ID which
|
281 |
+
will automatically be prepended. A trailing newline will automatically
|
282 |
+
be added, and hence messages should not end with one. Messages should be written
|
283 |
+
as complete sentences and end in a period. Multi-line messages may
|
284 |
+
contain embedded new lines.
|
285 |
+
|
286 |
+
Some examples:
|
287 |
+
|
288 |
+
``` cpp
|
289 |
+
logger->report("Path startpoint: {}", startpoint);
|
290 |
+
|
291 |
+
logger->error(ODB, 25, "Unable to open LEF file {}.", file_name);
|
292 |
+
|
293 |
+
logger->info(DRT, 42, "Routed {} nets in {:3.2f}s.", net_count, elapsed_time);
|
294 |
+
```
|
295 |
+
|
296 |
+
Tcl functions for reporting messages are defined in the OpenROAD swig
|
297 |
+
file `OpenRoad.i`. The message is simply a Tcl string (no C++20
|
298 |
+
formatting).
|
299 |
+
|
300 |
+
``` cpp
|
301 |
+
utl::report "Path startpoint: $startpoint"
|
302 |
+
|
303 |
+
utl::error ODB 25 "Unable to open LEF file $file_name."
|
304 |
+
|
305 |
+
utl::info DRT 42 "Routed $net_count nets in [format %3.2f $elapsed_time]."
|
306 |
+
```
|
307 |
+
|
308 |
+
`utl::report` should be used instead of 'puts' so that all output is
|
309 |
+
logged.
|
310 |
+
|
311 |
+
Calls to the Tcl functions `utl::warn` and `utl::error` with a single
|
312 |
+
message argument report with tool `ID UKN` and message `ID 0000`.
|
313 |
+
|
314 |
+
Tools use `#include utl/Logger.h` that defines the logger API. The Logger
|
315 |
+
instance is owned by the OpenROAD instance. Each tool should retrieve
|
316 |
+
the logger instance in the tool init function called after the tool make
|
317 |
+
function by the OpenROAD application.
|
318 |
+
|
319 |
+
Every tool swig file must include src/Exception.i so that errors thrown
|
320 |
+
by `utl::error` are caught at the Tcl command level. Use the following
|
321 |
+
swig command before `%inline`.
|
322 |
+
|
323 |
+
``` swig
|
324 |
+
%include "../../Exception.i"
|
325 |
+
```
|
326 |
+
|
327 |
+
The logger functions are shown below.
|
328 |
+
|
329 |
+
``` cpp
|
330 |
+
Logger::report(const std::string& message,
|
331 |
+
const Args&... args)
|
332 |
+
Logger::info(ToolId tool,
|
333 |
+
int id,
|
334 |
+
const std::string& message,
|
335 |
+
const Args&... args)
|
336 |
+
Logger::warn(ToolId tool,
|
337 |
+
int id,
|
338 |
+
const std::string& message,
|
339 |
+
const Args&... args)
|
340 |
+
Logger::error(ToolId tool,
|
341 |
+
int id,
|
342 |
+
const std::string& message,
|
343 |
+
const Args&... args)
|
344 |
+
Logger::critical(ToolId tool,
|
345 |
+
int id,
|
346 |
+
const std::string& message,
|
347 |
+
const Args&... args)
|
348 |
+
```
|
349 |
+
|
350 |
+
The corresponding Tcl functions are shown below.
|
351 |
+
|
352 |
+
``` tcl
|
353 |
+
utl::report message
|
354 |
+
utl::info tool id message
|
355 |
+
utl::warn tool id message
|
356 |
+
utl::error tool id message
|
357 |
+
utl::critical tool id message
|
358 |
+
```
|
359 |
+
|
360 |
+
Although there is a `utl::critical` function, it is really difficult to
|
361 |
+
imagine any circumstances that would justify aborting execution of the
|
362 |
+
application in a tcl function.
|
363 |
+
|
364 |
+
### Debug Messages
|
365 |
+
|
366 |
+
Debug messages have a different programming model. As they are most
|
367 |
+
often *not* issued the concern is to avoid slowing down normal
|
368 |
+
execution. For this reason such messages are issued by using the
|
369 |
+
debugPrint macro. This macro will avoid evaluating its arguments if they
|
370 |
+
are not going to be printed. The API is:
|
371 |
+
|
372 |
+
``` cpp
|
373 |
+
debugPrint(logger, tool, group, level, message, ...);
|
374 |
+
```
|
375 |
+
|
376 |
+
The `debug()` method of the Logger class should not be called directly.
|
377 |
+
No message id is used as these messages are not intended for end users.
|
378 |
+
The level is printed as the message id in the output.
|
379 |
+
|
380 |
+
The argument types are as for the info/warn/error/critical messages.
|
381 |
+
The one additional argument is group which is a `const char*`. Its
|
382 |
+
purpose is to allow the enabling of subsets of messages within one
|
383 |
+
tool.
|
384 |
+
|
385 |
+
Debug messages are enabled with the tcl command:
|
386 |
+
`set_debug_level <tool> <group> <level>`
|
387 |
+
|
388 |
+
## Metrics
|
389 |
+
|
390 |
+
The metrics logging uses a more restricted API since JSON only supports
|
391 |
+
specific types. There are a set of overloaded methods of the form:
|
392 |
+
|
393 |
+
``` cpp
|
394 |
+
metric(ToolId tool,
|
395 |
+
const std::string_view metric,
|
396 |
+
<type> value)
|
397 |
+
```
|
398 |
+
|
399 |
+
where `<type>` can be `int, double, string, or bool`. This will result
|
400 |
+
in the generated JSON:
|
401 |
+
|
402 |
+
``` text
|
403 |
+
"<tool>-<metric>" : value
|
404 |
+
```
|
405 |
+
|
406 |
+
String values will be enclosed in double-quotes automatically.
|
407 |
+
|
408 |
+
## Converting to Logger
|
409 |
+
|
410 |
+
The error functions in `include/openroad/Error.hh` should no longer be
|
411 |
+
included or used. Use the corresponding logger functions.
|
412 |
+
|
413 |
+
All uses of the tcl functions ord::error and ord::warn should be updated
|
414 |
+
call the `utl::error/warn` with a tool ID and message ID. For
|
415 |
+
compatibility these are defaulted to `UKN` and `0000` until they are
|
416 |
+
updated.
|
417 |
+
|
418 |
+
Regression tests should not have any `UKN-0000` messages in their ok
|
419 |
+
files. A simple grep should indicate that you still have pending calls
|
420 |
+
to pre-logger error/warn functions.
|
421 |
+
|
422 |
+
The `cmake` file for the tool must also be updated to include spdlog in
|
423 |
+
the link libraries so it can find the header files if they are not in
|
424 |
+
the normal system directories.
|
425 |
+
|
426 |
+
:::{tip}
|
427 |
+
At UCSD, dfm.ucsd.edu is an example of this problem; it has an ancient version of
|
428 |
+
spdlog in '/usr/include/spdlog'. Use `module` to install
|
429 |
+
spdlog 1.8.1 on dfm.ucsd.edu and check your build there.
|
430 |
+
:::
|
431 |
+
|
432 |
+
``` cmake
|
433 |
+
target_link_libraries(<library_target>
|
434 |
+
PUBLIC
|
435 |
+
utl
|
436 |
+
)
|
437 |
+
```
|
438 |
+
|
439 |
+
## Useful Information
|
440 |
+
As tool developers, we can also choose to include useful information to the end user -
|
441 |
+
be it in the form on debugging tips, or solutions to fix the errors/warnings. We compile
|
442 |
+
a list of such errors in this [table](../user/MessagesFinal.md). The good thing about
|
443 |
+
this page is the ability to encode rich formatting using Markdown, enabling you
|
444 |
+
to convey more information than what can be said from the limited messages in code.
|
445 |
+
|
446 |
+
To format the information, refer to this [sample GRT information file](../main/src/grt/doc/messages/0118.md).
|
447 |
+
In addition, make sure you create the corresponding `docs/messages` folder under the `tool` folder,
|
448 |
+
before creating your Markdown file with the corresponding `NUM`.
|
449 |
+
|
450 |
+
```shell
|
451 |
+
cd src/<tool> && mkdir -p doc/messages
|
452 |
+
cd doc/messages && touch <NUM>.md
|
453 |
+
```
|
454 |
+
|
455 |
+
### OpenROAD Tool List
|
456 |
+
A full list of tool namespaces can be found [here](DeveloperGuide.md#tool-flow-namespace).
|
markdown/OR_docs/general/README.md
ADDED
@@ -0,0 +1,367 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# OpenROAD
|
2 |
+
|
3 |
+
[![Build Status](https://jenkins.openroad.tools/buildStatus/icon?job=OpenROAD-Public%2Fmaster)](https://jenkins.openroad.tools/job/OpenROAD-Public/job/master/)
|
4 |
+
[![Coverity Scan Status](https://scan.coverity.com/projects/the-openroad-project-openroad/badge.svg)](https://scan.coverity.com/projects/the-openroad-project-openroad)
|
5 |
+
[![Documentation Status](https://readthedocs.org/projects/openroad/badge/?version=latest)](https://openroad.readthedocs.io/en/latest/?badge=latest)
|
6 |
+
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5370/badge)](https://bestpractices.coreinfrastructure.org/en/projects/5370)
|
7 |
+
|
8 |
+
## About OpenROAD
|
9 |
+
|
10 |
+
OpenROAD is the leading open-source, foundational application for
|
11 |
+
semiconductor digital design. The OpenROAD flow delivers an
|
12 |
+
Autonomous, No-Human-In-Loop (NHIL) flow, 24 hour turnaround from
|
13 |
+
RTL-GDSII for rapid design exploration and physical design implementation.
|
14 |
+
|
15 |
+
```{mermaid}
|
16 |
+
:align: center
|
17 |
+
|
18 |
+
%%{
|
19 |
+
init: {
|
20 |
+
'theme': 'neutral',
|
21 |
+
'themeVariables': {
|
22 |
+
'textColor': '#000000',
|
23 |
+
'noteTextColor' : '#000000',
|
24 |
+
'fontSize': '20px'
|
25 |
+
}
|
26 |
+
}
|
27 |
+
}%%
|
28 |
+
|
29 |
+
flowchart LR
|
30 |
+
b0[ ] --- b2[ ] --- b4[ ] --- ORFlow --- b1[ ] --- b3[ ] --- b5[ ]
|
31 |
+
style b0 stroke-width:0px, fill: #FFFFFF00, color:#FFFFFF00
|
32 |
+
style b1 stroke-width:0px, fill: #FFFFFF00
|
33 |
+
style b2 stroke-width:0px, fill: #FFFFFF00
|
34 |
+
style b3 stroke-width:0px, fill: #FFFFFF00
|
35 |
+
style b4 stroke-width:0px, fill: #FFFFFF00
|
36 |
+
style b5 stroke-width:0px, fill: #FFFFFF00, color:#FFFFFF00
|
37 |
+
|
38 |
+
linkStyle 0 stroke-width:0px
|
39 |
+
linkStyle 1 stroke-width:0px
|
40 |
+
linkStyle 2 stroke-width:0px
|
41 |
+
linkStyle 3 stroke-width:0px
|
42 |
+
linkStyle 4 stroke-width:0px
|
43 |
+
linkStyle 5 stroke-width:0px
|
44 |
+
|
45 |
+
|
46 |
+
subgraph ORFlow
|
47 |
+
direction TB
|
48 |
+
style ORFlow fill:#ffffff00, stroke-width:0px
|
49 |
+
A[Verilog\n+ libraries\n + constraints] --> FLOW
|
50 |
+
style A fill:#74c2b5,stroke:#000000,stroke-width:4px
|
51 |
+
subgraph FLOW
|
52 |
+
style FLOW fill:#FFFFFF00,stroke-width:4px
|
53 |
+
|
54 |
+
direction TB
|
55 |
+
B[Synthesis]
|
56 |
+
B --> C[Floorplan]
|
57 |
+
C --> D[Placement]
|
58 |
+
D --> E[Clock Tree Synthesis]
|
59 |
+
E --> F[Routing]
|
60 |
+
F --> G[Finishing]
|
61 |
+
style B fill:#f8cecc,stroke:#000000,stroke-width:4px
|
62 |
+
style C fill:#fff2cc,stroke:#000000,stroke-width:4px
|
63 |
+
style D fill:#cce5ff,stroke:#000000,stroke-width:4px
|
64 |
+
style E fill:#67ab9f,stroke:#000000,stroke-width:4px
|
65 |
+
style F fill:#fa6800,stroke:#000000,stroke-width:4px
|
66 |
+
style G fill:#ff6666,stroke:#000000,stroke-width:4px
|
67 |
+
end
|
68 |
+
|
69 |
+
FLOW --> H[GDSII\n Final Layout]
|
70 |
+
%% H --- H1[ ]
|
71 |
+
%% style H1 stroke-width:0px, fill: #FFFFFF00
|
72 |
+
%% linkStyle 11 stroke-width:0px
|
73 |
+
style H fill:#ff0000,stroke:#000000,stroke-width:4px
|
74 |
+
end
|
75 |
+
|
76 |
+
```
|
77 |
+
|
78 |
+
|
79 |
+
## OpenROAD Mission
|
80 |
+
|
81 |
+
[OpenROAD](https://theopenroadproject.org/) eliminates the barriers
|
82 |
+
of cost, schedule risk and uncertainty in hardware design to promote
|
83 |
+
open access to rapid, low-cost IC design software and expertise and
|
84 |
+
system innovation. The OpenROAD application enables flexible flow
|
85 |
+
control through an API with bindings in Tcl and Python.
|
86 |
+
|
87 |
+
OpenROAD is used in research and commercial applications such as,
|
88 |
+
- [OpenROAD-flow-scripts](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts)
|
89 |
+
from [OpenROAD](https://theopenroadproject.org/)
|
90 |
+
- [OpenLane](https://github.com/The-OpenROAD-Project/OpenLane) from
|
91 |
+
[Efabless](https://efabless.com/)
|
92 |
+
- [Silicon Compiler](https://github.com/siliconcompiler/siliconcompiler)
|
93 |
+
from [Zero ASIC](https://www.zeroasic.com/)
|
94 |
+
- [Hammer](https://docs.hammer-eda.org/en/latest/Examples/openroad-nangate45.html)
|
95 |
+
from [UC Berkeley](https://github.com/ucb-bar)
|
96 |
+
- [OpenFASoC](https://github.com/idea-fasoc/OpenFASOC) from
|
97 |
+
[IDEA-FASoC](https://github.com/idea-fasoc) for mixed-signal design flows
|
98 |
+
|
99 |
+
OpenROAD fosters a vibrant ecosystem of users through active
|
100 |
+
collaboration and partnership through software development and key
|
101 |
+
alliances. Our growing user community includes hardware designers,
|
102 |
+
software engineers, industry collaborators, VLSI enthusiasts,
|
103 |
+
students and researchers.
|
104 |
+
|
105 |
+
OpenROAD strongly advocates and enables IC design-based education
|
106 |
+
and workforce development initiatives through training content and
|
107 |
+
courses across several global universities, the Google-SkyWater
|
108 |
+
[shuttles](https://platform.efabless.com/projects/public) also
|
109 |
+
includes GlobalFoundries shuttles, design contests and IC design
|
110 |
+
workshops. The OpenROAD flow has been successfully used to date
|
111 |
+
in over 600 silicon-ready tapeouts for technologies up to 12nm.
|
112 |
+
|
113 |
+
## Getting Started with OpenROAD-flow-scripts
|
114 |
+
|
115 |
+
OpenROAD provides [OpenROAD-flow-scripts](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts)
|
116 |
+
as a native, ready-to-use prototyping and tapeout flow. However,
|
117 |
+
it also enables the creation of any custom flow controllers based
|
118 |
+
on the underlying tools, database and analysis engines. Please refer to the flow documentation [here](https://openroad-flow-scripts.readthedocs.io/en/latest/).
|
119 |
+
|
120 |
+
OpenROAD-flow-scripts (ORFS) is a fully autonomous, RTL-GDSII flow
|
121 |
+
for rapid architecture and design space exploration, early prediction
|
122 |
+
of QoR and detailed physical design implementation. However, ORFS
|
123 |
+
also enables manual intervention for finer user control of individual
|
124 |
+
flow stages through Tcl commands and Python APIs.
|
125 |
+
|
126 |
+
Figure below shows the main stages of the OpenROAD-flow-scripts:
|
127 |
+
|
128 |
+
```{mermaid}
|
129 |
+
:align: center
|
130 |
+
|
131 |
+
%%{init: { 'logLevel': 'debug', 'theme': 'dark'
|
132 |
+
} }%%
|
133 |
+
timeline
|
134 |
+
title RTL-GDSII Using OpenROAD-flow-scripts
|
135 |
+
Synthesis
|
136 |
+
: Inputs [RTL, SDC, .lib, .lef]
|
137 |
+
: Logic Synthesis (Yosys)
|
138 |
+
: Output files [Netlist, SDC]
|
139 |
+
Floorplan
|
140 |
+
: Floorplan Initialization
|
141 |
+
: IO placement (random)
|
142 |
+
: Timing-driven mixed-size placement
|
143 |
+
: Macro placement
|
144 |
+
: Tapcell and welltie insertion
|
145 |
+
: PDN generation
|
146 |
+
Placement
|
147 |
+
: Global placement without placed IOs
|
148 |
+
: IO placement (optimized)
|
149 |
+
: Global placement with placed IOs
|
150 |
+
: Resizing and buffering
|
151 |
+
: Detailed placement
|
152 |
+
CTS : Clock Tree Synthesis
|
153 |
+
: Timing optimization
|
154 |
+
: Filler cell insertion
|
155 |
+
Routing
|
156 |
+
: Global Routing
|
157 |
+
: Detailed Routing
|
158 |
+
Finishing
|
159 |
+
: Metal Fill insertion
|
160 |
+
: Signoff timing report
|
161 |
+
: Generate GDSII (KLayout)
|
162 |
+
: DRC/LVS check (KLayout)
|
163 |
+
```
|
164 |
+
|
165 |
+
Here are the main steps for a physical design implementation
|
166 |
+
using OpenROAD;
|
167 |
+
|
168 |
+
- `Floorplanning`
|
169 |
+
- Floorplan initialization - define the chip area, utilization
|
170 |
+
- IO pin placement (for designs without pads)
|
171 |
+
- Tap cell and well tie insertion
|
172 |
+
- PDN- power distribution network creation
|
173 |
+
- `Global Placement`
|
174 |
+
- Macro placement (RAMs, embedded macros)
|
175 |
+
- Standard cell placement
|
176 |
+
- Automatic placement optimization and repair for max slew,
|
177 |
+
max capacitance, and max fanout violations and long wires
|
178 |
+
- `Detailed Placement`
|
179 |
+
- Legalize placement - align to grid, adhere to design rules
|
180 |
+
- Incremental timing analysis for early estimates
|
181 |
+
- `Clock Tree Synthesis`
|
182 |
+
- Insert buffers and resize for high fanout nets
|
183 |
+
- `Optimize setup/hold timing`
|
184 |
+
- `Global Routing`
|
185 |
+
- Antenna repair
|
186 |
+
- Create routing guides
|
187 |
+
- `Detailed Routing`
|
188 |
+
- Legalize routes, DRC-correct routing to meet timing, power
|
189 |
+
constraints
|
190 |
+
- `Chip Finishing`
|
191 |
+
- Parasitic extraction using OpenRCX
|
192 |
+
- Final timing verification
|
193 |
+
- Final physical verification
|
194 |
+
- Dummy metal fill for manufacturability
|
195 |
+
- Use KLayout or Magic using generated GDS for DRC signoff
|
196 |
+
|
197 |
+
### GUI
|
198 |
+
|
199 |
+
The OpenROAD GUI is a powerful visualization, analysis, and debugging
|
200 |
+
tool with a customizable Tcl interface. The below figures show GUI views for
|
201 |
+
various flow stages including floorplanning, placement congestion,
|
202 |
+
CTS and post-routed design.
|
203 |
+
|
204 |
+
#### Floorplan
|
205 |
+
|
206 |
+
![ibex_floorplan.webp](./docs/images/ibex_floorplan.webp)
|
207 |
+
|
208 |
+
#### Automatic Hierarchical Macro Placement
|
209 |
+
|
210 |
+
![Ariane133](./docs/images/ariane133_mpl2.webp)
|
211 |
+
|
212 |
+
#### Placement Congestion Visualization
|
213 |
+
|
214 |
+
![pl_congestion.webp](./docs/images/pl_congestion.webp)
|
215 |
+
|
216 |
+
#### CTS
|
217 |
+
|
218 |
+
![clk_routing.webp](./docs/images/clk_routing.webp)
|
219 |
+
|
220 |
+
#### Routing
|
221 |
+
|
222 |
+
![ibex_routing.webp](./docs/images/ibex_routing.webp)
|
223 |
+
|
224 |
+
### PDK Support
|
225 |
+
|
226 |
+
The OpenROAD application is PDK independent. However, it has been tested
|
227 |
+
and validated with specific PDKs in the context of various flow
|
228 |
+
controllers.
|
229 |
+
|
230 |
+
OpenLane supports SkyWater 130nm and GlobalFoundries 180nm.
|
231 |
+
|
232 |
+
OpenROAD-flow-scripts supports several public and private PDKs
|
233 |
+
including:
|
234 |
+
|
235 |
+
#### Open-Source PDKs
|
236 |
+
|
237 |
+
- `GF180` - 180nm
|
238 |
+
- `SKY130` - 130nm
|
239 |
+
- `Nangate45` - 45nm
|
240 |
+
- `ASAP7` - Predictive FinFET 7nm
|
241 |
+
|
242 |
+
#### Proprietary PDKs
|
243 |
+
|
244 |
+
These PDKS are supported in OpenROAD-flow-scripts only. They are used to
|
245 |
+
test and calibrate OpenROAD against commercial platforms and ensure good
|
246 |
+
QoR. The PDKs and platform-specific files for these kits cannot be
|
247 |
+
provided due to NDA restrictions. However, if you are able to access
|
248 |
+
these platforms independently, you can create the necessary
|
249 |
+
platform-specific files yourself.
|
250 |
+
|
251 |
+
- `GF55` - 55nm
|
252 |
+
- `GF12` - 12nm
|
253 |
+
- `Intel22` - 22nm
|
254 |
+
- `Intel16` - 16nm
|
255 |
+
- `TSMC65` - 65nm
|
256 |
+
|
257 |
+
## Tapeouts
|
258 |
+
|
259 |
+
OpenROAD has been used for full physical implementation in over
|
260 |
+
600 tapeouts in SKY130 and GF180 through the Google-sponsored,
|
261 |
+
Efabless [MPW shuttle](https://efabless.com/open_shuttle_program)
|
262 |
+
and [ChipIgnite](https://efabless.com/) programs.
|
263 |
+
|
264 |
+
![shuttle.webp](./docs/images/shuttle.webp)
|
265 |
+
|
266 |
+
### OpenTitan SoC on GF12LP - Physical design and optimization using OpenROAD
|
267 |
+
|
268 |
+
![OpenTitan_SoC.webp](./docs/images/OpenTitan_SoC.webp)
|
269 |
+
|
270 |
+
### Continuous Tapeout Integration into CI
|
271 |
+
|
272 |
+
The OpenROAD project actively adds successfully taped out MPW shuttle
|
273 |
+
designs to the [CI regression
|
274 |
+
testing](https://github.com/The-OpenROAD-Project/OpenLane-MPW-CI).
|
275 |
+
Examples of designs include Open processor cores, RISC-V based SoCs,
|
276 |
+
cryptocurrency miners, robotic app processors, amateur satellite radio
|
277 |
+
transceivers, OpenPower-based Microwatt etc.
|
278 |
+
|
279 |
+
## Build OpenROAD
|
280 |
+
|
281 |
+
To build OpenROAD tools locally in your machine, follow steps
|
282 |
+
from [here](../user/Build.md).
|
283 |
+
|
284 |
+
## Regression Tests
|
285 |
+
|
286 |
+
There are a set of executable regression test scripts in `./test/`.
|
287 |
+
|
288 |
+
``` shell
|
289 |
+
# run tests for all tools
|
290 |
+
./test/regression
|
291 |
+
|
292 |
+
# run all flow tests
|
293 |
+
./test/regression flow
|
294 |
+
|
295 |
+
# run <tool> tests
|
296 |
+
./test/regression <tool>
|
297 |
+
|
298 |
+
# run all <tool>-specific unit tests
|
299 |
+
cd src/<tool>
|
300 |
+
./test/regression
|
301 |
+
|
302 |
+
# run only <TEST_NAME> for <tool>
|
303 |
+
cd src/<tool>
|
304 |
+
./test/regression <TEST_NAME>
|
305 |
+
```
|
306 |
+
|
307 |
+
The flow tests check results such as worst slack against reference values.
|
308 |
+
Use `report_flow_metrics [test]...` to see all of the metrics.
|
309 |
+
|
310 |
+
``` text
|
311 |
+
% report_flow_metrics gcd_nangate45
|
312 |
+
insts area util slack_min slack_max tns_max clk_skew max_slew max_cap max_fanout DPL ANT drv
|
313 |
+
gcd_nangate45 368 564 8.8 0.112 -0.015 -0.1 0.004 0 0 0 0 0 0
|
314 |
+
```
|
315 |
+
|
316 |
+
To update a failing regression, follow the instructions below:
|
317 |
+
|
318 |
+
```tcl
|
319 |
+
# update log files (i.e. *ok)
|
320 |
+
save_ok <TEST_NAME>
|
321 |
+
|
322 |
+
# update "*.metrics" for tests that use flow test
|
323 |
+
save_flow_metrics <TEST_NAME>
|
324 |
+
|
325 |
+
# update "*.metrics_limits" files
|
326 |
+
save_flow_metrics_limits <TEST_NAME>
|
327 |
+
```
|
328 |
+
|
329 |
+
## Run
|
330 |
+
|
331 |
+
``` text
|
332 |
+
openroad [-help] [-version] [-no_init] [-exit] [-gui]
|
333 |
+
[-threads count|max] [-log file_name] cmd_file
|
334 |
+
-help show help and exit
|
335 |
+
-version show version and exit
|
336 |
+
-no_init do not read .openroad init file
|
337 |
+
-threads count|max use count threads
|
338 |
+
-no_splash do not show the license splash at startup
|
339 |
+
-exit exit after reading cmd_file
|
340 |
+
-gui start in gui mode
|
341 |
+
-python start with python interpreter [limited to db operations]
|
342 |
+
-log <file_name> write a log in <file_name>
|
343 |
+
cmd_file source cmd_file
|
344 |
+
```
|
345 |
+
|
346 |
+
OpenROAD sources the Tcl command file `~/.openroad` unless the command
|
347 |
+
line option `-no_init` is specified.
|
348 |
+
|
349 |
+
OpenROAD then sources the command file `cmd_file` if it is specified on
|
350 |
+
the command line. Unless the `-exit` command line flag is specified, it
|
351 |
+
enters an interactive Tcl command interpreter.
|
352 |
+
|
353 |
+
A list of the available tools/modules included in the OpenROAD app
|
354 |
+
and their descriptions are available [here](../contrib/Logger.md#openroad-tool-list).
|
355 |
+
|
356 |
+
## Git Quickstart
|
357 |
+
OpenROAD uses Git for version control and contributions.
|
358 |
+
Get familiarised with a quickstart tutorial to contribution [here](../contrib/GitGuide.md).
|
359 |
+
|
360 |
+
|
361 |
+
## Understanding Warning and Error Messages
|
362 |
+
Seeing OpenROAD warnings or errors you do not understand? We have compiled a table of all messages
|
363 |
+
and you may potentially find your answer [here](https://openroad.readthedocs.io/en/latest/user/MessagesFinal.html).
|
364 |
+
|
365 |
+
## License
|
366 |
+
|
367 |
+
BSD 3-Clause License. See [LICENSE](LICENSE) file.
|
markdown/OR_docs/general/README_2.md
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Manpages Test Framework
|
2 |
+
|
3 |
+
There are 4 regression tests we conduct for the manpages, namely:
|
4 |
+
- Translator
|
5 |
+
- Count output files
|
6 |
+
- Man functionality check
|
7 |
+
- Man-to-Tcl check
|
8 |
+
|
9 |
+
There are also 2 CI tests as part of the
|
10 |
+
They can be found in `.github/workflows/github-actions-docs-test.yml` file.
|
11 |
+
|
12 |
+
## Regression tests
|
13 |
+
|
14 |
+
This is divided into static and dynamic regression tests.
|
15 |
+
Static tests are designed to test the script functionality, whereas
|
16 |
+
dynamic tests are designed to test the documentation compatibitity with the
|
17 |
+
script and will be housed in individual module folders.
|
18 |
+
|
19 |
+
### Static Test
|
20 |
+
|
21 |
+
#### Translator
|
22 |
+
|
23 |
+
The code file can be found [here](translator.py).
|
24 |
+
The objective of this test is to test if the underlying `README.md`
|
25 |
+
file can be converted to roff format via regex extraction. Namely,
|
26 |
+
the script checks for equality in the number of function names,
|
27 |
+
descriptors, synopsis, options and arguments detected per Tcl command.
|
28 |
+
|
29 |
+
#### Man functionality check
|
30 |
+
|
31 |
+
The code file can be found [here](man_func.tcl).
|
32 |
+
The objective of this test is to check the functionality of the Tcl
|
33 |
+
`man` command implemented within the OpenROAD binary.
|
34 |
+
Mode 1 is where we run `man -manpath <CMD>`, and mode 2
|
35 |
+
is where we do not specify the `-manpath` argument and just run
|
36 |
+
`man <CMD>`.
|
37 |
+
|
38 |
+
This check makes sure that the files are compiled in the correct location
|
39 |
+
and viewable by the `man` command.
|
40 |
+
|
41 |
+
### Dynamic Test
|
42 |
+
|
43 |
+
For all the tests below, do make sure to update it locally every
|
44 |
+
time you make a change to the `README.md`, update messages, or
|
45 |
+
make a change to the top-level `Tcl` code.
|
46 |
+
|
47 |
+
#### README-messages check
|
48 |
+
|
49 |
+
The name of this test is `{MODULE}_readme_msgs_check.py`.
|
50 |
+
The objective of this test is to check the number of
|
51 |
+
parsed module commands and messages.
|
52 |
+
|
53 |
+
### Man-to-Tcl check
|
54 |
+
|
55 |
+
The name of this test is `{MODULE}_man_tcl_check.py`
|
56 |
+
The objective of this test is to ensure that there are similar counts of
|
57 |
+
command in the following: `proc`, `help`, `man`.
|
58 |
+
|
59 |
+
`proc` and `help` commands are parsed from the Tcl file, whereas
|
60 |
+
`man` commands are parsed from the README file.
|
61 |
+
|
62 |
+
## CI tests
|
63 |
+
|
64 |
+
These two tests ensure that the documents and top-level Tcl files
|
65 |
+
are formatted properly to catch manpage extraction or compilation errors.
|
66 |
+
|
67 |
+
- Tcl Syntax Parser [code](man_tcl_params.py)
|
68 |
+
- Readme Syntax Parser [code](readme_parser.py)
|
69 |
+
|
70 |
+
## New Test Checklist
|
71 |
+
|
72 |
+
Adding a new test called `func`, you must create/update the following:
|
73 |
+
- `func.py|tcl`: Test script.
|
74 |
+
- `func.ok`: Log output of the test.
|
75 |
+
- `.*ok`: Ideal file output of the test (can be `def`, `lef` etc).
|
76 |
+
- `regression_tests.tcl`: Update the name of the test. In this case, `func`.
|
77 |
+
|
78 |
+
## Authors
|
79 |
+
|
80 |
+
Jack Luar (Advisor: Cho Moon)
|
81 |
+
|
82 |
+
## License
|
83 |
+
|
84 |
+
BSD 3-Clause License. See [LICENSE](../../../LICENSE) file.
|
markdown/OR_docs/general/ReadmeFormat.md
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Tool Name
|
2 |
+
|
3 |
+
The top-level READMEs in each tool folder (`~/OpenROAD/src/<tool>/README.md`)
|
4 |
+
has to be formatted in this particular manner. For most part, you can copy
|
5 |
+
the format and replace the contents where necessary.
|
6 |
+
|
7 |
+
## Commands
|
8 |
+
|
9 |
+
```{note}
|
10 |
+
- Parameters in square brackets `[-param param]` are optional.
|
11 |
+
- Parameters without square brackets `-param2 param2` are required.
|
12 |
+
```
|
13 |
+
|
14 |
+
### Command ABC
|
15 |
+
|
16 |
+
```{note}
|
17 |
+
Please add a description, even a one-liner will be sufficient to
|
18 |
+
avoid triggering CI errors.
|
19 |
+
```
|
20 |
+
|
21 |
+
The `command_abc` command performs...
|
22 |
+
|
23 |
+
The developer arguments are...
|
24 |
+
|
25 |
+
Note for commands, you must adhere to the top-level Tcl definition
|
26 |
+
for the same command.
|
27 |
+
- Arguments: cannot be preceded with dashes
|
28 |
+
- Flags/Keys: verify if it is optional or required, then insert the
|
29 |
+
necessary square brackets. Also, keys have to be followed with a specifier
|
30 |
+
whereas flags only require the `-flag` itself.
|
31 |
+
|
32 |
+
As far as possible, do place the positional arguments last.
|
33 |
+
|
34 |
+
```tcl
|
35 |
+
command_abc
|
36 |
+
-key1 key1
|
37 |
+
[-flag1]
|
38 |
+
[-flagDev]
|
39 |
+
arg1
|
40 |
+
```
|
41 |
+
|
42 |
+
#### Options
|
43 |
+
|
44 |
+
| Switch Name | Description |
|
45 |
+
| ----- | ----- |
|
46 |
+
| `arg1` | Description for `arg1`. |
|
47 |
+
| `-key1` | Description for `key1`. |
|
48 |
+
| `-flag1` | Description for `flag1`. |
|
49 |
+
|
50 |
+
#### Developer Arguments
|
51 |
+
|
52 |
+
If there are some developer arguments you want to highlight to the end user
|
53 |
+
not to worry about - you can park them in the same level below the main
|
54 |
+
`Options` category.
|
55 |
+
|
56 |
+
| Switch Name | Description |
|
57 |
+
| ----- | ----- |
|
58 |
+
| `-flagDev` | Description for `flagDev`. |
|
59 |
+
|
60 |
+
## Useful Developer Commands
|
61 |
+
|
62 |
+
If you are a developer, you might find these useful. More details can be found in the [source file]() or the [swig file]().
|
63 |
+
|
64 |
+
| Command Name | Description |
|
65 |
+
| ----- | ----- |
|
66 |
+
| `command_abc_debug` | Debug something. |
|
67 |
+
|
68 |
+
## Example scripts
|
69 |
+
|
70 |
+
Examples scripts demonstrating ...
|
71 |
+
|
72 |
+
```shell
|
73 |
+
./test/asdfg.tcl
|
74 |
+
```
|
75 |
+
|
76 |
+
## Regression tests
|
77 |
+
|
78 |
+
There are a set of regression tests in `./test`. Refer to this [section](../../README.md#regression-tests) for more information.
|
79 |
+
|
80 |
+
Simply run the following script:
|
81 |
+
|
82 |
+
```shell
|
83 |
+
./test/regression
|
84 |
+
```
|
85 |
+
|
86 |
+
## Limitations
|
87 |
+
|
88 |
+
## FAQs
|
89 |
+
|
90 |
+
Check out [GitHub discussion]()
|
91 |
+
about this tool.
|
92 |
+
|
93 |
+
## Authors
|
94 |
+
|
95 |
+
## References
|
96 |
+
|
97 |
+
## License
|
98 |
+
|
99 |
+
BSD 3-Clause License. See [LICENSE](../../LICENSE) file.
|
markdown/OR_docs/general/TclFormat.md
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Tcl Format
|
2 |
+
|
3 |
+
The most important part to take note of are:
|
4 |
+
`sta::define_cmd_args` - which defines what is printed when
|
5 |
+
a user types `help command` in the OR shell; as well as
|
6 |
+
`sta::parse_key_args` - which defines what keys/flags the
|
7 |
+
command actually parses.
|
8 |
+
|
9 |
+
Let us use `check_antennas` command for an example.
|
10 |
+
|
11 |
+
## Specification
|
12 |
+
|
13 |
+
```tcl
|
14 |
+
sta::define_cmd_args "check_antennas" { [-verbose]\
|
15 |
+
[-net net]}
|
16 |
+
|
17 |
+
proc check_antennas { args } {
|
18 |
+
sta::parse_key_args "check_antennas" args \
|
19 |
+
keys {-report_file -net} \
|
20 |
+
flags {-verbose -report_violating_nets}
|
21 |
+
...
|
22 |
+
}
|
23 |
+
```
|
24 |
+
|
25 |
+
## Do not compile
|
26 |
+
|
27 |
+
If you add `;# checker off` behind the command's
|
28 |
+
`sta::define_cmd_args {} ` and `sta::parse_key_args {}`
|
29 |
+
the function will not be compiled in the Manpages and
|
30 |
+
included in the doctests.
|
31 |
+
|
32 |
+
```tcl
|
33 |
+
sta::define_cmd_args "check_antennas" { [-verbose]\
|
34 |
+
[-net net]} ;# checker off
|
35 |
+
|
36 |
+
proc check_antennas { args } {
|
37 |
+
sta::parse_key_args "check_antennas" args \
|
38 |
+
keys {-report_file -net} \
|
39 |
+
flags {-verbose -report_violating_nets};# checker off
|
40 |
+
...
|
41 |
+
}
|
42 |
+
```
|
markdown/OR_docs/general/index.md
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Welcome to OpenROAD's documentation!
|
2 |
+
|
3 |
+
The OpenROAD ("Foundations and Realization of Open, Accessible Design")
|
4 |
+
project was launched in June 2018 within the DARPA IDEA program. OpenROAD
|
5 |
+
aims to bring down the barriers of cost, expertise and unpredictability that
|
6 |
+
currently block designers' access to hardware implementation in advanced
|
7 |
+
technologies. The project team (Qualcomm, Arm and multiple universities and
|
8 |
+
partners, led by UC San Diego) is developing a fully autonomous, open-source
|
9 |
+
tool chain for digital SoC layout generation, focusing on
|
10 |
+
the RTL-to-GDSII phase of system-on-chip design. Thus,
|
11 |
+
OpenROAD holistically attacks the multiple facets of today's design cost
|
12 |
+
crisis: engineering resources, design tool licenses, project schedule,
|
13 |
+
and risk.
|
14 |
+
|
15 |
+
The IDEA program targets no-human-in-loop (NHIL) design, with 24-hour
|
16 |
+
turnaround time and zero loss of power-performance-area (PPA) design quality.
|
17 |
+
|
18 |
+
The NHIL target requires tools to adapt and auto-tune successfully to flow
|
19 |
+
completion, without (or, with minimal) human intervention. Machine
|
20 |
+
intelligence augments human expertise through efficient modeling and
|
21 |
+
prediction of flow and optimization outcomes throughout the synthesis, placement
|
22 |
+
and routing process. This is complemented by development of metrics
|
23 |
+
and machine learning infrastructure.
|
24 |
+
|
25 |
+
The 24-hour runtime target implies that problems must be strategically
|
26 |
+
decomposed throughout the design process, with clustered and partitioned
|
27 |
+
subproblems being solved and recomposed through intelligent distribution
|
28 |
+
and management of computational resources. This ensures that the NHIL design
|
29 |
+
optimization is performed within its available `[threads * hours]` "box" of
|
30 |
+
resources. Decomposition that enables parallel and distributed search over
|
31 |
+
cloud resources incurs a quality-of-results loss, but this is subsequently
|
32 |
+
recovered through improved flow predictability and enhanced optimization.
|
33 |
+
|
34 |
+
For a technical description of the OpenROAD flow, please refer to our DAC-2019 paper:
|
35 |
+
[Toward an Open-Source Digital Flow: First Learnings from the OpenROAD Project](https://vlsicad.ucsd.edu/Publications/Conferences/371/c371.pdf).
|
36 |
+
The paper is also available from [ACM Digital Library](https://dl.acm.org/doi/10.1145/3316781.3326334).
|
37 |
+
Other publications and presentations are
|
38 |
+
linked [here](https://theopenroadproject.org/publications/).
|
39 |
+
|
40 |
+
## Documentation
|
41 |
+
|
42 |
+
The OpenROAD Project has two releases:
|
43 |
+
|
44 |
+
- Application ([github](https://github.com/The-OpenROAD-Project/OpenROAD)) ([docs](main/README.md)): The application is a standalone binary for digital place and route that can be used by any other RTL-GDSII flow controller.
|
45 |
+
- Flow ([github](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts)) ([docs](https://openroad-flow-scripts.readthedocs.io/en/latest/)): This is the native OpenROAD flow that consists of a set of integrated scripts for an autonomous RTL-GDSII flow using OpenROAD and other open-source tools.
|
46 |
+
|
47 |
+
## Code of conduct
|
48 |
+
|
49 |
+
Please read our code of conduct [here](main/CODE_OF_CONDUCT.md).
|
50 |
+
|
51 |
+
## How to contribute
|
52 |
+
|
53 |
+
If you are willing to **contribute**, see the
|
54 |
+
[Getting Involved](contrib/GettingInvolved.md) section.
|
55 |
+
|
56 |
+
If you are a **developer** with EDA background, learn more about how you
|
57 |
+
can use OpenROAD as the infrastructure for your tools in the
|
58 |
+
[Developer Guide](contrib/DeveloperGuide.md) section.
|
59 |
+
|
60 |
+
OpenROAD uses Git for version control and contributions.
|
61 |
+
Get familiarised with a quickstart tutorial to contribution [here](contrib/GitGuide.md).
|
62 |
+
|
63 |
+
## How to get in touch
|
64 |
+
|
65 |
+
We maintain the following channels for communication:
|
66 |
+
|
67 |
+
- Project homepage and news: <https://theopenroadproject.org>
|
68 |
+
- Twitter: <https://twitter.com/OpenROAD_EDA>
|
69 |
+
- Issues and bugs:
|
70 |
+
- OpenROAD: <https://github.com/The-OpenROAD-Project/OpenROAD/issues>
|
71 |
+
- Discussions:
|
72 |
+
- OpenROAD: <https://github.com/The-OpenROAD-Project/OpenROAD/discussions>
|
73 |
+
- Inquiries: openroad@ucsd.edu
|
74 |
+
|
75 |
+
See also our [FAQs](user/FAQS.md).
|
76 |
+
|
77 |
+
## Site Map
|
78 |
+
|
79 |
+
```{tableofcontents}
|
80 |
+
```
|
markdown/OR_docs/general/translator.md
ADDED
@@ -0,0 +1,245 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Global Placement
|
2 |
+
|
3 |
+
The global placement module in OpenROAD (`gpl`) is based on the open-source
|
4 |
+
RePlAce tool, from the paper "Advancing Solution Quality and Routability Validation
|
5 |
+
in Global Placement".
|
6 |
+
|
7 |
+
Features:
|
8 |
+
|
9 |
+
- Analytic and nonlinear placement algorithm. Solves
|
10 |
+
electrostatic force equations using Nesterov's method.
|
11 |
+
([link](https://cseweb.ucsd.edu/~jlu/papers/eplace-todaes14/paper.pdf))
|
12 |
+
- Verified with various commercial technologies and research enablements using OpenDB
|
13 |
+
(7/14/16/28/45/55/65nm).
|
14 |
+
- Verified deterministic solution generation with various compilers and OS.
|
15 |
+
- Supports Mixed-size placement mode.
|
16 |
+
|
17 |
+
## Commands
|
18 |
+
|
19 |
+
```{note}
|
20 |
+
- Parameters in square brackets `[-param param]` are optional.
|
21 |
+
- Parameters without square brackets `-param2 param2` are required.
|
22 |
+
```
|
23 |
+
|
24 |
+
### Global Placement
|
25 |
+
|
26 |
+
When using the `-timing_driven` flag, `gpl` does a virtual `repair_design`
|
27 |
+
to find slacks and
|
28 |
+
weight nets with low slack. It adjusts the worst slacks (modified with
|
29 |
+
`-timing_driven_nets_percentage`) using a multiplier (modified with
|
30 |
+
`-timing_driven_net_weight_max`). The multiplier
|
31 |
+
is scaled from the full value for the worst slack, to 1.0 at the
|
32 |
+
`timing_driven_nets_percentage` point. Use the `set_wire_rc` command to set
|
33 |
+
resistance and capacitance of estimated wires used for timing.
|
34 |
+
|
35 |
+
Routability-driven arguments
|
36 |
+
- They begin with `-routability`.
|
37 |
+
- `-routability_check_overflow`, `-routability_max_density`, `-routability_max_bloat_iter`, `-routability_max_inflation_iter`, `-routability_target_rc_metric`, `-routability_inflation_ratio_coef`, `-routability_max_inflation_ratio`, `-routability_rc_coefficients`
|
38 |
+
|
39 |
+
Timing-driven arguments
|
40 |
+
- They begin with `-timing_driven`.
|
41 |
+
- `-timing_driven_net_reweight_overflow`, `-timing_driven_net_weight_max`, `-timing_driven_nets_percentage`
|
42 |
+
|
43 |
+
```tcl
|
44 |
+
global_placement
|
45 |
+
[-timing_driven]
|
46 |
+
[-routability_driven]
|
47 |
+
[-disable_timing_driven]
|
48 |
+
[-disable_routability_driven]
|
49 |
+
[-skip_initial_place]
|
50 |
+
[-incremental]
|
51 |
+
[-bin_grid_count grid_count]
|
52 |
+
[-density target_density]
|
53 |
+
[-init_density_penalty init_density_penalty]
|
54 |
+
[-init_wirelength_coef init_wirelength_coef]
|
55 |
+
[-min_phi_coef min_phi_conef]
|
56 |
+
[-max_phi_coef max_phi_coef]
|
57 |
+
[-reference_hpwl reference_hpwl]
|
58 |
+
[-overflow overflow]
|
59 |
+
[-initial_place_max_iter initial_place_max_iter]
|
60 |
+
[-initial_place_max_fanout initial_place_max_fanout]
|
61 |
+
[-pad_left pad_left]
|
62 |
+
[-pad_right pad_right]
|
63 |
+
[-force_cpu]
|
64 |
+
[-skip_io]
|
65 |
+
[-skip_nesterov_place]
|
66 |
+
[-routability_check_overflow routability_check_overflow]
|
67 |
+
[-routability_max_density routability_max_density]
|
68 |
+
[-routability_max_bloat_iter routability_max_bloat_iter]
|
69 |
+
[-routability_max_inflation_iter routability_max_inflation_iter]
|
70 |
+
[-routability_target_rc_metric routability_target_rc_metric]
|
71 |
+
[-routability_inflation_ratio_coef routability_inflation_ratio_coef]
|
72 |
+
[-routability_max_inflation_ratio routability_max_inflation_ratio]
|
73 |
+
[-routability_rc_coefficients routability_rc_coefficients]
|
74 |
+
[-timing_driven_net_reweight_overflow]
|
75 |
+
[-timing_driven_net_weight_max]
|
76 |
+
[-timing_driven_nets_percentage]
|
77 |
+
```
|
78 |
+
|
79 |
+
#### Options
|
80 |
+
|
81 |
+
| Switch Name | Description |
|
82 |
+
| ----- | ----- |
|
83 |
+
| `-timing_driven` | Enable timing-driven mode. See [link](#timing-driven-arguments) for timing-specific arguments. |
|
84 |
+
| `-routability_driven` | Enable routability-driven mode. See [link](#routability-driven-arguments) for routability-specific arguments. |
|
85 |
+
| `-skip_initial_place` | Skip the initial placement (Biconjugate gradient stabilized, or BiCGSTAB solving) before Nesterov placement. Initial placement improves HPWL by ~5% on large designs. Equivalent to `-initial_place_max_iter 0`. |
|
86 |
+
| `-incremental` | Enable the incremental global placement. Users would need to tune other parameters (e.g., `init_density_penalty`) with pre-placed solutions. |
|
87 |
+
| `-bin_grid_count` | Set bin grid's counts. The internal heuristic defines the default value. Allowed values are integers `[64,128,256,512,...]`. |
|
88 |
+
| `-density` | Set target density. The default value is `0.7` (i.e., 70%). Allowed values are floats `[0, 1]`. |
|
89 |
+
| `-init_density_penalty` | Set initial density penalty. The default value is `8e-5`. Allowed values are floats `[1e-6, 1e6]`. |
|
90 |
+
| `-init_wirelength_coef` | Set initial wirelength coefficient. The default value is `0.25`. Allowed values are floats. |
|
91 |
+
| `-min_phi_coef` | Set `pcof_min` ($\mu_k$ Lower Bound). The default value is `0.95`. Allowed values are floats `[0.95, 1.05]`. |
|
92 |
+
| `-max_phi_coef` | Set `pcof_max` ($\mu_k$ Upper Bound). Default value is 1.05. Allowed values are `[1.00-1.20, float]`. |
|
93 |
+
| `-overflow` | Set target overflow for termination condition. The default value is `0.1`. Allowed values are floats `[0, 1]`. |
|
94 |
+
| `-initial_place_max_iter` | Set maximum iterations in the initial place. The default value is 20. Allowed values are integers `[0, MAX_INT]`. |
|
95 |
+
| `-initial_place_max_fanout` | Set net escape condition in initial place when $fanout \geq initial\_place\_max\_fanout$. The default value is 200. Allowed values are integers `[1, MAX_INT]`. |
|
96 |
+
| `-pad_left` | Set left padding in terms of number of sites. The default value is 0, and the allowed values are integers `[1, MAX_INT]` |
|
97 |
+
| `-pad_right` | Set right padding in terms of number of sites. The default value is 0, and the allowed values are integers `[1, MAX_INT]` |
|
98 |
+
| `-force_cpu` | Force to use the CPU solver even if the GPU is available. |
|
99 |
+
| `-skip_io` | Flag to ignore the IO ports when computing wirelength during placement. The default value is False, allowed values are boolean. |
|
100 |
+
|
101 |
+
#### Routability-Driven Arguments
|
102 |
+
|
103 |
+
| Switch Name | Description |
|
104 |
+
| ----- | ----- |
|
105 |
+
| `-routability_check_overflow` | Set overflow threshold for routability mode. The default value is `0.2`, and the allowed values are floats `[0, 1]`. |
|
106 |
+
| `-routability_max_density` | Set density threshold for routability mode. The default value is `0.99`, and the allowed values are floats `[0, 1]`. |
|
107 |
+
| `-routability_max_bloat_iter` | Set bloat iteration threshold for routability mode. The default value is `1`, and the allowed values are integers `[1, MAX_INT]`.|
|
108 |
+
| `-routability_max_inflation_iter` | Set inflation iteration threshold for routability mode. The default value is `4`, and the allowed values are integers `[1, MAX_INT]`. |
|
109 |
+
| `-routability_target_rc_metric` | Set target RC metric for routability mode. The default value is `1.25`, and the allowed values are floats. |
|
110 |
+
| `-routability_inflation_ratio_coef` | Set inflation ratio coefficient for routability mode. The default value is `2.5`, and the allowed values are floats. |
|
111 |
+
| `-routability_max_inflation_ratio` | Set inflation ratio threshold for routability mode. The default value is `2.5`, and the allowed values are floats. |
|
112 |
+
| `-routability_rc_coefficients` | Set routability RC coefficients. It comes in the form of a Tcl List `{k1, k2, k3, k4}`. The default value for each coefficient is `{1.0, 1.0, 0.0, 0.0}` respectively, and the allowed values are floats. |
|
113 |
+
|
114 |
+
#### Timing-Driven Arguments
|
115 |
+
|
116 |
+
| Switch Name | Description |
|
117 |
+
| ----- | ----- |
|
118 |
+
| `-timing_driven_net_reweight_overflow` | Set overflow threshold for timing-driven net reweighting. Allowed value is a Tcl list of integers where each number is `[0, 100]`. |
|
119 |
+
| `-timing_driven_net_weight_max` | Set the multiplier for the most timing-critical nets. The default value is `1.9`, and the allowed values are floats. |
|
120 |
+
| `-timing_driven_nets_percentage` | Set the reweighted percentage of nets in timing-driven mode. The default value is 10. Allowed values are floats `[0, 100]`. |
|
121 |
+
|
122 |
+
### Cluster Flops
|
123 |
+
|
124 |
+
This command does flop clustering based on parameters.
|
125 |
+
|
126 |
+
```tcl
|
127 |
+
cluster_flops
|
128 |
+
[-tray_weight tray_weight]\
|
129 |
+
[-timing_weight timing_weight]\
|
130 |
+
[-max_split_size max_split_size]\
|
131 |
+
[-num_paths num_paths]
|
132 |
+
```
|
133 |
+
|
134 |
+
#### Options
|
135 |
+
|
136 |
+
| Switch Name | Description |
|
137 |
+
| ----- | ----- |
|
138 |
+
| `-tray_weight` | Tray weight, default value is 20.0, type `float`. |
|
139 |
+
| `-timing_weight` | Timing weight, default value is 1.0, type `float`. |
|
140 |
+
| `-max_split_size` | Maximum split size, default value is -1, type `int`.|
|
141 |
+
| `-num_paths` | KIV, default value is 0, type `int`. |
|
142 |
+
|
143 |
+
|
144 |
+
## Useful Developer Commands
|
145 |
+
|
146 |
+
If you are a developer, you might find these useful. More details can be found in the [source file](./src/replace.cpp) or the [swig file](./src/replace.i).
|
147 |
+
|
148 |
+
```
|
149 |
+
# debugging global placement
|
150 |
+
global_placement_debug -pause -update -inst -draw_bins -initial
|
151 |
+
|
152 |
+
# adds padding and gets global placement uniform target density
|
153 |
+
get_global_placement_uniform_density -pad_left -pad_right
|
154 |
+
```
|
155 |
+
|
156 |
+
Example scripts demonstrating how to run `gpl` on a sample design on `core01` as follows:
|
157 |
+
|
158 |
+
```shell
|
159 |
+
./test/core01.tcl
|
160 |
+
```
|
161 |
+
|
162 |
+
## Regression tests
|
163 |
+
|
164 |
+
There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests).
|
165 |
+
|
166 |
+
Simply run the following script:
|
167 |
+
|
168 |
+
```shell
|
169 |
+
./test/regression
|
170 |
+
```
|
171 |
+
|
172 |
+
## Limitations
|
173 |
+
|
174 |
+
## Using the Python interface to gpl
|
175 |
+
|
176 |
+
This API tries to stay close to the API defined in `C++` class `Replace`
|
177 |
+
that is located [here](include/gpl/Replace.h).
|
178 |
+
|
179 |
+
When initializing a design, a sequence of Python commands might look like
|
180 |
+
the following:
|
181 |
+
|
182 |
+
```python
|
183 |
+
from openroad import Design, Tech
|
184 |
+
tech = Tech()
|
185 |
+
tech.readLef(...)
|
186 |
+
design = Design(tech)
|
187 |
+
design.readDef(...)
|
188 |
+
gpl = design.getReplace()
|
189 |
+
```
|
190 |
+
|
191 |
+
Here is an example of some options / configurations to the global placer.
|
192 |
+
(See [Replace.h](include/gpl/Replace.h) for a complete list)
|
193 |
+
|
194 |
+
```python
|
195 |
+
gpl.setInitialPlaceMaxIter(iter)
|
196 |
+
gpl.setSkipIoMode(skip_io)
|
197 |
+
gpl.setTimingDrivenMode(timing_driven)
|
198 |
+
gpl.setTimingNetWeightMax(weight)
|
199 |
+
```
|
200 |
+
|
201 |
+
There are some useful Python functions located in the file
|
202 |
+
[grt_aux.py](test/grt_aux.py) but these are not considered a part of the *final*
|
203 |
+
API and they may change.
|
204 |
+
|
205 |
+
## FAQs
|
206 |
+
|
207 |
+
Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+replace+in%3Atitle)
|
208 |
+
about this tool.
|
209 |
+
|
210 |
+
## References
|
211 |
+
|
212 |
+
- C.-K. Cheng, A. B. Kahng, I. Kang and L. Wang, "RePlAce: Advancing
|
213 |
+
Solution Quality and Routability Validation in Global Placement", IEEE
|
214 |
+
Transactions on Computer-Aided Design of Integrated Circuits and Systems,
|
215 |
+
38(9) (2019), pp. 1717-1730. [(.pdf)](https://vlsicad.ucsd.edu/Publications/Journals/j126.pdf)
|
216 |
+
- J. Lu, P. Chen, C.-C. Chang, L. Sha, D. J.-H. Huang, C.-C. Teng and
|
217 |
+
C.-K. Cheng, "ePlace: Electrostatics based Placement using Fast Fourier
|
218 |
+
Transform and Nesterov's Method", ACM TODAES 20(2) (2015), article 17. [(.pdf)](https://cseweb.ucsd.edu/~jlu/papers/eplace-todaes14/paper.pdf)
|
219 |
+
- J. Lu, H. Zhuang, P. Chen, H. Chang, C.-C. Chang, Y.-C. Wong, L. Sha,
|
220 |
+
D. J.-H. Huang, Y. Luo, C.-C. Teng and C.-K. Cheng, "ePlace-MS:
|
221 |
+
Electrostatics based Placement for Mixed-Size Circuits", IEEE TCAD 34(5)
|
222 |
+
(2015), pp. 685-698. [(.pdf)](https://cseweb.ucsd.edu/~jlu/papers/eplace-ms-tcad14/paper.pdf)
|
223 |
+
- A. B. Kahng, J. Li and L. Wang,
|
224 |
+
"Improved Flop Tray-Based Design Implementation for Power Reduction",
|
225 |
+
IEEE/ACM ICCAD, 2016, pp. 20:1-20:8.
|
226 |
+
- The timing-driven mode has been implemented by
|
227 |
+
Mingyu Woo (only available in [legacy repo in standalone
|
228 |
+
branch](https://github.com/The-OpenROAD-Project/RePlAce/tree/standalone).)
|
229 |
+
- The routability-driven mode has been implemented by Mingyu Woo.
|
230 |
+
- Timing-driven mode re-implementation is ongoing with the current
|
231 |
+
clean-code structure.
|
232 |
+
|
233 |
+
## Authors
|
234 |
+
|
235 |
+
- Authors/maintainer since Jan 2020: Mingyu Woo (Ph.D. Advisor:
|
236 |
+
Andrew. B. Kahng)
|
237 |
+
- Original open-sourcing of RePlAce: August 2018, by Ilgweon Kang
|
238 |
+
(Ph.D. Advisor: Chung-Kuan Cheng), Lutong Wang (Ph.D. Advisor: Andrew
|
239 |
+
B. Kahng), and Mingyu Woo (Ph.D. Advisor: Andrew B. Kahng).
|
240 |
+
- Also thanks to Dr. Jingwei Lu for open-sourcing the previous
|
241 |
+
ePlace-MS/ePlace project code.
|
242 |
+
|
243 |
+
## License
|
244 |
+
|
245 |
+
BSD 3-Clause License. See [LICENSE](LICENSE) file.
|
markdown/OR_docs/installation/Build.md
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Installing OpenROAD
|
2 |
+
|
3 |
+
## Build
|
4 |
+
|
5 |
+
The first step, independent of the build method, is to download the repository:
|
6 |
+
|
7 |
+
``` shell
|
8 |
+
git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD.git
|
9 |
+
cd OpenROAD
|
10 |
+
```
|
11 |
+
|
12 |
+
OpenROAD git submodules (cloned by the `--recursive` flag) are located in `src/`.
|
13 |
+
|
14 |
+
The default build type is RELEASE to compile optimized code.
|
15 |
+
The resulting executable is in `build/src/openroad`.
|
16 |
+
|
17 |
+
Optional CMake variables passed as `-D<var>=<value>` arguments to CMake are show below.
|
18 |
+
|
19 |
+
| Argument | Value |
|
20 |
+
|------------------------|---------------------------|
|
21 |
+
| `CMAKE_BUILD_TYPE` | DEBUG, RELEASE |
|
22 |
+
| `CMAKE_CXX_FLAGS` | Additional compiler flags |
|
23 |
+
| `TCL_LIBRARY` | Path to Tcl library |
|
24 |
+
| `TCL_HEADER` | Path to `tcl.h` |
|
25 |
+
| `ZLIB_ROOT` | Path to `zlib` |
|
26 |
+
| `CMAKE_INSTALL_PREFIX` | Path to install binary |
|
27 |
+
|
28 |
+
> **Note:** There is a `openroad_build.log` file that is generated
|
29 |
+
with every build in the build directory. In case of filing issues,
|
30 |
+
it can be uploaded in the "Relevant log output" section of OpenROAD
|
31 |
+
[issue forms](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/issues/new/choose).
|
32 |
+
|
33 |
+
## Install dependencies
|
34 |
+
|
35 |
+
You may follow our helper script to install dependencies as follows:
|
36 |
+
``` shell
|
37 |
+
sudo ./etc/DependencyInstaller.sh
|
38 |
+
```
|
39 |
+
|
40 |
+
> **WARNING**
|
41 |
+
>
|
42 |
+
> `etc/DependencyInstaller.sh` defaults to installing system
|
43 |
+
> packages and requires sudo access. These packages can affect
|
44 |
+
> your environment. We recommend users install dependencies
|
45 |
+
> locally using [setup.sh](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/setup.sh)
|
46 |
+
> from OpenROAD-flow-scripts.
|
47 |
+
|
48 |
+
### Build Manually
|
49 |
+
|
50 |
+
``` shell
|
51 |
+
mkdir build && cd build
|
52 |
+
cmake ..
|
53 |
+
make
|
54 |
+
sudo make install
|
55 |
+
```
|
56 |
+
|
57 |
+
The default install directory is `/usr/local`.
|
58 |
+
To install in a different directory with CMake use:
|
59 |
+
|
60 |
+
``` shell
|
61 |
+
cmake .. -DCMAKE_INSTALL_PREFIX=<prefix_path>
|
62 |
+
```
|
63 |
+
|
64 |
+
Alternatively, you can use the `DESTDIR` variable with make.
|
65 |
+
|
66 |
+
``` shell
|
67 |
+
make DESTDIR=<prefix_path> install
|
68 |
+
```
|
69 |
+
|
70 |
+
### Build using support script
|
71 |
+
|
72 |
+
``` shell
|
73 |
+
./etc/Build.sh
|
74 |
+
# To build with debug option enabled and if the Tcl library is not on the default path
|
75 |
+
./etc/Build.sh -cmake="-DCMAKE_BUILD_TYPE=DEBUG -DTCL_LIB=/path/to/tcl/lib"
|
76 |
+
|
77 |
+
# To build manpages
|
78 |
+
./etc/Build.sh -build-man
|
79 |
+
```
|
80 |
+
|
81 |
+
The default install directory is `/usr/local`.
|
82 |
+
To install in a different directory use:
|
83 |
+
|
84 |
+
``` shell
|
85 |
+
./etc/Build.sh -cmake="-DCMAKE_INSTALL_PREFIX=<prefix_path>"
|
86 |
+
```
|
87 |
+
|
88 |
+
### LTO Options
|
89 |
+
By default, OpenROAD is built with link time optimizations enabled.
|
90 |
+
This adds about 1 minute to compile times and improves the runtime
|
91 |
+
by about 11%. If you would like to disable LTO pass
|
92 |
+
`-DLINK_TIME_OPTIMIZATION=OFF` when generating a build.
|
93 |
+
|
94 |
+
### Build with Address Sanitizer
|
95 |
+
To enable building with Address Sanitizer, use the argument `-DASAN=ON`.
|
96 |
+
Setting the `ASAN` variable to `ON` adds necessary compile and link options
|
97 |
+
for using Address Sanitizer.
|
98 |
+
|
99 |
+
> **Note:** Address Sanitizer adds instrumentation for detecting memory errors.
|
100 |
+
> Enabling this option will cause OpenROAD to run slower and consume more RAM.
|
101 |
+
|
102 |
+
### Build with Prebuilt Binaries
|
103 |
+
|
104 |
+
Courtesy of [Precision Innovations](https://precisioninno.com/), there are pre-built binaries
|
105 |
+
of OpenROAD with self-contained dependencies released on a regular basis.
|
106 |
+
Refer to this [link](https://openroad-flow-scripts.readthedocs.io/en/latest/user/BuildWithPrebuilt.html) here.
|
markdown/OR_docs/installation/FAQS.md
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# FAQs
|
2 |
+
|
3 |
+
If you cannot find your question/answer here, please file a GitHub issue to
|
4 |
+
the appropriate repository or start a discussion.
|
5 |
+
|
6 |
+
- Issues and bugs:
|
7 |
+
- OpenROAD: <https://github.com/The-OpenROAD-Project/OpenROAD/issues>
|
8 |
+
- Discussions:
|
9 |
+
- OpenROAD: <https://github.com/The-OpenROAD-Project/OpenROAD/discussions>
|
10 |
+
|
11 |
+
## How can I contribute?
|
12 |
+
|
13 |
+
Thank you for your willingness to contribute. Please see the
|
14 |
+
[Getting Involved](../contrib/GettingInvolved) guide.
|
markdown/OR_docs/tools/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Contributor Covenant Code of Conduct
|
2 |
+
|
3 |
+
## Our Pledge
|
4 |
+
|
5 |
+
We as members, contributors, and leaders pledge to make participation in our
|
6 |
+
community a harassment-free experience for everyone, regardless of age, body
|
7 |
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
8 |
+
identity and expression, level of experience, education, socio-economic status,
|
9 |
+
nationality, personal appearance, race, religion, or sexual identity
|
10 |
+
and orientation.
|
11 |
+
|
12 |
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
13 |
+
diverse, inclusive, and healthy community.
|
14 |
+
|
15 |
+
## Our Standards
|
16 |
+
|
17 |
+
Examples of behavior that contributes to a positive environment for our
|
18 |
+
community include:
|
19 |
+
|
20 |
+
* Demonstrating empathy and kindness toward other people
|
21 |
+
* Being respectful of differing opinions, viewpoints, and experiences
|
22 |
+
* Giving and gracefully accepting constructive feedback
|
23 |
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
24 |
+
and learning from the experience
|
25 |
+
* Focusing on what is best not just for us as individuals, but for the
|
26 |
+
overall community
|
27 |
+
|
28 |
+
Examples of unacceptable behavior include:
|
29 |
+
|
30 |
+
* The use of sexualized language or imagery, and sexual attention or
|
31 |
+
advances of any kind
|
32 |
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
33 |
+
* Public or private harassment
|
34 |
+
* Publishing others' private information, such as a physical or email
|
35 |
+
address, without their explicit permission
|
36 |
+
* Other conduct which could reasonably be considered inappropriate in a
|
37 |
+
professional setting
|
38 |
+
|
39 |
+
## Enforcement Responsibilities
|
40 |
+
|
41 |
+
Community leaders are responsible for clarifying and enforcing our standards of
|
42 |
+
acceptable behavior and will take appropriate and fair corrective action in
|
43 |
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
44 |
+
or harmful.
|
45 |
+
|
46 |
+
Community leaders have the right and responsibility to remove, edit, or reject
|
47 |
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
48 |
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
49 |
+
decisions when appropriate.
|
50 |
+
|
51 |
+
## Scope
|
52 |
+
|
53 |
+
This Code of Conduct applies within all community spaces, and also applies when
|
54 |
+
an individual is officially representing the community in public spaces.
|
55 |
+
Examples of representing our community include using an official e-mail address,
|
56 |
+
posting via an official social media account, or acting as an appointed
|
57 |
+
representative at an online or offline event.
|
58 |
+
|
59 |
+
## Enforcement
|
60 |
+
|
61 |
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
62 |
+
reported to the community leaders responsible for enforcement at
|
63 |
+
complaints@openroad.tools.
|
64 |
+
All complaints will be reviewed and investigated promptly and fairly.
|
65 |
+
|
66 |
+
All community leaders are obligated to respect the privacy and security of the
|
67 |
+
reporter of any incident.
|
68 |
+
|
69 |
+
## Enforcement Guidelines
|
70 |
+
|
71 |
+
Community leaders will follow these Community Impact Guidelines in determining
|
72 |
+
the consequences for any action they deem in violation of this Code of Conduct:
|
73 |
+
|
74 |
+
### 1. Correction
|
75 |
+
|
76 |
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
77 |
+
unprofessional or unwelcome in the community.
|
78 |
+
|
79 |
+
**Consequence**: A private, written warning from community leaders, providing
|
80 |
+
clarity around the nature of the violation and an explanation of why the
|
81 |
+
behavior was inappropriate. A public apology may be requested.
|
82 |
+
|
83 |
+
### 2. Warning
|
84 |
+
|
85 |
+
**Community Impact**: A violation through a single incident or series
|
86 |
+
of actions.
|
87 |
+
|
88 |
+
**Consequence**: A warning with consequences for continued behavior. No
|
89 |
+
interaction with the people involved, including unsolicited interaction with
|
90 |
+
those enforcing the Code of Conduct, for a specified period of time. This
|
91 |
+
includes avoiding interactions in community spaces as well as external channels
|
92 |
+
like social media. Violating these terms may lead to a temporary or
|
93 |
+
permanent ban.
|
94 |
+
|
95 |
+
### 3. Temporary Ban
|
96 |
+
|
97 |
+
**Community Impact**: A serious violation of community standards, including
|
98 |
+
sustained inappropriate behavior.
|
99 |
+
|
100 |
+
**Consequence**: A temporary ban from any sort of interaction or public
|
101 |
+
communication with the community for a specified period of time. No public or
|
102 |
+
private interaction with the people involved, including unsolicited interaction
|
103 |
+
with those enforcing the Code of Conduct, is allowed during this period.
|
104 |
+
Violating these terms may lead to a permanent ban.
|
105 |
+
|
106 |
+
### 4. Permanent Ban
|
107 |
+
|
108 |
+
**Community Impact**: Demonstrating a pattern of violation of community
|
109 |
+
standards, including sustained inappropriate behavior, harassment of an
|
110 |
+
individual, or aggression toward or disparagement of classes of individuals.
|
111 |
+
|
112 |
+
**Consequence**: A permanent ban from any sort of public interaction within
|
113 |
+
the community.
|
114 |
+
|
115 |
+
## Attribution
|
116 |
+
|
117 |
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
118 |
+
version 2.0, available at
|
119 |
+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
120 |
+
|
121 |
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
122 |
+
enforcement ladder](https://github.com/mozilla/inclusion).
|
123 |
+
|
124 |
+
[homepage]: https://www.contributor-covenant.org
|
125 |
+
|
126 |
+
For answers to common questions about this code of conduct, see the FAQ at
|
127 |
+
https://www.contributor-covenant.org/faq. Translations are available at
|
128 |
+
https://www.contributor-covenant.org/translations.
|
markdown/OR_docs/tools/README.md
ADDED
@@ -0,0 +1,367 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# OpenROAD
|
2 |
+
|
3 |
+
[![Build Status](https://jenkins.openroad.tools/buildStatus/icon?job=OpenROAD-Public%2Fmaster)](https://jenkins.openroad.tools/job/OpenROAD-Public/job/master/)
|
4 |
+
[![Coverity Scan Status](https://scan.coverity.com/projects/the-openroad-project-openroad/badge.svg)](https://scan.coverity.com/projects/the-openroad-project-openroad)
|
5 |
+
[![Documentation Status](https://readthedocs.org/projects/openroad/badge/?version=latest)](https://openroad.readthedocs.io/en/latest/?badge=latest)
|
6 |
+
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5370/badge)](https://bestpractices.coreinfrastructure.org/en/projects/5370)
|
7 |
+
|
8 |
+
## About OpenROAD
|
9 |
+
|
10 |
+
OpenROAD is the leading open-source, foundational application for
|
11 |
+
semiconductor digital design. The OpenROAD flow delivers an
|
12 |
+
Autonomous, No-Human-In-Loop (NHIL) flow, 24 hour turnaround from
|
13 |
+
RTL-GDSII for rapid design exploration and physical design implementation.
|
14 |
+
|
15 |
+
```{mermaid}
|
16 |
+
:align: center
|
17 |
+
|
18 |
+
%%{
|
19 |
+
init: {
|
20 |
+
'theme': 'neutral',
|
21 |
+
'themeVariables': {
|
22 |
+
'textColor': '#000000',
|
23 |
+
'noteTextColor' : '#000000',
|
24 |
+
'fontSize': '20px'
|
25 |
+
}
|
26 |
+
}
|
27 |
+
}%%
|
28 |
+
|
29 |
+
flowchart LR
|
30 |
+
b0[ ] --- b2[ ] --- b4[ ] --- ORFlow --- b1[ ] --- b3[ ] --- b5[ ]
|
31 |
+
style b0 stroke-width:0px, fill: #FFFFFF00, color:#FFFFFF00
|
32 |
+
style b1 stroke-width:0px, fill: #FFFFFF00
|
33 |
+
style b2 stroke-width:0px, fill: #FFFFFF00
|
34 |
+
style b3 stroke-width:0px, fill: #FFFFFF00
|
35 |
+
style b4 stroke-width:0px, fill: #FFFFFF00
|
36 |
+
style b5 stroke-width:0px, fill: #FFFFFF00, color:#FFFFFF00
|
37 |
+
|
38 |
+
linkStyle 0 stroke-width:0px
|
39 |
+
linkStyle 1 stroke-width:0px
|
40 |
+
linkStyle 2 stroke-width:0px
|
41 |
+
linkStyle 3 stroke-width:0px
|
42 |
+
linkStyle 4 stroke-width:0px
|
43 |
+
linkStyle 5 stroke-width:0px
|
44 |
+
|
45 |
+
|
46 |
+
subgraph ORFlow
|
47 |
+
direction TB
|
48 |
+
style ORFlow fill:#ffffff00, stroke-width:0px
|
49 |
+
A[Verilog\n+ libraries\n + constraints] --> FLOW
|
50 |
+
style A fill:#74c2b5,stroke:#000000,stroke-width:4px
|
51 |
+
subgraph FLOW
|
52 |
+
style FLOW fill:#FFFFFF00,stroke-width:4px
|
53 |
+
|
54 |
+
direction TB
|
55 |
+
B[Synthesis]
|
56 |
+
B --> C[Floorplan]
|
57 |
+
C --> D[Placement]
|
58 |
+
D --> E[Clock Tree Synthesis]
|
59 |
+
E --> F[Routing]
|
60 |
+
F --> G[Finishing]
|
61 |
+
style B fill:#f8cecc,stroke:#000000,stroke-width:4px
|
62 |
+
style C fill:#fff2cc,stroke:#000000,stroke-width:4px
|
63 |
+
style D fill:#cce5ff,stroke:#000000,stroke-width:4px
|
64 |
+
style E fill:#67ab9f,stroke:#000000,stroke-width:4px
|
65 |
+
style F fill:#fa6800,stroke:#000000,stroke-width:4px
|
66 |
+
style G fill:#ff6666,stroke:#000000,stroke-width:4px
|
67 |
+
end
|
68 |
+
|
69 |
+
FLOW --> H[GDSII\n Final Layout]
|
70 |
+
%% H --- H1[ ]
|
71 |
+
%% style H1 stroke-width:0px, fill: #FFFFFF00
|
72 |
+
%% linkStyle 11 stroke-width:0px
|
73 |
+
style H fill:#ff0000,stroke:#000000,stroke-width:4px
|
74 |
+
end
|
75 |
+
|
76 |
+
```
|
77 |
+
|
78 |
+
|
79 |
+
## OpenROAD Mission
|
80 |
+
|
81 |
+
[OpenROAD](https://theopenroadproject.org/) eliminates the barriers
|
82 |
+
of cost, schedule risk and uncertainty in hardware design to promote
|
83 |
+
open access to rapid, low-cost IC design software and expertise and
|
84 |
+
system innovation. The OpenROAD application enables flexible flow
|
85 |
+
control through an API with bindings in Tcl and Python.
|
86 |
+
|
87 |
+
OpenROAD is used in research and commercial applications such as,
|
88 |
+
- [OpenROAD-flow-scripts](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts)
|
89 |
+
from [OpenROAD](https://theopenroadproject.org/)
|
90 |
+
- [OpenLane](https://github.com/The-OpenROAD-Project/OpenLane) from
|
91 |
+
[Efabless](https://efabless.com/)
|
92 |
+
- [Silicon Compiler](https://github.com/siliconcompiler/siliconcompiler)
|
93 |
+
from [Zero ASIC](https://www.zeroasic.com/)
|
94 |
+
- [Hammer](https://docs.hammer-eda.org/en/latest/Examples/openroad-nangate45.html)
|
95 |
+
from [UC Berkeley](https://github.com/ucb-bar)
|
96 |
+
- [OpenFASoC](https://github.com/idea-fasoc/OpenFASOC) from
|
97 |
+
[IDEA-FASoC](https://github.com/idea-fasoc) for mixed-signal design flows
|
98 |
+
|
99 |
+
OpenROAD fosters a vibrant ecosystem of users through active
|
100 |
+
collaboration and partnership through software development and key
|
101 |
+
alliances. Our growing user community includes hardware designers,
|
102 |
+
software engineers, industry collaborators, VLSI enthusiasts,
|
103 |
+
students and researchers.
|
104 |
+
|
105 |
+
OpenROAD strongly advocates and enables IC design-based education
|
106 |
+
and workforce development initiatives through training content and
|
107 |
+
courses across several global universities, the Google-SkyWater
|
108 |
+
[shuttles](https://platform.efabless.com/projects/public) also
|
109 |
+
includes GlobalFoundries shuttles, design contests and IC design
|
110 |
+
workshops. The OpenROAD flow has been successfully used to date
|
111 |
+
in over 600 silicon-ready tapeouts for technologies up to 12nm.
|
112 |
+
|
113 |
+
## Getting Started with OpenROAD-flow-scripts
|
114 |
+
|
115 |
+
OpenROAD provides [OpenROAD-flow-scripts](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts)
|
116 |
+
as a native, ready-to-use prototyping and tapeout flow. However,
|
117 |
+
it also enables the creation of any custom flow controllers based
|
118 |
+
on the underlying tools, database and analysis engines. Please refer to the flow documentation [here](https://openroad-flow-scripts.readthedocs.io/en/latest/).
|
119 |
+
|
120 |
+
OpenROAD-flow-scripts (ORFS) is a fully autonomous, RTL-GDSII flow
|
121 |
+
for rapid architecture and design space exploration, early prediction
|
122 |
+
of QoR and detailed physical design implementation. However, ORFS
|
123 |
+
also enables manual intervention for finer user control of individual
|
124 |
+
flow stages through Tcl commands and Python APIs.
|
125 |
+
|
126 |
+
Figure below shows the main stages of the OpenROAD-flow-scripts:
|
127 |
+
|
128 |
+
```{mermaid}
|
129 |
+
:align: center
|
130 |
+
|
131 |
+
%%{init: { 'logLevel': 'debug', 'theme': 'dark'
|
132 |
+
} }%%
|
133 |
+
timeline
|
134 |
+
title RTL-GDSII Using OpenROAD-flow-scripts
|
135 |
+
Synthesis
|
136 |
+
: Inputs [RTL, SDC, .lib, .lef]
|
137 |
+
: Logic Synthesis (Yosys)
|
138 |
+
: Output files [Netlist, SDC]
|
139 |
+
Floorplan
|
140 |
+
: Floorplan Initialization
|
141 |
+
: IO placement (random)
|
142 |
+
: Timing-driven mixed-size placement
|
143 |
+
: Macro placement
|
144 |
+
: Tapcell and welltie insertion
|
145 |
+
: PDN generation
|
146 |
+
Placement
|
147 |
+
: Global placement without placed IOs
|
148 |
+
: IO placement (optimized)
|
149 |
+
: Global placement with placed IOs
|
150 |
+
: Resizing and buffering
|
151 |
+
: Detailed placement
|
152 |
+
CTS : Clock Tree Synthesis
|
153 |
+
: Timing optimization
|
154 |
+
: Filler cell insertion
|
155 |
+
Routing
|
156 |
+
: Global Routing
|
157 |
+
: Detailed Routing
|
158 |
+
Finishing
|
159 |
+
: Metal Fill insertion
|
160 |
+
: Signoff timing report
|
161 |
+
: Generate GDSII (KLayout)
|
162 |
+
: DRC/LVS check (KLayout)
|
163 |
+
```
|
164 |
+
|
165 |
+
Here are the main steps for a physical design implementation
|
166 |
+
using OpenROAD;
|
167 |
+
|
168 |
+
- `Floorplanning`
|
169 |
+
- Floorplan initialization - define the chip area, utilization
|
170 |
+
- IO pin placement (for designs without pads)
|
171 |
+
- Tap cell and well tie insertion
|
172 |
+
- PDN- power distribution network creation
|
173 |
+
- `Global Placement`
|
174 |
+
- Macro placement (RAMs, embedded macros)
|
175 |
+
- Standard cell placement
|
176 |
+
- Automatic placement optimization and repair for max slew,
|
177 |
+
max capacitance, and max fanout violations and long wires
|
178 |
+
- `Detailed Placement`
|
179 |
+
- Legalize placement - align to grid, adhere to design rules
|
180 |
+
- Incremental timing analysis for early estimates
|
181 |
+
- `Clock Tree Synthesis`
|
182 |
+
- Insert buffers and resize for high fanout nets
|
183 |
+
- `Optimize setup/hold timing`
|
184 |
+
- `Global Routing`
|
185 |
+
- Antenna repair
|
186 |
+
- Create routing guides
|
187 |
+
- `Detailed Routing`
|
188 |
+
- Legalize routes, DRC-correct routing to meet timing, power
|
189 |
+
constraints
|
190 |
+
- `Chip Finishing`
|
191 |
+
- Parasitic extraction using OpenRCX
|
192 |
+
- Final timing verification
|
193 |
+
- Final physical verification
|
194 |
+
- Dummy metal fill for manufacturability
|
195 |
+
- Use KLayout or Magic using generated GDS for DRC signoff
|
196 |
+
|
197 |
+
### GUI
|
198 |
+
|
199 |
+
The OpenROAD GUI is a powerful visualization, analysis, and debugging
|
200 |
+
tool with a customizable Tcl interface. The below figures show GUI views for
|
201 |
+
various flow stages including floorplanning, placement congestion,
|
202 |
+
CTS and post-routed design.
|
203 |
+
|
204 |
+
#### Floorplan
|
205 |
+
|
206 |
+
![ibex_floorplan.webp](./docs/images/ibex_floorplan.webp)
|
207 |
+
|
208 |
+
#### Automatic Hierarchical Macro Placement
|
209 |
+
|
210 |
+
![Ariane133](./docs/images/ariane133_mpl2.webp)
|
211 |
+
|
212 |
+
#### Placement Congestion Visualization
|
213 |
+
|
214 |
+
![pl_congestion.webp](./docs/images/pl_congestion.webp)
|
215 |
+
|
216 |
+
#### CTS
|
217 |
+
|
218 |
+
![clk_routing.webp](./docs/images/clk_routing.webp)
|
219 |
+
|
220 |
+
#### Routing
|
221 |
+
|
222 |
+
![ibex_routing.webp](./docs/images/ibex_routing.webp)
|
223 |
+
|
224 |
+
### PDK Support
|
225 |
+
|
226 |
+
The OpenROAD application is PDK independent. However, it has been tested
|
227 |
+
and validated with specific PDKs in the context of various flow
|
228 |
+
controllers.
|
229 |
+
|
230 |
+
OpenLane supports SkyWater 130nm and GlobalFoundries 180nm.
|
231 |
+
|
232 |
+
OpenROAD-flow-scripts supports several public and private PDKs
|
233 |
+
including:
|
234 |
+
|
235 |
+
#### Open-Source PDKs
|
236 |
+
|
237 |
+
- `GF180` - 180nm
|
238 |
+
- `SKY130` - 130nm
|
239 |
+
- `Nangate45` - 45nm
|
240 |
+
- `ASAP7` - Predictive FinFET 7nm
|
241 |
+
|
242 |
+
#### Proprietary PDKs
|
243 |
+
|
244 |
+
These PDKS are supported in OpenROAD-flow-scripts only. They are used to
|
245 |
+
test and calibrate OpenROAD against commercial platforms and ensure good
|
246 |
+
QoR. The PDKs and platform-specific files for these kits cannot be
|
247 |
+
provided due to NDA restrictions. However, if you are able to access
|
248 |
+
these platforms independently, you can create the necessary
|
249 |
+
platform-specific files yourself.
|
250 |
+
|
251 |
+
- `GF55` - 55nm
|
252 |
+
- `GF12` - 12nm
|
253 |
+
- `Intel22` - 22nm
|
254 |
+
- `Intel16` - 16nm
|
255 |
+
- `TSMC65` - 65nm
|
256 |
+
|
257 |
+
## Tapeouts
|
258 |
+
|
259 |
+
OpenROAD has been used for full physical implementation in over
|
260 |
+
600 tapeouts in SKY130 and GF180 through the Google-sponsored,
|
261 |
+
Efabless [MPW shuttle](https://efabless.com/open_shuttle_program)
|
262 |
+
and [ChipIgnite](https://efabless.com/) programs.
|
263 |
+
|
264 |
+
![shuttle.webp](./docs/images/shuttle.webp)
|
265 |
+
|
266 |
+
### OpenTitan SoC on GF12LP - Physical design and optimization using OpenROAD
|
267 |
+
|
268 |
+
![OpenTitan_SoC.webp](./docs/images/OpenTitan_SoC.webp)
|
269 |
+
|
270 |
+
### Continuous Tapeout Integration into CI
|
271 |
+
|
272 |
+
The OpenROAD project actively adds successfully taped out MPW shuttle
|
273 |
+
designs to the [CI regression
|
274 |
+
testing](https://github.com/The-OpenROAD-Project/OpenLane-MPW-CI).
|
275 |
+
Examples of designs include Open processor cores, RISC-V based SoCs,
|
276 |
+
cryptocurrency miners, robotic app processors, amateur satellite radio
|
277 |
+
transceivers, OpenPower-based Microwatt etc.
|
278 |
+
|
279 |
+
## Build OpenROAD
|
280 |
+
|
281 |
+
To build OpenROAD tools locally in your machine, follow steps
|
282 |
+
from [here](../user/Build.md).
|
283 |
+
|
284 |
+
## Regression Tests
|
285 |
+
|
286 |
+
There are a set of executable regression test scripts in `./test/`.
|
287 |
+
|
288 |
+
``` shell
|
289 |
+
# run tests for all tools
|
290 |
+
./test/regression
|
291 |
+
|
292 |
+
# run all flow tests
|
293 |
+
./test/regression flow
|
294 |
+
|
295 |
+
# run <tool> tests
|
296 |
+
./test/regression <tool>
|
297 |
+
|
298 |
+
# run all <tool>-specific unit tests
|
299 |
+
cd src/<tool>
|
300 |
+
./test/regression
|
301 |
+
|
302 |
+
# run only <TEST_NAME> for <tool>
|
303 |
+
cd src/<tool>
|
304 |
+
./test/regression <TEST_NAME>
|
305 |
+
```
|
306 |
+
|
307 |
+
The flow tests check results such as worst slack against reference values.
|
308 |
+
Use `report_flow_metrics [test]...` to see all of the metrics.
|
309 |
+
|
310 |
+
``` text
|
311 |
+
% report_flow_metrics gcd_nangate45
|
312 |
+
insts area util slack_min slack_max tns_max clk_skew max_slew max_cap max_fanout DPL ANT drv
|
313 |
+
gcd_nangate45 368 564 8.8 0.112 -0.015 -0.1 0.004 0 0 0 0 0 0
|
314 |
+
```
|
315 |
+
|
316 |
+
To update a failing regression, follow the instructions below:
|
317 |
+
|
318 |
+
```tcl
|
319 |
+
# update log files (i.e. *ok)
|
320 |
+
save_ok <TEST_NAME>
|
321 |
+
|
322 |
+
# update "*.metrics" for tests that use flow test
|
323 |
+
save_flow_metrics <TEST_NAME>
|
324 |
+
|
325 |
+
# update "*.metrics_limits" files
|
326 |
+
save_flow_metrics_limits <TEST_NAME>
|
327 |
+
```
|
328 |
+
|
329 |
+
## Run
|
330 |
+
|
331 |
+
``` text
|
332 |
+
openroad [-help] [-version] [-no_init] [-exit] [-gui]
|
333 |
+
[-threads count|max] [-log file_name] cmd_file
|
334 |
+
-help show help and exit
|
335 |
+
-version show version and exit
|
336 |
+
-no_init do not read .openroad init file
|
337 |
+
-threads count|max use count threads
|
338 |
+
-no_splash do not show the license splash at startup
|
339 |
+
-exit exit after reading cmd_file
|
340 |
+
-gui start in gui mode
|
341 |
+
-python start with python interpreter [limited to db operations]
|
342 |
+
-log <file_name> write a log in <file_name>
|
343 |
+
cmd_file source cmd_file
|
344 |
+
```
|
345 |
+
|
346 |
+
OpenROAD sources the Tcl command file `~/.openroad` unless the command
|
347 |
+
line option `-no_init` is specified.
|
348 |
+
|
349 |
+
OpenROAD then sources the command file `cmd_file` if it is specified on
|
350 |
+
the command line. Unless the `-exit` command line flag is specified, it
|
351 |
+
enters an interactive Tcl command interpreter.
|
352 |
+
|
353 |
+
A list of the available tools/modules included in the OpenROAD app
|
354 |
+
and their descriptions are available [here](../contrib/Logger.md#openroad-tool-list).
|
355 |
+
|
356 |
+
## Git Quickstart
|
357 |
+
OpenROAD uses Git for version control and contributions.
|
358 |
+
Get familiarised with a quickstart tutorial to contribution [here](../contrib/GitGuide.md).
|
359 |
+
|
360 |
+
|
361 |
+
## Understanding Warning and Error Messages
|
362 |
+
Seeing OpenROAD warnings or errors you do not understand? We have compiled a table of all messages
|
363 |
+
and you may potentially find your answer [here](https://openroad.readthedocs.io/en/latest/user/MessagesFinal.html).
|
364 |
+
|
365 |
+
## License
|
366 |
+
|
367 |
+
BSD 3-Clause License. See [LICENSE](LICENSE) file.
|
markdown/OR_docs/tools/src/README.md
ADDED
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# OpenROAD
|
2 |
+
|
3 |
+
OpenROAD is run using Tcl scripts. The following commands are used to read
|
4 |
+
and write design data.
|
5 |
+
|
6 |
+
``` shell
|
7 |
+
read_lef [-tech] [-library] filename
|
8 |
+
read_def filename
|
9 |
+
write_def [-version 5.8|5.7|5.6|5.5|5.4|5.3] filename
|
10 |
+
read_verilog filename
|
11 |
+
write_verilog filename
|
12 |
+
read_db filename
|
13 |
+
write_db filename
|
14 |
+
write_abstract_lef filename
|
15 |
+
```
|
16 |
+
|
17 |
+
Use the Tcl `source` command to read commands from a file.
|
18 |
+
|
19 |
+
``` shell
|
20 |
+
source [-echo] file
|
21 |
+
```
|
22 |
+
|
23 |
+
If an error is encountered in a command while reading the command file,
|
24 |
+
then the error is printed and no more commands are read from the file. If
|
25 |
+
`file_continue_on_error` is `1` then OpenROAD will continue reading commands
|
26 |
+
after the error.
|
27 |
+
|
28 |
+
If `exit_on_error` is `1` then OpenROAD will exit when it encounters an error.
|
29 |
+
|
30 |
+
OpenROAD can be used to make a OpenDB database from LEF/DEF, or Verilog
|
31 |
+
(flat or hierarchical). Once the database is made it can be saved as a file
|
32 |
+
with the `write_db` command. OpenROAD can then read the database with the
|
33 |
+
`read_db` command without reading LEF/DEF or Verilog.
|
34 |
+
|
35 |
+
The `read_lef` and `read_def` commands can be used to build an OpenDB database
|
36 |
+
as shown below. The `read_lef -tech` flag reads the technology portion of a
|
37 |
+
LEF file. The `read_lef -library` flag reads the MACROs in the LEF file.
|
38 |
+
If neither of the `-tech` and `-library` flags are specified they default
|
39 |
+
to `-tech -library` if no technology has been read and `-library` if a
|
40 |
+
technology exists in the database.
|
41 |
+
|
42 |
+
``` shell
|
43 |
+
read_lef liberty1.lef
|
44 |
+
read_def reg1.def
|
45 |
+
# Write the db for future runs.
|
46 |
+
write_db reg1.db
|
47 |
+
```
|
48 |
+
|
49 |
+
The `read_verilog` command is used to build an OpenDB database as shown
|
50 |
+
below. Multiple Verilog files for a hierarchical design can be read.
|
51 |
+
The `link_design` command is used to flatten the design and make a database.
|
52 |
+
|
53 |
+
``` shell
|
54 |
+
read_lef liberty1.lef
|
55 |
+
read_verilog reg1.v
|
56 |
+
link_design top
|
57 |
+
# Write the db for future runs.
|
58 |
+
write_db reg1.db
|
59 |
+
```
|
60 |
+
|
61 |
+
## Example scripts
|
62 |
+
|
63 |
+
Example scripts demonstrating how to run OpenROAD on sample designs can
|
64 |
+
be found in /test. Flow tests taking sample designs from synthesizable RTL Verilog
|
65 |
+
to detail-routed final layout in the open-source technologies Nangate45 and Sky130HD are
|
66 |
+
shown below.
|
67 |
+
|
68 |
+
``` shell
|
69 |
+
gcd_nangate45.tcl
|
70 |
+
aes_nangate45.tcl
|
71 |
+
tinyRocket_nangate45.tcl
|
72 |
+
gcd_sky130hd.tcl
|
73 |
+
aes_sky130hd.tcl
|
74 |
+
ibex_sky130hd.tcl
|
75 |
+
```
|
76 |
+
|
77 |
+
Each of these designs use the common script `flow.tcl`.
|
78 |
+
|
79 |
+
## Abstract LEF Support
|
80 |
+
|
81 |
+
OpenROAD contains an abstract LEF writer that can take your current design
|
82 |
+
and emit an abstract LEF representing the external pins of your design and
|
83 |
+
metal obstructions.
|
84 |
+
|
85 |
+
|
86 |
+
``` tcl
|
87 |
+
write_abstract_lef (-bloat_factor bloat_factor|-bloat_occupied_layers) \
|
88 |
+
filename
|
89 |
+
```
|
90 |
+
### Options
|
91 |
+
|
92 |
+
| Switch Name | Description |
|
93 |
+
| ----- | ----- |
|
94 |
+
| `-bloat_factor` | Specifies the bloat factor used when bloating then merging shapes into LEF obstructions. The factor is measured in # of default metal pitches for the respective layer. A factor of `0` will result in detailed LEF obstructions |
|
95 |
+
| `-bloat_occupied_layers` | Generates cover obstructions (obstructions over the entire layer) for each layer where shapes are present |
|
96 |
+
|
97 |
+
### Examples
|
98 |
+
```
|
99 |
+
read reg1.db
|
100 |
+
|
101 |
+
# Bloat metal shapes by 3 pitches (respectively for every layer) and then merge
|
102 |
+
write_abstract_lef -bloat_factor 3 reg1_abstract.lef
|
103 |
+
|
104 |
+
# Produce cover obstructions for each layer with shapes present
|
105 |
+
write_abstract_lef -bloat_occupied_layers reg1_abstract.lef
|
106 |
+
```
|
107 |
+
|
108 |
+
### Global Connections
|
109 |
+
|
110 |
+
#### Add global connections
|
111 |
+
|
112 |
+
The `add_global_connection` command is used to specify how to connect power and ground pins on design instances to the appropriate supplies.
|
113 |
+
|
114 |
+
```
|
115 |
+
add_global_connection -net net_name \
|
116 |
+
[-inst_pattern inst_regular_expression] \
|
117 |
+
-pin_pattern pin_regular_expression \
|
118 |
+
(-power|-ground) \
|
119 |
+
[-region region_name]
|
120 |
+
```
|
121 |
+
|
122 |
+
##### Options
|
123 |
+
|
124 |
+
| Switch Name | Description |
|
125 |
+
| ----- | ----- |
|
126 |
+
| `-net` | Specifies the name of the net in the design to which connections are to be added |
|
127 |
+
| `-inst_pattern` | Optional specifies a regular expression to select a set of instances from the design. (Default: .\*) |
|
128 |
+
| `-pin_pattern` | Species a regular expression to select pins on the selected instances to connect to the specified net |
|
129 |
+
| `-power` | Specifies that the net it a power net |
|
130 |
+
| `-ground` | Specifies that the net is a ground net |
|
131 |
+
| `-region` | Specifies the name of the region for this rule |
|
132 |
+
|
133 |
+
##### Examples
|
134 |
+
```
|
135 |
+
# Stdcell power/ground pins
|
136 |
+
add_global_connection -net VDD -pin_pattern {^VDD$} -power
|
137 |
+
add_global_connection -net VSS -pin_pattern {^VSS$} -ground
|
138 |
+
|
139 |
+
# SRAM power ground pins
|
140 |
+
add_global_connection -net VDD -pin_pattern {^VDDPE$}
|
141 |
+
add_global_connection -net VDD -pin_pattern {^VDDCE$}
|
142 |
+
add_global_connection -net VSS -pin_pattern {^VSSE$}
|
143 |
+
```
|
144 |
+
|
145 |
+
#### Perform global connections
|
146 |
+
|
147 |
+
The `global_connect` command is used to connect power and ground pins on design instances to the appropriate supplies.
|
148 |
+
|
149 |
+
```
|
150 |
+
global_connect
|
151 |
+
```
|
152 |
+
|
153 |
+
#### Clear global connection rules
|
154 |
+
|
155 |
+
The `clear_global_connect` command is used remove all defined global connection rules.
|
156 |
+
|
157 |
+
```
|
158 |
+
clear_global_connect
|
159 |
+
```
|
160 |
+
|
161 |
+
#### Report global connection rules
|
162 |
+
|
163 |
+
The `report_global_connect` command is used print out the currently defined global connection rules.
|
164 |
+
|
165 |
+
```
|
166 |
+
report_global_connect
|
167 |
+
```
|
168 |
+
|
169 |
+
#### Report cell type usage
|
170 |
+
|
171 |
+
The `report_cell_usage` command is used to print out the usage of cells for each type of cell.
|
172 |
+
|
173 |
+
```
|
174 |
+
report_cell_usage
|
175 |
+
```
|
176 |
+
|
177 |
+
## TCL functions
|
178 |
+
|
179 |
+
Get the die and core areas as a list in microns: `llx lly urx ury`
|
180 |
+
|
181 |
+
```
|
182 |
+
ord::get_die_area
|
183 |
+
ord::get_core_area
|
184 |
+
```
|
185 |
+
|
186 |
+
## FAQs
|
187 |
+
|
188 |
+
Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+openroad+in%3Atitle)
|
189 |
+
about this tool.
|
190 |
+
|
191 |
+
## License
|
192 |
+
|
193 |
+
BSD 3-Clause License.
|
markdown/OR_docs/tools/src/ant/README.md
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Antenna Rule Checker
|
2 |
+
|
3 |
+
This tool checks antenna violations and generates a report to indicate
|
4 |
+
violated nets. See LEF/DEF 5.8 Language Reference, Appendix C,
|
5 |
+
"Calculating and Fixing Process Antenna Violations" (p.389)
|
6 |
+
for a [description](https://coriolis.lip6.fr/doc/lefdef/lefdefref/lefdefref.pdf) of antenna violations.
|
7 |
+
|
8 |
+
This is an example of the detailed and simple reports of the antenna checker:
|
9 |
+
|
10 |
+
| <img src="./doc/images/ant_report_print.png" width=500px> |
|
11 |
+
|
12 |
+
Abbreviations Index:
|
13 |
+
|
14 |
+
- `PAR`: Partial Area Ratio
|
15 |
+
- `CAR`: Cumulative Area Ratio
|
16 |
+
- `Area`: Gate Area
|
17 |
+
- `S. Area`: Side Diffusion Area
|
18 |
+
- `C. Area`: Cumulative Gate Area
|
19 |
+
- `C. S. Area`: Cumulative Side (Diffusion) Area
|
20 |
+
|
21 |
+
Antenna violations can be repaired after global routing with the `repair_design` command.
|
22 |
+
|
23 |
+
## Commands
|
24 |
+
|
25 |
+
```{note}
|
26 |
+
- Parameters in square brackets `[-param param]` are optional.
|
27 |
+
- Parameters without square brackets `-param2 param2` are required.
|
28 |
+
```
|
29 |
+
|
30 |
+
### Check Antennas
|
31 |
+
|
32 |
+
The `check_antennas` command will check for antenna violations.
|
33 |
+
|
34 |
+
```tcl
|
35 |
+
check_antennas
|
36 |
+
[-net net]
|
37 |
+
[-verbose]
|
38 |
+
```
|
39 |
+
|
40 |
+
#### Options
|
41 |
+
|
42 |
+
| Switch Name | Description |
|
43 |
+
| ----- | ----- |
|
44 |
+
| `-verbose` | Report all antenna calculations for violating nets. |
|
45 |
+
| `-net` | Check antennas on the specified net. |
|
46 |
+
|
47 |
+
## Regression tests
|
48 |
+
|
49 |
+
There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests).
|
50 |
+
|
51 |
+
Simply run the following script:
|
52 |
+
|
53 |
+
```shell
|
54 |
+
./test/regression
|
55 |
+
```
|
56 |
+
|
57 |
+
## Limitations
|
58 |
+
|
59 |
+
## FAQs
|
60 |
+
|
61 |
+
Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+antenna+in%3Atitle)
|
62 |
+
about this tool.
|
63 |
+
|
64 |
+
## Algorithm
|
65 |
+
|
66 |
+
| <img src="./doc/images/example_ant.png" width=400px> | <img src="./doc/images/step1.png" width=400px> |
|
67 |
+
| --- | --- |
|
68 |
+
| **Antenna Checker Algorithm**: WireGraph Example | **Step 1**: (a) Start from the root node (ITerm) using upper Via to find a node for a new wire. (b) Save the ITerm area for cumulative gate/diffusion area. |
|
69 |
+
| <img src="./doc/images/step2.png" width=400px> | <img src="./doc/images/step3.png" width=400px> |
|
70 |
+
| **Step 2**: From the node of the wire, find all the nodes in the wire through segment wires and find the "root" node of this wire. | **Step 3**: (a) From the "root" node of the wire, along the outgoing segment edge that goes to other nodes belonging to this wire, calculate the area of this wire. (b) Then, find all the ITerms below these nodes, except for the root node (directly use an ITerm or lower Vias to find ITerms for lower metals). (c) Sum up the areas of all the ITerms found with the cumulative areas and calculate the PAR of this wire. (d) Add the PAR value and the wire info (layer, Index) into the PAR table. Add the new area to the cumulative areas. |
|
71 |
+
| <img src="./doc/images/step4.png" width=400px> | <img src="./doc/images/step5.png" width=400px> |
|
72 |
+
| **Step 4**: Find all the upper Vias on this wire (for all the nodes on this wire), and go to the higher-level metal. | **Step 5**: Repeat Steps 2 and 3 for new-found upper-level wires. |
|
73 |
+
| <img src="./doc/images/step6.png" width=400px> | <img src="./doc/images/step7.png" width=400px> |
|
74 |
+
| **Step 6**: Repeat Steps 4 and 5 until we reach a wire that cannot have upper Vias for its nodes (highest-level metal). | **Step 7**: Pick up another ITerm as a root node and repeat Steps 1 to 6, skipping the wires already in the PAR table. Repeat this for all the ITerms to get a whole PAR table. |
|
75 |
+
| <img src="./doc/images/step8.png" width=400px> |
|
76 |
+
| **Step 8**: (a) Pick up a gate ITerm and a node of a wire (e.g., M4,1). Find possible paths that connect them, look up the PAR value of the wires along these paths, and add them up to get the CAR of the (gate, wire) pair. (b) Compare to the AntennaRule to see if the CAR violates the rules. (c) Check this for all (gate, wire) pairs. |
|
77 |
+
|
78 |
+
## License
|
79 |
+
|
80 |
+
BSD 3-Clause License. See [LICENSE](../../LICENSE) file.
|
markdown/OR_docs/tools/src/cts/README.md
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Clock Tree Synthesis
|
2 |
+
|
3 |
+
The clock tree synthesis module in OpenROAD (`cts`) is based on TritonCTS
|
4 |
+
2.0. It is available from the `clock_tree_synthesis` command. TritonCTS 2.0
|
5 |
+
performs on-the-fly characterization. Thus, there is no need to generate
|
6 |
+
characterization data. The on-the-fly characterization feature can be optionally
|
7 |
+
controlled by parameters specified by the `configure_cts_characterization`
|
8 |
+
command. Use `set_wire_rc` command to set the clock routing layer.
|
9 |
+
|
10 |
+
## Commands
|
11 |
+
|
12 |
+
```{note}
|
13 |
+
- Parameters in square brackets `[-param param]` are optional.
|
14 |
+
- Parameters without square brackets `-param2 param2` are required.
|
15 |
+
```
|
16 |
+
|
17 |
+
### Configure CTS Characterization
|
18 |
+
|
19 |
+
Configure key CTS characterization parameters, for example maximum slew and capacitance,
|
20 |
+
as well as the number of steps they will be divided for characterization.
|
21 |
+
|
22 |
+
```tcl
|
23 |
+
configure_cts_characterization
|
24 |
+
[-max_slew max_slew]
|
25 |
+
[-max_cap max_cap]
|
26 |
+
[-slew_steps slew_steps]
|
27 |
+
[-cap_steps cap_steps]
|
28 |
+
```
|
29 |
+
|
30 |
+
#### Options
|
31 |
+
|
32 |
+
| Switch Name | Description |
|
33 |
+
| ----- | ----- |
|
34 |
+
| `-max_slew` | Max slew value (in the current time unit) that the characterization will test. If this parameter is omitted, the code would use max slew value for specified buffer in `buf_list` from liberty file. |
|
35 |
+
| `-max_cap` | Max capacitance value (in the current capacitance unit) that the characterization will test. If this parameter is omitted, the code would use max cap value for specified buffer in `buf_list` from liberty file. |
|
36 |
+
| `-slew_steps` | Number of steps that `max_slew` will be divided into for characterization. The default value is `12`, and the allowed values are integers `[0, MAX_INT]`. |
|
37 |
+
| `-cap_steps` | Number of steps that `max_cap` will be divided into for characterization. The default value is `34`, and the allowed values are integers `[0, MAX_INT]`. |
|
38 |
+
|
39 |
+
### Clock Tree Synthesis
|
40 |
+
|
41 |
+
Perform clock tree synthesis.
|
42 |
+
|
43 |
+
```tcl
|
44 |
+
clock_tree_synthesis
|
45 |
+
[-wire_unit wire_unit]
|
46 |
+
[-buf_list <list_of_buffers>]
|
47 |
+
[-root_buf root_buf]
|
48 |
+
[-clk_nets <list_of_clk_nets>]
|
49 |
+
[-tree_buf <buf>]
|
50 |
+
[-distance_between_buffers]
|
51 |
+
[-branching_point_buffers_distance]
|
52 |
+
[-clustering_exponent]
|
53 |
+
[-clustering_unbalance_ratio]
|
54 |
+
[-sink_clustering_size cluster_size]
|
55 |
+
[-sink_clustering_max_diameter max_diameter]
|
56 |
+
[-sink_clustering_enable]
|
57 |
+
[-balance_levels]
|
58 |
+
[-sink_clustering_levels levels]
|
59 |
+
[-num_static_layers]
|
60 |
+
[-sink_clustering_buffer]
|
61 |
+
[-obstruction_aware]
|
62 |
+
[-apply_ndr]
|
63 |
+
[-insertion_delay]
|
64 |
+
[-dont_use_dummy_load]
|
65 |
+
[-sink_buffer_max_cap_derate derate_value]
|
66 |
+
[-delay_buffer_derate derate_value]
|
67 |
+
```
|
68 |
+
|
69 |
+
#### Options
|
70 |
+
|
71 |
+
| Switch Name | Description |
|
72 |
+
| ----- | ----- |
|
73 |
+
| `-buf_list` | Tcl list of master cells (buffers) that will be considered when making the wire segments (e.g. `{BUFXX, BUFYY}`). |
|
74 |
+
| `-root_buffer` | The master cell of the buffer that serves as root for the clock tree. If this parameter is omitted, the first master cell from `-buf_list` is taken. |
|
75 |
+
| `-wire_unit` | Minimum unit distance between buffers for a specific wire. If this parameter is omitted, the code gets the value from ten times the height of `-root_buffer`. |
|
76 |
+
| `-distance_between_buffers` | Distance (in microns) between buffers that `cts` should use when creating the tree. When using this parameter, the clock tree algorithm is simplified and only uses a fraction of the segments from the LUT. |
|
77 |
+
| `-branching_point_buffers_distance` | Distance (in microns) that a branch has to have in order for a buffer to be inserted on a branch end-point. This requires the `-distance_between_buffers` value to be set. |
|
78 |
+
| `-clustering_exponent` | Value that determines the power used on the difference between sink and means on the CKMeans clustering algorithm. The default value is `4`, and the allowed values are integers `[0, MAX_INT]`. |
|
79 |
+
| `-clustering_unbalance_ratio` | Value determines each cluster's maximum capacity during CKMeans. A value of `0.5` (i.e., 50%) means that each cluster will have exactly half of all sinks for a specific region (half for each branch). The default value is `0.6`, and the allowed values are floats `[0, 1.0]`. |
|
80 |
+
| `-sink_clustering_enable` | Enables pre-clustering of sinks to create one level of sub-tree before building H-tree. Each cluster is driven by buffer which becomes end point of H-tree structure. |
|
81 |
+
| `-sink_clustering_size` | Specifies the maximum number of sinks per cluster. The default value is `20`, and the allowed values are integers `[0, MAX_INT]`. |
|
82 |
+
| `-sink_clustering_max_diameter` | Specifies maximum diameter (in microns) of sink cluster. The default value is `50`, and the allowed values are integers `[0, MAX_INT]`. |
|
83 |
+
| `-balance_levels` | Attempt to keep a similar number of levels in the clock tree across non-register cells (e.g., clock-gate or inverter). The default value is `False`, and the allowed values are bool. |
|
84 |
+
| `-clk_nets` | String containing the names of the clock roots. If this parameter is omitted, `cts` looks for the clock roots automatically. |
|
85 |
+
| `-num_static_layers` | Set the number of static layers. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. |
|
86 |
+
| `-sink_clustering_buffer` | Set the sink clustering buffer(s) to be used. |
|
87 |
+
| `-obstruction_aware` | Enables obstruction-aware buffering such that clock buffers are not placed on top of blockages or hard macros. This option may reduce legalizer displacement, leading to better latency, skew or timing QoR. The default value is `False`, and the allowed values are bool. |
|
88 |
+
| `-apply_ndr` | Applies 2X spacing non-default rule to all clock nets except leaf-level nets. The default value is `False`. |
|
89 |
+
| `-dont_use_dummy_load` | Don't apply dummy buffer or inverter cells at clock tree leaves to balance loads. The default values is `False`. |
|
90 |
+
| `-sink_buffer_max_cap_derate` | Use this option to control automatic buffer selection. To favor strong(weak) drive strength buffers use a small(large) value. The default value is `0.01`, meaning that buffers are selected by derating max cap limit by 0.01. The value of 1.0 means no derating of max cap limit. |
|
91 |
+
| `-delay_buffer_derate` | This option balances latencies between macro cells and registers by inserting delay buffers. The default value is `1.0`, meaning all needed delay buffers are inserted. A value of 0.5 means only half of necessary delay buffers are inserted. A value of 0.0 means no insertion of delay buffers. |
|
92 |
+
|
93 |
+
### Report CTS
|
94 |
+
|
95 |
+
This command is used to extract the following metrics after a successful `clock_tree_synthesis` run.
|
96 |
+
- Number of Clock Roots
|
97 |
+
- Number of Buffers Inserted
|
98 |
+
- Number of Clock Subnets
|
99 |
+
- Number of Sinks.
|
100 |
+
|
101 |
+
```tcl
|
102 |
+
report_cts
|
103 |
+
[-out_file file]
|
104 |
+
```
|
105 |
+
|
106 |
+
#### Options
|
107 |
+
|
108 |
+
| Switch Name | Description |
|
109 |
+
| ----- | ----- |
|
110 |
+
| `-out_file` | The file to save `cts` reports. If this parameter is omitted, the report is streamed to `stdout` and not saved. |
|
111 |
+
|
112 |
+
## Useful Developer Commands
|
113 |
+
|
114 |
+
If you are a developer, you might find these useful. More details can be found in the [source file](./src/TritonCTS.cpp) or the [swig file](./src/TritonCTS.i).
|
115 |
+
|
116 |
+
| Command Name | Description |
|
117 |
+
| ----- | ----- |
|
118 |
+
| `clock_tree_synthesis_debug` | Option to plot the CTS to GUI. |
|
119 |
+
|
120 |
+
## Example scripts
|
121 |
+
|
122 |
+
```
|
123 |
+
clock_tree_synthesis -root_buf "BUF_X4" \
|
124 |
+
-buf_list "BUF_X4" \
|
125 |
+
-wire_unit 20
|
126 |
+
report_cts "file.txt"
|
127 |
+
```
|
128 |
+
|
129 |
+
## Regression tests
|
130 |
+
|
131 |
+
There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests).
|
132 |
+
|
133 |
+
Simply run the following script:
|
134 |
+
|
135 |
+
```shell
|
136 |
+
./test/regression
|
137 |
+
```
|
138 |
+
|
139 |
+
## Limitations
|
140 |
+
|
141 |
+
## FAQs
|
142 |
+
|
143 |
+
Check out
|
144 |
+
[GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+cts) about this tool.
|
145 |
+
|
146 |
+
## References
|
147 |
+
|
148 |
+
1. [LEMON](https://lemon.cs.elte.hu/trac/lemon) - **L**ibrary for
|
149 |
+
**E**fficient **M**odeling and **O**ptimization in **N**etworks
|
150 |
+
1. Kahng, A. B., Li, J., & Wang, L. (2016, November). Improved flop tray-based design implementation for power reduction. In 2016 IEEE/ACM International Conference on Computer-Aided Design (ICCAD) (pp. 1-8). IEEE. [(.pdf)](https://vlsicad.ucsd.edu/Publications/Conferences/344/c344.pdf)
|
151 |
+
|
152 |
+
## Authors
|
153 |
+
|
154 |
+
TritonCTS 2.0 is written by Mateus Fogaça, PhD student in the Graduate
|
155 |
+
Program on Microelectronics from the Federal University of Rio Grande do Sul
|
156 |
+
(UFRGS), Brazil. Mr. Fogaça's advisor is Prof. Ricardo Reis.
|
157 |
+
|
158 |
+
Many guidance provided by (alphabetic order):
|
159 |
+
- Andrew B. Kahng
|
160 |
+
- Jiajia Li
|
161 |
+
- Kwangsoo Han
|
162 |
+
- Tom Spyrou
|
163 |
+
|
164 |
+
## License
|
165 |
+
|
166 |
+
BSD 3-Clause License. See [LICENSE](LICENSE) file.
|
167 |
+
|
markdown/OR_docs/tools/src/dft/README.md
ADDED
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# DFT: Design for Testing
|
2 |
+
|
3 |
+
The Design for Testing module in OpenROAD (`dft`) is an implementation of Design For Testing.
|
4 |
+
New nets and logic are added to allow IC designs to be tested for errors in manufacturing.
|
5 |
+
Physical imperfections can cause hard failures and variability can cause timing errors.
|
6 |
+
|
7 |
+
A simple DFT insertion consist of the following parts:
|
8 |
+
|
9 |
+
* A scan_in pin where the test patterns are shifted in.
|
10 |
+
* A scan_out pin where the test patterns are read from.
|
11 |
+
* Scan cells that replace flops with registers that allow for testing.
|
12 |
+
* One or more scan chains (shift registers created from your scan cells).
|
13 |
+
* A scan_enable pin to allow your design to enter and leave the test mode.
|
14 |
+
|
15 |
+
## Commands
|
16 |
+
|
17 |
+
```{note}
|
18 |
+
- Parameters in square brackets `[-param param]` are optional.
|
19 |
+
- Parameters without square brackets `-param2 param2` are required.
|
20 |
+
```
|
21 |
+
|
22 |
+
### Set DFT Config
|
23 |
+
|
24 |
+
The command `set_dft_config` sets the DFT configuration variables.
|
25 |
+
|
26 |
+
```tcl
|
27 |
+
set_dft_config
|
28 |
+
[-max_length <int>]
|
29 |
+
[-max_chains <int>]
|
30 |
+
[-clock_mixing <string>]
|
31 |
+
```
|
32 |
+
|
33 |
+
#### Options
|
34 |
+
|
35 |
+
| Switch Name | Description |
|
36 |
+
| ---- | ---- |
|
37 |
+
| `-max_length` | The maximum number of bits that can be in each scan chain. |
|
38 |
+
| `-max_chains` | The maximum number of scan chains that will be generated. This takes priority over `max_length`,
|
39 |
+
in `no_mix` clock mode it specifies a maximum number of chains per clock-edge pair. |
|
40 |
+
| `-clock_mixing` | How architect will mix the scan flops based on the clock driver. `no_mix`: Creates scan chains with only one type of clock and edge. This may create unbalanced chains. `clock_mix`: Creates scan chains mixing clocks and edges. Falling edge flops are going to be stitched before rising edge. |
|
41 |
+
|
42 |
+
### Report DFT Config
|
43 |
+
|
44 |
+
Prints the current DFT configuration to be used by `preview_dft` and
|
45 |
+
`insert_dft`.
|
46 |
+
|
47 |
+
```tcl
|
48 |
+
report_dft_config
|
49 |
+
```
|
50 |
+
|
51 |
+
### Scan replace
|
52 |
+
|
53 |
+
Replaces flipflops with equivalent scan flipflops. This will generally be called before
|
54 |
+
placement, as it changes the area of cells.
|
55 |
+
|
56 |
+
```tcl
|
57 |
+
scan_replace
|
58 |
+
```
|
59 |
+
|
60 |
+
### Preview DFT
|
61 |
+
|
62 |
+
Prints a preview of the scan chains that will be stitched by `insert_dft`. Use
|
63 |
+
this command to iterate and try different DFT configurations. This command does
|
64 |
+
not perform any modification to the design, and should be run after `scan_replace`
|
65 |
+
and global placement.
|
66 |
+
|
67 |
+
```tcl
|
68 |
+
preview_dft
|
69 |
+
[-verbose]
|
70 |
+
```
|
71 |
+
|
72 |
+
#### Options
|
73 |
+
|
74 |
+
| Switch Name | Description |
|
75 |
+
| ---- | ---- |
|
76 |
+
| `-verbose` | Shows more information about each one of the scan chains that will be created. |
|
77 |
+
|
78 |
+
### Insert DFT
|
79 |
+
|
80 |
+
Architect scan chains and connect them up in a way that minimises wirelength. As a result, this
|
81 |
+
should be run after placement, and after `scan_replace`.
|
82 |
+
|
83 |
+
```tcl
|
84 |
+
insert_dft
|
85 |
+
```
|
86 |
+
|
87 |
+
|
88 |
+
## Example scripts
|
89 |
+
|
90 |
+
This example will create scan chains with a max length of 10 bits mixing all the
|
91 |
+
scan flops in the scan chains.
|
92 |
+
|
93 |
+
```
|
94 |
+
set_dft_config -max_length 10 -clock_mixing clock_mix
|
95 |
+
report_dft_config
|
96 |
+
scan_replace
|
97 |
+
# Run global placement...
|
98 |
+
preview_dft -verbose
|
99 |
+
insert_dft
|
100 |
+
```
|
101 |
+
|
102 |
+
## Regression tests
|
103 |
+
|
104 |
+
There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests).
|
105 |
+
|
106 |
+
Simply run the following script:
|
107 |
+
|
108 |
+
```shell
|
109 |
+
./test/regression
|
110 |
+
```
|
111 |
+
|
112 |
+
## Limitations
|
113 |
+
|
114 |
+
* There are no optimizations for the scan chains. This is a WIP.
|
115 |
+
* There is no way to specify existing scan ports to be used by scan insertion.
|
116 |
+
* There is currently no way to define a user defined scan path.
|
117 |
+
* We can only work with one bit cells.
|
118 |
+
|
119 |
+
## License
|
120 |
+
|
121 |
+
BSD 3-Clause License. See [LICENSE](../../LICENSE) file.
|
markdown/OR_docs/tools/src/dpl/README.md
ADDED
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Detailed Placement
|
2 |
+
|
3 |
+
The detailed placement module in OpenROAD (`dpl`) is based on OpenDP, or
|
4 |
+
Open-Source Detailed Placement Engine. Its key features are:
|
5 |
+
|
6 |
+
- Fence region.
|
7 |
+
- Fragmented ROWs.
|
8 |
+
|
9 |
+
## Commands
|
10 |
+
|
11 |
+
```{note}
|
12 |
+
- Parameters in square brackets `[-param param]` are optional.
|
13 |
+
- Parameters without square brackets `-param2 param2` are required.
|
14 |
+
```
|
15 |
+
|
16 |
+
### Detailed Placement
|
17 |
+
|
18 |
+
The `detailed_placement` command performs detailed placement of instances
|
19 |
+
to legal locations after global placement.
|
20 |
+
|
21 |
+
```tcl
|
22 |
+
detailed_placement
|
23 |
+
[-max_displacement disp|{disp_x disp_y}]
|
24 |
+
[-disallow_one_site_gaps]
|
25 |
+
[-report_file_name filename]
|
26 |
+
```
|
27 |
+
|
28 |
+
#### Options
|
29 |
+
|
30 |
+
| Switch Name | Description |
|
31 |
+
| ----- | ----- |
|
32 |
+
| `-max_displacement` | Max distance that an instance can be moved (in microns) when finding a site where it can be placed. Either set one value for both directions or set `{disp_x disp_y}` for individual directions. The default values are `{0, 0}`, and the allowed values within are integers `[0, MAX_INT]`. |
|
33 |
+
| `-disallow_one_site_gaps` | Disable one site gap during placement check. |
|
34 |
+
| `-report_file_name` | File name for saving the report to (e.g. `report.json`.) |
|
35 |
+
|
36 |
+
### Set Placement Padding
|
37 |
+
|
38 |
+
The `set_placement_padding` command sets left and right padding in multiples
|
39 |
+
of the row site width. Use the `set_placement_padding` command before
|
40 |
+
legalizing placement to leave room for routing. Use the `-global` flag
|
41 |
+
for padding that applies to all instances. Use `-instances`
|
42 |
+
for instance-specific padding. The instances `insts` can be a list of instance
|
43 |
+
names, or an instance object returned by the SDC `get_cells` command. To
|
44 |
+
specify padding for all instances of a common master, use the `-filter`
|
45 |
+
"ref_name == <name>" option to `get_cells`.
|
46 |
+
|
47 |
+
```tcl
|
48 |
+
set_placement_padding
|
49 |
+
-global|-masters masters|-instances insts
|
50 |
+
[-right site_count]
|
51 |
+
[-left site_count]
|
52 |
+
```
|
53 |
+
|
54 |
+
#### Options
|
55 |
+
|
56 |
+
```{warning}
|
57 |
+
Either one of these flags must be set: `-global | -masters | -instances`.
|
58 |
+
The order of preference is `global > masters > instances`
|
59 |
+
```
|
60 |
+
|
61 |
+
| Switch Name | Description |
|
62 |
+
| ----- | ----- |
|
63 |
+
| `-global` | Set padding globally using `left` and `right` values. |
|
64 |
+
| `-masters` | Set padding only for these masters using `left` and `right` values. |
|
65 |
+
| `-instances` | For `-instances`, you will set padding only for these insts using `left` and `right` values. |
|
66 |
+
| `-left` | Left padding (in site count). |
|
67 |
+
| `-right` | Right padding (in site count). |
|
68 |
+
| `instances` | Set padding for these list of instances. Not to be confused with the `-instances` switch above. |
|
69 |
+
|
70 |
+
### Filler Placement
|
71 |
+
|
72 |
+
The `filler_placement` command fills gaps between detail-placed instances
|
73 |
+
to connect the power and ground rails in the rows. `filler_masters` is a
|
74 |
+
list of master/macro names to use for filling the gaps. Wildcard matching
|
75 |
+
is supported, so `FILL*` will match, e.g., `FILLCELL_X1 FILLCELL_X16 FILLCELL_X2
|
76 |
+
FILLCELL_X32 FILLCELL_X4 FILLCELL_X8`. To specify a different naming prefix
|
77 |
+
from `FILLER_` use `-prefix <new prefix>`.
|
78 |
+
|
79 |
+
```tcl
|
80 |
+
filler_placement
|
81 |
+
[-prefix prefix]
|
82 |
+
filler_masters
|
83 |
+
```
|
84 |
+
|
85 |
+
#### Options
|
86 |
+
|
87 |
+
| Switch Name | Description |
|
88 |
+
| ----- | ----- |
|
89 |
+
| `-prefix` | Prefix to name the filler cells. The default value is `FILLER_`. |
|
90 |
+
| `filler_masters` | Filler master cells. |
|
91 |
+
|
92 |
+
### Remove Fillers
|
93 |
+
|
94 |
+
This command removes all filler cells.
|
95 |
+
|
96 |
+
```tcl
|
97 |
+
remove_fillers
|
98 |
+
```
|
99 |
+
|
100 |
+
### Check Placement
|
101 |
+
|
102 |
+
The `check_placement` command checks the placement legality. It returns
|
103 |
+
`0` if the placement is legal.
|
104 |
+
|
105 |
+
```tcl
|
106 |
+
check_placement
|
107 |
+
[-verbose]
|
108 |
+
[-disallow_one_site_gaps]
|
109 |
+
[-report_file_name filename]
|
110 |
+
```
|
111 |
+
|
112 |
+
#### Options
|
113 |
+
|
114 |
+
| Switch Name | Description |
|
115 |
+
| ----- | ----- |
|
116 |
+
| `-verbose` | Enable verbose logging. |
|
117 |
+
| `-disallow_one_site_gaps` | Disable one site gap during placement check. |
|
118 |
+
| `-report_file_name` | File name for saving the report to (e.g. `report.json`. |
|
119 |
+
|
120 |
+
### Optimize Mirroring
|
121 |
+
|
122 |
+
The `optimize_mirroring` command mirrors instances about the Y axis in
|
123 |
+
a weak attempt to reduce the total half-perimeter wirelength (HPWL).
|
124 |
+
|
125 |
+
```tcl
|
126 |
+
optimize_mirroring
|
127 |
+
```
|
128 |
+
|
129 |
+
## Useful Developer Commands
|
130 |
+
|
131 |
+
If you are a developer, you might find these useful. More details can be found in the [source file](./src/Opendp.cpp) or the [swig file](./src/Opendp.i).
|
132 |
+
|
133 |
+
| Command Name | Description |
|
134 |
+
| ----- | ----- |
|
135 |
+
| `detailed_placement_debug` | Debug detailed placement. |
|
136 |
+
| `get_masters_arg` | Get masters from a design. |
|
137 |
+
| `get_inst_bbox` | Get bounding box of an instance. |
|
138 |
+
| `get_inst_grid_bbox` | Get grid bounding box of an instance. |
|
139 |
+
| `format_grid` | Format grid (takes in length `x` and site width `w` as inputs). |
|
140 |
+
| `get_row_site` | Get row site name.
|
141 |
+
|
142 |
+
## Example scripts
|
143 |
+
|
144 |
+
Examples scripts demonstrating how to run `dpl` on a sample design of `aes` as follows:
|
145 |
+
|
146 |
+
```shell
|
147 |
+
./test/aes.tcl
|
148 |
+
```
|
149 |
+
|
150 |
+
## Regression tests
|
151 |
+
|
152 |
+
There are a set of regression tests in `./test`. Refer to this [section](../../README.md#regression-tests) for more information.
|
153 |
+
|
154 |
+
Simply run the following script:
|
155 |
+
|
156 |
+
```shell
|
157 |
+
./test/regression
|
158 |
+
```
|
159 |
+
|
160 |
+
## Limitations
|
161 |
+
|
162 |
+
## FAQs
|
163 |
+
|
164 |
+
Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+opendp+in%3Atitle)
|
165 |
+
about this tool.
|
166 |
+
|
167 |
+
## Authors
|
168 |
+
|
169 |
+
- SangGi Do and Mingyu Woo (respective Ph. D. advisors: Seokhyeong Kang,
|
170 |
+
Andrew B. Kahng).
|
171 |
+
- Rewrite and port to OpenDB/OpenROAD by James Cherry, Parallax Software
|
172 |
+
|
173 |
+
## References
|
174 |
+
1. Do, S., Woo, M., & Kang, S. (2019, May). Fence-region-aware mixed-height standard cell legalization. In Proceedings of the 2019 on Great Lakes Symposium on VLSI (pp. 259-262). [(.pdf)](https://dl.acm.org/doi/10.1145/3299874.3318012)
|
175 |
+
|
176 |
+
## License
|
177 |
+
|
178 |
+
BSD 3-Clause License. See [LICENSE](LICENSE) file.
|
markdown/OR_docs/tools/src/drt/README.md
ADDED
@@ -0,0 +1,252 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Detailed Routing
|
2 |
+
|
3 |
+
The Detailed Routing (`drt`) module in OpenROAD is based on the open-source
|
4 |
+
detailed router, TritonRoute. TritonRoute consists of several main
|
5 |
+
building blocks, including pin access analysis, track assignment,
|
6 |
+
initial detailed routing, search and repair, and a DRC engine.
|
7 |
+
The initial development of the
|
8 |
+
[router](https://vlsicad.ucsd.edu/Publications/Conferences/363/c363.pdf)
|
9 |
+
is inspired by the [ISPD-2018 initial detailed routing
|
10 |
+
contest](http://www.ispd.cc/contests/18/). However, the current framework
|
11 |
+
differs and is built from scratch, aiming for an industrial-oriented scalable
|
12 |
+
and flexible flow.
|
13 |
+
|
14 |
+
TritonRoute provides industry-standard LEF/DEF interface with
|
15 |
+
support of [ISPD-2018](http://www.ispd.cc/contests/18/) and
|
16 |
+
[ISPD-2019](http://www.ispd.cc/contests/19/) contest-compatible route
|
17 |
+
guide format.
|
18 |
+
|
19 |
+
## Commands
|
20 |
+
|
21 |
+
```{note}
|
22 |
+
- Parameters in square brackets `[-param param]` are optional.
|
23 |
+
- Parameters without square brackets `-param2 param2` are required.
|
24 |
+
```
|
25 |
+
|
26 |
+
### Detailed Route
|
27 |
+
|
28 |
+
This command performs detailed routing.
|
29 |
+
|
30 |
+
Developer arguments
|
31 |
+
- `-or_seed`, `-or_k`
|
32 |
+
|
33 |
+
Distributed arguments
|
34 |
+
- `-distributed` , `-remote_host`, `-remote_port`, `-shared_volume`, `-cloud_size`
|
35 |
+
|
36 |
+
```tcl
|
37 |
+
detailed_route
|
38 |
+
[-output_maze filename]
|
39 |
+
[-output_drc filename]
|
40 |
+
[-output_cmap filename]
|
41 |
+
[-output_guide_coverage filename]
|
42 |
+
[-drc_report_iter_step step]
|
43 |
+
[-db_process_node name]
|
44 |
+
[-disable_via_gen]
|
45 |
+
[-droute_end_iter iter]
|
46 |
+
[-via_in_pin_bottom_layer layer]
|
47 |
+
[-via_in_pin_top_layer layer]
|
48 |
+
[-or_seed seed]
|
49 |
+
[-or_k k]
|
50 |
+
[-bottom_routing_layer layer]
|
51 |
+
[-top_routing_layer layer]
|
52 |
+
[-verbose level]
|
53 |
+
[-distributed]
|
54 |
+
[-remote_host rhost]
|
55 |
+
[-remote_port rport]
|
56 |
+
[-shared_volume vol]
|
57 |
+
[-cloud_size sz]
|
58 |
+
[-clean_patches]
|
59 |
+
[-no_pin_access]
|
60 |
+
[-min_access_points count]
|
61 |
+
[-save_guide_updates]
|
62 |
+
[-repair_pdn_vias layer]
|
63 |
+
[-single_step_dr]
|
64 |
+
```
|
65 |
+
|
66 |
+
#### Options
|
67 |
+
|
68 |
+
| Switch Name | Description |
|
69 |
+
| ----- | ----- |
|
70 |
+
| `-output_maze` | Path to output maze log file (e.g. `output_maze.log`). |
|
71 |
+
| `-output_drc` | Path to output DRC report file (e.g. `output_drc.rpt`). |
|
72 |
+
| `-output_cmap` | Path to output congestion map file (e.g. `output.cmap`). |
|
73 |
+
| `-output_guide_coverage` | Path to output guide coverage file (e.g. `sample_coverage.csv`). |
|
74 |
+
| `-drc_report_iter_step` | Report DRC on each iteration which is a multiple of this step. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. |
|
75 |
+
| `-db_process_node` | Specify the process node. |
|
76 |
+
| `-disable_via_gen` | Option to diable via generation with bottom and top routing layer. The default value is disabled. |
|
77 |
+
| `-droute_end_iter` | Number of detailed routing iterations. The default value is `-1`, and the allowed values are integers `[1, 64]`. |
|
78 |
+
| `-via_in_pin_bottom_layer` | Via-in pin bottom layer name. |
|
79 |
+
| `-via_in_pin_top_layer` | Via-in pin top layer name. |
|
80 |
+
| `-or_seed` | Refer to developer arguments [here](#developer-arguments). |
|
81 |
+
| `-or_k` | Refer to developer arguments [here](#developer-arguments). |
|
82 |
+
| `-bottom_routing_layer` | Bottommost routing layer name. |
|
83 |
+
| `-top_routing_layer` | Topmost routing layer name. |
|
84 |
+
| `-verbose` | Sets verbose mode if the value is greater than 1, else non-verbose mode (must be integer, or error will be triggered.) |
|
85 |
+
| `-distributed` | Refer to distributed arguments [here](#distributed-arguments). |
|
86 |
+
| `-clean_patches` | Clean unneeded patches during detailed routing. |
|
87 |
+
| `-no_pin_access` | Disables pin access for routing. |
|
88 |
+
| `-min_access_points` | Minimum access points for standard cell and macro cell pins. |
|
89 |
+
| `-save_guide_updates` | Flag to save guides updates. |
|
90 |
+
| `-repair_pdn_vias` | This option is used for PDKs where M1 and M2 power rails run in parallel. |
|
91 |
+
|
92 |
+
#### Developer arguments
|
93 |
+
|
94 |
+
Some arguments that are helpful for developers are listed here.
|
95 |
+
|
96 |
+
| Switch Name | Description |
|
97 |
+
| ----- | ----- |
|
98 |
+
| `-or_seed` | Random seed for the order of nets to reroute. The default value is `-1`, and the allowed values are integers `[0, MAX_INT]`. |
|
99 |
+
| `-or_k` | Number of swaps is given by $k * sizeof(rerouteNets)$. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. |
|
100 |
+
|
101 |
+
### Detailed Route Debugging
|
102 |
+
|
103 |
+
The following command and arguments are useful when debugging error
|
104 |
+
messages from `drt` and to understand its behavior.
|
105 |
+
|
106 |
+
```tcl
|
107 |
+
detailed_route_debug
|
108 |
+
[-pa]
|
109 |
+
[-ta]
|
110 |
+
[-dr]
|
111 |
+
[-maze]
|
112 |
+
[-net name]
|
113 |
+
[-pin name]
|
114 |
+
[-box x1 y1 x2 y2]
|
115 |
+
[-iter iter]
|
116 |
+
[-pa_markers]
|
117 |
+
[-dump_dr]
|
118 |
+
[-dump_dir dir]
|
119 |
+
[-dump_last_worker]
|
120 |
+
[-pa_edge]
|
121 |
+
[-pa_commit]
|
122 |
+
[-write_net_tracks]
|
123 |
+
```
|
124 |
+
|
125 |
+
#### Options
|
126 |
+
|
127 |
+
| Switch Name | Description |
|
128 |
+
| ----- | ----- |
|
129 |
+
| `-pa` | Enable debug for pin access. |
|
130 |
+
| `-ta` | Enable debug for track assignment. |
|
131 |
+
| `-dr` | Enable debug for detailed routing. |
|
132 |
+
| `-maze` | Enable debug for maze routing. |
|
133 |
+
| `-net` | Enable debug for net name. |
|
134 |
+
| `-pin` | Enable debug for pin name. |
|
135 |
+
| `-box` | Set the box for debugging given by lower left/upper right coordinates. |
|
136 |
+
| `-worker` | Debugs routes that pass through the point `{x, y}`. |
|
137 |
+
| `-iter` | Specifies the number of debug iterations. The default value is `0`, and the accepted values are integers `[0, MAX_INT`. |
|
138 |
+
| `-pa_markers` | Enable pin access markers. |
|
139 |
+
| `-dump_dr` | Filename for detailed routing dump. |
|
140 |
+
| `-dump_dir` | Directory for detailed routing dump. |
|
141 |
+
| `-pa_edge` | Enable visibility of pin access edges. |
|
142 |
+
| `-pa_commit` | Enable visibility of pin access commits. |
|
143 |
+
| `-write_net_tracks` | Enable writing of net track assigments. |
|
144 |
+
|
145 |
+
### Check Pin Access
|
146 |
+
|
147 |
+
This function checks pin access.
|
148 |
+
|
149 |
+
```tcl
|
150 |
+
pin_access
|
151 |
+
[-db_process_node name]
|
152 |
+
[-bottom_routing_layer layer]
|
153 |
+
[-top_routing_layer layer]
|
154 |
+
[-min_access_points count]
|
155 |
+
[-verbose level]
|
156 |
+
[-distributed]
|
157 |
+
[-remote_host rhost]
|
158 |
+
[-remote_port rport]
|
159 |
+
[-shared_volume vol]
|
160 |
+
[-cloud_size sz]
|
161 |
+
```
|
162 |
+
|
163 |
+
#### Options
|
164 |
+
|
165 |
+
| Switch Name | Description |
|
166 |
+
| ----- | ----- |
|
167 |
+
| `-db_process_node` | Specify process node. |
|
168 |
+
| `-bottom_routing_layer` | Bottommost routing layer. |
|
169 |
+
| `-top_routing_layer` | Topmost routing layer. |
|
170 |
+
| `-min_access_points` | Minimum number of access points per pin. |
|
171 |
+
| `-verbose` | Sets verbose mode if the value is greater than 1, else non-verbose mode (must be integer, or error will be triggered.) |
|
172 |
+
| `-distributed` | Refer to distributed arguments [here](#distributed-arguments). |
|
173 |
+
|
174 |
+
#### Distributed Arguments
|
175 |
+
|
176 |
+
We have compiled all distributed arguments in this section.
|
177 |
+
|
178 |
+
```{note}
|
179 |
+
Additional setup is required. Please refer to this [guide](./doc/Distributed.md).
|
180 |
+
```
|
181 |
+
|
182 |
+
| Switch Name | Description |
|
183 |
+
| ----- | ----- |
|
184 |
+
| `-distributed` | Enable distributed mode with Kubernetes and Google Cloud. |
|
185 |
+
| `-remote_host` | The host IP. |
|
186 |
+
| `-remote_port` | The value of the port to access from. |
|
187 |
+
| `-shared_volume` | The mount path of the nfs shared folder. |
|
188 |
+
| `-cloud_size` | The number of workers. |
|
189 |
+
|
190 |
+
## Useful Developer Commands
|
191 |
+
|
192 |
+
If you are a developer, you might find these useful. More details can be found in the [source file](./src/TritonRoute.cpp) or the [swig file](./src/TritonRoute.i).
|
193 |
+
|
194 |
+
| Command Name | Description |
|
195 |
+
| ----- | ----- |
|
196 |
+
| `detailed_route_set_default_via` | Set default via. |
|
197 |
+
| `detailed_route_set_unidirectional_layer` | Set unidirectional layer. |
|
198 |
+
| `step_dr` | Refer to function `detailed_route_step_drt`. |
|
199 |
+
| `check_drc` | Refer to function `check_drc_cmd`. |
|
200 |
+
|
201 |
+
|
202 |
+
|
203 |
+
## Example scripts
|
204 |
+
|
205 |
+
Example script demonstrating how to run TritonRoute on a sample design of `gcd`
|
206 |
+
in the Nangate45 technology node.
|
207 |
+
|
208 |
+
```shell
|
209 |
+
# single machine example
|
210 |
+
./test/gcd_nangate45.tcl
|
211 |
+
|
212 |
+
# distributed example
|
213 |
+
./test/gcd_nangate45_distributed.tcl
|
214 |
+
```
|
215 |
+
|
216 |
+
## Regression tests
|
217 |
+
|
218 |
+
There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests).
|
219 |
+
|
220 |
+
Simply run the following script:
|
221 |
+
|
222 |
+
```shell
|
223 |
+
./test/regression
|
224 |
+
```
|
225 |
+
|
226 |
+
## Limitations
|
227 |
+
|
228 |
+
## FAQs
|
229 |
+
|
230 |
+
Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+tritonroute+in%3Atitle)
|
231 |
+
about this tool.
|
232 |
+
|
233 |
+
## References
|
234 |
+
|
235 |
+
Please cite the following paper(s) for publication:
|
236 |
+
|
237 |
+
1. A. B. Kahng, L. Wang and B. Xu, "TritonRoute: The Open Source Detailed
|
238 |
+
Router", IEEE Transactions on Computer-Aided Design of Integrated Circuits
|
239 |
+
and Systems (2020), doi:10.1109/TCAD.2020.3003234. [(.pdf)](https://ieeexplore.ieee.org/ielaam/43/9358030/9120211-aam.pdf)
|
240 |
+
1. A. B. Kahng, L. Wang and B. Xu, "The Tao of PAO: Anatomy of a Pin Access
|
241 |
+
Oracle for Detailed Routing", Proc. ACM/IEEE Design Automation Conf., 2020,
|
242 |
+
pp. 1-6. [(.pdf)](https://vlsicad.ucsd.edu/Publications/Conferences/377/c377.pdf)
|
243 |
+
|
244 |
+
## Authors
|
245 |
+
|
246 |
+
TritonRoute was developed by graduate students Lutong Wang and
|
247 |
+
Bangqi Xu from UC San Diego, and serves as the detailed router in the
|
248 |
+
[OpenROAD](https://theopenroadproject.org/) project.
|
249 |
+
|
250 |
+
## License
|
251 |
+
|
252 |
+
BSD 3-Clause License. See [LICENSE](LICENSE) file.
|