aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/archdefs.h
diff options
context:
space:
mode:
authorEddie Hung <eddieh@ece.ubc.ca>2018-11-13 12:12:11 -0800
committerEddie Hung <eddieh@ece.ubc.ca>2018-11-13 12:12:11 -0800
commit2d39cde17be718d76e6f5c06c8f06c70d44c7918 (patch)
tree8b0e0f98125b2ec7fdb55c9644c524753a7a1cd5 /ecp5/archdefs.h
parentba7a7a3733c493fc950d5bedbc49b4c78b451b3d (diff)
parent3b2b15dc4a6cdf9cadab96b1db5483d4f7082dff (diff)
downloadnextpnr-2d39cde17be718d76e6f5c06c8f06c70d44c7918.tar.gz
nextpnr-2d39cde17be718d76e6f5c06c8f06c70d44c7918.tar.bz2
nextpnr-2d39cde17be718d76e6f5c06c8f06c70d44c7918.zip
Merge remote-tracking branch 'origin/master' into timingapi
Diffstat (limited to 'ecp5/archdefs.h')
-rw-r--r--ecp5/archdefs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/ecp5/archdefs.h b/ecp5/archdefs.h
index b85852c2..01cbad46 100644
--- a/ecp5/archdefs.h
+++ b/ecp5/archdefs.h
@@ -75,6 +75,7 @@ struct Location
bool operator==(const Location &other) const { return x == other.x && y == other.y; }
bool operator!=(const Location &other) const { return x != other.x || y != other.y; }
+ bool operator<(const Location &other) const { return y == other.y ? x < other.x : y < other.y; }
};
inline Location operator+(const Location &a, const Location &b) { return Location(a.x + b.x, a.y + b.y); }
@@ -86,6 +87,7 @@ struct BelId
bool operator==(const BelId &other) const { return index == other.index && location == other.location; }
bool operator!=(const BelId &other) const { return index != other.index || location != other.location; }
+ bool operator<(const BelId &other) const { return location == other.location ? index < other.index : location < other.location; }
};
struct WireId
@@ -95,6 +97,7 @@ struct WireId
bool operator==(const WireId &other) const { return index == other.index && location == other.location; }
bool operator!=(const WireId &other) const { return index != other.index || location != other.location; }
+ bool operator<(const WireId &other) const { return location == other.location ? index < other.index : location < other.location; }
};
struct PipId
@@ -104,6 +107,7 @@ struct PipId
bool operator==(const PipId &other) const { return index == other.index && location == other.location; }
bool operator!=(const PipId &other) const { return index != other.index || location != other.location; }
+ bool operator<(const PipId &other) const { return location == other.location ? index < other.index : location < other.location; }
};
struct GroupId