vendor.lattice_ice40: never place an inverter on global buffer output.
This would make `pin.i` not a global network anymore, which is likely undesirable if an explicit Attrs(GLOBAL=1) is specified.
This commit is contained in:
parent
01a3101fd3
commit
70bbfecf6d
3
nmigen/vendor/lattice_ice40.py
vendored
3
nmigen/vendor/lattice_ice40.py
vendored
|
@ -164,6 +164,7 @@ class LatticeICE40Platform(TemplatedPlatform):
|
||||||
del attrs["GLOBAL"]
|
del attrs["GLOBAL"]
|
||||||
else:
|
else:
|
||||||
is_global_input = False
|
is_global_input = False
|
||||||
|
assert not (is_global_input and i_invert)
|
||||||
|
|
||||||
if "i" in pin.dir:
|
if "i" in pin.dir:
|
||||||
if pin.xdr < 2:
|
if pin.xdr < 2:
|
||||||
|
@ -222,7 +223,7 @@ class LatticeICE40Platform(TemplatedPlatform):
|
||||||
|
|
||||||
if "i" in pin.dir:
|
if "i" in pin.dir:
|
||||||
if pin.xdr == 0 and is_global_input:
|
if pin.xdr == 0 and is_global_input:
|
||||||
io_args.append(("o", "GLOBAL_BUFFER_OUTPUT", pin_i[bit]))
|
io_args.append(("o", "GLOBAL_BUFFER_OUTPUT", pin.i[bit]))
|
||||||
elif pin.xdr < 2:
|
elif pin.xdr < 2:
|
||||||
io_args.append(("o", "D_IN_0", pin_i[bit]))
|
io_args.append(("o", "D_IN_0", pin_i[bit]))
|
||||||
elif pin.xdr == 2:
|
elif pin.xdr == 2:
|
||||||
|
|
Loading…
Reference in a new issue