Skip to content

Commit

Permalink
report_slew -corner
Browse files Browse the repository at this point in the history
  • Loading branch information
jjcherry56 committed Apr 26, 2021
1 parent cc1c0a1 commit 312878c
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 15 deletions.
7 changes: 6 additions & 1 deletion include/sta/Sta.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,12 @@ public:
const PathAnalysisPt *path_ap);
void vertexSlacks(Vertex *vertex,
Slack (&slacks)[RiseFall::index_count][MinMax::index_count]);
// Slew for one delay calc analysis pt(corner).
// Slew for one corner.
Slew vertexSlew(Vertex *vertex,
const RiseFall *rf,
const Corner *corner,
const MinMax *min_max);
// Slew for one delay calc analysis pt (corner min/max).
Slew vertexSlew(Vertex *vertex,
const RiseFall *rf,
const DcalcAnalysisPt *dcalc_ap);
Expand Down
11 changes: 11 additions & 0 deletions search/Sta.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3170,6 +3170,17 @@ Sta::setArcDelayAnnotated(Edge *edge,
graph_delay_calc_->delayInvalid(to);
}

Slew
Sta::vertexSlew(Vertex *vertex,
const RiseFall *rf,
const Corner *corner,
const MinMax *min_max)
{
findDelays(vertex);
const DcalcAnalysisPt *dcalc_ap = corner->findDcalcAnalysisPt(min_max);
return graph_->slew(vertex, rf, dcalc_ap->index());
}

Slew
Sta::vertexSlew(Vertex *vertex,
const RiseFall *rf,
Expand Down
19 changes: 14 additions & 5 deletions tcl/Graph.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,23 @@ proc edge_disable_reason_verbose { edge } {

################################################################

define_cmd_args "report_slews" { pin }
define_cmd_args "report_slews" {[-corner corner] pin}

proc report_slews { pin } {
proc report_slews { args } {
global sta_report_default_digits

set pin1 [get_port_pin_error "pin" $pin]
foreach vertex [$pin1 vertices] {
report_line "[vertex_path_name $vertex] [rise_short_name] [format_times [$vertex slews rise] $sta_report_default_digits] [fall_short_name] [format_times [$vertex slews fall] $sta_report_default_digits]"
parse_key_args "report_slews" args keys {-corner} flags {}
check_argc_eq1 "report_slews" $args

set corner [parse_corner_or_all keys]
set pin [get_port_pin_error "pin" [lindex $args 0]]
set digits $sta_report_default_digits
foreach vertex [$pin vertices] {
if { $corner == "NULL" } {
report_line "[vertex_path_name $vertex] [rise_short_name] [format_time [$vertex slew rise min] $digits]:[format_time [$vertex slew rise max] $digits] [fall_short_name] [format_time [$vertex slew fall min] $digits]:[format_time [$vertex slew fall max] $digits]"
} else {
report_line "[vertex_path_name $vertex] [rise_short_name] [format_time [$vertex slew_corner rise $corner min] $digits]:[format_time [$vertex slew_corner rise $corner max] $digits] [fall_short_name] [format_time [$vertex slew_corner fall $corner min] $digits]:[format_time [$vertex slew_corner fall $corner max] $digits]"
}
}
}

Expand Down
17 changes: 8 additions & 9 deletions tcl/StaTcl.i
Original file line number Diff line number Diff line change
Expand Up @@ -5889,22 +5889,21 @@ bool is_bidirect_driver() { return self->isBidirectDriver(); }
int level() { return Sta::sta()->vertexLevel(self); }
int tag_group_index() { return self->tagGroupIndex(); }

TmpFloatSeq *
slews(RiseFall *rf)
Slew
slew(const RiseFall *rf,
const MinMax *min_max)
{
Sta *sta = Sta::sta();
TmpFloatSeq *floats = new FloatSeq;
for (auto dcalc_ap : sta->corners()->dcalcAnalysisPts())
floats->push_back(delayAsFloat(sta->vertexSlew(self, rf, dcalc_ap)));
return floats;
return sta->vertexSlew(self, rf, min_max);
}

Slew
slew(const RiseFall *rf,
const MinMax *min_max)
slew_corner(const RiseFall *rf,
const Corner *corner,
const MinMax *min_max)
{
Sta *sta = Sta::sta();
return sta->vertexSlew(self, rf, min_max);
return sta->vertexSlew(self, rf, corner, min_max);
}

VertexOutEdgeIterator *
Expand Down

0 comments on commit 312878c

Please sign in to comment.