Complete the code to declare the input signal for UART RX line.
module uart_rx(input wire [1], output reg data_ready);The UART receiver module needs an input wire named rx to receive serial data.
Complete the code to define the baud rate parameter for 9600 baud.
parameter BAUD_RATE = [1];The baud rate parameter should be set to 9600 for standard UART communication at 9600 baud.
Fix the error in the always block sensitivity list to trigger on the positive edge of the clock.
always @([1]) begin
// UART receive logic
endThe always block should trigger on the positive edge of the clock signal using posedge clk.
Fill both blanks to complete the bit counter update and reset logic.
if (bit_count == [1]) begin bit_count <= 0; end else begin bit_count <= bit_count [2] 1; end
The bit counter resets after counting 8 bits (0 to 7), so it resets at 8. The counter increments by 1 using the '+' operator.
Fill all three blanks to complete the data shift register update and data ready signal.
if (bit_count == [1]) begin data_ready <= 1'b1; data_out <= shift_reg; end else begin shift_reg <= {rx, shift_reg[2]1}; data_ready <= [3]; end
The data is ready after receiving 8 bits (bit_count == 7). The shift register shifts bits right by selecting bits 7 down to 1. The data_ready signal is cleared (0) while receiving data.
