From 51cec70501b4fc3721a449c78d79371c3c91e9b8 Mon Sep 17 00:00:00 2001 From: Lofty Date: Tue, 2 Sep 2025 11:39:08 +0100 Subject: [PATCH] make sure that the pip used is the one assigned --- himbaechel/uarch/gatemate/gatemate.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/himbaechel/uarch/gatemate/gatemate.cc b/himbaechel/uarch/gatemate/gatemate.cc index dac9162a..03820422 100644 --- a/himbaechel/uarch/gatemate/gatemate.cc +++ b/himbaechel/uarch/gatemate/gatemate.cc @@ -318,7 +318,11 @@ void GateMateImpl::reassign_bridges(NetInfo* ni, const dict& net auto dst = ctx->getPipDstWire(pip); // Ignore wires not part of the net - if (!net_wires.count(dst)) + auto it = net_wires.find(dst); + if (it == net_wires.end()) + continue; + // Ignore pips if the wire is driven by another pip. + if (pip != it->second.pip) continue; // Ignore wires already visited. if (wire_to_net.count(dst))