Closed
Description
It seems like the r_level / w_level on AsyncFIFO / AsyncFIFOBufered are broken in multiple ways:
- If the FIFO is full the level indicators become 0
- The semantics of w_level of AsyncFIFOBuffered are quite unintuitive since it cannot reach depth and is quite different from r_level / w_level of AsyncFIFO.
@awygle started to work on a fix for this and I picked up his work and added a simulation-based test case (master...anuejn:fifo_bugfix).
However, it is unclear to me, how one would implement the same behavior of w_level for AsyncFIFOBuffered as for AsyncFIFO without violating CDC rules. Maybe anyone has an idea here? Am I wrong here?