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.Dismiss alert
It's often useful to have a "high watermark/low watermark" signal from a FIFO, particularly when processing any kind of fixed-length frames. This could be implemented as a wrapper around SyncFIFO pretty easily but probably wants to be more deeply integrated with AsyncFIFO since there's already a clock-domain-crossing counter to use (which is not currently exposed to consumers).
The text was updated successfully, but these errors were encountered:
That means we have to Gray decode the resynchronized counters, right? Then it seems like we should rather have r_level and w_level for consistency with SyncFIFO, and the consumer of the FIFO interface can then write a comparator with HWM/LWM. We can even make it a part of the general FIFO interface, with the SyncFIFO case aliasing level as both.
In particular I think having a level is strictly more useful than watermarks (even configurable watermarks), if only for debugging. It's true that comparators are cheaper on architectures which have lookahead carry primitives, but I would say that it's the toolchain's job to simplify subtract-then-compare, since that's a fairly simple local transformation.