From: whitequark Date: Sun, 4 Aug 2019 00:30:50 +0000 (+0000) Subject: vendor.lattice_ice40: avoid routing conflicts with SDR/DDR input pins. X-Git-Tag: locally_working~48 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=34a97b27512a208101619b8c6f4434bef97e1808;p=nmigen.git vendor.lattice_ice40: avoid routing conflicts with SDR/DDR input pins. --- diff --git a/nmigen/vendor/lattice_ice40.py b/nmigen/vendor/lattice_ice40.py index 6f1021a..3ab0747 100644 --- a/nmigen/vendor/lattice_ice40.py +++ b/nmigen/vendor/lattice_ice40.py @@ -244,11 +244,15 @@ class LatticeICE40Platform(TemplatedPlatform): ] if "i" not in pin.dir: - i_type = 0b00 # PIN_NO_INPUT aka PIN_INPUT_REGISTERED + # If no input pin is requested, it is important to use a non-registered input pin + # type, because an output-only pin would not have an input clock, and if its input + # is configured as registered, this would prevent a co-located input-capable pin + # from using an input clock. + i_type = 0b01 # PIN_INPUT elif pin.xdr == 0: i_type = 0b01 # PIN_INPUT elif pin.xdr > 0: - i_type = 0b00 # PIN_INPUT_REGISTERED + i_type = 0b00 # PIN_INPUT_REGISTERED aka PIN_INPUT_DDR if "o" not in pin.dir: o_type = 0b0000 # PIN_NO_OUTPUT elif pin.xdr == 0 and pin.dir == "o":