diff options
| -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; |
