You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
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?
The text was updated successfully, but these errors were encountered:
Yeah I goofed this up pretty badly (we either need a lot more simulation test cases for AsyncFIFO or we need to implement #387...). Thanks for the test case! I'll pick this back up ASAP, just kinda swamped at the moment.
Per IRC discussion, @anuejn may be able to fix this bug as they already have a partial fix for r_level. The fix for w_level would involve resynchronizing the state of the output buffer (which has the same CDC latency as the Gray counters themselves) and then doing the same thing as for r_level.