kasli: make second eem optional in urukul

This commit is contained in:
Robert Jördens 2018-03-05 18:06:17 +01:00
parent 257bef0d21
commit 07de7af86a
1 changed files with 18 additions and 16 deletions

View File

@ -193,8 +193,8 @@ def _novogorny(eem):
] ]
def _urukul(eem, eem_aux): def _urukul(eem, eem_aux=None):
return [ ios = [
("{}_spi_p".format(eem), 0, ("{}_spi_p".format(eem), 0,
Subsignal("clk", Pins("{}:{}_p".format(eem, _eem_signal(0)))), Subsignal("clk", Pins("{}:{}_p".format(eem, _eem_signal(0)))),
Subsignal("mosi", Pins("{}:{}_p".format(eem, _eem_signal(1)))), Subsignal("mosi", Pins("{}:{}_p".format(eem, _eem_signal(1)))),
@ -213,24 +213,26 @@ def _urukul(eem, eem_aux):
eem, [_eem_signal(i + 3) for i in range(3)]))), eem, [_eem_signal(i + 3) for i in range(3)]))),
IOStandard("LVDS_25"), IOStandard("LVDS_25"),
), ),
] + [ ]
("{}_{}".format(eem, sig), 0, ttls = [(6, eem, "io_update"),
Subsignal("p", Pins("{}:{}_p".format(j, _eem_signal(i)))), (7, eem, "dds_reset")]
Subsignal("n", Pins("{}:{}_n".format(j, _eem_signal(i)))), if eem_aux is not None:
IOStandard("LVDS_25") ttls += [(0, eem_aux, "sync_clk"),
) for i, j, sig in [
(6, eem, "io_update"),
(7, eem, "dds_reset"),
(0, eem_aux, "sync_clk"),
(1, eem_aux, "sync_in"), (1, eem_aux, "sync_in"),
(2, eem_aux, "io_update_ret"), (2, eem_aux, "io_update_ret"),
(3, eem_aux, "nu_mosi3"), (3, eem_aux, "nu_mosi3"),
(4, eem_aux, "sw0"), (4, eem_aux, "sw0"),
(5, eem_aux, "sw1"), (5, eem_aux, "sw1"),
(6, eem_aux, "sw2"), (6, eem_aux, "sw2"),
(7, eem_aux, "sw3") (7, eem_aux, "sw3")]
] for i, j, sig in ttls:
] ios.append(
("{}_{}".format(eem, sig), 0,
Subsignal("p", Pins("{}:{}_p".format(j, _eem_signal(i)))),
Subsignal("n", Pins("{}:{}_n".format(j, _eem_signal(i)))),
IOStandard("LVDS_25")
))
return ios
class Opticlock(_StandaloneBase): class Opticlock(_StandaloneBase):