0
\$\begingroup\$

Suppose I have a FIFO code written in vhdl for FIFO. I want to delete an element from the FIFO. Here would the FIFO be acting the same as a linked list where I check each and every element of the FIFO and then match it with the data_in and then finally delete it.

OR it is the case that I should always delete the first element of the FIFO ?

Please give me some valuable suggestions .

Regards to all.

\$\endgroup\$
  • 1
    \$\begingroup\$ That all depends on how the FIFO was coded. \$\endgroup\$ – Mark Apr 22 '11 at 22:36
0
\$\begingroup\$

I have done a type of fifo with had four extra inputs: rd_cancel and rd_commit, and wr_cancel and wr_commit. The idea is that you can do a bunch of writes and then either cancel the writes you did (erase the data you just wrote) or commit that data (make it available to the read port). The same thing for reading: rd_cancel would "unread" what you just read, rd_commit would commit your reads. The cancel/commit operation would cancel or commit only the data since the last cancel/commit.

This is done by having a temporary copy of the write and read pointers. These temp pointers are copied back and forth with the real pointers depending on the cancel/commit inputs. Also, when calculating if the FIFO is full or not, sometimes the temp pointers or the real pointers are used. It's a bit complicated, and beyond this kind of forum, but if this sounds like what you want then let me know and I'll see what I can come up with.

Just FYI: I have never seen this type of FIFO done before, but it seems like an obvious solution to several FIFO related problems. The last time I googled for a FIFO like this I came up empty, but I'd be surprised if nobody else have ever dreamed up something like this.

\$\endgroup\$
  • \$\begingroup\$ hi David ... thnx for your response .... \$\endgroup\$ – zyxwvu Apr 23 '11 at 0:06
  • \$\begingroup\$ actually i was confused a bit and started thinking FIFO as a linked list rather than a queue(a simple FIFO..first in first out).Such a FIFO would take an element as an input then search for it in the queue and then delete accordingly..also the data stored in the FIFO buffer could be sorted .. i started to think in those terms .but right now i am implementing a very simple FIFO which is very much similar to a queue storing data and performing two very simple functions i.e.insert and delete.after doing these two things i would be adding a few additional features which i had been thinking. \$\endgroup\$ – zyxwvu Apr 23 '11 at 0:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.