Skip to content

Commit 244797f

Browse files
authored
Merge pull request #370 from The-OpenROAD-Project-staging/sta_latest_0609
Sta latest 0609
2 parents 1475199 + 1c7c168 commit 244797f

32 files changed

Lines changed: 299 additions & 129 deletions

.cursor/rules/cpp-coding-standards.mdc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
---
22
description: C++ coding standards and formatting for OpenSTA
33
globs: ["**/*.cc", "**/*.hh", "**/*.h"]
4-
alwaysApply: false
4+
alwaysApply: true
55
---
66

77
# C++ Coding Standards
88

9+
## File-internal helpers (translation-unit local)
10+
11+
- For helpers used only in one `.cc` file, put them in the **same namespace** as the rest of the implementation (e.g. `namespace sta { ... }`).
12+
- Mark them **`static`** at namespace scope so they have internal linkage.
13+
- **Do not** wrap them in an **anonymous namespace** in this project (no `namespace { ... }` file-static helpers). The user preference is `static` inside the real namespace, not a nested anonymous namespace inside `sta` or at file scope before `sta`.
14+
915
## Line Width
1016

1117
- **Keep lines under 90 characters** to match `.clang-format` (ColumnLimit: 90).
12-
- Break long lines at logical points: after commas, before operators, after opening parens.
18+
- Only break a line when it would exceed 90 characters. Do not introduce unnecessary line breaks when the expression fits on one line.
19+
- When a break is needed, break at logical points: after commas, before operators. Keep the first argument on the same line as the opening paren (do not break immediately after an opening paren).
1320

1421
## Naming Conventions
1522

