aboutsummaryrefslogtreecommitdiffstats
path: root/common/base_arch.h
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-03-18 16:31:40 -0700
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-03-22 09:17:55 -0700
commite7d81913a48bffd970f7a92acc44eb36d9f996f7 (patch)
tree93704cb3edc4497651e23adfb7d6541eab1bb907 /common/base_arch.h
parent53ed6979a964f3eaaabc0d97399eec9b4c3347f9 (diff)
downloadnextpnr-e7d81913a48bffd970f7a92acc44eb36d9f996f7.tar.gz
nextpnr-e7d81913a48bffd970f7a92acc44eb36d9f996f7.tar.bz2
nextpnr-e7d81913a48bffd970f7a92acc44eb36d9f996f7.zip
Add "checkPipAvailForNet" to Arch API.
This is important for distiguishing valid pseudo pips in the FPGA interchange arch. This also avoids a double or triple lookup of pip->net map. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'common/base_arch.h')
-rw-r--r--common/base_arch.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/base_arch.h b/common/base_arch.h
index 84629977..d4efe9ce 100644
--- a/common/base_arch.h
+++ b/common/base_arch.h
@@ -243,6 +243,11 @@ template <typename R> struct BaseArch : ArchAPI<R>
p2n_entry = nullptr;
}
virtual bool checkPipAvail(PipId pip) const override { return getBoundPipNet(pip) == nullptr; }
+ virtual bool checkPipAvailForNet(PipId pip, NetInfo *net) const override
+ {
+ NetInfo *bound_net = getBoundPipNet(pip);
+ return bound_net == nullptr || bound_net == net;
+ }
virtual NetInfo *getBoundPipNet(PipId pip) const override
{
auto fnd = base_pip2net.find(pip);