Skip to content

Sta latest from parallaxsw 0407#343

Merged
maliberty merged 21 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:sta_latest_from_parallaxsw_0407
Apr 8, 2026
Merged

Sta latest from parallaxsw 0407#343
maliberty merged 21 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:sta_latest_from_parallaxsw_0407

Conversation

@openroad-ci

Copy link
Copy Markdown
Member

Changes from latest Parallax/OpenSTA, and Prima delay calculation fix to avoid crash

  1. Fix findRoot API mismatch in tests

Files: dcalc/test/cpp/TestFindRoot.cc, dcalc/test/cpp/TestDcalc.cc

findRoot changed from taking a bool &fail output parameter to returning std::pair<double, bool>. Updated ~70 call sites across both test files from:
bool fail = false;
double root = findRoot(func, ..., fail);
to:
auto [root, fail] = findRoot(func, ...);

  1. Fix read_spef -name not associating parasitics with scenes

File: search/Sta.cc

Sta::readSpef with -name created/found the parasitics object but never called setParasitics on any scene. Delay calculators that look up parasitics via scene->parasitics() would get null, causing Prima (and
potentially others) to fail silently. Added the missing setParasitics call to match the no-name path.

  1. Fix bias → well rename in PortDirection tests

File: network/test/cpp/TestNetwork.cc

Updated all references to PortDirection::bias() / isBias() to PortDirection::well() / isWell(), and updated string literals from "bias" to "well".

  1. Fix stale filter function signatures in sdc tests

Files: sdc/test/sdc_filter_dot.tcl, sdc/test/sdc_filter_query.tcl

filter_expr_to_postfix, filter_ports, filter_clocks, filter_lib_cells, filter_insts, filter_pins, and filter_nets had a trailing flag argument removed from the SWIG API. Removed the extra argument from all
call sites in the test scripts.

  1. Update stale golden files

Files: 8 liberty .ok files, 2 sdc .ok files

Updated golden files to reflect bias → well rename and corrected filter function outputs.

  1. Add dcalc_prima_report regression test

Files: dcalc/test/dcalc_prima_report.tcl, dcalc/test/dcalc_prima_report.ok, dcalc/test/CMakeLists.txt

New Tcl regression test exercising report_dcalc with Prima delay calculator and -name/-reduce SPEF flags.

  1. Additional change float ceff = ceff_vth_.empty() ? load_cap : ceff_vth_[0]; in PrimaDelayCalc::reportGateDelay compared to upstream to avoid the seg fault when lib has NLDM and no CCS, but prima delay calculation is requested. Above regression excercises this issue

mikesinouye and others added 20 commits April 2, 2026 15:59
* Provide close2proc function to prevent tcl9 from crashing.

Tcl 9 does not test if the close2Proc function pointer is non-null,
but calls it unconditionally:
https://github.com/tcltk/tcl/blob/core-9-0-3/generic/tclIO.c#L384

So we need to provide a non-null function pointer for our code
to not crash with Tcl9.

Use the same implementation as the previous close channel
had.

Signed-off-by: Henner Zeller <h.zeller@acm.org>

* Use non-deprecated trace add variable syntax.

In modern tcl, `trace variable` is now i`trace add variable`,
and `"rw"` should be spelled out as `{read write}`
There were backwards compatible forms in Tcl 8.x but now loudly
complains in Tcl 9

Signed-off-by: Henner Zeller <h.zeller@acm.org>

* Use `Tcl_Size` for all tcl functions returning sizes.

This is the type the Tcl-API provides in its prototypes and
starting from Tcl9 this typedef actually changes from `int` to `long`,
so will no longer compile when passing an `int*`.

So whenever we get a return value of this type, use the
correct typedef to declare the variable. This makes it forward and
backward compatible.

Signed-off-by: Henner Zeller <h.zeller@acm.org>

* Address review comments: compare with `read`/`write` not `r`, `w`

Signed-off-by: Henner Zeller <h.zeller@acm.org>

---------

Signed-off-by: Henner Zeller <h.zeller@acm.org>
Support for std::{from,to}_chars isn't finalized in
libcxx as of the time of writing, see __cpp_lib_to_chars in
https://github.com/llvm/llvm-project/blob/6331bfa41ab529558ec9d645c0effb7a4146591c/libcxx/docs/FeatureTestMacroTable.rst

This patch adds a fallback using strtof. There are two
differences:
* strtof is locale-dependent
* strtof tolerates leading spaces

Signed-off-by: Mohamed Gaber <me@donn.website>
Signed-off-by: James Cherry <cherry@parallaxsw.com>
Signed-off-by: James Cherry <cherry@parallaxsw.com>
Signed-off-by: James Cherry <cherry@parallaxsw.com>
Signed-off-by: James Cherry <cherry@parallaxsw.com>
Signed-off-by: James Cherry <cherry@parallaxsw.com>
Signed-off-by: James Cherry <cherry@parallaxsw.com>
Signed-off-by: James Cherry <cherry@parallaxsw.com>
Signed-off-by: James Cherry <cherry@parallaxsw.com>
Signed-off-by: James Cherry <cherry@parallaxsw.com>
Signed-off-by: James Cherry <cherry@parallaxsw.com>
Signed-off-by: James Cherry <cherry@parallaxsw.com>
…me unrelated stuff

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Signed-off-by: James Cherry <cherry@parallaxsw.com>
* Update STA to exclude bias pins from timing graph and subsequently in write_verilog

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>

* unnecessary space in orig verilog

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>

* Update to use well supplies rather than bias pins

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>

---------

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
…regression added

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
@CLAassistant

CLAassistant commented Apr 7, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 5 committers have signed the CLA.

✅ mikesinouye
✅ hzeller
✅ dsengupta0628
❌ donn
❌ jjcherry56
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed. Claude makes this mistake often. How about editing .gitignore to prevent this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, I pulled in latest master which already had the following in .gitignore
/test/.log
Testing/

So this should not have been part of my change when git add/commit was done (unless I your changes came in after I created my 1st set of commits). I will just remove these

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh existing .gitignore didn't help: Testing/ only matches at the repo root. The files were at liberty/test/Testing/Temporary/. Changed it to **/Testing/ to match at any depth. Updated it now

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
Comment thread dcalc/PrimaDelayCalc.cc
gateDelay(drvr_pin, arc, in_slew, load_cap, parasitic,
load_pin_index_map, scene, min_max);
float in_slew1 = delayAsFloat(in_slew);
float ceff = ceff_vth_.empty() ? load_cap : ceff_vth_[0];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maliberty This is the line different in from upstream OSTA. Without this, the testcase I added in parallaxsw/OpenSTA#418 crashes. I will keep track of this change even after we merged in OpenROAD/OpenSTA and may use a better solution if James has one

Comment thread search/Sta.cc
parasitics = findParasitics(std::string(name));
if (parasitics == nullptr)
parasitics = makeConcreteParasitics(std::string(name), std::string(filename));
if (scene)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maliberty This snippet is also different in from upstream OSTA. Without this, but with upstream OSTA code, the testcase I added in parallaxsw/OpenSTA#418 can still crash if "read_spef -name .." is used. I will also keep track of this change even after we merged in OpenROAD/OpenSTA and may use a better solution if James has one

@maliberty maliberty merged commit 6599d47 into The-OpenROAD-Project:master Apr 8, 2026
6 of 7 checks passed
@openroad-ci openroad-ci deleted the sta_latest_from_parallaxsw_0407 branch April 8, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants