deepu_s_s
Full Member level 5
Hi Friends,
I am designing a FIFO. Please confirm whether I am correct about the FIFO.
FIFO : First in First Out . Consider an array of 10 elements. The FIFO will have write_pointer, read_pointer, full, empty signals. First two of them are not interfacing signals. They are used for internal purpose.
Initially, the write_pointer and the read_pointer are set to 0; the starting location of the FIFO.
If we want to write into FIFO, check the full = 0, then
fifo_array[write_pointer] = data_in
write_pointer = write_pointer + 1.
Suppose we inserted 5 elements. Then the write_pointer = 5.
Now we start reading the elements from it. we check the empty = 0, then
data_out = fifo_array[read_pointer]
We read all the 5 elements and now, the FIFO is empty. then empty = 1.
i.e empty is asserted when the read_pointer = write_pointer.
Now the full is asserted, when write_address = FIFO size.
If the read_pointer = write_pointer, i.e the FIFO EMPTY case, We then reset the values of read_pointer = write_pointer=0.
Am I right about the FIFO operation? Please correct me if I am wrong. And also please post me some docs .
Thanks and Regards
Deepak
I am designing a FIFO. Please confirm whether I am correct about the FIFO.
FIFO : First in First Out . Consider an array of 10 elements. The FIFO will have write_pointer, read_pointer, full, empty signals. First two of them are not interfacing signals. They are used for internal purpose.
Initially, the write_pointer and the read_pointer are set to 0; the starting location of the FIFO.
If we want to write into FIFO, check the full = 0, then
fifo_array[write_pointer] = data_in
write_pointer = write_pointer + 1.
Suppose we inserted 5 elements. Then the write_pointer = 5.
Now we start reading the elements from it. we check the empty = 0, then
data_out = fifo_array[read_pointer]
We read all the 5 elements and now, the FIFO is empty. then empty = 1.
i.e empty is asserted when the read_pointer = write_pointer.
Now the full is asserted, when write_address = FIFO size.
If the read_pointer = write_pointer, i.e the FIFO EMPTY case, We then reset the values of read_pointer = write_pointer=0.
Am I right about the FIFO operation? Please correct me if I am wrong. And also please post me some docs .
Thanks and Regards
Deepak