uart_rx

Sample rx_i at 16× baud and assemble a UART receive frame.

tick_baud_x16_i paces oversampling; word_length_i, parity_enable_i, parity_odd_i, and extra_stop_bit_i shape the expected frame. rx_valid_o pulses with rx_data_o; frame_err_o and rx_parity_err_o report framing and parity faults with the same pulse. rx_i is not synchronized here; uart_core synchronizes and filters it. A start bit that is no longer low at mid-bit is discarded as a glitch.

Ports

Table 1. Ports
NameDirectionTypeDescription
clk_iinputlogicSystem clock.
rst_niinputlogicActive-low reset.
rx_enable_iinputlogicLow clears the receiver and holds it idle.
tick_baud_x16_iinputlogic16× baud oversample tick.
parity_enable_iinputlogicInclude a parity bit in the frame.
parity_odd_iinputlogic1 selects odd parity; 0 selects even.
parity_force_iinputlogicStick parity. When set with parity_enable_i, the check flags data with an odd number of ones and ignores the received parity bit.
word_length_iinputlogic [3:0]Data bits per frame.
extra_stop_bit_iinputlogicAdd a second stop bit when high.
tick_baud_ooutputlogicOne-cycle pulse per bit period from the receive baud divider, realigned to mid-bit at each start bit.
rx_valid_ooutputlogicOne-cycle pulse at the end of each received frame.
rx_data_ooutputlogic [7:0]Received data, valid with rx_valid_o.
idle_ooutputlogicHigh when no frame is being received or rx_enable_i is low.
frame_err_ooutputlogicPulses with rx_valid_o when a stop bit is sampled low. Two stop bits are checked when extra_stop_bit_i is set and the word length is not 5.
rx_parity_err_ooutputlogicPulses with rx_valid_o when parity_enable_i is set and the parity check fails.
rx_iinputlogicSerial receive line.