aboutsummaryrefslogtreecommitdiffstats
path: root/mistral
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-08-14 20:18:54 +0100
committergatecat <gatecat@ds0.me>2021-08-14 20:23:05 +0100
commite7db15d6a4c9b1a36d87d7ab8a56d51f578ef82a (patch)
tree8ea4552e6293c7d503f0b93290aa81e886579ee9 /mistral
parenta66cd0200bdcb87f17f97fb7a65bfd99c42a6de2 (diff)
downloadnextpnr-e7db15d6a4c9b1a36d87d7ab8a56d51f578ef82a.tar.gz
nextpnr-e7db15d6a4c9b1a36d87d7ab8a56d51f578ef82a.tar.bz2
nextpnr-e7db15d6a4c9b1a36d87d7ab8a56d51f578ef82a.zip
mistral: Fix pip binding check
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'mistral')
-rw-r--r--mistral/arch.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/mistral/arch.h b/mistral/arch.h
index c00ee2a7..c13c4c8a 100644
--- a/mistral/arch.h
+++ b/mistral/arch.h
@@ -388,21 +388,28 @@ struct Arch : BaseArch<ArchRanges>
return UpDownhillPipRange(wires.at(wire).wires_uphill, wire, true);
}
- bool checkPipAvail(PipId pip) const override
+ bool is_pip_blocked(PipId pip) const
{
- // Check reserved routes
WireId dst(pip.dst);
const auto &dst_data = wires.at(dst);
if ((dst_data.flags & WireInfo::RESERVED_ROUTE) != 0) {
if (WireId(pip.src) != dst_data.wires_uphill.at(dst_data.flags & 0xFF))
- return false;
+ return true;
}
+ return false;
+ }
+
+ bool checkPipAvail(PipId pip) const override
+ {
+ // Check reserved routes
+ if (is_pip_blocked(pip))
+ return false;
return BaseArch::checkPipAvail(pip);
}
bool checkPipAvailForNet(PipId pip, NetInfo *net) const override
{
- if (!checkPipAvail(pip))
+ if (is_pip_blocked(pip))
return false;
return BaseArch::checkPipAvailForNet(pip, net);
}