self.submodules.mila = MiLa(mila_width, mila_depth, [term], rle=True)
# Uart2Csr
- self.submodules.uart2csr = uart2csr.Uart2Csr(clk_freq, 115200)
- uart_pads = platform.request("serial")
- self.comb += uart_pads.tx.eq(self.uart2csr.tx)
- self.comb += self.uart2csr.rx.eq(uart_pads.rx)
+ self.submodules.uart2csr = uart2csr.Uart2Csr(platform.request("serial"), clk_freq, 115200)
# Csr Interconnect
self.submodules.csrbankarray = csrgen.BankArray(self,
CLOSE_CMD = 0x03
class Uart2Csr(Module):
- def __init__(self, clk_freq, baud):
- # Uart interface
- self.rx = Signal()
- self.tx = Signal()
+ def __init__(self, pads, clk_freq, baud):
# Csr interface
self.csr = csr.Interface()
# In/Out
#
self.comb +=[
- uart.rx.eq(self.rx),
- self.tx.eq(uart.tx)
+ uart.rx.eq(pads.rx),
+ pads.tx.eq(uart.tx)
]
cmd = Signal(8)