From c2d828baf56d599d7c192fc90f7101e53d1c86d1 Mon Sep 17 00:00:00 2001 From: Mohamed Gaber Date: Tue, 26 May 2026 00:09:28 +0300 Subject: [PATCH 1/3] chore: update to OpenSTA 3.0 - update Silimate/OpenSTA to version including OpenSTA 3.0's changes - update findPathEnds invocation - update jsonName to use string_views --- src/Silisizer.cpp | 14 ++++++++++---- third_party/OpenSTA | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Silisizer.cpp b/src/Silisizer.cpp index eeef88f..790c412 100644 --- a/src/Silisizer.cpp +++ b/src/Silisizer.cpp @@ -73,16 +73,19 @@ int Silisizer::silisize(const char *workdir) { for (int cur_iter = 0; true; cur_iter++) { // Run timer to get violating paths (one per endpoint) std::cout << "Running timer..." << std::endl; + + sta::StringSeq group_names; + sta::PathEndSeq ends = sta_->findPathEnds( /*exception from*/ nullptr, /*exception through*/ nullptr, - /*exception to*/ nullptr, /*unconstrained*/ false, /*corner*/ nullptr, + /*exception to*/ nullptr, /*unconstrained*/ false, /*scenes*/ sta_->scenes(), /*min_max*/ sta::MinMaxAll::max(), /*group_count*/ 10000, /*endpoint_count*/ 1, /*unique_pins*/ true, /*unique_edges*/ true, /*min_slack*/ -1.0e+30, /*max_slack*/ 0.0, /*sort_by_slack*/ false, - /*groups->size() ? groups :*/ nullptr, + /*groups->size() ? groups :*/ group_names, /*setup*/ true, /*hold*/ false, /*recovery*/ false, /*removal*/ false, /*clk_gating_setup*/ false, /*clk_gating_hold*/ false); @@ -286,9 +289,12 @@ int Silisizer::silisize(const char *workdir) { } // Remove escape characters from JSON output -static std::string jsonName(const char *s) { +static std::string jsonName(std::string_view s) { + const char *p = s.data(); + const char *e = s.data() + s.length(); std::string out; - for (; *s; ++s) if (*s != '\\') out.push_back(*s); + out.reserve(s.length()); + for (; p != e; ++p) if (*p != '\\') out.push_back(*p); return out; } diff --git a/third_party/OpenSTA b/third_party/OpenSTA index 5c5b9c5..2d2cfe6 160000 --- a/third_party/OpenSTA +++ b/third_party/OpenSTA @@ -1 +1 @@ -Subproject commit 5c5b9c5502a963dacae9b015815f6e89c237de75 +Subproject commit 2d2cfe6fa68bbeb52ec4373416a4af604f002d20 From cfde151168c1b2fba4772518f4ecf2c13e64efa2 Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Mon, 25 May 2026 20:25:49 -0700 Subject: [PATCH 2/3] Update src/Silisizer.cpp Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- src/Silisizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Silisizer.cpp b/src/Silisizer.cpp index 790c412..7856732 100644 --- a/src/Silisizer.cpp +++ b/src/Silisizer.cpp @@ -74,7 +74,7 @@ int Silisizer::silisize(const char *workdir) { // Run timer to get violating paths (one per endpoint) std::cout << "Running timer..." << std::endl; - sta::StringSeq group_names; + sta::StringSeq group_names; // empty = report all path groups sta::PathEndSeq ends = sta_->findPathEnds( /*exception from*/ nullptr, /*exception through*/ nullptr, From fda2f93a73f3ece30c66ce799f6acf41a169ee05 Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Mon, 25 May 2026 20:26:54 -0700 Subject: [PATCH 3/3] Refactor jsonName to remove escape characters Refactor jsonName function to use range-based for loop. --- src/Silisizer.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Silisizer.cpp b/src/Silisizer.cpp index 7856732..390a7ee 100644 --- a/src/Silisizer.cpp +++ b/src/Silisizer.cpp @@ -290,11 +290,9 @@ int Silisizer::silisize(const char *workdir) { // Remove escape characters from JSON output static std::string jsonName(std::string_view s) { - const char *p = s.data(); - const char *e = s.data() + s.length(); std::string out; out.reserve(s.length()); - for (; p != e; ++p) if (*p != '\\') out.push_back(*p); + for (char c : s) if (c != '\\') out.push_back(c); return out; }