Asynchronous FIFO cdc question

Status
Not open for further replies.

promach

Advanced Member level 4
Joined
Feb 22, 2016
Messages
1,199
Helped
2
Reputation
4
Reaction score
5
Trophy points
1,318
Activity points
11,636

Re: Asynchronous fifo cdc question

In FIFO style #1, the FIFO memory can be completely full, so an additional write will overwrite the oldest element.
If you write when the FIFO is full, the correct behavior is to ignore the write. It is not OK to destroy data that is already in the FIFO.
The AND gate prevents the overwrite.

A read will not destroy anything, so no need to AND the read signals. The logic inside "FIFO rptr & empty" will not increment the read pointer when the FIFO is empty.

In FIFO style #2 it is necessary to use "almost full" and "almost empty" signals. This means that there will be some slack, so a write when the FIFO is "almost full" will not destroy anything.
The memory in FIFO style #2 can never be completely full.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…