Altera cyclone V Technical Reference page 1242

Hard processor system
Hide thumbs Also See for cyclone V:
Table of Contents

Advertisement

cv_5v4
2016.10.28
Receive Descriptor Acquisition
The receive Engine always attempts to acquire an extra descriptor in anticipation of an incoming frame.
Descriptor acquisition is attempted if any of the following conditions is satisfied: †
• Bit 1 (Start or Stop Receive) of Register 6 (Operation Mode Register) has been set immediately after
being placed in the Run state. †
• The data buffer of the current descriptor is full before the frame ends for the current transfer. †
• The controller has completed frame reception, but the current receive descriptor is not yet closed. †
• The receive process has been suspended because of a host-owned buffer (RDES0[31] = 0) and a new
frame is received. †
• A Receive poll demand has been issued. †
Receive Frame Processing
The MAC transfers the received frames to the Host memory only when the frame passes the address filter
and frame size is greater than or equal to the configurable threshold bytes set for the receive FIFO buffer of
MTL, or when the complete frame is written to the FIFO buffer in store-and-forward mode. †
If the frame fails the address filtering, it is dropped in the MAC block itself (unless Bit 31 (Receive All) of
Register 1 (MAC Frame Filter) is set). Frames that are shorter than 64 bytes, because of collision or
premature termination, can be removed from the MTL receive FIFO buffer. †
After 64 (configurable threshold) bytes have been received, the MTL block requests the DMA block to
begin transferring the frame data to the receive buffer pointed by the current descriptor. The DMA sets the
First Descriptor (RDES0[9]) after the DMA Host interface becomes ready to receive a data transfer (if the
DMA is not fetching transmit data from the host), to delimit the frame. The descriptors are released when
the Own (RDES[31]) bit is clear, either as the Data buffer fills up or as the last segment of the frame is
transferred to the receive buffer. If the frame is contained in a single descriptor, both Last Descriptor
(RDES0[8]) and First Descriptor (RDES0[9]) are set.
The DMA fetches the next descriptor, sets the Last Descriptor (RDES[8]) bit, and releases the RDES0
status bits in the previous frame descriptor. Then the DMA sets bit 6 (Receive Interrupt) of Register 5
(Status Register). The same process repeats unless the DMA encounters a descriptor flagged as being
owned by the host. If this occurs,Bit 7 (Receive Buffer Unavailable) of Register 5 (Status Register) is set and
the receive process enters the Suspend state. The position in the receive list is retained. †
Receive Process Suspended
If a new receive frame arrives while the receive process is in the suspend state, the DMA refetches the
current descriptor in the Host memory. If the descriptor is now owned by the DMA, the receive process
re-enters the run state and starts frame reception. If the descriptor is still owned by the host, by default, the
DMA discards the current frame at the top of the MTL RX FIFO buffer and increments the missed frame
counter. If more than one frame is stored in the MTL EX FIFO buffer, the process repeats. †
The discarding or flushing of the frame at the top of the MTL EX FIFO buffer can be avoided by disabling
Flushing (Bit 24 of Register 6 (Operation Mode Register)). In such conditions, the receive process sets the
Receive Buffer Unavailable status and returns to the Suspend state. †
Interrupts
Interrupts can be generated as a result of various events. The DMA Register 5 (Status Register) contains a
status bit for each of the events that can cause an interrupt. Register 7 (Interrupt Enable Register) contains
an enable bit for each of the possible interrupt sources.
There are two groups of interrupts, Normal and Abnormal, as described in Register 5 (Status Register).
Interrupts are cleared by writing a 1 to the corresponding bit position. When all the enabled interrupts
Ethernet Media Access Controller
Send Feedback
Receive Descriptor Acquisition
Altera Corporation
17-27

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents