2 descriptor processor, 1 receive descriptor processor queues, 2 receive descriptor queue – Cirrus Logic EP93xx User Manual

Page 315: 2 descriptor processor -13

Advertising
background image

DS785UM1

9-13

Copyright 2007 Cirrus Logic

1/10/100 Mbps Ethernet LAN Controller

EP93xx User’s Guide

9

9

9

9.1.4.11.4 Steps for PHY Startup

1. Set the MDC ClockDivisor and the PreambleSuppress for the PHY in the SelfCtl

register. The default value 0x0000_0F10 is appropriate for most PHYs in transmission
mode.

2. Have the PHY perform auto-negotiation.

3. Read the Auto-Negotiation_Link_Partner_Ability register to check the PHY’s

configuration.

4. If the link is Full Duplex, then set MAC for Full Duplex.

9.2 Descriptor Processor

The MAC operates as a bus master to transfer all receive and transmit, data and status,
across the AHB bus. The transfers are managed by two sets of queues for each direction, a
descriptor queue and a status queue. The following section details the operation of these
queues.

9.2.1 Receive Descriptor Processor Queues

The Receive Descriptor Processor uses two circular queues in Host memory to manage the
transfer of receive data frames. The receive descriptor queue is used to pass descriptors of
free data buffers from the Host to the MAC. The receive status queue is used to pass
information on the MAC’s use of the data buffers back to the Host. Keeping these queues
separate enables the use of burst transfers to and from the queues, reducing the overall
amount of bus traffic and avoiding some potential latency problems.

9.2.2 Receive Descriptor Queue

The receive descriptors are passed from the Host to the MAC via the receive descriptor
queue. The receive descriptor queue is a circular queue occupying a contiguous area of
memory. The location and size of the queue are set at initialization writing to the Receive
Descriptor Queue Base Address Register, the Receive descriptor current address, and the
Receive Descriptor Queue Base Length. The base address must point to a word-aligned
memory location. The Current Address must be set to point to the first descriptor to be used.
This would normally be the first entry (same value as the base address). The Receive
Descriptor Queue Base Length is set to the length (in bytes) of the queue. The number of
descriptors should be an integral power-of-two (2, 4, 8, 16, etc.). Otherwise the Receive
Descriptor Processor may not work properly and the MAC/Ethernet may stop receiving
frames.

Each descriptor entry defines one receive data buffer, and consists of two words. The first
word contains the address of the data buffer, which must be word aligned. The second word
contains three fields: buffer length, buffer index and a Not Start Of Frame bit. The buffer
length field specifies the maximum number of bytes to be used in the buffer and should be an
integral number of words. If the buffer length is set to zero, the descriptor will be ignored, and
no status will be posted for the buffer. The buffer index can be used by the Host to keep track

Advertising