- 4'b0010: rx_data[0] <= serialrx;
- 4'b0011: rx_data[1] <= serialrx;
- 4'b0100: rx_data[2] <= serialrx;
- 4'b0101: rx_data[3] <= serialrx;
- 4'b0110: rx_data[4] <= serialrx;
- 4'b0111: rx_data[5] <= serialrx;
- 4'b1000: rx_data[6] <= serialrx;
- 4'b1001: rx_data[7] <= serialrx;
- 4'b1010: begin end /* Expect a 1 */
+ 4'b0010: rx_data_tmp[0] <= serialrx;
+ 4'b0011: rx_data_tmp[1] <= serialrx;
+ 4'b0100: rx_data_tmp[2] <= serialrx;
+ 4'b0101: rx_data_tmp[3] <= serialrx;
+ 4'b0110: rx_data_tmp[4] <= serialrx;
+ 4'b0111: rx_data_tmp[5] <= serialrx;
+ 4'b1000: rx_data_tmp[6] <= serialrx;
+ 4'b1001: rx_data_tmp[7] <= serialrx;
+ 4'b1010: if (serialrx == 1) begin
+ rx_data <= rx_data_tmp; /* Expect a 1 */
+ rx_hasdata <= 1;
+ end