diff options
author | David Shah <dave@ds0.me> | 2021-02-02 16:55:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-02 16:55:13 +0000 |
commit | d1ef3ae1bac8f108b642c42c4fbfbdd4899c7641 (patch) | |
tree | 3657232a91e97f839cd9114f40aa0c565afc23d4 /ecp5/archdefs.h | |
parent | efc98c517eb1d2eb4a8ecc2ae82e770aaa1a0edd (diff) | |
parent | da74a425d23352d7cddf9d1c4b0b7c86dd567c40 (diff) | |
download | nextpnr-d1ef3ae1bac8f108b642c42c4fbfbdd4899c7641.tar.gz nextpnr-d1ef3ae1bac8f108b642c42c4fbfbdd4899c7641.tar.bz2 nextpnr-d1ef3ae1bac8f108b642c42c4fbfbdd4899c7641.zip |
Merge pull request #557 from litghost/refactor_placer_arch_api
RFC: Initial refactoring of placer API.
Diffstat (limited to 'ecp5/archdefs.h')
-rw-r--r-- | ecp5/archdefs.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ecp5/archdefs.h b/ecp5/archdefs.h index 586c385f..3bc75ab4 100644 --- a/ecp5/archdefs.h +++ b/ecp5/archdefs.h @@ -126,6 +126,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 @@ -262,4 +271,14 @@ template <> struct hash<NEXTPNR_NAMESPACE_PREFIX DecalId> } }; +template <> struct hash<NEXTPNR_NAMESPACE_PREFIX BelBucketId> +{ + std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX BelBucketId &partition) const noexcept + { + std::size_t seed = 0; + boost::hash_combine(seed, hash<NEXTPNR_NAMESPACE_PREFIX IdString>()(partition.name)); + return seed; + } +}; + } // namespace std |