aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mistral/arch.cc14
-rw-r--r--mistral/arch.h2
2 files changed, 15 insertions, 1 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())
diff --git a/mistral/arch.h b/mistral/arch.h
index c0ab86e5..3d5a8617 100644
--- a/mistral/arch.h
+++ b/mistral/arch.h
@@ -386,7 +386,7 @@ struct Arch : BaseArch<ArchRanges>
delay_t getDelayFromNS(float ns) const override { return delay_t(ns * 1000.0f); };
uint32_t getDelayChecksum(delay_t v) const override { return v; };
- ArcBounds getRouteBoundingBox(WireId src, WireId dst) const override { return ArcBounds(); }
+ ArcBounds getRouteBoundingBox(WireId src, WireId dst) const override;
// -------------------------------------------------