|
发表于 2018-4-20 11:03:35
|
显示全部楼层
read through the whole reply. I also provide my opinion.
1. For Async_FIFO:
The whole diagram has 3 parts: write, CDC between read and write, and read
CDC may have the meta stability issue, that's why we need to use gray code
For 100<->1 clock rate, I think it's not related to CDC. I try to simplify it with sync fifo, with two clock, but two clock are synchronous, like generated clock to avoid CDC issue first.
2. Sync FIFO
2.1 If write clock is 100 times of read clock
In write part, main signals has two parts: 1. write 2. fifo_full
Since write is too fast, and write clock will sample rd_pointer fast and compare with wr_pointer. The control part will report full without issue.
In read part, , signals also has tow parts: 1. read, 2. fifo_empty
there are two case:
a. write and read both work, since write is too fast, it will not have chance to catch wr_pointer, so it will not have chance to set empty signal. so no issue here.
b. write sotp and read work, wr_pointer keeps unchange, if rd_pointer catch wr_pointer, it will set empty signal, no issue either.
2.2 read clock is 100 times faster than write clock
In read part, read clock is faster. When both write and read work, if rd_ptr catches wr_ptr, it will assert fifo_empty, since it's fast, sample miss will not happen. When write stops, there is no issue
In write part, if both work, wr_pointer has no chance to catch rd_ptr, there is no issue and fifo_full will not be set
If read part stops and wr part work, sampling issue has not issue, fifo_full will set regularily.
So, for sync_fifo, I don't think 100 times will have problem.
Let's come back to async_fifo. The big difference is CDC. If we suppose no CDC issue, what's the difference between async_fifo and sync_fifo logically. CDC issue is already solved mostly with Gray code for wr_pointer and rd_pointer. I remember there is a paper to talk about aync_fifo design. Some one call it fifo2.pdf. |
|