diff options
| author | Julian Blake Kongslie | 2022-04-22 22:43:10 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-04-22 22:43:10 -0700 |
| commit | ac61ee2ad230b8f93a23c9cfe01880b4385fd747 (patch) | |
| tree | e87f000c991f0e9c418bfcc73cf7bd5524255831 /hdl/rs232.sv | |
| parent | Refer to wrap bits instead of previous greycode in FIFO greycode calculation. (diff) | |
| download | multipdp8-ac61ee2ad230b8f93a23c9cfe01880b4385fd747.tar.xz | |
Transmit two stop bits to RS232 uart.
Diffstat (limited to '')
| -rw-r--r-- | hdl/rs232.sv | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/hdl/rs232.sv b/hdl/rs232.sv index 03378ef..41403a6 100644 --- a/hdl/rs232.sv +++ b/hdl/rs232.sv | |||
| @@ -17,7 +17,8 @@ module rs232_tx | |||
| 17 | (* syn_encoding = "one-hot" *) enum int unsigned | 17 | (* syn_encoding = "one-hot" *) enum int unsigned |
| 18 | { START | 18 | { START |
| 19 | , DATA | 19 | , DATA |
| 20 | , STOP | 20 | , STOP1 |
| 21 | , STOP2 | ||
| 21 | } state; | 22 | } state; |
| 22 | 23 | ||
| 23 | bit [$clog2(`UART_BYTE_BITS):0] data_bits; | 24 | bit [$clog2(`UART_BYTE_BITS):0] data_bits; |
| @@ -53,7 +54,12 @@ module rs232_tx | |||
| 53 | ++data_bits; | 54 | ++data_bits; |
| 54 | end | 55 | end |
| 55 | 56 | ||
| 56 | STOP: begin | 57 | STOP1: begin |
| 58 | tx = 1; | ||
| 59 | state = state.next; | ||
| 60 | end | ||
| 61 | |||
| 62 | STOP2: begin | ||
| 57 | hold_valid = 0; | 63 | hold_valid = 0; |
| 58 | tx = 1; | 64 | tx = 1; |
| 59 | state = state.next; | 65 | state = state.next; |
