Architecture
The uart wrapper connects the UART to TileLink, alert, RACL, chip-I/O,
and interrupt interfaces. Register accesses are decoded by
uart_reg_top; the resulting uart_reg_pkg::uart_reg2hw_t
and uart_reg_pkg::uart_hw2reg_t structures connect the register block
to uart_core.
The core separates the two serial directions into uart_tx and
uart_rx.
RTL responsibilities
Object |
Responsibility |
Selected API |
|---|---|---|
Integration wrapper |
|
|
Generated bus-facing register block |
||
FIFOs, baud generation, loopback, status, and interrupts |
|
|
Parallel-to-serial datapath |
||
Oversampled serial-to-parallel datapath |
FIFO sizing
The package constants uart_reg_pkg::RxFifoDepth and
uart_reg_pkg::TxFifoDepth configure 64 receive entries and 32
transmit entries respectively. uart_core uses those values to size
the FIFO depth counters and instantiate the two synchronous FIFOs.
Data flow
On transmit, software writes a byte through the register block. The core queues
it, then presents it on uart_tx.wr_data while pulsing
uart_tx.wr. The transmitter shifts the frame out through
uart_tx.tx.
On receive, uart_core synchronizes and optionally majority-filters
the external input before forwarding it to uart_rx.rx. A valid frame
produces uart_rx.rx_data and uart_rx.rx_valid; the core
accepts the byte only when neither uart_rx.frame_err nor
uart_rx.rx_parity_err is asserted.
The upstream theory of operation covers register programming, loopback, interrupt behavior, break detection, and baud-rate calculations in detail.