Dockerfile.ubuntu24.04

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
FROM ubuntu:24.04
2+
LABEL author="James Cherry"
3+
LABEL maintainer="James Cherry <cherry@parallaxsw.com>"
4+
5+
# Install basics
6+
ARG DEBIAN_FRONTEND=noninteractive
7+
RUN apt-get update && \
8+
apt-get install -y \
9+
git \
10+
wget \
11+
cmake \
12+
gcc \
13+
gdb \
14+
tcl-dev \
15+
tcl-tclreadline \
16+
swig \
17+
bison \
18+
flex \
19+
automake \
20+
autotools-dev \
21+
libeigen3-dev \
22+
libfmt-dev
23+
24+
# Download CUDD
25+
RUN wget https://raw.githubusercontent.com/davidkebo/cudd/main/cudd_versions/cudd-3.0.0.tar.gz && \
26+
tar -xvf cudd-3.0.0.tar.gz && \
27+
rm cudd-3.0.0.tar.gz
28+
29+
# Build CUDD
30+
RUN cd cudd-3.0.0 && \
31+
mkdir ../cudd && \
32+
./configure && \
33+
make -j`nproc`
34+
35+
# Copy files and install OpenSTA
36+
RUN mkdir OpenSTA
37+
COPY . OpenSTA
38+
RUN cd OpenSTA && \
39+
rm -rf build && \
40+
mkdir build && \
41+
cd build && \
42+
cmake -DCUDD_DIR=../cudd-3.0.0 .. && \
43+
make -j`nproc`
44+
45+
# Run sta on entry
46+
ENTRYPOINT ["OpenSTA/build/sta"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ following command builds a Docker image.
194194

195195
```
196196
cd OpenSTA
197-
docker build --file Dockerfile.ubuntu22.04 --tag opensta_ubuntu22.04 .
197+
docker build --file Dockerfile.ubuntu24.04 --tag opensta_ubuntu24.04 .
198198
or
199199
docker build --file Dockerfile.centos7 --tag opensta_centos7 .
200200
```

cmake/FindTCL.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ set(TCL_POSSIBLE_NAMES
2929
tcl85 tcl8.5
3030
)
3131

32-
# tcl lib path guesses.
32+
# TCL lib path guesses.
3333
if (NOT TCL_LIB_PATHS)
3434
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
35+
file(GLOB tcl_homebrew_libs
36+
/opt/homebrew/Cellar/tcl-tk@8/*/lib
37+
)
3538
set(TCL_LIB_PATHS
36-
#/opt/homebrew/Cellar/tcl-tk/9.0.3/lib
37-
/opt/homebrew/Cellar/tcl-tk@8/8.6.18/lib
38-
/opt/homebrew/Cellar/tcl-tk@8/8.6.17/lib
39-
/opt/homebrew/Cellar/tcl-tk@8/8.6.16/lib
39+
${tcl_homebrew_libs}
4040
/opt/homebrew/opt/tcl-tk/lib /usr/local/lib)
4141
set(TCL_NO_DEFAULT_PATH TRUE)
4242
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")

doc/ChangeLog.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ Release 3.0.1 2026/03/12
2222
------------------------
2323

2424
Statistical timing (SSTA) with Liberty LVF (Liberty Variation Format)
25-
models is now supported. Statistical timing uses a probaility
26-
distribution to represent a delay or slew ranther than a single
25+
models is now supported. Statistical timing uses a probability
26+
distribution to represent a delay or slew rather than a single
2727
number.
2828

2929
Normal and skew normal probability distributions are supported.
3030

31-
SSTA is enabled with the sta_pocv_mode variaable.
31+
SSTA is enabled with the sta_pocv_mode variable.
3232

3333
set sta_pocv_mode scalar|normal|skew_normal
3434

@@ -43,10 +43,10 @@ set with the sta_pocv_quantile variable.
4343

4444
The default value is 3 standard deviations, or sigma.
4545

46-
Use the variance field with report_checks or report_check_types to see
46+
Use the variation field with report_checks or report_check_types to see
4747
distribution parameters in timing reports.
4848

49-
A command file for analyzing a design with statisical timing with an
49+
A command file for analyzing a design with statistical timing with an
5050
LVF library is shown below.
5151

5252
read_liberty lvf_library.lib.gz

doc/OpenSTA.fodt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6639,15 +6639,15 @@
66396639
<text:p text:style-name="P17">This example can be found in <text:span text:style-name="T8">examples/</text:span><text:span text:style-name="T10">mcmm3</text:span><text:span text:style-name="T8">.tcl</text:span>.<text:line-break/><text:line-break/><text:span text:style-name="T6">In the example show above the SDC for the modes is in separate files. Alternatively, the SDC can be defined in the command file using the </text:span><text:span text:style-name="T13">set_mode</text:span><text:span text:style-name="T6"> command between SDC command groups.</text:span></text:p>
66406640
<text:p text:style-name="P18"><text:span text:style-name="T6">set_mode mode1<text:line-break/>create_clock -name m1_clk -period 1000 {clk1 clk2 clk3}<text:line-break/></text:span>set_input_delay -clock m1_clk 100 {in1 in2}<text:line-break/><text:line-break/><text:span text:style-name="T6">set_mode mode2<text:line-break/>create_clock -name m2_clk -period 500 {clk1 clk3}<text:line-break/></text:span>set_output_delay -clock m2_clk 100 out</text:p>
66416641
<text:h text:style-name="P19" text:outline-level="2"><text:bookmark-start text:name="__RefHeading___Toc42583_2528141652 Copy 1"/>Statistical Timing Analysis<text:bookmark-end text:name="__RefHeading___Toc42583_2528141652 Copy 1"/></text:h>
6642-
<text:p text:style-name="Body_20_first">OpenSTA also supports <text:span text:style-name="T14">statistical timing </text:span>.<text:span text:style-name="T14">anallysis with Liberty Variation Format (LVF) libraries. Statistical timing uses a probaility </text:span>distribution to represent a delay or slew ranther than a single number.</text:p>
6643-
<text:p text:style-name="P20"><text:soft-page-break/>Normal and skew normal probability distributions are supported. <text:s/>SSTA is enabled with the <text:span text:style-name="T12">sta_pocv_mode</text:span> variaable.</text:p>
6642+
<text:p text:style-name="Body_20_first">OpenSTA also supports <text:span text:style-name="T14">statistical timing </text:span><text:span text:style-name="T14">analysis with Liberty Variation Format (LVF) libraries. Statistical timing uses a probability </text:span>distribution to represent a delay or slew rather than a single number.</text:p>
6643+
<text:p text:style-name="P20"><text:soft-page-break/>Normal and skew normal probability distributions are supported. <text:s/>SSTA is enabled with the <text:span text:style-name="T12">sta_pocv_mode</text:span> variable.</text:p>
66446644
<text:p text:style-name="Example_20__20_indented">set sta_pocv_mode scalar|normal|skew_normal<text:line-break/><text:line-break/><text:span text:style-name="T15">scalar mode is for non-SSTA analysis<text:line-break/>normal mode uses gaussian normal distributions<text:line-break/>skew_normal mode is for skew normal LVF moment based distributions</text:span></text:p>
66456645
<text:p text:style-name="P20">The target quantile of a delay probability distribution (confidence level) is set with the <text:span text:style-name="T12">sta_pocv_quantile</text:span> variable.</text:p>
66466646
<text:p text:style-name="Example_20__20_indented"><text:span text:style-name="T16">set </text:span>sta_pocv_quantile &lt;float&gt;</text:p>
66476647
<text:p text:style-name="P20">The default value is 3 standard deviations, or sigma.</text:p>
6648-
<text:p text:style-name="P21"><text:span text:style-name="T16">Use the </text:span><text:span text:style-name="T12">variance</text:span> <text:span text:style-name="T16">field with the </text:span>report_checks <text:span text:style-name="T16">and</text:span> report_check_types <text:span text:style-name="T16">commands to see distribution parameters in timing reports.</text:span></text:p>
6649-
<text:p text:style-name="P22">A command file for analyzing a design with statisical timing is shown below.</text:p>
6650-
<text:p text:style-name="Example_20__20_indented"><text:soft-page-break/>read_liberty lvf_library.lib.gz<text:line-break/>read_verilog design.v<text:line-break/>link_design topcreate_clock -period 50 clk<text:line-break/>set_input_delay -clock clk 1 {in1 in2}<text:line-break/>set sta_pocv_mode skew_normal<text:line-break/>report_checks -fields {slew variation input_pin variation} -digits 3</text:p>
6648+
<text:p text:style-name="P21"><text:span text:style-name="T16">Use the </text:span><text:span text:style-name="T12">variation</text:span> <text:span text:style-name="T16">field with the </text:span>report_checks <text:span text:style-name="T16">and</text:span> report_check_types <text:span text:style-name="T16">commands to see distribution parameters in timing reports.</text:span></text:p>
6649+
<text:p text:style-name="P22">A command file for analyzing a design with statistical timing is shown below.</text:p>
6650+
<text:p text:style-name="Example_20__20_indented"><text:soft-page-break/>read_liberty lvf_library.lib.gz<text:line-break/>read_verilog design.v<text:line-break/>link_design topcreate_clock -period 50 clk<text:line-break/>set_input_delay -clock clk 1 {in1 in2}<text:line-break/>set sta_pocv_mode skew_normal<text:line-break/>report_checks -fields {slew variation input_pin} -digits 3</text:p>
66516651
<text:p text:style-name="Example_20__20_indented"><text:soft-page-break/><text:span text:style-name="T16">Startpoint: r2 (rising edge-triggered flip-flop clocked by clk)<text:line-break/>Endpoint: r3 (rising edge-triggered flip-flop clocked by clk)<text:line-break/>Path Group: clk<text:line-break/>Path Type: max<text:line-break/><text:line-break/> <text:s text:c="3"/>Slew <text:s text:c="3"/>Delay Variation <text:s text:c="4"/>Time <text:s text:c="2"/>Description<text:line-break/>---------------------------------------------------------------------------<text:line-break/> <text:s text:c="2"/>0.000 <text:s text:c="3"/>0.000 <text:s text:c="12"/>0.000 <text:s text:c="2"/>clock clk (rise edge)<text:line-break/> <text:s text:c="11"/>0.000 <text:s text:c="12"/>0.000 <text:s text:c="2"/>clock network delay (ideal)<text:line-break/> <text:s text:c="2"/>0.000 <text:s text:c="3"/>0.000 <text:s text:c="12"/>0.000 ^ r2/CK (FDPQ1)<text:line-break/> <text:s text:c="19"/>12.026 <text:s text:c="11"/>mean<text:line-break/> <text:s text:c="20"/>0.017 <text:s text:c="11"/>mean_shift<text:line-break/> <text:s text:c="20"/>0.366 <text:s text:c="11"/>std_dev<text:line-break/> <text:s text:c="20"/>0.000 <text:s text:c="11"/>skewness<text:line-break/> <text:s text:c="2"/>4.648 <text:s text:c="2"/>12.409 <text:s text:c="11"/>12.409 v r2/Q (FFQ1)<text:line-break/> <text:s text:c="2"/>4.648 <text:s text:c="3"/>0.000 <text:s text:c="11"/>12.409 v u1/A (BUF1)<text:line-break/> <text:s text:c="20"/>6.084 <text:s text:c="11"/>mean<text:line-break/> <text:s text:c="20"/>0.007 <text:s text:c="11"/>mean_shift<text:line-break/> <text:s text:c="20"/>0.188 <text:s text:c="11"/>std_dev<text:line-break/> <text:s text:c="20"/>0.000 <text:s text:c="11"/>skewness<text:line-break/> <text:s text:c="2"/>2.513 <text:s text:c="3"/>6.137 <text:s text:c="11"/>18.546 v u1/X (BUF1)<text:line-break/> <text:s text:c="2"/>2.513 <text:s text:c="3"/>0.000 <text:s text:c="11"/>18.546 v u2/A2 (AN21)<text:line-break/> <text:s text:c="20"/>6.447 <text:s text:c="11"/>mean<text:line-break/> <text:s text:c="20"/>0.008 <text:s text:c="11"/>mean_shift<text:line-break/> <text:s text:c="20"/>0.191 <text:s text:c="11"/>std_dev<text:line-break/> <text:s text:c="20"/>0.000 <text:s text:c="11"/>skewness<text:line-break/> <text:s text:c="2"/>2.565 <text:s text:c="3"/>6.497 <text:s text:c="11"/>25.043 v u2/X (AN21)<text:line-break/> <text:s text:c="2"/>2.565 <text:s text:c="3"/>0.000 <text:s text:c="11"/>25.043 v r3/D (FFQ1)<text:line-break/> <text:s text:c="28"/>25.043 <text:s text:c="2"/>data arrival time<text:line-break/></text:span><text:line-break/> <text:s text:c="2"/>0.000 <text:s text:c="2"/>50.000 <text:s text:c="11"/>50.000 <text:s text:c="2"/>clock clk (rise edge)<text:line-break/> <text:s text:c="11"/>0.000 <text:s text:c="11"/>50.000 <text:s text:c="2"/>clock network delay (ideal)<text:line-break/> <text:s text:c="11"/>0.000 <text:s text:c="11"/>50.000 <text:s text:c="2"/>clock reconvergence pessimism<text:line-break/> <text:s text:c="28"/>50.000 ^ r3/CK (FFQ1)<text:line-break/> <text:s text:c="10"/>-9.376 <text:s text:c="11"/>40.624 <text:s text:c="2"/>library setup time<text:line-break/> <text:s text:c="28"/>40.624 <text:s text:c="2"/>data required time<text:line-break/>---------------------------------------------------------------------------<text:line-break/> <text:s text:c="28"/>40.624 <text:s text:c="2"/>data required time<text:line-break/> <text:s text:c="27"/>-25.043 <text:s text:c="2"/>data arrival time<text:line-break/>---------------------------------------------------------------------------<text:line-break/> <text:s text:c="28"/>15.581 <text:s text:c="2"/>slack (MET)</text:p>
66526652
<text:p text:style-name="P23">The standard deviation for <text:span text:style-name="T14">n</text:span>ormal distributions is specified with the following liberty timing groups.</text:p>
66536653
<text:p text:style-name="P24"><text:soft-page-break/>ocv_sigma_cell_rise<text:line-break/>ocv_sigma_cell_fall<text:line-break/>ocv_sigma_rise_transition<text:line-break/>ocv_sigma_fall_transition<text:line-break/>ocv_sigma_rise_constraint<text:line-break/>ocv_sigma_fall_constraint</text:p>
@@ -9532,7 +9532,7 @@
95329532
<text:p text:style-name="P160">fields</text:p>
95339533
</table:table-cell>
95349534
<table:table-cell table:style-name="Table52.A2" office:value-type="string">
9535-
<text:p text:style-name="P151"><text:span text:style-name="Default_20_Paragraph_20_Font">List of </text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T12">capacitance|slew|input_pins|</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T173">hierarc</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T174">h</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T173">i</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T174">c</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T173">al_pins|</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T12">nets|fanout</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T175">|src_attr</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T176">|variance</text:span></text:span></text:p>
9535+
<text:p text:style-name="P151"><text:span text:style-name="Default_20_Paragraph_20_Font">List of </text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T12">capacitance|slew|input_pins|</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T173">hierarc</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T174">h</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T173">i</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T174">c</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T173">al_pins|</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T12">nets|fanout</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T175">|src_attr</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T176">|variation</text:span></text:span></text:p>
95369536
</table:table-cell>
95379537
</table:table-row>
95389538
<table:table-row table:style-name="Table52.1">
@@ -9611,7 +9611,7 @@
96119611
<text:p text:style-name="P167">fields</text:p>
96129612
</table:table-cell>
96139613
<table:table-cell table:style-name="Table59.A2" office:value-type="string">
9614-
<text:p text:style-name="P164"><text:span text:style-name="Default_20_Paragraph_20_Font">List of </text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T12">capacitance|slew|input_pins|</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T173">hierarc</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T174">h</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T173">i</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T174">c</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T173">al_pins|</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T12">nets|fanout</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T175">|src_attr</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T176">|variance</text:span></text:span></text:p>
9614+
<text:p text:style-name="P164"><text:span text:style-name="Default_20_Paragraph_20_Font">List of </text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T12">capacitance|slew|input_pins|</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T173">hierarc</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T174">h</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T173">i</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T174">c</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T173">al_pins|</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T12">nets|fanout</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T175">|src_attr</text:span></text:span><text:span text:style-name="Default_20_Paragraph_20_Font"><text:span text:style-name="T176">|variation</text:span></text:span></text:p>
96159615
</table:table-cell>
96169616
</table:table-row>
96179617
<table:table-row table:style-name="Table59.1">

doc/OpenSTA.pdf

-3.28 KB
Binary file not shown.

graph/Graph.cc

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,6 @@ Graph::makeWireEdge(const Pin *from_pin,
384384
}
385385
}
386386

387-
void
388-
Graph::makeSceneAfter()
389-
{
390-
ap_count_ = dcalcAnalysisPtCount();
391-
initSlews();
392-
}
393-
394387
////////////////////////////////////////////////////////////////
395388

396389
Vertex *
@@ -782,17 +775,13 @@ Graph::removeDelayAnnotated(Edge *edge)
782775

783776
////////////////////////////////////////////////////////////////
784777

785-
// This only gets called if the analysis type changes from single
786-
// to bc_wc/ocv or visa versa.
787778
void
788-
Graph::setDelayCount(DcalcAPIndex ap_count)
779+
Graph::delayCountChanged()
789780
{
790-
if (ap_count != ap_count_) {
791-
// Discard any existing delays.
792-
removePeriodCheckAnnotations();
793-
ap_count_ = ap_count;
794-
initSlews();
795-
}
781+
ap_count_ = dcalcAnalysisPtCount();
782+
// Discard any existing delays.
783+
removePeriodCheckAnnotations();
784+
initSlews();
796785
}
797786

798787
void

0 commit comments

Comments
 (0)