summaryrefslogtreecommitdiff
path: root/hdl/rs232.sv
diff options
context:
space:
mode:
authorJulian Blake Kongslie2022-05-15 15:53:36 -0700
committerJulian Blake Kongslie2022-05-15 15:53:36 -0700
commit716ed41a46aea2a3c81564b6e6a55e3b3e43ec46 (patch)
tree6d8aed132fc842ed12495d0401bab5b2911e10ad /hdl/rs232.sv
parentChange to 1Mbaud RS232 (diff)
downloadmultipdp8-716ed41a46aea2a3c81564b6e6a55e3b3e43ec46.tar.xz
Fix the RS232 receive state machine 😠💢:mad:
Our current consensus is that we have a bug which causes the RX state machine to make incomprehensible jumps when the sample counter is more than about 9 bits wide. We haven't completely pinned down the problem; we saw it when running at 1Mbaud with a 7 bit (one extra bit) counter. I hate Verilog and Altera, both exclusively and in combination.
Diffstat (limited to '')
-rw-r--r--hdl/rs232.sv2
1 files changed, 1 insertions, 1 deletions
diff --git a/hdl/rs232.sv b/hdl/rs232.sv
index 2a31e31..29ccb6c 100644
--- a/hdl/rs232.sv
+++ b/hdl/rs232.sv
@@ -136,7 +136,7 @@ module rs232_rx
136 bit [$clog2(`UART_BYTE_BITS):0] data_bits; 136 bit [$clog2(`UART_BYTE_BITS):0] data_bits;
137 bit parity; 137 bit parity;
138 138
139 bit [$clog2(OVERSAMPLE+1)+2:0] sample; 139 bit [$clog2(OVERSAMPLE+1):0] sample;
140 bit [$clog2(OVERSAMPLE+1):0] clock_counter; 140 bit [$clog2(OVERSAMPLE+1):0] clock_counter;
141 bit [$clog2(OVERSAMPLE+1):0] next_clock_counter; 141 bit [$clog2(OVERSAMPLE+1):0] next_clock_counter;
142 142