diff options
Diffstat (limited to 'nexus/archdefs.h')
-rw-r--r-- | nexus/archdefs.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/nexus/archdefs.h b/nexus/archdefs.h index adc1342c..7e427e06 100644 --- a/nexus/archdefs.h +++ b/nexus/archdefs.h @@ -114,6 +114,15 @@ struct PipId } }; +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 GroupId { enum : int8_t @@ -250,4 +259,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 |