The current APB wrapper exhibits an issue with the reading process from the RX FIFO. It incorrectly accesses the wrong FIFO element. For instance, instead of fetching the first element as intended, it retrieves the second one. This error occurs as the FIFO's second element is popped during the address phase, leading to the data phase capturing this second element rather than the intended first one, as demonstrated in the provided code snippet.
https://github.com/efabless/EF_UART/blob/018334c67b7d2067ea16bf2038ca4507af94a072/hdl/rtl/bus_wrappers/EF_UART_APB.v#L244-L246
I suggest this can be fixed by either buffer the rdata value in the address phase or use apb_re_delayed instead of apb_re
The current APB wrapper exhibits an issue with the reading process from the RX FIFO. It incorrectly accesses the wrong FIFO element. For instance, instead of fetching the first element as intended, it retrieves the second one. This error occurs as the FIFO's second element is popped during the address phase, leading to the data phase capturing this second element rather than the intended first one, as demonstrated in the provided code snippet. https://github.com/efabless/EF_UART/blob/018334c67b7d2067ea16bf2038ca4507af94a072/hdl/rtl/bus_wrappers/EF_UART_APB.v#L244-L246
I suggest this can be fixed by either buffer the
rdata
value in the address phase or useapb_re_delayed
instead ofapb_re