Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AAjit2
New Contributor I
490 Views

FIFO Block Implementation error

Jump to solution

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

Accepted Solutions
GuaBin_N_Intel
Employee
52 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
53 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

AAjit2
New Contributor I
52 Views

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

AAjit2
New Contributor I
52 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.

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