aboutsummaryrefslogtreecommitdiffstats
path: root/mistral/arch.cc
diff options
context:
space:
mode:
Diffstat (limited to 'mistral/arch.cc')
-rw-r--r--mistral/arch.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/mistral/arch.cc b/mistral/arch.cc
index 5fc2a0b4..ffe6e833 100644
--- a/mistral/arch.cc
+++ b/mistral/arch.cc
@@ -305,6 +305,23 @@ WireId Arch::add_wire(int x, int y, IdString name, uint64_t flags)
}
}
+void Arch::reserve_route(WireId src, WireId dst)
+{
+ auto &dst_data = wires.at(dst);
+ int idx = -1;
+
+ for (int i = 0; i < int(dst_data.wires_uphill.size()); i++) {
+ if (dst_data.wires_uphill.at(i) == src) {
+ idx = i;
+ break;
+ }
+ }
+
+ NPNR_ASSERT(idx != -1);
+
+ dst_data.flags = WireInfo::RESERVED_ROUTE | unsigned(idx);
+}
+
bool Arch::wires_connected(WireId src, WireId dst) const
{
PipId pip(src.node, dst.node);