Delay buffers using synchronous FIFOs

Question: How can I make a delay buffer that always has x number of words in the buffer?



If you need a 1440 word deep delay buffer, first clock 1440 words in without any reads, then start reading and writing simultaneously with the same clocks. The important aspect is using the same clock. This allows the depth of the FIFO to stay constant at 1440. For every new word written into the FIFO, another word is read out.