aboutsummaryrefslogtreecommitdiffstats
path: root/machxo2/archdefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'machxo2/archdefs.h')
-rw-r--r--machxo2/archdefs.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/machxo2/archdefs.h b/machxo2/archdefs.h
index 87f9c98a..1520f0c3 100644
--- a/machxo2/archdefs.h
+++ b/machxo2/archdefs.h
@@ -107,8 +107,31 @@ struct PipId
unsigned int hash() const { return mkhash(location.hash(), index); }
};
+struct DecalId
+{
+ enum
+ {
+ TYPE_NONE,
+ TYPE_BEL,
+ TYPE_WIRE,
+ TYPE_PIP,
+ TYPE_GROUP
+ } type = TYPE_NONE;
+ Location location;
+ uint32_t z = 0;
+ bool active = false;
+ bool operator==(const DecalId &other) const
+ {
+ return type == other.type && location == other.location && z == other.z && active == other.active;
+ }
+ bool operator!=(const DecalId &other) const
+ {
+ return type != other.type || location != other.location || z != other.z || active != other.active;
+ }
+ unsigned int hash() const { return mkhash(location.hash(), mkhash(z, int(type))); }
+};
+
typedef IdString GroupId;
-typedef IdString DecalId;
typedef IdString BelBucketId;
typedef IdString ClusterId;