changes to show original name of pins in path report for mbff clustered flops

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
This commit is contained in:
dsengupta0628 2026-04-08 15:39:18 +00:00
parent 12bbfed551
commit 37520c08d2
9 changed files with 73 additions and 38 deletions

View File

@ -992,7 +992,8 @@ public:
bool report_slew,
bool report_fanout,
bool report_variation,
bool report_src_attr);
bool report_src_attr,
bool report_orig_name);
ReportField *findReportPathField(std::string_view name);
void setReportPathDigits(int digits);
void setReportPathNoSplit(bool no_split);

View File

@ -133,7 +133,7 @@ ReportPath::ReportPath(StaState *sta) :
{
makeFields();
setDigits(2);
setReportFields(false, false, false, false, false, false, false, false);
setReportFields(false, false, false, false, false, false, false, false, false);
}
ReportPath::~ReportPath()
@ -146,6 +146,7 @@ ReportPath::~ReportPath()
delete field_fanout_;
delete field_variation_;
delete field_src_attr_;
delete field_orig_name_;
delete field_edge_;
delete field_case_;
}
@ -171,6 +172,8 @@ ReportPath::makeFields()
true, nullptr, true);
field_src_attr_ = makeField("src_attr", "Src Attr", 40,
true, nullptr, true);
field_orig_name_ = makeField("orig_name", "Orig Name", 36,
true, nullptr, false);
}
ReportField *
@ -231,7 +234,8 @@ ReportPath::setReportFields(bool report_input_pin,
bool report_slew,
bool report_fanout,
bool report_variation,
bool report_src_attr)
bool report_src_attr,
bool report_orig_name)
{
report_input_pin_ = report_input_pin;
report_hier_pins_ = report_hier_pins;
@ -242,6 +246,7 @@ ReportPath::setReportFields(bool report_input_pin,
field_fanout_->setEnabled(report_fanout);
field_variation_->setEnabled(report_variation);
field_src_attr_->setEnabled(report_src_attr);
field_orig_name_->setEnabled(report_orig_name);
// for debug
field_case_->setEnabled(false);
}
@ -2457,11 +2462,16 @@ ReportPath::reportPathLine(const Path *path,
std::string src_attr;
if (inst)
src_attr = network_->getAttribute(inst, "src");
std::string orig_name;
if (inst && field_orig_name_->enabled()) {
std::string port_name = network_->portName(pin);
orig_name = network_->getAttribute(inst, "orig_name_" + port_name);
}
// Don't show capacitance field for input pins.
if (is_driver && field_capacitance_->enabled())
cap = graph_delay_calc_->loadCap(pin, rf, scene, min_max);
reportLine(what, cap, slew, field_blank_, incr, field_blank_,
time, false, early_late, rf, src_attr, line_case);
time, false, early_late, rf, src_attr, orig_name, line_case);
}
void
@ -2739,6 +2749,11 @@ ReportPath::reportPath6(const Path *path,
std::string src_attr;
if (inst)
src_attr = network_->getAttribute(inst, "src");
std::string orig_name;
if (inst && field_orig_name_->enabled()) {
std::string port_name = network_->portName(pin);
orig_name = network_->getAttribute(inst, "orig_name_" + port_name);
}
// Always show the search start point (register clk pin).
// Skip reporting the clk tree unless it is requested.
if (is_clk_start
@ -2831,13 +2846,13 @@ ReportPath::reportPath6(const Path *path,
const std::string what = descriptionField(vertex);
reportLine(what, cap, slew, fanout,
incr, field_blank_, time, false, min_max, rf, src_attr,
line_case);
orig_name, line_case);
if (report_net_) {
const std::string what2 = descriptionNet(pin);
reportLine(what2, field_blank_, field_blank_, field_blank_,
field_blank_, field_blank_, field_blank_, false, min_max,
nullptr, src_attr, "");
nullptr, src_attr, "", "");
}
prev_time = time;
}
@ -2850,7 +2865,7 @@ ReportPath::reportPath6(const Path *path,
const std::string what = descriptionField(vertex);
reportLine(what, field_blank_, slew, field_blank_,
incr, field_blank_, time, false, min_max, rf, src_attr,
line_case);
orig_name, line_case);
prev_time = time;
}
}
@ -2875,27 +2890,27 @@ ReportPath::reportVariation(const Path *path) const
float std_dev = arc_delay.stdDev();
reportLine("sigma", field_blank_, field_blank_, field_blank_,
field_blank_, std_dev, field_blank_, true, min_max,
nullptr, "", "");
nullptr, "", "", "");
break;
}
case PocvMode::skew_normal: {
float mean = arc_delay.mean();
reportLine("mean", field_blank_, field_blank_, field_blank_,
field_blank_, mean, field_blank_, true, min_max,
nullptr, "", "");
nullptr, "", "", "");
float mean_shift = arc_delay.meanShift();
reportLine("mean_shift", field_blank_, field_blank_, field_blank_,
field_blank_, mean_shift, field_blank_, true, min_max,
nullptr, "", "");
nullptr, "", "", "");
float std_dev = arc_delay.stdDev();
reportLine("std_dev", field_blank_, field_blank_, field_blank_,
field_blank_, std_dev, field_blank_, true, min_max,
nullptr, "", "");
nullptr, "", "", "");
// skewness is dimensionless, so scale it to the field's time units.
float skewness = arc_delay.skewness() * units_->timeUnit()->scale();
reportLine("skewness", field_blank_, field_blank_, field_blank_,
field_blank_, skewness, field_blank_, true, min_max,
nullptr, "", "");
nullptr, "", "", "");
break;
}
default:
@ -2923,7 +2938,7 @@ ReportPath::reportHierPinsThru(const Path *path) const
const std::string what = descriptionField(hpin);
reportLine(what, field_blank_, field_blank_, field_blank_,
field_blank_, field_blank_, field_blank_, false, path->minMax(this),
nullptr, "", "");
nullptr, "", "", "");
}
}
}
@ -3116,7 +3131,7 @@ ReportPath::reportLine(std::string_view what,
const EarlyLate *early_late) const
{
reportLine(what, field_blank_, field_blank_, field_blank_, field_blank_,
field_blank_, total, false, early_late, nullptr, "", "");
field_blank_, total, false, early_late, nullptr, "", "", "");
}
// Report negative total.
@ -3127,7 +3142,7 @@ ReportPath::reportLineNegative(std::string_view what,
{
reportLine(what, field_blank_, field_blank_, field_blank_,
field_blank_, field_blank_, total, true /* tota_with_minus */,
early_late, nullptr, "", "");
early_late, nullptr, "", "", "");
}
// Report total, and transition suffix.
@ -3138,7 +3153,7 @@ ReportPath::reportLine(std::string_view what,
const RiseFall *rf) const
{
reportLine(what, field_blank_, field_blank_, field_blank_,
field_blank_, field_blank_, total, false, early_late, rf, "", "");
field_blank_, field_blank_, total, false, early_late, rf, "", "", "");
}
// Report increment, and total.
@ -3149,7 +3164,7 @@ ReportPath::reportLine(std::string_view what,
const EarlyLate *early_late) const
{
reportLine(what, field_blank_, field_blank_, field_blank_,
incr, field_blank_, total, false, early_late, nullptr, "", "");
incr, field_blank_, total, false, early_late, nullptr, "", "", "");
}
// Report increment, total, and transition suffix.
@ -3161,7 +3176,7 @@ ReportPath::reportLine(std::string_view what,
const RiseFall *rf) const
{
reportLine(what, field_blank_, field_blank_, field_blank_,
incr, field_blank_, total, false, early_late, rf, "", "");
incr, field_blank_, total, false, early_late, rf, "", "", "");
}
// Report slew, increment, and total.
@ -3173,7 +3188,7 @@ ReportPath::reportLine(std::string_view what,
const EarlyLate *early_late) const
{
reportLine(what, field_blank_, slew, field_blank_,
incr, field_blank_, total, false, early_late, nullptr, "", "");
incr, field_blank_, total, false, early_late, nullptr, "", "", "");
}
void
@ -3188,6 +3203,7 @@ ReportPath::reportLine(std::string_view what,
const EarlyLate *early_late,
const RiseFall *rf,
std::string_view src_attr,
std::string_view orig_name,
std::string_view line_case) const
{
std::string line;
@ -3195,7 +3211,7 @@ ReportPath::reportLine(std::string_view what,
bool first_field = true;
for (const ReportField *field : fields_) {
bool last_field = field_index == (fields_.size() - 1);
if (field->enabled()) {
if (!first_field)
line += ' ';
@ -3238,6 +3254,12 @@ ReportPath::reportLine(std::string_view what,
else
reportFieldBlank(field, line);
}
else if (field == field_orig_name_) {
if (orig_name != "")
reportField(orig_name, field, line);
else
reportFieldBlank(field, line);
}
else if (field == field_case_)
line += line_case;

View File

@ -58,7 +58,8 @@ public:
bool report_slew,
bool report_fanout,
bool report_variation,
bool report_src_attr);
bool report_src_attr,
bool report_orig_name);
int digits() const { return digits_; }
void setDigits(int digits);
void setNoSplit(bool no_split);
@ -159,6 +160,7 @@ public:
ReportField *fieldFanout() const { return field_fanout_; }
ReportField *fieldCapacitance() const { return field_capacitance_; }
ReportField *fieldSrcAttr() const { return field_src_attr_; }
ReportField *fieldOrigName() const { return field_orig_name_; }
protected:
void makeFields();
@ -370,6 +372,7 @@ protected:
const EarlyLate *early_late,
const RiseFall *rf,
std::string_view src_attr,
std::string_view orig_name,
std::string_view line_case) const;
void reportLineTotal(std::string_view what,
const Delay &incr,
@ -490,6 +493,7 @@ protected:
ReportField *field_fanout_;
ReportField *field_variation_;
ReportField *field_src_attr_;
ReportField *field_orig_name_;
ReportField *field_edge_;
ReportField *field_case_;

View File

@ -415,7 +415,8 @@ set_report_path_fields(bool report_input_pin,
bool report_slew,
bool report_fanout,
bool report_variation,
bool report_src_attr)
bool report_src_attr,
bool report_orig_name)
{
Sta::sta()->setReportPathFields(report_input_pin,
report_hier_pins,
@ -424,7 +425,8 @@ set_report_path_fields(bool report_input_pin,
report_slew,
report_fanout,
report_variation,
report_src_attr);
report_src_attr,
report_orig_name);
}
void

View File

@ -336,7 +336,7 @@ define_cmd_args "report_checks" \
[-sort_by_slack]\
[-path_group group_name]\
[-format full|full_clock|full_clock_expanded|short|end|slack_only|summary|json]\
[-fields capacitance|slew|fanout|input_pin|net|src_attr]\
[-fields capacitance|slew|fanout|input_pin|net|src_attr|orig_name]\
[-digits digits]\
[-no_line_splits]\
[> filename] [>> filename]}
@ -722,6 +722,7 @@ proc parse_report_path_options { cmd args_var default_format
set report_fanout 0
set report_variation 0
set report_src_attr 0
set report_orig_name 0
if { [info exists path_options(-fields)] } {
foreach field $path_options(-fields) {
if { [string match "input*" $field] } {
@ -740,6 +741,8 @@ proc parse_report_path_options { cmd args_var default_format
set report_variation 1
} elseif { [string match "src*" $field] } {
set report_src_attr 1
} elseif { [string match "orig*" $field] } {
set report_orig_name 1
} else {
sta_warn 168 "unknown field $field."
}
@ -747,7 +750,8 @@ proc parse_report_path_options { cmd args_var default_format
}
set_report_path_fields $report_input_pin $report_hier_pins $report_net \
$report_cap $report_slew $report_fanout $report_variation $report_src_attr
$report_cap $report_slew $report_fanout $report_variation $report_src_attr \
$report_orig_name
set_report_path_no_split [info exists path_options(-no_line_splits)]
}

View File

@ -2769,11 +2769,13 @@ Sta::setReportPathFields(bool report_input_pin,
bool report_slew,
bool report_fanout,
bool report_variation,
bool report_src_attr)
bool report_src_attr,
bool report_orig_name)
{
report_path_->setReportFields(report_input_pin, report_hier_pins, report_net,
report_cap, report_slew, report_fanout,
report_variation, report_src_attr);
report_variation, report_src_attr,
report_orig_name);
}
ReportField *

View File

@ -1874,7 +1874,7 @@ TEST_F(StaDesignTest, SearchReportClkInfos) {
TEST_F(StaDesignTest, SetReportPathFields) {
ASSERT_NO_THROW(( [&](){
sta_->setReportPathFields(true, true, true, true, true, true, true, true);
sta_->setReportPathFields(true, true, true, true, true, true, true, true, true);
}() ));
}
@ -3625,7 +3625,7 @@ TEST_F(StaDesignTest, ReportPathFieldOrder) {
TEST_F(StaDesignTest, ReportPathFields) {
ASSERT_NO_THROW(( [&](){
sta_->setReportPathFields(true, true, true, true, true, true, true, true);
sta_->setReportPathFields(true, true, true, true, true, true, true, true, true);
}() ));
}

View File

@ -433,13 +433,13 @@ TEST_F(StaInitTest, SetReportPathFields) {
ASSERT_NE(fanout_field, nullptr);
ASSERT_NE(src_attr_field, nullptr);
sta_->setReportPathFields(true, true, true, true, true, true, true, true);
sta_->setReportPathFields(true, true, true, true, true, true, true, true, true);
EXPECT_TRUE(cap_field->enabled());
EXPECT_TRUE(slew_field->enabled());
EXPECT_TRUE(fanout_field->enabled());
EXPECT_TRUE(src_attr_field->enabled());
sta_->setReportPathFields(false, false, false, false, false, false, false, false);
sta_->setReportPathFields(false, false, false, false, false, false, false, false, false);
EXPECT_FALSE(cap_field->enabled());
EXPECT_FALSE(slew_field->enabled());
EXPECT_FALSE(fanout_field->enabled());
@ -1613,8 +1613,8 @@ TEST_F(StaInitTest, ReportPathNoSplit) {
TEST_F(StaInitTest, ReportPathSetReportFields) {
ReportPath *rpt = sta_->reportPath();
rpt->setReportFields(true, true, true, true, true, true, true, true);
rpt->setReportFields(false, false, false, false, false, false, false, false);
rpt->setReportFields(true, true, true, true, true, true, true, true, true);
rpt->setReportFields(false, false, false, false, false, false, false, false, false);
}

View File

@ -224,7 +224,7 @@ TEST_F(StaInitTest, StaReportPathEndFooter2) {
TEST_F(StaInitTest, StaSetReportPathFields) {
ASSERT_NO_THROW(( [&](){
sta_->setReportPathFields(true, true, true, true, true, true, true, true);
sta_->setReportPathFields(true, true, true, true, true, true, true, true, true);
}() ));
}
@ -1724,8 +1724,8 @@ TEST_F(StaInitTest, SearchClassConstants2) {
TEST_F(StaInitTest, ReportPathSetReportFields2) {
ASSERT_NO_THROW(( [&](){
ReportPath *rpt = sta_->reportPath();
rpt->setReportFields(true, true, true, true, true, true, true, true);
rpt->setReportFields(false, false, false, false, false, false, false, false);
rpt->setReportFields(true, true, true, true, true, true, true, true, true);
rpt->setReportFields(false, false, false, false, false, false, false, false, false);
}() ));
}
@ -1909,8 +1909,8 @@ TEST_F(StaInitTest, ReportPathSetReportFieldsPublic) {
ASSERT_NO_THROW(( [&](){
ReportPath *rpt = sta_->reportPath();
// Call setReportFields with various combinations
rpt->setReportFields(true, false, false, false, true, false, false, false);
rpt->setReportFields(true, true, true, true, true, true, true, true);
rpt->setReportFields(true, false, false, false, true, false, false, false, false);
rpt->setReportFields(true, true, true, true, true, true, true, true, true);
expectStaCoreState(sta_);
}() ));
}