From ff4fde29e7c46df3d4f2aebe2127598cfed612b7 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Fri, 15 May 2026 15:17:37 +0000 Subject: [PATCH 01/11] update latest STA module and use make report fields Signed-off-by: dsengupta0628 --- src/gpl/src/mbff.cpp | 51 +++++++++++++++++++++++++++++++++++--------- src/sta | 2 +- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/src/gpl/src/mbff.cpp b/src/gpl/src/mbff.cpp index cad22fa72eb..1c7cf912eb7 100644 --- a/src/gpl/src/mbff.cpp +++ b/src/gpl/src/mbff.cpp @@ -66,6 +66,8 @@ using odb::dbMTerm; using odb::dbNet; using utl::GPL; +constexpr const char* kOrigNameProp = "orig_name"; + struct Point { float x; @@ -927,27 +929,26 @@ void MBFF::ModifyPinConnections(const std::vector& flops, } // Store original FF→tray pin mapping as a property on the tray - // instance so timing reports can display the original pin name. - std::string tray_port; + // pin (iterm) so the report_path "orig_name" field can display the + // original pin name. + dbITerm* tray_iterm = nullptr; if (is_d && d_pin) { - tray_port = d_pin->name(); + tray_iterm = tray_inst[tray_idx]->findITerm(d_pin->name().c_str()); } else if (is_q) { if (is_qn_inv && qn_pin) { - tray_port = qn_pin->name(); + tray_iterm = tray_inst[tray_idx]->findITerm(qn_pin->name().c_str()); } else if (q_pin) { - tray_port = q_pin->name(); + tray_iterm = tray_inst[tray_idx]->findITerm(q_pin->name().c_str()); } } - if (!tray_port.empty()) { - const std::string key = "orig_name_" + tray_port; + if (tray_iterm) { const std::string val = orig_inst_name + "/" + orig_port_name; odb::dbStringProperty* prop - = odb::dbStringProperty::find(tray_inst[tray_idx], key.c_str()); + = odb::dbStringProperty::find(tray_iterm, kOrigNameProp); if (prop) { prop->setValue(val.c_str()); } else { - odb::dbStringProperty::create( - tray_inst[tray_idx], key.c_str(), val.c_str()); + odb::dbStringProperty::create(tray_iterm, kOrigNameProp, val.c_str()); } } } @@ -2775,6 +2776,36 @@ MBFF::MBFF(odb::dbDatabase* db, test_idx_(-1) { graphics_->setDebugOn(debug_graphics); + + if (sta_->findReportPathField(kOrigNameProp) == nullptr) { + sta::dbNetwork* network = network_; + sta_->makeReportPathField( + kOrigNameProp, kOrigNameProp, "Orig Name", 36, true, nullptr, + [network](const sta::Path* path, + const sta::StaState* sta) -> std::string { + if (path == nullptr) { + return {}; + } + sta::Vertex* vertex = path->vertex(sta); + if (vertex == nullptr) { + return {}; + } + const sta::Pin* pin = vertex->pin(); + if (pin == nullptr) { + return {}; + } + odb::dbITerm* iterm = nullptr; + odb::dbBTerm* bterm = nullptr; + odb::dbModITerm* moditerm = nullptr; + network->staToDb(pin, iterm, bterm, moditerm); + if (iterm == nullptr) { + return {}; + } + odb::dbStringProperty* prop + = odb::dbStringProperty::find(iterm, kOrigNameProp); + return prop ? prop->getValue() : std::string{}; + }); + } } MBFF::~MBFF() = default; diff --git a/src/sta b/src/sta index 76c4d6df353..337c7382655 160000 --- a/src/sta +++ b/src/sta @@ -1 +1 @@ -Subproject commit 76c4d6df3537ccce331b5caa812196c3330ba7c4 +Subproject commit 337c7382655132b67e230095ee2e5701969e115e From 32fc69e696cc0392b5c19ff2c9377bae71631a11 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Fri, 15 May 2026 15:42:00 +0000 Subject: [PATCH 02/11] enhance testcase to use hier design Signed-off-by: dsengupta0628 --- src/gpl/test/mbff_orig_name.def | 41 --------------------------------- src/gpl/test/mbff_orig_name.ok | 19 +++++++++------ src/gpl/test/mbff_orig_name.tcl | 20 ++++++++++++---- src/gpl/test/mbff_orig_name.v | 23 ++++++++++++++++++ 4 files changed, 51 insertions(+), 52 deletions(-) delete mode 100644 src/gpl/test/mbff_orig_name.def create mode 100644 src/gpl/test/mbff_orig_name.v diff --git a/src/gpl/test/mbff_orig_name.def b/src/gpl/test/mbff_orig_name.def deleted file mode 100644 index 7ad6d57980c..00000000000 --- a/src/gpl/test/mbff_orig_name.def +++ /dev/null @@ -1,41 +0,0 @@ -VERSION 5.8 ; -DIVIDERCHAR "/" ; -BUSBITCHARS "[]" ; -DESIGN tray_test ; -UNITS DISTANCE MICRONS 1000 ; -DIEAREA ( 0 0 ) ( 10000 10000 ) ; - - -COMPONENTS 4 ; -- ff1 DFFHQNx1_ASAP7_75t_L + PLACED ( 6000 6000 ) N ; -- ff2 DFFHQNx1_ASAP7_75t_L + PLACED ( 4000 6000 ) N ; -- ff3 DFFHQNx1_ASAP7_75t_L + PLACED ( 4000 4000 ) N ; -- ff4 DFFHQNx1_ASAP7_75t_L + PLACED ( 6000 4000 ) N ; -END COMPONENTS - -PINS 1 ; -- clk1 + NET clk1 + DIRECTION INPUT + USE SIGNAL + FIXED ( 0 0 ) N + LAYER M1 ( 0 0 ) ( 180 180 ) ; -- d1 + NET d1 + DIRECTION INPUT + USE SIGNAL + FIXED ( 360 0 ) N + LAYER M1 ( 0 0 ) ( 180 180 ) ; -- d2 + NET d2 + DIRECTION INPUT + USE SIGNAL + FIXED ( 540 0 ) N + LAYER M1 ( 0 0 ) ( 180 180 ) ; -- d3 + NET d3 + DIRECTION INPUT + USE SIGNAL + FIXED ( 720 0 ) N + LAYER M1 ( 0 0 ) ( 180 180 ) ; -- d4 + NET d4 + DIRECTION INPUT + USE SIGNAL + FIXED ( 900 0 ) N + LAYER M1 ( 0 0 ) ( 180 180 ) ; -- o1 + NET o1 + DIRECTION INPUT + USE SIGNAL + FIXED ( 360 10000 ) N + LAYER M1 ( 0 0 ) ( 180 180 ) ; -- o2 + NET o2 + DIRECTION INPUT + USE SIGNAL + FIXED ( 540 10000 ) N + LAYER M1 ( 0 0 ) ( 180 180 ) ; -- o3 + NET o3 + DIRECTION INPUT + USE SIGNAL + FIXED ( 720 10000 ) N + LAYER M1 ( 0 0 ) ( 180 180 ) ; -- o4 + NET o4 + DIRECTION INPUT + USE SIGNAL + FIXED ( 900 10000 ) N + LAYER M1 ( 0 0 ) ( 180 180 ) ; -END PINS - - -NETS 1 ; -- clk1 ( PIN clk1 ) ( ff1 CLK ) ( ff2 CLK ) ( ff3 CLK ) ( ff4 CLK ) + USE SIGNAL ; -- d1 ( PIN d1 ) ( ff1 D ) + USE SIGNAL ; -- d2 ( PIN d2 ) ( ff2 D ) + USE SIGNAL ; -- d3 ( PIN d3 ) ( ff3 D ) + USE SIGNAL ; -- d4 ( PIN d4 ) ( ff4 D ) + USE SIGNAL ; -- o1 ( PIN o1 ) ( ff1 QN ) + USE SIGNAL ; -- o2 ( PIN o2 ) ( ff2 QN ) + USE SIGNAL ; -- o3 ( PIN o3 ) ( ff3 QN ) + USE SIGNAL ; -- o4 ( PIN o4 ) ( ff4 QN ) + USE SIGNAL ; -END NETS - -END DESIGN diff --git a/src/gpl/test/mbff_orig_name.ok b/src/gpl/test/mbff_orig_name.ok index 40f414e2c39..14eae91edb7 100644 --- a/src/gpl/test/mbff_orig_name.ok +++ b/src/gpl/test/mbff_orig_name.ok @@ -5,10 +5,15 @@ [INFO ODB-0227] LEF file: ./4BitTrayH4/asap7sc7p5t_DFFHQNV4X.lef, created 9 library cells [INFO ODB-0394] Duplicate site asap7sc7p5t_pg in asap7sc7p5t_DFFHQNH2V2X already seen in asap7sc7p5t_DFFHQNV2X [INFO ODB-0227] LEF file: ./4BitTrayH2W2/asap7sc7p5t_DFFHQNH2V2X.lef, created 9 library cells -[INFO ODB-0128] Design: tray_test -[INFO ODB-0130] Created 9 pins. -[INFO ODB-0131] Created 4 components and 20 component-terminals. -[INFO ODB-0133] Created 9 nets and 12 connections. +[WARNING ORD-0011] Hierarchical flow (-hier) is currently in development and may cause multiple issues. Do not use in production environments. +[WARNING IFP-0028] Core area lower left (1.000, 1.000) snapped to (1.026, 1.080). +[INFO IFP-0001] Added 29 rows of 147 site asap7sc7p5t. +[INFO IFP-0100] Die BBox: ( 0.000 0.000 ) ( 10.000 10.000 ) um +[INFO IFP-0101] Core BBox: ( 1.026 1.080 ) ( 8.964 8.910 ) um +[INFO IFP-0102] Core area: 62.155 um^2 +[INFO IFP-0103] Total instances area: 1.166 um^2 +[INFO IFP-0104] Effective utilization: 0.019 +[INFO IFP-0105] Number of instances: 4 Alpha = 40.0, Beta = 1.0, #paths = 0, max size = -1 Total ILP Cost: 112.643 Total Timing Critical Path Displacement: 0.0 @@ -16,7 +21,7 @@ Average slot-to-flop displacement: 1.730 Final Objective Value: 112.643 Sizes used 4-bit: 1 -Startpoint: d3 (input port clocked by clk) +Startpoint: d4 (input port clocked by clk) Endpoint: _tray_size4_7 (rising edge-triggered flip-flop clocked by clk) Path Group: clk Path Type: max @@ -26,8 +31,8 @@ Path Type: max 0.00 0.00 clock clk (rise edge) 0.00 0.00 clock network delay (ideal) 0.00 0.00 ^ input external delay - 0.00 0.00 ^ d3 (in) - 0.00 0.00 ^ _tray_size4_7/D1 (DFFHQNV4Xx1_ASAP7_75t_L) ff3/D + 0.00 0.00 ^ d4 (in) + 0.00 0.00 ^ _tray_size4_7/D0 (DFFHQNV4Xx1_ASAP7_75t_L) bank1/ff_b/D 0.00 data arrival time 1000.00 1000.00 clock clk (rise edge) diff --git a/src/gpl/test/mbff_orig_name.tcl b/src/gpl/test/mbff_orig_name.tcl index 69d7969da32..8e13a9300a9 100644 --- a/src/gpl/test/mbff_orig_name.tcl +++ b/src/gpl/test/mbff_orig_name.tcl @@ -14,7 +14,17 @@ read_lib ./4BitTrayH4/asap7sc7p5t_DFFHQNV4X_LVT_TT_nldm_FAKE.lib read_lef ./4BitTrayH2W2/asap7sc7p5t_DFFHQNH2V2X.lef read_lib ./4BitTrayH2W2/asap7sc7p5t_DFFHQNH2V2X_LVT_TT_nldm_FAKE.lib -read_def ./$test_name.def +read_verilog ./$test_name.v +link_design -hier tray_test + +initialize_floorplan -die_area "0 0 10 10" \ + -core_area "1 1 9 9" \ + -site asap7sc7p5t + +place_inst -name bank0/ff_a -origin {6 6} -status PLACED +place_inst -name bank0/ff_b -origin {4 6} -status PLACED +place_inst -name bank1/ff_a -origin {4 4} -status PLACED +place_inst -name bank1/ff_b -origin {6 4} -status PLACED create_clock -name clk -period 1000 [get_ports clk1] set_input_delay -clock clk 0 [get_ports {d1 d2 d3 d4}] @@ -24,6 +34,8 @@ cluster_flops -tray_weight 40.0 \ -max_split_size -1 \ -num_paths 0 -# Report timing to verify original FF names appear in the path report. -# After clustering the tray pin descriptions should show in the Orig Name column. -report_checks -path_delay max -fields {orig_name} -through [get_pins _tray_size4_7/D1] +# Report timing to verify original (hierarchical) FF pin names appear +# in the path report. After clustering the tray pin descriptions show +# the bankN/ff_x/D mapping in the Orig Name column. +report_checks -path_delay max -fields {orig_name} \ + -through [get_pins -of_objects [get_cells _tray_size4_*] ] diff --git a/src/gpl/test/mbff_orig_name.v b/src/gpl/test/mbff_orig_name.v new file mode 100644 index 00000000000..10dbf2d0b84 --- /dev/null +++ b/src/gpl/test/mbff_orig_name.v @@ -0,0 +1,23 @@ +module bank (clk, d, qn); + input clk; + input [1:0] d; + output [1:0] qn; + + DFFHQNx1_ASAP7_75t_L ff_a (.CLK(clk), .D(d[0]), .QN(qn[0])); + DFFHQNx1_ASAP7_75t_L ff_b (.CLK(clk), .D(d[1]), .QN(qn[1])); +endmodule + +module tray_test (clk1, d1, d2, d3, d4, o1, o2, o3, o4); + input clk1; + input d1; + input d2; + input d3; + input d4; + output o1; + output o2; + output o3; + output o4; + + bank bank0 (.clk(clk1), .d({d2, d1}), .qn({o2, o1})); + bank bank1 (.clk(clk1), .d({d4, d3}), .qn({o4, o3})); +endmodule From 0912d5f16a3e75f778d911514edb269c1a2098b8 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Fri, 15 May 2026 15:49:25 +0000 Subject: [PATCH 03/11] clang formatter Signed-off-by: dsengupta0628 --- src/gpl/src/mbff.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gpl/src/mbff.cpp b/src/gpl/src/mbff.cpp index 1c7cf912eb7..d30bda26a12 100644 --- a/src/gpl/src/mbff.cpp +++ b/src/gpl/src/mbff.cpp @@ -2780,7 +2780,12 @@ MBFF::MBFF(odb::dbDatabase* db, if (sta_->findReportPathField(kOrigNameProp) == nullptr) { sta::dbNetwork* network = network_; sta_->makeReportPathField( - kOrigNameProp, kOrigNameProp, "Orig Name", 36, true, nullptr, + kOrigNameProp, + kOrigNameProp, + "Orig Name", + 36, + true, + nullptr, [network](const sta::Path* path, const sta::StaState* sta) -> std::string { if (path == nullptr) { From 3452e8ea079217380286fa3e9d7a07efe068bce2 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Fri, 15 May 2026 15:52:28 +0000 Subject: [PATCH 04/11] tclfmt fix Signed-off-by: dsengupta0628 --- src/gpl/test/mbff_orig_name.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gpl/test/mbff_orig_name.tcl b/src/gpl/test/mbff_orig_name.tcl index 8e13a9300a9..8037188fa62 100644 --- a/src/gpl/test/mbff_orig_name.tcl +++ b/src/gpl/test/mbff_orig_name.tcl @@ -38,4 +38,4 @@ cluster_flops -tray_weight 40.0 \ # in the path report. After clustering the tray pin descriptions show # the bankN/ff_x/D mapping in the Orig Name column. report_checks -path_delay max -fields {orig_name} \ - -through [get_pins -of_objects [get_cells _tray_size4_*] ] + -through [get_pins -of_objects [get_cells _tray_size4_*]] From f97d94eb44ea39bf125b764b79cbe205b8665978 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Fri, 15 May 2026 16:11:00 +0000 Subject: [PATCH 05/11] address one legit gemini feedback Signed-off-by: dsengupta0628 --- src/gpl/src/mbff.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gpl/src/mbff.cpp b/src/gpl/src/mbff.cpp index d30bda26a12..582117e01fe 100644 --- a/src/gpl/src/mbff.cpp +++ b/src/gpl/src/mbff.cpp @@ -935,10 +935,10 @@ void MBFF::ModifyPinConnections(const std::vector& flops, if (is_d && d_pin) { tray_iterm = tray_inst[tray_idx]->findITerm(d_pin->name().c_str()); } else if (is_q) { - if (is_qn_inv && qn_pin) { - tray_iterm = tray_inst[tray_idx]->findITerm(qn_pin->name().c_str()); - } else if (q_pin) { - tray_iterm = tray_inst[tray_idx]->findITerm(q_pin->name().c_str()); + const sta::LibertyPort* tray_port = is_qn_inv ? qn_pin : q_pin; + if (tray_port) { + tray_iterm + = tray_inst[tray_idx]->findITerm(tray_port->name().c_str()); } } if (tray_iterm) { From cc1e711b46f82d16460eb2579b3b44457e9d6857 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Fri, 15 May 2026 16:14:03 +0000 Subject: [PATCH 06/11] add comment to accompany call to sta_->makeReportPathField Signed-off-by: dsengupta0628 --- src/gpl/src/mbff.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gpl/src/mbff.cpp b/src/gpl/src/mbff.cpp index 582117e01fe..e3c50540aa7 100644 --- a/src/gpl/src/mbff.cpp +++ b/src/gpl/src/mbff.cpp @@ -2777,6 +2777,9 @@ MBFF::MBFF(odb::dbDatabase* db, { graphics_->setDebugOn(debug_graphics); + // Register "orig_name" report_path field: original pin name before + // multi-bit clustering. Reads "orig_name" property off the path + // vertex's iterm. if (sta_->findReportPathField(kOrigNameProp) == nullptr) { sta::dbNetwork* network = network_; sta_->makeReportPathField( From 17c48eb530dad40598d1c79f9b6e0f45cece2a50 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Fri, 15 May 2026 18:43:52 +0000 Subject: [PATCH 07/11] moved makeReportPathField from MBFF ctor to Replace ctor so the field is available before any cluster_flops invocation Signed-off-by: dsengupta0628 --- src/gpl/src/mbff.cpp | 40 ---------------------- src/gpl/src/mbff.h | 2 ++ src/gpl/src/replace.cpp | 37 +++++++++++++++++++++ src/gpl/test/mbff_orig_name.ok | 43 ++++++++++++++++++++++-- src/gpl/test/mbff_orig_name.tcl | 59 ++++++++++++++++++++++++++++----- src/gpl/test/mbff_orig_name.v | 15 +++------ 6 files changed, 135 insertions(+), 61 deletions(-) diff --git a/src/gpl/src/mbff.cpp b/src/gpl/src/mbff.cpp index e3c50540aa7..48fdf2c077c 100644 --- a/src/gpl/src/mbff.cpp +++ b/src/gpl/src/mbff.cpp @@ -66,8 +66,6 @@ using odb::dbMTerm; using odb::dbNet; using utl::GPL; -constexpr const char* kOrigNameProp = "orig_name"; - struct Point { float x; @@ -2776,44 +2774,6 @@ MBFF::MBFF(odb::dbDatabase* db, test_idx_(-1) { graphics_->setDebugOn(debug_graphics); - - // Register "orig_name" report_path field: original pin name before - // multi-bit clustering. Reads "orig_name" property off the path - // vertex's iterm. - if (sta_->findReportPathField(kOrigNameProp) == nullptr) { - sta::dbNetwork* network = network_; - sta_->makeReportPathField( - kOrigNameProp, - kOrigNameProp, - "Orig Name", - 36, - true, - nullptr, - [network](const sta::Path* path, - const sta::StaState* sta) -> std::string { - if (path == nullptr) { - return {}; - } - sta::Vertex* vertex = path->vertex(sta); - if (vertex == nullptr) { - return {}; - } - const sta::Pin* pin = vertex->pin(); - if (pin == nullptr) { - return {}; - } - odb::dbITerm* iterm = nullptr; - odb::dbBTerm* bterm = nullptr; - odb::dbModITerm* moditerm = nullptr; - network->staToDb(pin, iterm, bterm, moditerm); - if (iterm == nullptr) { - return {}; - } - odb::dbStringProperty* prop - = odb::dbStringProperty::find(iterm, kOrigNameProp); - return prop ? prop->getValue() : std::string{}; - }); - } } MBFF::~MBFF() = default; diff --git a/src/gpl/src/mbff.h b/src/gpl/src/mbff.h index 13e76eed369..190f37425eb 100644 --- a/src/gpl/src/mbff.h +++ b/src/gpl/src/mbff.h @@ -32,6 +32,8 @@ class Scene; namespace gpl { +inline constexpr const char* kOrigNameProp = "orig_name"; + struct Point; struct Tray; struct Flop; diff --git a/src/gpl/src/replace.cpp b/src/gpl/src/replace.cpp index 597d9b3df36..81f45632858 100644 --- a/src/gpl/src/replace.cpp +++ b/src/gpl/src/replace.cpp @@ -10,6 +10,7 @@ #include #include "AbstractGraphics.h" +#include "db_sta/dbNetwork.hh" #include "db_sta/dbSta.hh" #include "graphicsNone.h" #include "initialPlace.h" @@ -21,6 +22,8 @@ #include "placerBase.h" #include "routeBase.h" #include "rsz/Resizer.hh" +#include "sta/Graph.hh" +#include "sta/Path.hh" #include "sta/StaMain.hh" #include "timingBase.h" #include "utl/Logger.h" @@ -38,6 +41,40 @@ Replace::Replace(odb::dbDatabase* odb, : db_(odb), sta_(sta), rs_(resizer), fr_(router), log_(logger) { graphics_ = std::make_unique(); + + // Register "orig_name" report_path field: original pin name before + // multi-bit clustering. Reads "orig_name" property off the path + // vertex's iterm. Registered at tool init so paths can be reported + // even when the design is loaded from an already-clustered .odb + // without re-running cluster_flops. + if (sta_->findReportPathField(kOrigNameProp) == nullptr) { + sta::dbNetwork* network = sta_->getDbNetwork(); + sta_->makeReportPathField( + kOrigNameProp, + kOrigNameProp, + "Orig Name", + 36, + true, + nullptr, + [network](const sta::Path* path, + const sta::StaState* sta) -> std::string { + if (path == nullptr) { + return {}; + } + const sta::Pin* pin = path->vertex(sta)->pin(); + // staToDb requires all three out-params; only iterm is used. + odb::dbITerm* iterm = nullptr; + odb::dbBTerm* bterm = nullptr; + odb::dbModITerm* moditerm = nullptr; + network->staToDb(pin, iterm, bterm, moditerm); + if (iterm == nullptr) { + return {}; + } + odb::dbStringProperty* prop + = odb::dbStringProperty::find(iterm, kOrigNameProp); + return prop ? prop->getValue() : std::string{}; + }); + } } Replace::~Replace() = default; diff --git a/src/gpl/test/mbff_orig_name.ok b/src/gpl/test/mbff_orig_name.ok index 14eae91edb7..361f7d978c3 100644 --- a/src/gpl/test/mbff_orig_name.ok +++ b/src/gpl/test/mbff_orig_name.ok @@ -5,7 +5,7 @@ [INFO ODB-0227] LEF file: ./4BitTrayH4/asap7sc7p5t_DFFHQNV4X.lef, created 9 library cells [INFO ODB-0394] Duplicate site asap7sc7p5t_pg in asap7sc7p5t_DFFHQNH2V2X already seen in asap7sc7p5t_DFFHQNV2X [INFO ODB-0227] LEF file: ./4BitTrayH2W2/asap7sc7p5t_DFFHQNH2V2X.lef, created 9 library cells -[WARNING ORD-0011] Hierarchical flow (-hier) is currently in development and may cause multiple issues. Do not use in production environments. +orig_name field registered at session init (pre-cluster_flops). [WARNING IFP-0028] Core area lower left (1.000, 1.000) snapped to (1.026, 1.080). [INFO IFP-0001] Added 29 rows of 147 site asap7sc7p5t. [INFO IFP-0100] Die BBox: ( 0.000 0.000 ) ( 10.000 10.000 ) um @@ -32,7 +32,46 @@ Path Type: max 0.00 0.00 clock network delay (ideal) 0.00 0.00 ^ input external delay 0.00 0.00 ^ d4 (in) - 0.00 0.00 ^ _tray_size4_7/D0 (DFFHQNV4Xx1_ASAP7_75t_L) bank1/ff_b/D + 0.00 0.00 ^ _tray_size4_7/D0 (DFFHQNV4Xx1_ASAP7_75t_L) ff4/D + 0.00 data arrival time + +1000.00 1000.00 clock clk (rise edge) + 0.00 1000.00 clock network delay (ideal) + 0.00 1000.00 clock reconvergence pessimism + 1000.00 ^ _tray_size4_7/CLK (DFFHQNV4Xx1_ASAP7_75t_L) + -22.99 977.01 library setup time + 977.01 data required time +--------------------------------------------------------------------------------------------- + 977.01 data required time + -0.00 data arrival time +--------------------------------------------------------------------------------------------- + 977.01 slack (MET) + + +=== Reload-from-db phase === +OpenROAD 26Q2-1224-gcc1e711b46 +Features included (+) or not (-): +GPU +GUI +Python : DEBUG +This program is licensed under the BSD-3 license. See the LICENSE file for details. +Components of this program may be licensed under more restrictive licenses which must be honored. +[INFO ODB-0227] LEF file: ./asap7/asap7_tech_1x_201209.lef, created 30 layers, 9 vias +[INFO ODB-0227] LEF file: ./SingleBit/asap7sc7p5t_28_L_1x_220121a.lef, created 212 library cells +[INFO ODB-0227] LEF file: ./2BitTrayH2/asap7sc7p5t_DFFHQNV2X.lef, created 9 library cells +[INFO ODB-0394] Duplicate site asap7sc7p5t_pg in asap7sc7p5t_DFFHQNV4X already seen in asap7sc7p5t_DFFHQNV2X +[INFO ODB-0227] LEF file: ./4BitTrayH4/asap7sc7p5t_DFFHQNV4X.lef, created 9 library cells +[INFO ODB-0394] Duplicate site asap7sc7p5t_pg in asap7sc7p5t_DFFHQNH2V2X already seen in asap7sc7p5t_DFFHQNV2X +[INFO ODB-0227] LEF file: ./4BitTrayH2W2/asap7sc7p5t_DFFHQNH2V2X.lef, created 9 library cells +Startpoint: d4 (input port clocked by clk) +Endpoint: _tray_size4_7 (rising edge-triggered flip-flop clocked by clk) +Path Group: clk +Path Type: max + + Delay Time Description Orig Name +--------------------------------------------------------------------------------------------- + 0.00 0.00 clock clk (rise edge) + 0.00 0.00 clock network delay (ideal) + 0.00 0.00 ^ input external delay + 0.00 0.00 ^ d4 (in) + 0.00 0.00 ^ _tray_size4_7/D0 (DFFHQNV4Xx1_ASAP7_75t_L) ff4/D 0.00 data arrival time 1000.00 1000.00 clock clk (rise edge) diff --git a/src/gpl/test/mbff_orig_name.tcl b/src/gpl/test/mbff_orig_name.tcl index 8037188fa62..ea25295e4c8 100644 --- a/src/gpl/test/mbff_orig_name.tcl +++ b/src/gpl/test/mbff_orig_name.tcl @@ -15,16 +15,25 @@ read_lef ./4BitTrayH2W2/asap7sc7p5t_DFFHQNH2V2X.lef read_lib ./4BitTrayH2W2/asap7sc7p5t_DFFHQNH2V2X_LVT_TT_nldm_FAKE.lib read_verilog ./$test_name.v -link_design -hier tray_test +link_design tray_test + +# Verify the "orig_name" report field is registered at session init +# (Replace ctor), not deferred until cluster_flops. Required so an +# already-clustered .odb loaded in a fresh session can still report +# the saved orig_name properties via report_checks. +if { [sta::find_report_path_field_abrev orig_name] == "" } { + utl::error GPL 330 "orig_name report_path field not registered at session init." +} +puts "orig_name field registered at session init (pre-cluster_flops)." initialize_floorplan -die_area "0 0 10 10" \ -core_area "1 1 9 9" \ -site asap7sc7p5t -place_inst -name bank0/ff_a -origin {6 6} -status PLACED -place_inst -name bank0/ff_b -origin {4 6} -status PLACED -place_inst -name bank1/ff_a -origin {4 4} -status PLACED -place_inst -name bank1/ff_b -origin {6 4} -status PLACED +place_inst -name ff1 -origin {6 6} -status PLACED +place_inst -name ff2 -origin {4 6} -status PLACED +place_inst -name ff3 -origin {4 4} -status PLACED +place_inst -name ff4 -origin {6 4} -status PLACED create_clock -name clk -period 1000 [get_ports clk1] set_input_delay -clock clk 0 [get_ports {d1 d2 d3 d4}] @@ -34,8 +43,42 @@ cluster_flops -tray_weight 40.0 \ -max_split_size -1 \ -num_paths 0 -# Report timing to verify original (hierarchical) FF pin names appear -# in the path report. After clustering the tray pin descriptions show -# the bankN/ff_x/D mapping in the Orig Name column. +# Report timing to verify original FF pin names appear in the path +# report. After clustering the tray pin descriptions show the ffN/D +# mapping in the Orig Name column. report_checks -path_delay max -fields {orig_name} \ -through [get_pins -of_objects [get_cells _tray_size4_*]] + +# Reload-from-db scenario: +# Persist the post-cluster_flops design, then spawn a fresh openroad +# that reads the .odb and runs report_checks WITHOUT invoking +# cluster_flops. Verifies that the "orig_name" report field is +# registered at session init (Replace ctor) and that the iterm +# properties persist across write_db / read_db so the saved mappings +# remain reportable. +set db_file [make_result_file $test_name.odb] +write_db $db_file + +set reload_tcl [make_result_file ${test_name}_reload.tcl] +set rf [open $reload_tcl w] +puts $rf [subst -nocommands { +read_lef ./asap7/asap7_tech_1x_201209.lef +read_lef ./SingleBit/asap7sc7p5t_28_L_1x_220121a.lef +read_lef ./2BitTrayH2/asap7sc7p5t_DFFHQNV2X.lef +read_lef ./4BitTrayH4/asap7sc7p5t_DFFHQNV4X.lef +read_lef ./4BitTrayH2W2/asap7sc7p5t_DFFHQNH2V2X.lef +read_lib ./SingleBit/asap7sc7p5t_SEQ_LVT_TT_nldm_220123.lib +read_lib ./2BitTrayH2/asap7sc7p5t_DFFHQNV2X_LVT_TT_nldm_FAKE.lib +read_lib ./4BitTrayH4/asap7sc7p5t_DFFHQNV4X_LVT_TT_nldm_FAKE.lib +read_lib ./4BitTrayH2W2/asap7sc7p5t_DFFHQNH2V2X_LVT_TT_nldm_FAKE.lib +read_db $db_file +create_clock -name clk -period 1000 [get_ports clk1] +set_input_delay -clock clk 0 [get_ports {d1 d2 d3 d4}] +report_checks -path_delay max -fields {orig_name} \ + -through [get_pins -of_objects [get_cells _tray_size4_*]] +}] +close $rf + +puts "=== Reload-from-db phase ===" +catch {exec [info nameofexecutable] -no_init -exit $reload_tcl 2>@1} reload_out +puts $reload_out diff --git a/src/gpl/test/mbff_orig_name.v b/src/gpl/test/mbff_orig_name.v index 10dbf2d0b84..a6cd448f7d8 100644 --- a/src/gpl/test/mbff_orig_name.v +++ b/src/gpl/test/mbff_orig_name.v @@ -1,12 +1,3 @@ -module bank (clk, d, qn); - input clk; - input [1:0] d; - output [1:0] qn; - - DFFHQNx1_ASAP7_75t_L ff_a (.CLK(clk), .D(d[0]), .QN(qn[0])); - DFFHQNx1_ASAP7_75t_L ff_b (.CLK(clk), .D(d[1]), .QN(qn[1])); -endmodule - module tray_test (clk1, d1, d2, d3, d4, o1, o2, o3, o4); input clk1; input d1; @@ -18,6 +9,8 @@ module tray_test (clk1, d1, d2, d3, d4, o1, o2, o3, o4); output o3; output o4; - bank bank0 (.clk(clk1), .d({d2, d1}), .qn({o2, o1})); - bank bank1 (.clk(clk1), .d({d4, d3}), .qn({o4, o3})); + DFFHQNx1_ASAP7_75t_L ff1 (.CLK(clk1), .D(d1), .QN(o1)); + DFFHQNx1_ASAP7_75t_L ff2 (.CLK(clk1), .D(d2), .QN(o2)); + DFFHQNx1_ASAP7_75t_L ff3 (.CLK(clk1), .D(d3), .QN(o3)); + DFFHQNx1_ASAP7_75t_L ff4 (.CLK(clk1), .D(d4), .QN(o4)); endmodule From 2f9fdb676fd5483f41e238f51428101e2e45005d Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Fri, 15 May 2026 18:46:58 +0000 Subject: [PATCH 08/11] tclfmt Signed-off-by: dsengupta0628 --- src/gpl/test/mbff_orig_name.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gpl/test/mbff_orig_name.tcl b/src/gpl/test/mbff_orig_name.tcl index ea25295e4c8..62ad5bb6195 100644 --- a/src/gpl/test/mbff_orig_name.tcl +++ b/src/gpl/test/mbff_orig_name.tcl @@ -80,5 +80,5 @@ report_checks -path_delay max -fields {orig_name} \ close $rf puts "=== Reload-from-db phase ===" -catch {exec [info nameofexecutable] -no_init -exit $reload_tcl 2>@1} reload_out +catch {exec [info nameofexecutable] -no_init -exit $reload_tcl 2>@1 } reload_out puts $reload_out From 43286b9ccb309bb9470468d6f2edf6e7916c083f Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Fri, 15 May 2026 19:10:41 +0000 Subject: [PATCH 09/11] regression Signed-off-by: dsengupta0628 --- src/gpl/test/mbff_orig_name.ok | 39 --------------------------------- src/gpl/test/mbff_orig_name.tcl | 33 ---------------------------- 2 files changed, 72 deletions(-) diff --git a/src/gpl/test/mbff_orig_name.ok b/src/gpl/test/mbff_orig_name.ok index 361f7d978c3..0b551bca833 100644 --- a/src/gpl/test/mbff_orig_name.ok +++ b/src/gpl/test/mbff_orig_name.ok @@ -48,42 +48,3 @@ Path Type: max 977.01 slack (MET) -=== Reload-from-db phase === -OpenROAD 26Q2-1224-gcc1e711b46 -Features included (+) or not (-): +GPU +GUI +Python : DEBUG -This program is licensed under the BSD-3 license. See the LICENSE file for details. -Components of this program may be licensed under more restrictive licenses which must be honored. -[INFO ODB-0227] LEF file: ./asap7/asap7_tech_1x_201209.lef, created 30 layers, 9 vias -[INFO ODB-0227] LEF file: ./SingleBit/asap7sc7p5t_28_L_1x_220121a.lef, created 212 library cells -[INFO ODB-0227] LEF file: ./2BitTrayH2/asap7sc7p5t_DFFHQNV2X.lef, created 9 library cells -[INFO ODB-0394] Duplicate site asap7sc7p5t_pg in asap7sc7p5t_DFFHQNV4X already seen in asap7sc7p5t_DFFHQNV2X -[INFO ODB-0227] LEF file: ./4BitTrayH4/asap7sc7p5t_DFFHQNV4X.lef, created 9 library cells -[INFO ODB-0394] Duplicate site asap7sc7p5t_pg in asap7sc7p5t_DFFHQNH2V2X already seen in asap7sc7p5t_DFFHQNV2X -[INFO ODB-0227] LEF file: ./4BitTrayH2W2/asap7sc7p5t_DFFHQNH2V2X.lef, created 9 library cells -Startpoint: d4 (input port clocked by clk) -Endpoint: _tray_size4_7 (rising edge-triggered flip-flop clocked by clk) -Path Group: clk -Path Type: max - - Delay Time Description Orig Name ---------------------------------------------------------------------------------------------- - 0.00 0.00 clock clk (rise edge) - 0.00 0.00 clock network delay (ideal) - 0.00 0.00 ^ input external delay - 0.00 0.00 ^ d4 (in) - 0.00 0.00 ^ _tray_size4_7/D0 (DFFHQNV4Xx1_ASAP7_75t_L) ff4/D - 0.00 data arrival time - -1000.00 1000.00 clock clk (rise edge) - 0.00 1000.00 clock network delay (ideal) - 0.00 1000.00 clock reconvergence pessimism - 1000.00 ^ _tray_size4_7/CLK (DFFHQNV4Xx1_ASAP7_75t_L) - -22.99 977.01 library setup time - 977.01 data required time ---------------------------------------------------------------------------------------------- - 977.01 data required time - -0.00 data arrival time ---------------------------------------------------------------------------------------------- - 977.01 slack (MET) - - diff --git a/src/gpl/test/mbff_orig_name.tcl b/src/gpl/test/mbff_orig_name.tcl index 62ad5bb6195..7d0d017afef 100644 --- a/src/gpl/test/mbff_orig_name.tcl +++ b/src/gpl/test/mbff_orig_name.tcl @@ -49,36 +49,3 @@ cluster_flops -tray_weight 40.0 \ report_checks -path_delay max -fields {orig_name} \ -through [get_pins -of_objects [get_cells _tray_size4_*]] -# Reload-from-db scenario: -# Persist the post-cluster_flops design, then spawn a fresh openroad -# that reads the .odb and runs report_checks WITHOUT invoking -# cluster_flops. Verifies that the "orig_name" report field is -# registered at session init (Replace ctor) and that the iterm -# properties persist across write_db / read_db so the saved mappings -# remain reportable. -set db_file [make_result_file $test_name.odb] -write_db $db_file - -set reload_tcl [make_result_file ${test_name}_reload.tcl] -set rf [open $reload_tcl w] -puts $rf [subst -nocommands { -read_lef ./asap7/asap7_tech_1x_201209.lef -read_lef ./SingleBit/asap7sc7p5t_28_L_1x_220121a.lef -read_lef ./2BitTrayH2/asap7sc7p5t_DFFHQNV2X.lef -read_lef ./4BitTrayH4/asap7sc7p5t_DFFHQNV4X.lef -read_lef ./4BitTrayH2W2/asap7sc7p5t_DFFHQNH2V2X.lef -read_lib ./SingleBit/asap7sc7p5t_SEQ_LVT_TT_nldm_220123.lib -read_lib ./2BitTrayH2/asap7sc7p5t_DFFHQNV2X_LVT_TT_nldm_FAKE.lib -read_lib ./4BitTrayH4/asap7sc7p5t_DFFHQNV4X_LVT_TT_nldm_FAKE.lib -read_lib ./4BitTrayH2W2/asap7sc7p5t_DFFHQNH2V2X_LVT_TT_nldm_FAKE.lib -read_db $db_file -create_clock -name clk -period 1000 [get_ports clk1] -set_input_delay -clock clk 0 [get_ports {d1 d2 d3 d4}] -report_checks -path_delay max -fields {orig_name} \ - -through [get_pins -of_objects [get_cells _tray_size4_*]] -}] -close $rf - -puts "=== Reload-from-db phase ===" -catch {exec [info nameofexecutable] -no_init -exit $reload_tcl 2>@1 } reload_out -puts $reload_out From 6b36f7c16ce01f109518e8edb8f2cd13e3e780d9 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Fri, 15 May 2026 19:13:07 +0000 Subject: [PATCH 10/11] regression tclfmt Signed-off-by: dsengupta0628 --- src/gpl/test/mbff_orig_name.tcl | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gpl/test/mbff_orig_name.tcl b/src/gpl/test/mbff_orig_name.tcl index 7d0d017afef..42aa733d27e 100644 --- a/src/gpl/test/mbff_orig_name.tcl +++ b/src/gpl/test/mbff_orig_name.tcl @@ -48,4 +48,3 @@ cluster_flops -tray_weight 40.0 \ # mapping in the Orig Name column. report_checks -path_delay max -fields {orig_name} \ -through [get_pins -of_objects [get_cells _tray_size4_*]] - From 437521a92a4d37f1717ac70674a23be60f346b9b Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Fri, 15 May 2026 20:07:25 +0000 Subject: [PATCH 11/11] clang tidy comment Signed-off-by: dsengupta0628 --- src/gpl/src/replace.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gpl/src/replace.cpp b/src/gpl/src/replace.cpp index 81f45632858..c30d115edec 100644 --- a/src/gpl/src/replace.cpp +++ b/src/gpl/src/replace.cpp @@ -25,6 +25,7 @@ #include "sta/Graph.hh" #include "sta/Path.hh" #include "sta/StaMain.hh" +#include "sta/StaState.hh" #include "timingBase.h" #include "utl/Logger.h" #include "utl/validation.h"