aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/chip.h
diff options
context:
space:
mode:
Diffstat (limited to 'ice40/chip.h')
-rw-r--r--ice40/chip.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/ice40/chip.h b/ice40/chip.h
index 370fcc02..1f46ccd2 100644
--- a/ice40/chip.h
+++ b/ice40/chip.h
@@ -211,6 +211,9 @@ struct BelId
bool nil() const {
return index < 0;
}
+
+ bool operator==(const BelId &other) const { return index == other.index; }
+ bool operator!=(const BelId &other) const { return index != other.index; }
};
struct WireId
@@ -220,6 +223,9 @@ struct WireId
bool nil() const {
return index < 0;
}
+
+ bool operator==(const WireId &other) const { return index == other.index; }
+ bool operator!=(const WireId &other) const { return index != other.index; }
};
struct PipId
@@ -229,6 +235,9 @@ struct PipId
bool nil() const {
return index < 0;
}
+
+ bool operator==(const PipId &other) const { return index == other.index; }
+ bool operator!=(const PipId &other) const { return index != other.index; }
};
struct BelPin