Complete the code to define the baud rate generator clock enable signal.
assign baud_tick = (clk_count == [1]) ? 1'b1 : 1'b0;
The baud_tick signal is asserted when the clock counter reaches the baud_limit value.
Complete the code to load the data into the shift register when start signal is asserted.
if (start) shift_reg <= [1];
The shift register must load the input data when transmission starts.
Fix the error in the always block sensitivity list for synchronous logic.
always @(posedge clk or [1]) begin
The asynchronous reset is usually active low and triggered on the negative edge.
Fill both blanks to correctly shift the data and update the bit counter.
if (baud_tick) begin shift_reg <= shift_reg[1] 1; bit_count <= bit_count [2] 1; end
The shift register shifts right to send LSB first, and bit_count increments by 1.
Fill all three blanks to define the UART transmitter output logic with start, data, and stop bits.
assign tx = (state == [1]) ? 1'b0 : (state == [2]) ? shift_reg[0] : (state == [3]) ? 1'b1 : 1'b1;
The transmitter outputs 0 during start bit, data bits from shift_reg, and 1 during stop bit.
