FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5145 Discussions

FIFO Block Implementation error

AAjit2
New Contributor I
625 Views

I tried writing my own version of FIFO block but I can't seem to understand how the read data stages shift out of the FIFO pushing down the stages above it all the while continuously writing into the FIFO from the outside. To give an example say I write a b c into the FIFO at 1 2 3 position, at c I start reading the data so a comes out and b becomes 1 and c becomes 2. However while I'm reading out data, I want data to be written in and not at 4 because 3 is now empty as c is in 2. So how do I write the code such that both processes happen side by side yet the shifting is also happening. Any help with this is much appreciated.

0 Kudos
1 Solution
GuaBin_N_Intel
Employee
187 Views

To my best understanding in FIFO, it should have two separate control logic blocks to perform read and write on a RAM. It uses a pointer to determine which address to do the read or write operation. Hence, NOT really need shift the data from one location to another.

View solution in original post

4 Replies
GuaBin_N_Intel
Employee
188 Views

To my best understanding in FIFO, it should have two separate control logic blocks to perform read and write on a RAM. It uses a pointer to determine which address to do the read or write operation. Hence, NOT really need shift the data from one location to another.

AAjit2
New Contributor I
187 Views

Wait, so if the data isn't shifted, how does the read data removed once it's read out? With the pointers it would seem as though it just keeps reading up until the FIFO is full without clearing the previous data.

AAjit2
New Contributor I
187 Views

Ahh okay! Thank you so much, this clears it up quite a bit!

GuaBin_N_Intel
Employee
187 Views
It won't be removed unless you reset the RAM block completely or overwrite old data with new data.
Reply