Skip to content

Commit

Permalink
ecp5: Improve router performance on slower speed grades
Browse files Browse the repository at this point in the history
Signed-off-by: gatecat <[email protected]>
  • Loading branch information
gatecat committed Feb 21, 2024
1 parent aa26ba7 commit 05ed930
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ecp5/arch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const

int dx = abs(src_loc.first - dst_loc.first), dy = abs(src_loc.second - dst_loc.second);

return (120 - 22 * args.speed) *
return (80 - 9 * args.speed) *
(6 + std::max(dx - 5, 0) + std::max(dy - 5, 0) + 2 * (std::min(dx, 5) + std::min(dy, 5)));
}

Expand Down Expand Up @@ -579,11 +579,11 @@ delay_t Arch::predictDelay(BelId src_bel, IdString src_pin, BelId dst_bel, IdStr

int dx = abs(driver_loc.x - sink_loc.x), dy = abs(driver_loc.y - sink_loc.y);

return (120 - 22 * args.speed) *
(3 + std::max(dx - 5, 0) + std::max(dy - 5, 0) + 2 * (std::min(dx, 5) + std::min(dy, 5)));
return (80 - 9 * args.speed) *
(6 + std::max(dx - 5, 0) + std::max(dy - 5, 0) + 2 * (std::min(dx, 5) + std::min(dy, 5)));
}

delay_t Arch::getRipupDelayPenalty() const { return 400; }
delay_t Arch::getRipupDelayPenalty() const { return 550 - 50 * args.speed; }

// -----------------------------------------------------------------------

Expand Down

0 comments on commit 05ed930

Please sign in to comment.