diff options
author | gatecat <gatecat@ds0.me> | 2021-05-13 23:51:47 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-05-15 14:54:33 +0100 |
commit | 6ad329c5404021ca38784b21fc4d01a548caed30 (patch) | |
tree | bbab867cd0e5858fbe2c98efa1ebbec5bac37d98 /mistral/arch.cc | |
parent | e688ee0e89263bc39a0ea10ac552430e41824aa1 (diff) | |
download | nextpnr-6ad329c5404021ca38784b21fc4d01a548caed30.tar.gz nextpnr-6ad329c5404021ca38784b21fc4d01a548caed30.tar.bz2 nextpnr-6ad329c5404021ca38784b21fc4d01a548caed30.zip |
mistral: Implement bounding boxes for router2
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'mistral/arch.cc')
-rw-r--r-- | mistral/arch.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mistral/arch.cc b/mistral/arch.cc index ffe6e833..d5bc424c 100644 --- a/mistral/arch.cc +++ b/mistral/arch.cc @@ -382,6 +382,20 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const return 100 * std::abs(y1 - y0) + 100 * std::abs(x1 - x0) + 100; } +ArcBounds Arch::getRouteBoundingBox(WireId src, WireId dst) const +{ + ArcBounds bounds; + int src_x = CycloneV::rn2x(src.node); + int src_y = CycloneV::rn2y(src.node); + int dst_x = CycloneV::rn2x(dst.node); + int dst_y = CycloneV::rn2y(dst.node); + bounds.x0 = std::min(src_x, dst_x); + bounds.y0 = std::min(src_y, dst_y); + bounds.x1 = std::max(src_x, dst_x); + bounds.y1 = std::max(src_y, dst_y); + return bounds; +} + delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const { if (net_info->driver.cell == nullptr || net_info->driver.cell->bel == BelId()) |