Skip to content

Commit c0966f5

Browse files
[SQUASH ME] Cleaned Up Figure and Wording
1 parent bd5b38c commit c0966f5

File tree

3 files changed

+93
-30
lines changed

3 files changed

+93
-30
lines changed

doc/src/tutorials/timing_analysis/index.rst

+21-21
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ multi-clock timing analysis, which tools like OpenSTA have better support for.
1515

1616
.. figure:: timing_analysis_design_cycle.png
1717

18-
Timing analysis design cycle flow diagram.
18+
Post-implementation timing analysis design cycle.
1919

20-
A user design cycle which would use this would perform the following steps:
21-
1. Run VPR with the timing commands it can support.
20+
A user design cycle which would use post-implementation timing analysis could perform the following:
21+
1. Run VPR with the timing commands it can support (simplified constraints).
2222
2. Perform timing analysis on the resulting netlist using OpenSTA with
2323
more complex timing commands.
24-
3. Modify the user design to meet the complex timing constraints.
25-
4. Repeat.
24+
3. The user can then modify the design to meet the complex timing constraints based on the timing report produced by OpenSTA.
25+
4. The design can then be fed back into VPR and the process can repeat until all constraints are met.
2626

2727
Generating the Post-Implementation Netlist for STA
2828
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -47,7 +47,7 @@ directory for convenience:
4747
4848
.. note:: Replace :term:`$VTR_ROOT` with the root directory of the VTR source tree
4949

50-
To perform timing analysis externally to VTR, we will need to create an SDC file
50+
To perform timing analysis externally to VTR, we will need to provide an SDC file
5151
which will contain the timing constraints on the clocks and I/Os in the circuit.
5252
For this tutorial, we will use the following ``clma.sdc`` file:
5353

@@ -81,10 +81,10 @@ for timing analysis using VPR.
8181
8282
In this command, we provide the architecture, circuit, the channel width, and
8383
the SDC file. The other four commands are what generate the necessary netlist
84-
files for timing simulation:
84+
files for timing analysis:
8585
* ``--gen_post_synthesis_netlist on``: This will generate the post-implementation netlist as a Verilog file.
86-
* ``--gen_post_implementation_sdc on``: This will have VPR generate a new SDC file which contains extra timing information used from proper timing analysis.
87-
* ``--post_synth_netlist_unconn_inputs gnd``: For timing analysis with OpenSTA we want to be explicit about how we handle unconnected signal ports. Here we just ground them for simplicity.
86+
* ``--gen_post_implementation_sdc on``: This will have VPR generate a new SDC file which contains extra timing information based on how VPR implemented the design.
87+
* ``--post_synth_netlist_unconn_inputs gnd``: For timing analysis with OpenSTA, we should be explicit about how we handle unconnected signal ports. Here we just ground them for simplicity.
8888
* ``--post_synth_netlist_module_parameters off``: OpenSTA does not allow parameters to be used in the netlist. This command tells VPR to generate a netlist without using parameters.
8989

9090
Once VPR has completed, we should see the generated Verilog netlist, SDF file, and SDC file:
@@ -98,11 +98,11 @@ Once VPR has completed, we should see the generated Verilog netlist, SDF file, a
9898
Performing Timing Analysis using OpenSTA
9999
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100100

