From da46844ca67f0c5eca59351164a507fce504eaa2 Mon Sep 17 00:00:00 2001 From: gatecat Date: Wed, 22 Jul 2026 14:03:42 +0200 Subject: [PATCH] nexus: Fix slow routing around DQSBUFs Signed-off-by: gatecat --- nexus/arch.cc | 12 +++++++++++- nexus/arch.h | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/nexus/arch.cc b/nexus/arch.cc index efaf2632..3b3c4239 100644 --- a/nexus/arch.cc +++ b/nexus/arch.cc @@ -736,7 +736,10 @@ BoundingBox Arch::getRouteBoundingBox(WireId src, WireId dst) const bb.y0 = std::max(0, bb.y0 - 7); bb.y1 = std::min(chip_info->width, bb.y1 + 7); } - + if (dqsbuf_wires.count(src) || dqsbuf_wires.count(dst)) { + bb.x0 = std::max(0, bb.x0 - 6); + bb.x1 = std::min(chip_info->width, bb.x1 + 6); + } return bb; } @@ -796,6 +799,13 @@ void Arch::pre_routing() lram_wires.insert(wire); } } + if (ci->type == id_DQSBUF_CORE) { + for (auto &port : ci->ports) { + WireId wire = getBelPinWire(ci->bel, port.first); + if (wire != WireId()) + dqsbuf_wires.insert(wire); + } + } } } namespace { diff --git a/nexus/arch.h b/nexus/arch.h index 3a80b47b..a229b4d6 100644 --- a/nexus/arch.h +++ b/nexus/arch.h @@ -1319,7 +1319,7 @@ struct Arch : BaseArch // for better DSP bounding boxes void pre_routing(); - pool dsp_wires, lram_wires; + pool dsp_wires, lram_wires, dqsbuf_wires; // -------------------------------------------------