
352 Embedded systems design
The only problem is that the next data pointer must be
checked to know when to reset it to the beginning of the buffer.
This provides some additional overhead. Many DSPs provide a
special modulo addressing mode that will automatically reset the
address for a particular buffer size. This buffer size is normally
restricted to a power of two.
Buffer underrun and overrun
The terms overrun and underrun have been described
throughout this chapter and have been portrayed as things to be
avoided when designing buffers and the system that supports
them. While this is generally true, it is not always the case and
there are times where ...