Skip to content

Commit eb53bba

Browse files
committed
fix(brg): Fix totalWait hard-coded for 16 oversamples
1 parent e84bb75 commit eb53bba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rtl/BaudRateGen/BaudRateGen.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module BaudRateGen #(
3636
rxRate = rate[txWidth-1:rxShift];
3737
offset = rxRate - ((rxRate >> 1) + 1);
3838

39-
totalWait = rate - {rxRate, 4'b0};
39+
totalWait = txWidth'(rate[rxShift-1:0]);
4040
preWait = rate - (totalWait >> 1);
4141
postWait = rate - preWait + txWidth'(rate[0]) + txWidth'(offset);
4242
inWait = txCount > preWait || txCount < postWait;

0 commit comments

Comments
 (0)