FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5892 Discussions

FIFO Block Implementation error

AAjit2
New Contributor I
955 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
517 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

0 Kudos
4 Replies
GuaBin_N_Intel
Employee
518 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.

0 Kudos
AAjit2
New Contributor I
517 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.

0 Kudos
AAjit2
New Contributor I
517 Views

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

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