I wish to design a FIFO to tansfer data from a high speed clock domain(320 MHz) to low speed clock domain(40 Mhz). I dont wish to use the cores available from any of the vendors.
Inputs =>
DataIn // 16 bit data input that is latched in on the posedge of clkHigh when Wen is high Wen // Write enable to strobe in the data into the register Ren // read enable strobe to let the reg know data was read out of the DataOut register clkHigh // High speed clock for writing data in clkLow // low speed clock for reading data out
Outputs =>
DataOut // 16 bit data out that is changed to the next value (or all low if nothing is yet stored inside) when Ren goes low after toggling high based on the clkL Full // signal goes high when all input registers are filled up. Empty // Goes high when nothing
How to decide on the depth of register DataOut to ensure that data is not overwritten. The issue is that the FIFO has to have some high speed storage capacity to allow for more data coming in then was written out.
Any suggestions would be appreciated.