- if(clk_bps) begin
- num <= num+1'b1;
- case (num)
- 4'd0: rs232_tx_r <= 1'b0; //<b>发送起始位</b>
- 4'd1: rs232_tx_r <= tx_data[0]; //发送bit0
- 4'd2: rs232_tx_r <= tx_data[1]; //发送bit1
- 4'd3: rs232_tx_r <= tx_data[2]; //发送bit2
- 4'd4: rs232_tx_r <= tx_data[3]; //发送bit3
- 4'd5: rs232_tx_r <= tx_data[4]; //发送bit4
- 4'd6: rs232_tx_r <= tx_data[5]; //发送bit5
- 4'd7: rs232_tx_r <= tx_data[6]; //发送bit6
- 4'd8: rs232_tx_r <= tx_data[7]; //发送bit7
- 4'd9: rs232_tx_r <= 1'b1; //发送结束位
- default: rs232_tx_r <= 1'b1;
- endcase
复制代码
这个特权同学的一段代码,看代码感觉没有发送起始位,但是
仿真时通过的。哪位大神指导下
一周热门 更多>