report -max_fanout

This commit is contained in:
James Cherry 2020-06-02 15:19:09 -07:00
parent 4c74fcfb65
commit 1560a77ba5
6 changed files with 82 additions and 65 deletions

View File

@ -166,13 +166,15 @@ CheckFanoutLimits::fanout(const Pin *pin) const
float fanout = 0;
const Network *network = sta_->network();
Net *net = network->net(pin);
NetPinIterator *pin_iter = network->pinIterator(net);
while (pin_iter->hasNext()) {
Pin *pin = pin_iter->next();
if (network->isLoad(pin))
fanout++;
if (net) {
NetPinIterator *pin_iter = network->pinIterator(net);
while (pin_iter->hasNext()) {
Pin *pin = pin_iter->next();
if (network->isLoad(pin))
fanout++;
}
delete pin_iter;
}
delete pin_iter;
return fanout;
}

View File

@ -143,7 +143,7 @@ ReportPath::~ReportPath()
void
ReportPath::makeFields()
{
field_fanout_ = makeField("fanout", "Fanout", 5, false, nullptr, true);
field_fanout_ = makeField("fanout", "Fanout", 6, false, nullptr, true);
field_capacitance_ = makeField("capacitance", "Cap", 6, false,
units_->capacitanceUnit(), true);
field_slew_ = makeField("slew", "Slew", 6, false, units_->timeUnit(),
@ -1549,43 +1549,43 @@ ReportPath::reportSkewClkPath(const char *arrival_msg,
////////////////////////////////////////////////////////////////
void
ReportPath::reportLimitShortHeader(const char *what)
ReportPath::reportLimitShortHeader(const ReportField *field)
{
string result;
reportLimitShortHeader(what, result);
reportLimitShortHeader(field, result);
report_->print(result);
}
void
ReportPath::reportLimitShortHeader(const char *what,
ReportPath::reportLimitShortHeader(const ReportField *field,
string &result)
{
reportDescription("Pin", result);
result += ' ';
reportField("Limit", field_slew_, result);
reportField("Limit", field, result);
result += ' ';
reportField(what, field_slew_, result);
reportField(field->title(), field, result);
result += ' ';
reportField("Slack", field_slew_, result);
reportField("Slack", field, result);
reportEndOfLine(result);
reportDashLine(field_description_->width() + field_slew_->width() * 3 + 3,
reportDashLine(field_description_->width() + field->width() * 3 + 3,
result);
}
void
ReportPath::reportLimitShort(const char *what,
ReportPath::reportLimitShort(const ReportField *field,
Pin *pin,
float value,
float limit,
float slack)
{
string result;
reportLimitShort(what, pin, value, limit, slack, result);
reportLimitShort(field, pin, value, limit, slack, result);
report_->print(result);
}
void
ReportPath::reportLimitShort(const char *what,
ReportPath::reportLimitShort(const ReportField *field,
Pin *pin,
float value,
float limit,
@ -1594,13 +1594,16 @@ ReportPath::reportLimitShort(const char *what,
{
const char *pin_name = cmd_network_->pathName(pin);
reportDescription(pin_name, result);
reportSpaceFieldTime(limit, result);
reportSpaceFieldDelay(value, EarlyLate::late(), result);
reportSpaceSlack(slack, result);
result += ' ';
reportField(limit, field, result);
result += ' ';
reportField(value, field, result);
result += ' ';
reportField(slack, field, result);
}
void
ReportPath::reportLimitVerbose(const char *what,
ReportPath::reportLimitVerbose(const ReportField *field,
Pin *pin,
const RiseFall *rf,
float value,
@ -1609,12 +1612,12 @@ ReportPath::reportLimitVerbose(const char *what,
const MinMax *min_max)
{
string result;
reportLimitVerbose(what, pin, rf, value, limit, slack, min_max, result);
reportLimitVerbose(field, pin, rf, value, limit, slack, min_max, result);
report_->print(result);
}
void
ReportPath::reportLimitVerbose(const char *what,
ReportPath::reportLimitVerbose(const ReportField *field,
Pin *pin,
const RiseFall *rf,
float value,
@ -1629,25 +1632,24 @@ ReportPath::reportLimitVerbose(const char *what,
if (rf)
result += rf->shortName();
else
result += " ";
result += ' ';
reportEndOfLine(result);
result += min_max->asString();
result += " ";
result += what;
result += " ";
reportSpaceFieldTime(limit, result);
result += ' ';
result += field->name();
result += ' ';
reportField(limit, field, result);
reportEndOfLine(result);
result += what;
result += " ";
reportField(value, field_slew_, result);
result += field->name();
result += " ";
reportField(value, field, result);
reportEndOfLine(result);
reportDashLine(strlen(field->name()) + field->width() + 5, result);
reportDashLine(strlen(what) + field_slew_->width() + 6, result);
result += "Slack ";
reportSpaceSlack(slack, result);
result += "Slack ";
reportField(slack, field, result);
}
////////////////////////////////////////////////////////////////
@ -3221,20 +3223,24 @@ ReportPath::reportFieldDelay(Delay value,
void
ReportPath::reportField(float value,
ReportField *field,
const ReportField *field,
string &result)
{
if (value == field_blank_)
reportFieldBlank(field, result);
else {
const char *value_str = field->unit()->asString(value, digits_);
Unit *unit = field->unit();
const char *value_str = (unit)
? unit->asString(value, digits_)
// fanout
: stringPrintTmp("%.0f", value);
reportField(value_str, field, result);
}
}
void
ReportPath::reportField(const char *value,
ReportField *field,
const ReportField *field,
string &result)
{
if (field->leftJustify())
@ -3246,7 +3252,7 @@ ReportPath::reportField(const char *value,
}
void
ReportPath::reportFieldBlank(ReportField *field,
ReportPath::reportFieldBlank(const ReportField *field,
string &result)
{
result += field->blank();

View File

@ -137,28 +137,28 @@ public:
void reportVerbose(MaxSkewCheck *check,
string &result);
void reportLimitShortHeader(const char *what);
void reportLimitShortHeader(const char *what,
void reportLimitShortHeader(const ReportField *field);
void reportLimitShortHeader(const ReportField *field,
string &result);
void reportLimitShort(const char *what,
void reportLimitShort(const ReportField *field,
Pin *pin,
float value,
float limit,
float slack);
void reportLimitShort(const char *what,
void reportLimitShort(const ReportField *field,
Pin *pin,
float value,
float limit,
float slack,
string &result);
void reportLimitVerbose(const char *what,
void reportLimitVerbose(const ReportField *field,
Pin *pin,
const RiseFall *rf,
float value,
float limit,
float slack,
const MinMax *min_max);
void reportLimitVerbose(const char *what,
void reportLimitVerbose(const ReportField *field,
Pin *pin,
const RiseFall *rf,
float value,
@ -166,6 +166,9 @@ public:
float slack,
const MinMax *min_max,
string &result);
ReportField *fieldSlew() const { return field_slew_; }
ReportField *fieldFanout() const { return field_fanout_; }
ReportField *fieldCapacitance() const { return field_capacitance_; }
protected:
void makeFields();
@ -454,12 +457,12 @@ protected:
ReportField *field,
string &result);
void reportField(float value,
ReportField *field,
const ReportField *field,
string &result);
void reportField(const char *value,
ReportField *field,
const ReportField *field,
string &result);
void reportFieldBlank(ReportField *field,
void reportFieldBlank(const ReportField *field,
string &result);
void reportDashLine(string &result);
void reportDashLine(int line_width,
@ -568,7 +571,7 @@ public:
void setWidth(int width);
bool leftJustify() const { return left_justify_; }
Unit *unit() const { return unit_; }
const char *blank() { return blank_; }
const char *blank() const { return blank_; }
void setEnabled(bool enabled);
bool enabled() const { return enabled_; }

View File

@ -4858,7 +4858,7 @@ Sta::pinSlewLimitViolations(const Corner *corner,
void
Sta::reportSlewLimitShortHeader()
{
report_path_->reportLimitShortHeader("Slew");
report_path_->reportLimitShortHeader(report_path_->fieldSlew());
}
void
@ -4872,7 +4872,8 @@ Sta::reportSlewLimitShort(Pin *pin,
float limit, slack;
check_slew_limits_->checkSlews(pin, corner, min_max,
corner1, rf, slew, limit, slack);
report_path_->reportLimitShort("slew", pin, delayAsFloat(slew), limit, slack);
report_path_->reportLimitShort(report_path_->fieldSlew(), pin,
delayAsFloat(slew), limit, slack);
}
void
@ -4886,7 +4887,8 @@ Sta::reportSlewLimitVerbose(Pin *pin,
float limit, slack;
check_slew_limits_->checkSlews(pin, corner, min_max,
corner1, rf, slew, limit, slack);
report_path_->reportLimitVerbose("slew", pin, rf, delayAsFloat(slew),
report_path_->reportLimitVerbose(report_path_->fieldSlew(), pin, rf,
delayAsFloat(slew),
limit, slack, min_max);
}
@ -4933,7 +4935,7 @@ Sta::pinFanoutLimitViolations(const MinMax *min_max)
void
Sta::reportFanoutLimitShortHeader()
{
report_path_->reportLimitShortHeader("Fanout");
report_path_->reportLimitShortHeader(report_path_->fieldFanout());
}
void
@ -4943,7 +4945,8 @@ Sta::reportFanoutLimitShort(Pin *pin,
float fanout, limit, slack;
check_fanout_limits_->checkFanout(pin, min_max,
fanout, limit, slack);
report_path_->reportLimitShort("fanout", pin, fanout, limit, slack);
report_path_->reportLimitShort(report_path_->fieldFanout(),
pin, fanout, limit, slack);
}
void
@ -4953,7 +4956,8 @@ Sta::reportFanoutLimitVerbose(Pin *pin,
float fanout, limit, slack;
check_fanout_limits_->checkFanout(pin, min_max,
fanout, limit, slack);
report_path_->reportLimitVerbose("fanout", pin, nullptr, fanout,
report_path_->reportLimitVerbose(report_path_->fieldFanout(),
pin, nullptr, fanout,
limit, slack, min_max);
}
@ -4999,7 +5003,7 @@ Sta::pinCapacitanceLimitViolations(const Corner *corner,
void
Sta::reportCapacitanceLimitShortHeader()
{
report_path_->reportLimitShortHeader("Capacitance");
report_path_->reportLimitShortHeader(report_path_->fieldCapacitance());
}
void
@ -5013,7 +5017,8 @@ Sta::reportCapacitanceLimitShort(Pin *pin,
check_capacitance_limits_->checkCapacitance(pin, corner, min_max,
corner1, rf, capacitance,
limit, slack);
report_path_->reportLimitShort("capacitance", pin, capacitance, limit, slack);
report_path_->reportLimitShort(report_path_->fieldCapacitance(),
pin, capacitance, limit, slack);
}
void
@ -5027,8 +5032,9 @@ Sta::reportCapacitanceLimitVerbose(Pin *pin,
check_capacitance_limits_->checkCapacitance(pin, corner, min_max,
corner1, rf, capacitance,
limit, slack);
report_path_->reportLimitVerbose("capacitance", pin, rf,
capacitance, limit, slack, min_max);
report_path_->reportLimitVerbose(report_path_->fieldCapacitance(),
pin, rf, capacitance,
limit, slack, min_max);
}
void

View File

@ -247,7 +247,7 @@ proc parse_report_path_options { cmd args_var default_format
set path_options(num_fmt) "%.${digits}f"
set_report_path_digits $digits
# Numberic field width expands with digits.
# Numeric field width expands with digits.
set field_width [expr $digits + $report_path_field_width_extra]
if { $report_sigmas } {
set delay_field_width [expr $field_width * 3 + $report_path_field_width_extra]
@ -257,7 +257,7 @@ proc parse_report_path_options { cmd args_var default_format
foreach field {total incr} {
set_report_path_field_width $field $delay_field_width
}
foreach field {capacitance slew} {
foreach field {capacitance slew fanout} {
set_report_path_field_width $field $field_width
}

View File

@ -389,8 +389,8 @@ proc_redirect report_check_types {
set min_pulse_width 1
set min_period 1
set max_skew 1
set max_fanout 1
set max_capacitance 1
set max_fanout 0
set max_capacitance 0
} else {
parse_key_args "report_check_types" args keys {} \
flags {-max_delay -min_delay -recovery -removal \
@ -476,10 +476,10 @@ proc_redirect report_check_types {
report_slew_limits $corner "min" $violators $verbose $nosplit
}
if { $max_fanout } {
# report_fanout_limits "max" $violators $verbose $nosplit
report_fanout_limits "max" $violators $verbose $nosplit
}
if { $min_fanout } {
# report_fanout_limits "min" $violators $verbose $nosplit
report_fanout_limits "min" $violators $verbose $nosplit
}
if { $max_capacitance } {
# report_capacitance_limits $corner "max" $violators $verbose $nosplit