
When the receive DMA process attempts to open
the buffer that BOUND points to for storage of a
packet, it aborts the reception and sets the
INTSTAT.OVW flag (in the Interrupt Status
Register) and the RSTAT.MPA bit (in the Receiver
Status Register). The protected buffer is not written
to.
Normally, BOUND is set up to point to the oldest
received packet in the ring. This pointer can be
managed by the host. To discard an unwanted
frame, the host may simply rewrite BOUND to point
to the next packet. A good practice is to write zeros
into the first byte of the discarded packet to prevent
future interpretation as a received packet.
When BOUND and CURR have the same value,
the ring may be either full or empty. The 83C795
can distinguish between full and empty rings.
CURR is updated by the DMA controller at the end
of a frame reception. The ring is considered full if
these two registers are equal and the DMA
controller updated CURR more recently than the
host updated BOUND. Conversely, when data is
being removed from the ring, the host updates
BOUND after removal. When it has been advanced
past the end of the last received frame, it should
have the same value as CURR. The chip treats the
ring as empty when these two register values are
equal and BOUND has been updated after CURR.
When initializing the buffer ring, BOUND and CURR
may be given the same or different values. These
registers may be initialized to point to any buffer
within the ring. They may point to RSTART but may
notpoint to RSTOP. If CURR points outside the ring,
the RDMA will store frames outside the ring in an
unpredictable manner. If BOUND points outside the
ring, the received frames will not be protected from
overwrites by later frames.
Figure 8-4 illustrates the buffer ring in two common
states. The top ring, INITRBUF, illustrates the
relationship between these pointers in a typical ring
initialization. The bottom ring, RBUF, shows a ring
that has received a few frames - the normal
condition for the ring.
FIGURE 8-4. RECEIVER BUFFER RING 1
83C795
BUFFER STRUCTURING AND DATA MOVEMENT PROCESSES
86