101-
To perform static timing analysis for this tutorial, we will be using OpenSTA.
102-
Other STA tools can be used, they may use slightly different commands.
101+
To perform static timing analysis for this tutorial, we will be using OpenSTA (https://github.com/parallaxsw/OpenSTA ).
102+
Other STA tools can be used, however they may use slightly different commands.
103103

104104
First, install OpenSTA onto your system. Building from source is a good option,
105-
using the following instructions:
105+
which can be done using the following instructions:
106106
https://github.com/parallaxsw/OpenSTA?tab=readme-ov-file#build-from-source
107107

108108
After OpenSTA is installed, we can perfrom static timing analysis on the post-implementation
@@ -119,24 +119,24 @@ It is easiest to write a ``sdf_delays.tcl`` file to setup and configure the timi
119119
# an SDF file. This contains descriptions of the timing arcs of the primitives
120120
# in the circuit.
121121
read_liberty $VTR_ROOT/vtr_flow/primitives.lib
122-
122+
123123
# Read the post-implementation netlist generated by VPR.
124124
read_verilog top_post_synthesis.v
125-
125+
126126
# Link the top-level design.
127127
link_design top
128-
128+
129129
# Read the post-synthesis SDF file.
130130
read_sdf top_post_synthesis.sdf
131-
131+
132132
# Read the SDC commands generated by VPR.
133133
read_sdc top_post_synthesis.sdc
134-
135-
# Report the setup and hold timing checks using OpenSTA and write to a file.
136-
report_checks -group_path_count 100 -path_delay max > open_sta_report_timing.setup.rpt
137-
report_checks -group_path_count 100 -path_delay min > open_sta_report_timing.hold.rpt
138134
139-
# Report the minimum period of the clock and the fmax.
135+
# Report the setup and hold timing checks using OpenSTA and write them to files.
136+
report_checks -group_path_count 100 -digits 3 -path_delay max > open_sta_report_timing.setup.rpt
137+
report_checks -group_path_count 100 -digits 3 -path_delay min > open_sta_report_timing.hold.rpt
138+
139+
# Report the minimum period of the clockis and their fmax.
140140
report_clock_min_period
141141
142142
# Exit OpenSTA's TCL terminal.
Loading

vtr_flow/primitives.lib

+72-9
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@
66
* post-synthesis netlist (from VTR) into OpenSTA.
77
*
88
* This file contains just enough information to allow OpenSTA to use a provided
9-
* SDF file for timing analysis of the netlist. It likely is missing primitives
10-
* from some architectures.
9+
* SDF file for timing analysis of the netlist.
10+
*
11+
* This file only defines the primitives that VPR defines as "library models".
12+
* This includes LUTs (.names) and Flip-Flops (.latch). For user models (the
13+
* models defined in the "models" section of the architecture description file),
14+
* one should create another liberty file.
1115
*/
1216

13-
library (Skeleton) {
17+
library (VTRPrimitives) {
1418

1519
/* General Attributes */
1620
delay_model : table_lookup;
@@ -29,7 +33,7 @@ library (Skeleton) {
2933
output_threshold_pct_fall : 50.00 ;
3034
output_threshold_pct_rise : 50.00 ;
3135

32-
/* Bus types used for the LUT cells to allow their inputs to be an arrays.*/
36+
/* Bus types used for the LUT cells to allow their inputs to be arrays.*/
3337
type (BUS4) {
3438
base_type: array;
3539
data_type: bit;
@@ -73,7 +77,16 @@ library (Skeleton) {
7377
bit_to: 0;
7478
}
7579

76-
/* FPGA interconnect module. Modelled after the timing model of a buffer */
80+
/**
81+
* @brief FPGA interconnect module. This cell acts as a wire in the post-
82+
* implementation netlist to add delays on connections between
83+
* primitives (due to routing delays).
84+
*
85+
* INPUTS:
86+
* datain
87+
* OUPUTS:
88+
* dataout
89+
*/
7790
cell (fpga_interconnect) {
7891
pin (datain) {
7992
direction: input;
@@ -102,7 +115,19 @@ library (Skeleton) {
102115
}
103116
}
104117

105-
/* 4-bit LUT module. This module takes the mask as an input, and the output is a function of the mask and the input pins.*/
118+
/**
119+
* @brief 4-input LUT module.
120+
*
121+
* INPUTS:
122+
* in:
123+
* The input pins of the LUT, as an array.
124+
* mask:
125+
* The LUT mask that defines the output of the LUT as a function
126+
* of the input. mask[0] is the output if all the inputs are 0, and
127+
* mask[2^k - 1] is the output if all the inputs are 1.
128+
* OUPUTS:
129+
* out
130+
*/
106131
cell (LUT_4) {
107132
bus (mask) {
108133
bus_type: "BUS16";
@@ -136,7 +161,19 @@ library (Skeleton) {
136161
}
137162
}
138163

139-
/* 5-bit LUT module. This module takes the mask as an input, and the output is a function of the mask and the input pins.*/
164+
/**
165+
* @brief 5-input LUT module.
166+
*
167+
* INPUTS:
168+
* in:
169+
* The input pins of the LUT, as an array.
170+
* mask:
171+
* The LUT mask that defines the output of the LUT as a function
172+
* of the input. mask[0] is the output if all the inputs are 0, and
173+
* mask[2^k - 1] is the output if all the inputs are 1.
174+
* OUPUTS:
175+
* out
176+
*/
140177
cell (LUT_5) {
141178
bus (mask) {
142179
bus_type: "BUS32";
@@ -170,7 +207,19 @@ library (Skeleton) {
170207
}
171208
}
172209

173-
/* 6-bit LUT module. This module takes the mask as an input, and the output is a function of the mask and the input pins.*/
210+
/**
211+
* @brief 6-input LUT module.
212+
*
213+
* INPUTS:
214+
* in:
215+
* The input pins of the LUT, as an array.
216+
* mask:
217+
* The LUT mask that defines the output of the LUT as a function
218+
* of the input. mask[0] is the output if all the inputs are 0, and
219+
* mask[2^k - 1] is the output if all the inputs are 1.
220+
* OUPUTS:
221+
* out
222+
*/
174223
cell (LUT_6) {
175224
bus (mask) {
176225
bus_type: "BUS64";
@@ -204,7 +253,21 @@ library (Skeleton) {
204253
}
205254
}
206255

207-
/* D-flip-flop module. Modelled after the timing model of a standard DFF */
256+
/**
257+
* @brief D-Flip-Flop module.
258+
*
259+
* INPUTS:
260+
* D:
261+
* The input of the DFF, which will get latched on the rising clock
262+
* edge.
263+
* clock:
264+
* The clock signal for the DFF.
265+
* OUPUTS:
266+
* Q:
267+
* The current value stored in the latch.
268+
* QN:
269+
* The inverse of the current value stored in the latch.
270+
*/
208271
cell (DFF) {
209272
ff (IQ, IQN) {
210273
next_state: "D";

0 commit comments

Comments
 (0)