diff options
author | David Shah <dave@ds0.me> | 2020-01-06 15:42:06 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2020-11-30 08:45:27 +0000 |
commit | 60c6510b3b5687741f2f1939a37ab579451dbdae (patch) | |
tree | 9250f54c9026bebf536af1dfd14b91749a7f6c4e /nexus/archdefs.h | |
parent | 54e0ef9cf7ce15d5f1561135edd41da38a32949a (diff) | |
download | nextpnr-60c6510b3b5687741f2f1939a37ab579451dbdae.tar.gz nextpnr-60c6510b3b5687741f2f1939a37ab579451dbdae.tar.bz2 nextpnr-60c6510b3b5687741f2f1939a37ab579451dbdae.zip |
nexus: Arch utilities
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'nexus/archdefs.h')
-rw-r--r-- | nexus/archdefs.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/nexus/archdefs.h b/nexus/archdefs.h index 32c48cdf..ef5c4c3c 100644 --- a/nexus/archdefs.h +++ b/nexus/archdefs.h @@ -65,6 +65,9 @@ struct BelId // PIP index in tile int32_t index = -1; + BelId() = default; + inline BelId(int32_t tile, int32_t index) : tile(tile), index(index){}; + bool operator==(const BelId &other) const { return tile == other.tile && index == other.index; } bool operator!=(const BelId &other) const { return tile != other.tile || index != other.index; } bool operator<(const BelId &other) const @@ -80,6 +83,9 @@ struct WireId // Tile wires: tile != -1; index = wire index in tile int32_t index = -1; + WireId() = default; + inline WireId(int32_t tile, int32_t index) : tile(tile), index(index){}; + bool operator==(const WireId &other) const { return tile == other.tile && index == other.index; } bool operator!=(const WireId &other) const { return tile != other.tile || index != other.index; } bool operator<(const WireId &other) const @@ -94,6 +100,9 @@ struct PipId // PIP index in tile int32_t index = -1; + PipId() = default; + inline PipId(int32_t tile, int32_t index) : tile(tile), index(index){}; + bool operator==(const PipId &other) const { return tile == other.tile && index == other.index; } bool operator!=(const PipId &other) const { return tile != other.tile || index != other.index; } bool operator<(const PipId &other) const @@ -133,10 +142,12 @@ struct DecalId struct ArchNetInfo { - bool is_global = false; - bool is_clock, is_reset = false, is_enable = false; + bool is_global; + bool is_clock, is_reset; }; +struct NetInfo; + struct ArchCellInfo { union |