forked from M-Labs/artiq-zynq
parent
392f38ed7e
commit
d73cd459f0
|
@ -40,6 +40,15 @@ class CXP_DownConn_PHYS(Module, AutoCSR):
|
||||||
# checkout channel interfaces & drtio_gtx
|
# checkout channel interfaces & drtio_gtx
|
||||||
# GTPTXPhaseAlignement for inspiration
|
# GTPTXPhaseAlignement for inspiration
|
||||||
|
|
||||||
|
# Connect slave i's `cxp_gtx_rx` clock to `cxp_gtx_rxi` clock
|
||||||
|
for rx in self.rx_phys:
|
||||||
|
name = "cd_cxp_gtx_rx" + str(i)
|
||||||
|
setattr(self.clock_domains, name, ClockDomain(name=name))
|
||||||
|
self.comb += [
|
||||||
|
getattr(self, name).clk.eq(rx.gtx.cd_cxp_gtx_rx.clk),
|
||||||
|
getattr(self, name).rst.eq(rx.gtx.cd_cxp_gtx_rx.rst)
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
class Receiver(Module):
|
class Receiver(Module):
|
||||||
def __init__(self, qpll, pad, sys_clk_freq, tx_mode, rx_mode, debug_sma, pmod_pads):
|
def __init__(self, qpll, pad, sys_clk_freq, tx_mode, rx_mode, debug_sma, pmod_pads):
|
||||||
|
@ -51,8 +60,8 @@ class Receiver(Module):
|
||||||
self.source.stb.eq(0),
|
self.source.stb.eq(0),
|
||||||
If(gtx.rx_ready & self.source.ack & ~((gtx.decoders[0].d == 0xBC) & (gtx.decoders[0].k == 1)),
|
If(gtx.rx_ready & self.source.ack & ~((gtx.decoders[0].d == 0xBC) & (gtx.decoders[0].k == 1)),
|
||||||
self.source.stb.eq(1),
|
self.source.stb.eq(1),
|
||||||
self.source.data.eq(Cat(gtx.decoders[0].d, gtx.decoders[1].d, gtx.decoders[2].d, gtx.decoders[3].d)),
|
self.source.data.eq(Cat(gtx.decoders[i].d for i in range(4))),
|
||||||
self.source.k.eq(Cat(gtx.decoders[0].k, gtx.decoders[1].k, gtx.decoders[2].k, gtx.decoders[3].k)),
|
self.source.k.eq(Cat(gtx.decoders[i].k for i in range(4))),
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue