diff options
author | David Shah <davey1576@gmail.com> | 2018-07-05 20:59:11 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-07-11 10:41:36 +0200 |
commit | c4af52dd5b3830905e2b9e8f7135f886882841ba (patch) | |
tree | 3839057b8b1ea950c6763770851bc8640d3431fb /ecp5/archdefs.h | |
parent | eaae6b7dca43d90fabb7676c514d630b1575e9c4 (diff) | |
download | nextpnr-c4af52dd5b3830905e2b9e8f7135f886882841ba.tar.gz nextpnr-c4af52dd5b3830905e2b9e8f7135f886882841ba.tar.bz2 nextpnr-c4af52dd5b3830905e2b9e8f7135f886882841ba.zip |
ecp5: Working on arch implementation
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ecp5/archdefs.h')
-rw-r--r-- | ecp5/archdefs.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ecp5/archdefs.h b/ecp5/archdefs.h index f185da72..0af48753 100644 --- a/ecp5/archdefs.h +++ b/ecp5/archdefs.h @@ -60,13 +60,13 @@ enum PortPin : int32_t PIN_MAXIDX }; -NPNR_PACKED_STRUCT( -struct Location { +NPNR_PACKED_STRUCT(struct Location { int16_t x = -1, y = -1; 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; } -} -); +}); + +Location operator+(const Location &a, const Location &b) { return Location{a.x + b.x, a.y + b.y};} struct BelId { |