uart_wrap

Map NUM_UARTS uart_log_engine_wrap instances behind one AXI-Lite port.

Instance i owns the window at UART_LOG_ENGINE_WRAP_0__REG_MAP_BASE_ADDR plus i*UART_LOG_ENGINE_WRAP_SPACING; its UART, log-engine and CTRL bases shift by the same amount. Addresses outside every window go to an error slave that answers DECERR with read data 0xBADCAB1E. The instances' log-fetch masters share log_fetch_axil_* through an AXI-Lite mux. All other outputs are per-instance vectors, bit i from instance i.

Parameters

Table 1. Parameters
NameTypeDefaultDescription
NUM_UARTSint unsigned4UART instance count; 1 to MaxNumUarts.
UART_TX_FIFO_DEPTHint unsigned32Per-UART TX FIFO depth.
UART_RX_FIFO_DEPTHint unsigned32Per-UART RX FIFO depth.
GEN_LOG_ENGINESbit [NUM_UARTS-1:0]{NUM_UARTS{1'b1}}Bit i instantiates the log engine of UART i.
LOG_ENGINE_FIFO_DEPTHint unsigned4Entries in each log engine's read-data FIFO.
UART_LOG_ENGINE_WRAP_0__REG_MAP_BASE_ADDRbit [uart_wrap_pkg::RegAddrWidth-1:0]0Base of instance 0's decode window.
UART_LOG_ENGINE_WRAP_0__REG_MAP_SIZEbit [uart_wrap_pkg::RegAddrWidth-1:0]0Size of each instance's decode window.
UART_LOG_ENGINE_WRAP_SPACINGbit [uart_wrap_pkg::RegAddrWidth-1:0]0Address stride between instance windows and their internal map bases.
UART_REG_MAP_BASE_ADDRbit [uart_wrap_pkg::RegAddrWidth-1:0]0Instance 0's UART register-map base.
UART_REG_MAP_SIZEbit [uart_wrap_pkg::RegAddrWidth-1:0]0Per-instance UART register-map size.
LOG_ENGINE_REG_MAP_BASE_ADDRbit [uart_wrap_pkg::RegAddrWidth-1:0]0Instance 0's log-engine register-map base.
LOG_ENGINE_REG_MAP_SIZEbit [uart_wrap_pkg::RegAddrWidth-1:0]0Per-instance log-engine register-map size.
UART_LOG_ENGINE_CTRL_REG_MAP_BASE_ADDRbit [uart_wrap_pkg::RegAddrWidth-1:0]0Instance 0's CTRL register-map base.
UART_LOG_ENGINE_CTRL_REG_MAP_SIZEbit [uart_wrap_pkg::RegAddrWidth-1:0]0Per-instance CTRL register-map size.
NumRegMapsint unsignedNUM_UARTS + 1+1 for error slave.
UndefinedRegMapuart_wrap_reg_map_select_tuart_wrap_reg_map_select_t'(NumRegMaps - 1)Unmapped address sink select.

Ports

Table 2. Ports
NameDirectionTypeDescription
clk_iinputlogicSystem clock.
rst_niinputlogicActive-low reset.
csr_axil_req_iinputuart_wrap_pkg::csr_axil_req_tRegister-port request, decoded onto the instance windows.
csr_axil_resp_ooutputuart_wrap_pkg::csr_axil_resp_tCsr AXI-Lite resp.
log_fetch_axil_req_ooutputlog_engine_pkg::log_fetch_axil_req_tLog-fetch request muxed from every instance's log engine.
log_fetch_axil_resp_iinputlog_engine_pkg::log_fetch_axil_resp_tLog fetch AXI-Lite resp.
uart_en_ooutputlogic [NUM_UARTS-1:0]Per-UART CTRL.UART_EN value, active-high; not used inside the wrapper.
uart_rx_iinputlogic [NUM_UARTS-1:0]Per-UART serial receive data; asynchronous, synchronized in uart_core.
uart_tx_ooutputlogic [NUM_UARTS-1:0]Serial transmit data to the pad, one bit per UART; idles high.
uart_cts_niinputlogic [NUM_UARTS-1:0]uart cts, active-low (UART Modem Interface).
uart_dsr_niinputlogic [NUM_UARTS-1:0]uart dsr, active-low.
uart_ri_niinputlogic [NUM_UARTS-1:0]uart ri, active-low.
uart_dcd_niinputlogic [NUM_UARTS-1:0]uart dcd, active-low.
uart_rts_nooutputlogic [NUM_UARTS-1:0]uart rts, active-low.
uart_dtr_nooutputlogic [NUM_UARTS-1:0]uart dtr, active-low.
uart_out1_nooutputlogic [NUM_UARTS-1:0]uart out1, active-low.
uart_out2_nooutputlogic [NUM_UARTS-1:0]uart out2, active-low.
uart_rxrdy_ooutputlogic [NUM_UARTS-1:0]Per-UART DMA receive request, active-high: in mode 0 while the RX FIFO is not empty; in mode 1 from the trigger level or a character timeout until the FIFO empties.
uart_txrdy_ooutputlogic [NUM_UARTS-1:0]Per-UART DMA transmit request, active-high: in mode 0 while the TX FIFO is empty; in mode 1 until it fills, then again once it drains.
uart_err_ooutputlogic [NUM_UARTS-1:0]Per-UART FIFO or holding-register integrity error, active-high.
uart_irq_ooutputlogic [NUM_UARTS-1:0]Per-UART interrupt request, active-high.
log_engine_irq_ooutputlogic [NUM_UARTS-1:0]Per-UART log-engine interrupt, active-high; low for a UART generated without a log engine.