aboutsummaryrefslogtreecommitdiffstats
path: root/fpga_interchange/archdefs.h
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-02-01 07:18:28 -0800
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-02-04 16:38:33 -0800
commitcd41c4001e68fd9e5741351d4640078e055b9c05 (patch)
treed05d40ddeb18504b5ce669fec28717ea8b817b3c /fpga_interchange/archdefs.h
parent67dc19bb579a1edcd1145f910e54c5baf2fa3cb6 (diff)
downloadnextpnr-cd41c4001e68fd9e5741351d4640078e055b9c05.tar.gz
nextpnr-cd41c4001e68fd9e5741351d4640078e055b9c05.tar.bz2
nextpnr-cd41c4001e68fd9e5741351d4640078e055b9c05.zip
Add initial updates to FPGA interchange arch for BEL buckets.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'fpga_interchange/archdefs.h')
-rw-r--r--fpga_interchange/archdefs.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/fpga_interchange/archdefs.h b/fpga_interchange/archdefs.h
index 744fa1d3..66d72f1c 100644
--- a/fpga_interchange/archdefs.h
+++ b/fpga_interchange/archdefs.h
@@ -123,6 +123,17 @@ struct DecalId
bool operator!=(const DecalId &other) const { return false; }
};
+struct BelBucketId {
+ IdString name;
+
+ bool operator==(const BelBucketId &other) const { return (name == other.name); }
+ bool operator!=(const BelBucketId &other) const { return (name != other.name); }
+ bool operator<(const BelBucketId &other) const
+ {
+ return name < other.name;
+ }
+};
+
struct ArchNetInfo
{
};
@@ -186,4 +197,15 @@ template <> struct hash<NEXTPNR_NAMESPACE_PREFIX DecalId>
return seed;
}
};
+
+template <> struct hash<NEXTPNR_NAMESPACE_PREFIX BelBucketId>
+{
+ std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX BelBucketId &bucket) const noexcept
+ {
+ std::size_t seed = 0;
+ boost::hash_combine(seed, hash<NEXTPNR_NAMESPACE_PREFIX IdString>()(bucket.name));
+ return seed;
+ }
+};
+
} // namespace std