mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
fix UART RX FIFO bug where tail pointer can overtake head pointer
This commit is contained in:
parent
cdcf419147
commit
9dcd5d3622
@ -31,6 +31,7 @@
|
||||
`define BUSYBEAR 0
|
||||
`define LINUX_FIX_READ {'h10000005}
|
||||
`define LINUX_TEST_VECTORS "../linux-testgen/linux-testvectors/"
|
||||
//`define LINUX_TEST_VECTORS "/courses/e190ax/buildroot_boot/"
|
||||
// RV32 or RV64: XLEN = 32 or 64
|
||||
`define XLEN 64
|
||||
|
||||
|
@ -1,14 +1,11 @@
|
||||
set pagination off
|
||||
target extended-remote :1236
|
||||
file ../buildroot-image-output/vmlinux
|
||||
#b do_idle
|
||||
#c
|
||||
#c
|
||||
#c
|
||||
#c
|
||||
b *0x80200040
|
||||
stepi 1000
|
||||
b do_idle
|
||||
c
|
||||
c
|
||||
c
|
||||
stepi 10000
|
||||
set confirm off
|
||||
kill
|
||||
q
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -269,7 +269,7 @@ module uartPC16550D(
|
||||
rxdataready <= #1 1;
|
||||
end else if (~MEMRb & A == 3'b000 & ~DLAB) begin // reading RBR updates ready / pops fifo
|
||||
if (fifoenabled) begin
|
||||
rxfifotail <= #1 rxfifotail + 1;
|
||||
if (rxfifotail+1 < rxfifohead) rxfifotail <= #1 rxfifotail + 1;
|
||||
if (rxfifohead == rxfifotail +1) rxdataready <= #1 0;
|
||||
end else rxdataready <= #1 0;
|
||||
end else if (~MEMWb & A == 3'b010) // writes to FIFO Control Register
|
||||
|
Loading…
Reference in New Issue
Block a user