Re: Interrupt driven UART



In article <12jf7bg1ib8f5c8@xxxxxxxxxxxxxxxxxx>,
ms@xxxxxxxxxxxxxxxxxxxxxxxxx says...
"James Beck" <jim@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:MPG.1fa1600d44355be9989d48@xxxxxxxxxxxxxxxxxxxxxxxxxxx
When I think of FIFO I think of a linear system, possibly hardware
based, that may or may not have "wrap around" in the memory pointer
sense.

How can you implement a FIFO without wrapping pointers around?

Like a stack that pushes on one end and pops at the other

Which is a LIFO, not a fifo in my opinion.
The only difference in a LIFO and FIFO is how the data is pulled.
I guess maybe I'm not expressing myself well here.
I am speaking of how you mentally model the queue, not necessarily how
it is physically implemented.

In the end I was really just trying to point out that there will be
times when the pointers into the queue can wrap around at different
times and make doing simple math like
num_in_queue = queue_head - queue_tail
might not work....

Make the operations atomic.

OK, the operations are atomic.
How does that stop the head pointer from wrapping around and pointing at
a lower address that the tail pointer?



.



Relevant Pages

  • Re: Asynchronous FIFO with depth that is not a power of 2
    ... When a whistle blows, one or more of those against each wall must race to the other side and wait until the next whistle just like bits changing state in a counter. ... synchronizer output may be erroneous. ... if the write pointer increments and causes the FIFO to ...
    (comp.lang.verilog)
  • Re: Asynchronous FIFO with depth that is not a power of 2
    ... of the FIFO is 688, which is not a power of 2. ... use the Gray pointer technique. ... timing across an asynchronous interface). ...
    (comp.lang.verilog)
  • Re: Asynchronous FIFO with depth that is not a power of 2
    ... of the FIFO is 688, which is not a power of 2. ... use the Gray pointer technique. ... then even in case of gray pointer the ... synchronizer output may be erroneous. ...
    (comp.lang.verilog)
  • async fifo design
    ... I'm designing an "On Chip Network" System consisting of one network ... But I'm not sure how to implement such a fifo exactly. ... how to implement a gray code to binary code converter to address the ... or write pointer depending on which fifo is addressed. ...
    (comp.arch.fpga)
  • Asynchronous FIFO with depth that is not a power of 2
    ... I am trying to design an asynchronous FIFO that works with two clock ... use the Gray pointer technique. ...
    (comp.lang.verilog)