diff options
author | David Shah <davey1576@gmail.com> | 2018-07-08 13:29:13 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-07-11 10:42:09 +0200 |
commit | 417913fd8509a44edf8421184c46d15d6763908b (patch) | |
tree | c7d43a8c366be9daa8afeb4f1c1e3cf51e4e6a07 /ecp5 | |
parent | 49f39b8d5635e607764f12c31d2f18a0f79b1969 (diff) | |
download | nextpnr-417913fd8509a44edf8421184c46d15d6763908b.tar.gz nextpnr-417913fd8509a44edf8421184c46d15d6763908b.tar.bz2 nextpnr-417913fd8509a44edf8421184c46d15d6763908b.zip |
ecp5: Architecture fixes
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ecp5')
-rw-r--r-- | ecp5/arch.h | 4 | ||||
-rwxr-xr-x | ecp5/trellis_import.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ecp5/arch.h b/ecp5/arch.h index b9cedd2c..029caef0 100644 --- a/ecp5/arch.h +++ b/ecp5/arch.h @@ -672,7 +672,9 @@ struct Arch : BaseCtx PipRange range; NPNR_ASSERT(wire != WireId()); range.b.cursor = locInfo(wire)->wire_data[wire.index].pips_downhill.get(); + range.b.wire_loc = wire.location; range.e.cursor = range.b.cursor + locInfo(wire)->wire_data[wire.index].num_downhill; + range.e.wire_loc = wire.location; return range; } @@ -681,7 +683,9 @@ struct Arch : BaseCtx PipRange range; NPNR_ASSERT(wire != WireId()); range.b.cursor = locInfo(wire)->wire_data[wire.index].pips_uphill.get(); + range.b.wire_loc = wire.location; range.e.cursor = range.b.cursor + locInfo(wire)->wire_data[wire.index].num_uphill; + range.e.wire_loc = wire.location; return range; } diff --git a/ecp5/trellis_import.py b/ecp5/trellis_import.py index aabcffb1..62aa4d81 100755 --- a/ecp5/trellis_import.py +++ b/ecp5/trellis_import.py @@ -297,7 +297,7 @@ class BinaryBlobAssembler: assert len(self.data) % 2 == 0 if self.nodebug: comment = None - c2val = (~v + 1) if v < 0 else v + c2val = (((-v) ^ 0xffff) + 1) if v < 0 else v if self.endianness == "le": self.data.append(c2val & 255) self.data.append((c2val >> 8) & 255) |