uart_16550

Wrap a 16550-compatible UART core and register block behind AXI-Lite.

TX_FIFO_DEPTH and RX_FIFO_DEPTH size the FIFOs. Exposes rx/tx, modem controls (cts/dsr/ri/dcd in, rts/dtr/out1/out2 out), DMA rxrdy/txrdy, err_o, and irq_o. An AXI-Lite demux with one outstanding transaction per channel splits the bus over three register maps: while LCR.DLAB is set, DLL and DLM go to the divisor-latch map; writes to THR and FCR go to the write-only map; everything else goes to the main map. In MCR.LOOP system loopback the modem outputs are held high, and in MCR.LINE_LOOPBACK rts_no, dtr_no, out1_no and out2_no follow cts_ni, dsr_ni, ri_ni and dcd_ni.

Parameters

Table 1. Parameters
NameTypeDefaultDescription
TX_FIFO_DEPTHint unsigned16Transmit FIFO depth in characters. Must be a power of 2 from 4 to 4096 inclusive.
RX_FIFO_DEPTHint unsigned16Receive FIFO depth in characters. Must be a power of 2 from 4 to 4096 inclusive.

Ports

Table 2. Ports
NameDirectionTypeDescription
clk_iinputlogicSystem clock, rising-edge triggered.
rst_niinputlogicActive-low reset. Assert asynchronously; deassert synchronously to clk_i. Resets all registers to their defaults and clears the FIFOs.
axil_req_iinputaxil_req_tAXI-Lite req (AXI4-Lite Register Interface).
axil_resp_ooutputaxil_resp_tAXI-Lite resp.
rx_iinputlogicSerial receive line; idles high. Asynchronous; synchronized internally.
tx_ooutputlogicSerial transmit line; idles high.
cts_niinputlogicClear To Send, active-low (Modem Interface). Asynchronous; synchronized internally. Reported in MSR.CTS; a change sets MSR.DCTS and raises the modem status interrupt. Does not stall the transmitter.
dsr_niinputlogicData Set Ready, active-low. Asynchronous; synchronized internally. Reported in MSR.DSR; a change sets MSR.DDSR.
ri_niinputlogicRing Indicator, active-low. Asynchronous; synchronized internally. Reported in MSR.RI; a trailing edge sets MSR.TERI.
dcd_niinputlogicData Carrier Detect, active-low. Asynchronous; synchronized internally. Reported in MSR.DCD; a change sets MSR.DDCD.
rts_nooutputlogicRequest To Send, active-low; driven from MCR.RTS outside loopback. The receiver never deasserts it on its own when the RX FIFO fills.
dtr_nooutputlogicData Terminal Ready, active-low; driven from MCR.DTR.
out1_nooutputlogicGeneral-purpose output 1, active-low; driven from MCR.OUT1.
out2_nooutputlogicGeneral-purpose output 2, active-low; driven from MCR.OUT2.
rxrdy_ooutputlogicReceiver ready, active-high (DMA Interface). FCR.DMA_MODE_SELECT chooses mode 0 or mode 1 signalling.
txrdy_ooutputlogicTransmitter ready, active-high. FCR.DMA_MODE_SELECT chooses mode 0 or mode 1 signalling.
err_ooutputlogicStorage integrity error, active-high: a data parity or pointer error in the TX or RX FIFO, or a parity error in the non-FIFO holding register. Unrelated to the parity of received characters.
irq_ooutputlogicInterrupt request, active-high. High while any of the six enabled interrupt sources is pending.