aboutsummaryrefslogtreecommitdiffstats
path: root/mistral
diff options
context:
space:
mode:
Diffstat (limited to 'mistral')
-rw-r--r--mistral/archdefs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/mistral/archdefs.h b/mistral/archdefs.h
index 60bdcfeb..9d953223 100644
--- a/mistral/archdefs.h
+++ b/mistral/archdefs.h
@@ -25,6 +25,7 @@
#include "base_clusterinfo.h"
#include "cyclonev.h"
+#include "hashlib.h"
#include "idstring.h"
#include "nextpnr_assertions.h"
#include "nextpnr_namespaces.h"
@@ -84,6 +85,7 @@ struct BelId
bool operator==(const BelId &other) const { return pos == other.pos && z == other.z; }
bool operator!=(const BelId &other) const { return pos != other.pos || z != other.z; }
bool operator<(const BelId &other) const { return pos < other.pos || (pos == other.pos && z < other.z); }
+ unsigned int hash() const { return mkhash(pos, z); }
};
static constexpr auto invalid_rnode = std::numeric_limits<CycloneV::rnode_t>::max();
@@ -104,6 +106,7 @@ struct WireId
bool operator==(const WireId &other) const { return node == other.node; }
bool operator!=(const WireId &other) const { return node != other.node; }
bool operator<(const WireId &other) const { return node < other.node; }
+ unsigned int hash() const { return unsigned(node); }
};
struct PipId
@@ -115,6 +118,7 @@ struct PipId
bool operator==(const PipId &other) const { return src == other.src && dst == other.dst; }
bool operator!=(const PipId &other) const { return src != other.src || dst != other.dst; }
bool operator<(const PipId &other) const { return dst < other.dst || (dst == other.dst && src < other.src); }
+ unsigned int hash() const { return mkhash(src, dst); }
};
typedef IdString DecalId;