aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/archdefs.h
diff options
context:
space:
mode:
authorKeith Rothman <537074+litghost@users.noreply.github.com>2021-01-28 19:08:14 -0800
committerKeith Rothman <537074+litghost@users.noreply.github.com>2021-02-02 07:34:56 -0800
commitd03d9d839b7e49a4bf3428e949bda85574adf403 (patch)
tree9d680a06ccd312bc057544a093d28bee9979b607 /ecp5/archdefs.h
parent71e210dd4b12f1e91630f83396be236034f68e30 (diff)
downloadnextpnr-d03d9d839b7e49a4bf3428e949bda85574adf403.tar.gz
nextpnr-d03d9d839b7e49a4bf3428e949bda85574adf403.tar.bz2
nextpnr-d03d9d839b7e49a4bf3428e949bda85574adf403.zip
Working compile of ECP5.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'ecp5/archdefs.h')
-rw-r--r--ecp5/archdefs.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/ecp5/archdefs.h b/ecp5/archdefs.h
index b0e01e4d..5bfe13d2 100644
--- a/ecp5/archdefs.h
+++ b/ecp5/archdefs.h
@@ -131,6 +131,10 @@ struct PartitionId {
bool operator==(const PartitionId &other) const { return (name == other.name); }
bool operator!=(const PartitionId &other) const { return (name != other.name); }
+ bool operator<(const PartitionId &other) const
+ {
+ return name < other.name;
+ }
};
struct GroupId
@@ -269,4 +273,14 @@ template <> struct hash<NEXTPNR_NAMESPACE_PREFIX DecalId>
}
};
+template <> struct hash<NEXTPNR_NAMESPACE_PREFIX PartitionId>
+{
+ std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX PartitionId &partition) const noexcept
+ {
+ std::size_t seed = 0;
+ boost::hash_combine(seed, hash<NEXTPNR_NAMESPACE_PREFIX IdString>()(partition.name));
+ return seed;
+ }
+};
+
} // namespace std