Skip to content

Commit

Permalink
timing: remove the articial clock delay inflation
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanG077 committed Sep 20, 2024
1 parent 785bf13 commit 2550b14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
20 changes: 4 additions & 16 deletions common/kernel/timing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -573,10 +573,7 @@ void TimingAnalyser::walk_forward()
init_arrival += fanin.value.delayPair();
// Include the clock delay if clock_skew analysis is enabled
if (with_clock_skew) {
auto clock_delay = ports.at(CellPortKey(sp.first.cell, fanin.other_port)).route_delay;
clock_delay.min_delay = clock_delay_fac * clock_delay.min_delay;
clock_delay.max_delay = clock_delay_fac * clock_delay.max_delay;
init_arrival += clock_delay;
init_arrival += ports.at(CellPortKey(sp.first.cell, fanin.other_port)).route_delay;
}
break;
}
Expand Down Expand Up @@ -633,10 +630,7 @@ void TimingAnalyser::walk_backward()

if (fanin.type == CellArc::SETUP && fanin.other_port == ep.second) {
if (with_clock_skew) {
auto clock_delay = ports.at(CellPortKey(ep.first.cell, fanin.other_port)).route_delay;
clock_delay.min_delay = clock_delay_fac * clock_delay.min_delay;
clock_delay.max_delay = clock_delay_fac * clock_delay.max_delay;
init_required += clock_delay;
init_required += ports.at(CellPortKey(ep.first.cell, fanin.other_port)).route_delay;
}
init_required.min_delay -= fanin.value.maxDelay();
}
Expand Down Expand Up @@ -707,8 +701,6 @@ dict<domain_id_t, delay_t> TimingAnalyser::max_delay_by_domain_pairs()
for (auto &fanin : ep_port.cell_arcs) {
if (fanin.type == CellArc::SETUP) {
auto clock_delay = ports.at(CellPortKey(ep.first.cell, fanin.other_port)).route_delay;
clock_delay.min_delay = clock_delay_fac * clock_delay.min_delay;
clock_delay.max_delay = clock_delay_fac * clock_delay.max_delay;
delay += clock_delay.minDelay();
}
}
Expand All @@ -722,8 +714,6 @@ dict<domain_id_t, delay_t> TimingAnalyser::max_delay_by_domain_pairs()
for (auto &fanin : sp_port.cell_arcs) {
if (fanin.type == CellArc::CLK_TO_Q) {
auto clock_delay = ports.at(CellPortKey(sp.cell->name, fanin.other_port)).route_delay;
clock_delay.min_delay = clock_delay_fac * clock_delay.min_delay;
clock_delay.max_delay = clock_delay_fac * clock_delay.max_delay;
delay -= clock_delay.maxDelay();
}
}
Expand Down Expand Up @@ -1000,10 +990,8 @@ CriticalPath TimingAnalyser::build_critical_path_report(domain_id_t domain_pair,

if (with_clock_skew && register_start && register_end && (same_clock || related_clock)) {

auto clock_delay_launch =
clock_delay_fac * ctx->getNetinfoRouteDelay(sp_clk_net, PortRef{sp_cell, sp_clk_info.clock_port});
auto clock_delay_capture =
clock_delay_fac * ctx->getNetinfoRouteDelay(ep_clk_net, PortRef{ep_cell, ep_clk_info.clock_port});
auto clock_delay_launch = ctx->getNetinfoRouteDelay(sp_clk_net, PortRef{sp_cell, sp_clk_info.clock_port});
auto clock_delay_capture = ctx->getNetinfoRouteDelay(ep_clk_net, PortRef{ep_cell, ep_clk_info.clock_port});

delay_t clock_skew = clock_delay_launch - clock_delay_capture;

Expand Down
3 changes: 0 additions & 3 deletions common/kernel/timing.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ struct TimingAnalyser
// Enable analysis of clock skew between FFs.
bool with_clock_skew = false;

// REMOVE ME once approved
delay_t clock_delay_fac = 1;

bool setup_only = false;
bool have_loops = false;
bool updated_domains = false;
Expand Down

0 comments on commit 2550b14

Please sign in to comment.