EasyManua.ls Logo

Broadcom BCM5722 - Figure 21: Generic Ring Diagram; Producer and Consumer Indices

Broadcom BCM5722
593 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
BCM5722 Programmer’s Guide
10/15/07
Broadcom Corporation
Page 43 Descriptor Rings Document 5722-PG101-R
PRODUCER AND CONSUMER INDICES
The Producer Index and the Consumer Index control which descriptors are valid for a given ring. Each ring will have its own
separate Producer and Consumer Indices. When incremented, the Producer Index can be used to add elements to the ring.
Conversely, when incremented, the Consumer Index is used to remove elements from the ring. The difference between the
Producer and Consumer Indices mark which descriptors are currently valid in the ring (see Figure 21). When the Producer
and Consumer Index are equal, the ring is empty. When the producer is one behind the consumer, the ring is considered to
be full.
Figure 21: Generic Ring Diagram
The drawing shows a generic host descriptor ring (could be either a send ring or a receiv
e
ring), and demonstrates how the consumer and producer indices are used to determine
which descriptors in the ring are valid at any given moment in time.
1st
Cons
Prod
T
he delta between the producer and
c
onsumer indices is indicated by the
shaded areas. These shaded
descriptors are considered to be
valid (non-empty) and thus need to
be processed.

Table of Contents