forked from M-Labs/artiq
ad9xxx: fix gpio signal length
This commit is contained in:
parent
fba05531f4
commit
d38f1e6796
|
@ -55,7 +55,11 @@ class AD9xxx(Module):
|
|||
dts.oe.eq(~rx)
|
||||
]
|
||||
|
||||
gpio = Signal(flen(pads.sel) + 1)
|
||||
if hasattr(pads, "sel"):
|
||||
sel_len = flen(pads.sel)
|
||||
else:
|
||||
sel_len = flen(pads.sel_n)
|
||||
gpio = Signal(sel_len + 1)
|
||||
gpio_load = Signal()
|
||||
self.sync += If(gpio_load, gpio.eq(bus.dat_w))
|
||||
if hasattr(pads, "rst"):
|
||||
|
|
Loading…
Reference in New Issue