English
Language : 

PM7367 Datasheet, PDF (55/323 Pages) PMC-Sierra, Inc – 32 link, 32 Channel Data Link Manager with PCI Interface
DATA SHEET
PMC-1991499
ISSUE 2
PM7367 FREEDM-32P32
FRAME ENGINE AND DATA LINK MANAGER
Receive Packet Queues
Receive Packet Queues are used to transfer RPDRs between the host and the
RMAC. There are three queues: a RPDR Large Buffer Free Queue (RPDRLFQ),
a RPDR Small Buffer Free Queue (RPDRSFQ) and a RPDR Ready Queue
(RPDRRQ). The free queues contain RPDRs referencing RPDs that define free
buffers. The ready queue contains RPDRs referencing RPDs that define buffers
ready for host processing. The RMAC pulls RPDRs from the free queues when
it needs free data buffers. The RMAC places an RPDR onto the ready queue
after it has filled the buffers with data from each complete packet. The host
removes RPDRs from the ready queue to process the data buffers. The host
places the RPDRs back onto the free queues after it finishes reading the data
from the buffers.
When starting to process a packet, the RMAC uses a small buffer RPD to store
the packet data. If the packet requires more than one buffer, the RMAC uses
large buffer RPDs to store the remainder of the packet. The RMAC links
together all the RPDs required to store the packet and returns the RPDR
associated with the first RPD onto the ready queue.
All receive packet queues reside in host memory and are defined by the Rx
Queue Base (RQB) register and index registers which reside in the RMAC. The
Rx Queue Base is the base address for the receive packet queues. Each packet
queue has four index registers which define the start and end of the queue and
the read and write locations of the queue. Each index register is 16 bits in length
and defines an offset from the Rx Queue Base. Thus, as shown in the Figure 6,
the host address of a RPDR is calculated by adding the index register to the Rx
Queue Base register. The host initialises the Rx Queue Base and all the index
registers. When an entity (either the RMAC or the host) removes elements from
a queue, the entity updates the read pointer for that queue. When an entity
(either the RMAC or the host) places elements onto a queue, the entity updates
the write pointer for that queue.
The read index for each queue points to the last valid RPDR read while the write
index points to where the next RPDR can be written. The start index points to the
first valid location within the queue; an RPDR can be written to this location.
However, the end index points to a location that is beyond a queue; an RPDR
can not be written to this location. Note however, the start index of one queue
can be set to the end index of another queue. A queue is empty when the read
index is one less than the write index; a queue is also empty if the read index is
one less than the end index and the write index equals the start index. A queue is
full when the read index is equal to the write index. Figure 6 shows the RPDR
reference queues.
PROPRIETARY AND CONFIDENTIAL TO PMC-SIERRA, INC., AND FOR ITS CUSTOMER’S INTERNAL USE 41