1
0
Fork 0

cxp: connect tx command to PHY

This commit is contained in:
morgan 2024-09-05 12:16:23 +08:00
parent 20de7b0a0c
commit 4f733ffafb
1 changed files with 20 additions and 33 deletions

View File

@ -125,41 +125,28 @@ class UpConn_Interface(Module, AutoCSR):
# tags implementation is on firmware # tags implementation is on firmware
self.submodules.command = command = TX_Command_Packet(layout) self.submodules.command = command = TX_Command_Packet(layout)
self.comb += command.source.connect(upconn_phy.tx_fifos.sink[2])
# DEBUG: OUTPUT # DEBUG: OUTPUT
self.submodules.command_out = command_out = stream.SyncFIFO(layout, 64) # self.submodules.command_out = command_out = stream.SyncFIFO(layout, 64)
self.comb += command.source.connect(command_out.sink) # self.comb += command.source.connect(command_out.sink)
self.command_inc = CSR() # self.command_inc = CSR()
self.command_dout_pak = CSRStatus(8) # self.command_dout_pak = CSRStatus(8)
self.command_kout_pak = CSRStatus() # self.command_kout_pak = CSRStatus()
self.command_dout_valid = CSRStatus() # self.command_dout_valid = CSRStatus()
self.sync += [ # self.sync += [
# output # # output
command_out.source.ack.eq(self.command_inc.re), # command_out.source.ack.eq(self.command_inc.re),
self.command_dout_pak.status.eq(command_out.source.data), # self.command_dout_pak.status.eq(command_out.source.data),
self.command_kout_pak.status.eq(command_out.source.k), # self.command_kout_pak.status.eq(command_out.source.k),
self.command_dout_valid.status.eq(command_out.source.stb), # self.command_dout_valid.status.eq(command_out.source.stb),
] # ]
self.specials += [ # self.symbol2 = CSR(9)
# pmod 0-7 pin # self.sync += [
Instance("OBUF", i_I=command.pak_wrp.sink.stb, o_O=pmod_pads[0]), # upconn_phy.tx_fifos.sink[2].stb.eq(self.symbol2.re),
Instance("OBUF", i_I=command.pak_wrp.sink.ack, o_O=pmod_pads[1]), # upconn_phy.tx_fifos.sink[2].data.eq(self.symbol2.r[:8]),
Instance("OBUF", i_I=command.pak_wrp.source.stb, o_O=pmod_pads[2]), # upconn_phy.tx_fifos.sink[2].k.eq(self.symbol2.r[8]),
Instance("OBUF", i_I=command.pak_wrp.source.ack, o_O=pmod_pads[3]), # ]
Instance("OBUF", i_I=command_out.sink.stb, o_O=pmod_pads[4]),
Instance("OBUF", i_I=command_out.sink.ack, o_O=pmod_pads[5]),
Instance("OBUF", i_I=command_out.source.stb, o_O=pmod_pads[6]),
Instance("OBUF", i_I=command_out.source.ack, o_O=pmod_pads[7]),
]
self.symbol2 = CSR(9)
self.sync += [
upconn_phy.tx_fifos.sink[2].stb.eq(self.symbol2.re),
upconn_phy.tx_fifos.sink[2].data.eq(self.symbol2.r[:8]),
upconn_phy.tx_fifos.sink[2].k.eq(self.symbol2.r[8]),
]