aboutsummaryrefslogtreecommitdiffstats
path: root/nexus/arch.cc
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2020-11-16 13:31:43 +0000
committerDavid Shah <dave@ds0.me>2020-11-30 08:45:28 +0000
commit6b5277638bc63b592e30acb4f51a4df3a8bd59d8 (patch)
treea2d55d1d1e03afd7800f996e37205274efbe2248 /nexus/arch.cc
parent160045a058dc6f5dea278f133f227697532f8cbb (diff)
downloadnextpnr-6b5277638bc63b592e30acb4f51a4df3a8bd59d8.tar.gz
nextpnr-6b5277638bc63b592e30acb4f51a4df3a8bd59d8.tar.bz2
nextpnr-6b5277638bc63b592e30acb4f51a4df3a8bd59d8.zip
nexus: Fix slow routing around DSPs
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'nexus/arch.cc')
-rw-r--r--nexus/arch.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/nexus/arch.cc b/nexus/arch.cc
index 6cc0da0f..3a279f4a 100644
--- a/nexus/arch.cc
+++ b/nexus/arch.cc
@@ -582,6 +582,12 @@ ArcBounds Arch::getRouteBoundingBox(WireId src, WireId dst) const
bb.y0 = std::min(bb.y0, y);
bb.y1 = std::max(bb.y1, y);
};
+
+ if (dsp_wires.count(src) || dsp_wires.count(dst)) {
+ bb.x0 -= 5;
+ bb.x1 += 5;
+ }
+
extend(dst_x, dst_y);
return bb;
@@ -617,10 +623,28 @@ bool Arch::place()
return true;
}
+void Arch::pre_routing()
+{
+ for (auto cell : sorted(cells)) {
+ CellInfo *ci = cell.second;
+ if (ci->type == id_MULT9_CORE || ci->type == id_PREADD9_CORE || ci->type == id_MULT18_CORE ||
+ ci->type == id_MULT18X36_CORE || ci->type == id_MULT36_CORE || ci->type == id_REG18_CORE ||
+ ci->type == id_ACC54_CORE) {
+ for (auto port : sorted_ref(ci->ports)) {
+ WireId wire = getBelPinWire(ci->bel, port.first);
+ if (wire != WireId())
+ dsp_wires.insert(wire);
+ }
+ }
+ }
+}
+
bool Arch::route()
{
assign_budget(getCtx(), true);
+ pre_routing();
+
route_globals();
std::string router = str_or_default(settings, id("router"), defaultRouter);