Skip to content

Commit 9a0a0ea

Browse files
committed
Fix install for STA
1 parent cd932f3 commit 9a0a0ea

File tree

1 file changed

+23
-15
lines changed

1 file changed

+23
-15
lines changed

sta.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Static Timing Analysis (STA) Tutorial
22

3-
OpenSTA is a command line tool called `sta`, but it is
4-
also integrated into OpenROAD and the OpenLane environment. You can run it there in either the
5-
[Nix or Docker environment](installation.md):
3+
OpenSTA is a command line tool called `sta`, but it is
4+
also integrated into OpenROAD and the [ORFS environment](orfs-installation.md):
5+
66
```
77
$ openroad
88
OpenROAD edf00dff99f6c40d67a30c0e22a8191c5d2ed9d6
@@ -17,82 +17,92 @@ These tutorials all use [TCL (Tool Command
1717
Language)](https://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html) scripts to
1818
interact with OpenSTA. You don't need to master TCL, but you should be familiar with
1919
it. It is based on LISP but with customized commands for EDA tools. While you can also use
20-
some of these commands in Python, *the industry standard is currently TCL*.
20+
some of these commands in Python, *the industry standard is currently TCL*.
2121

2222
The full documentation of the OpenSTA commands can be found
2323
[here](https://github.com/The-OpenROAD-Project/OpenSTA/blob/2c5df8ccbc09a98bd39af206339505754cbee339/doc/OpenSTA.pdf).
2424

2525
This tutorial will utilize the spm design example final output that was created by OpenLane2.
2626
You should untar the file for this tutorial:
27+
2728
```bash
2829
git clone https://github.com/VLSIDA/chip-tutorials.git
2930
cd chip-tutorials
3031
tar -zxvf final.tar.gz
3132
```
33+
3234
which will create the final subdirectory with subdirectories for the different design files.
3335
The ones that we are concerned with are the following: def, odb, nl, sdc, and spef.
3436

3537
This assumes that you have an environment variable pointing to your PDK installation directory. In most cases, this will be:
38+
3639
```bash
3740
export PDK_ROOT=~/.volare
3841
```
42+
3943
Note that PDK_ROOT is an environment variable set in the OpenLane environment that points to the
40-
PDK installation directory.
44+
PDK installation directory.
4145

4246
## Single corner timing analysis
4347

44-
There are four main steps to setting up a timing analysis.
48+
There are four main steps to setting up a timing analysis.
49+
4550
1. Read in the library file(s)
4651
1. Read in the design file(s)
4752
1. Read in the parasitic file(s)
48-
1. Read in the constraints
53+
1. Read in the constraints
4954

5055
The following is an example that does each of these steps:
56+
5157
```tcl
5258
read_lib $env(PDK_ROOT)/sky130A/libs.ref/sky130_fd_sc_hd/lib/sky130_fd_sc_hd__ss_100C_1v60.lib
5359
read_db odb/spm.odb
5460
read_spef spef/max/spm.max.spef
5561
read_sdc sdc/spm.sdc
5662
```
5763

58-
### Other ways to read the design file(s)
64+
### Other ways to read the design file(s)
5965

6066
Instead of reading the ODB (OpenROAD database format) file, you can use
6167
gate-level verilog file or the DEF (Design Exchange Format) file. You may need to do this
6268
depending on what output is available from the steps of the design flow (i.e. they don't all save ODB files). However,
6369
these both require that you also read in the LEF technology and cell files. This would replace the
6470
reading of the design above with these multiple steps like this for the DEF:
71+
6572
```tcl
6673
read_lef $env(PDK_ROOT)/sky130A/libs.ref/sky130_fd_sc_hd/techlef/sky130_fd_sc_hd__nom.tlef
6774
read_lef $env(PDK_ROOT)/sky130A/libs.ref/sky130_fd_sc_hd/lef/sky130_fd_sc_hd.lef
6875
read_lef $env(PDK_ROOT)/sky130A/libs.ref/sky130_fd_sc_hd/lef/sky130_ef_sc_hd.lef
6976
read_def def/spm.def
7077
```
78+
7179
or like this for the gate-level Verilog:
80+
7281
```tcl
7382
read_lef $env(PDK_ROOT)/sky130A/libs.ref/sky130_fd_sc_hd/techlef/sky130_fd_sc_hd__nom.tlef
7483
read_lef $env(PDK_ROOT)/sky130A/libs.ref/sky130_fd_sc_hd/lef/sky130_fd_sc_hd.lef
7584
read_lef $env(PDK_ROOT)/sky130A/libs.ref/sky130_fd_sc_hd/lef/sky130_ef_sc_hd.lef
7685
read_verilog nl/spm.nl.v
7786
link_design spm
7887
```
88+
7989
The other steps (library files, parasitics, and constraints) are the same. Note
8090
that with the Verilog method, the `link_design` command will report a few
8191
missing liberty files:
92+
8293
```
8394
[WARNING ORD-2011] LEF master sky130_ef_sc_hd__decap_12 has no liberty cell.
8495
[WARNING ORD-2011] LEF master sky130_fd_sc_hd__fill_1 has no liberty cell.
8596
[WARNING ORD-2011] LEF master sky130_fd_sc_hd__fill_2 has no liberty cell.
8697
[WARNING ORD-2011] LEF master sky130_fd_sc_hd__tapvpwrvgnd_1 has no liberty cell.
8798
```
88-
but that is ok since they are special cells that do not have timing.
8999

100+
but that is ok since they are special cells that do not have timing.
90101

91102
## Reports
92103

93104
The [STA Reporting Tutorial](sta-reports.md) goes into more detail on the different reports that can be generated.
94105

95-
96106
## Timing Constraints
97107

98108
The [STA Timing Constraints Tutorial](sta-constraints.md) goes into more detail on the different constraints that can be used.
@@ -110,22 +120,20 @@ TBD
110120
OpenROAD has a GUI that can be used to view the timing results. You can open it
111121
by running `openroad -gui` and running the previous commands in the "TCL Commands"
112122
portion of OpenROAD. It is recommended
113-
to use the ODB or DEF design files as these have the placement information.
123+
to use the ODB or DEF design files as these have the placement information.
114124
Once you do this, click on the "Timing Report" tab and then click the "Update" button
115125
to run the timing analysis. You should see something like this:
116126

117127
![Timing Analysis in OpenROAD](sta/openroad-timing.png)
118128

119-
You can select the top ranked path (and expand the window sizes) to see the details
129+
You can select the top ranked path (and expand the window sizes) to see the details
120130
of the path like this:
121131

122132
![Timing Path in OpenROAD](sta/openroad-timing-report.png)
123133

124-
The path should also be highlighted in the layout to see the placement. However, the color
134+
The path should also be highlighted in the layout to see the placement. However, the color
125135
defaults to black.
126136

127-
128-
129137
# License
130138

131139
Copyright 2024 VLSI-DA (see [LICENSE](LICENSE) for use)

0 commit comments

Comments
 (0)