1.2.3
Generic EMAC/MDIO Chip Support Library
For the most part, the mini-driver invokes CSL APIs for setup, Tx, and
interrupt service operations. The CSL layer, however, can also invoke the
mini-driver layer. The CSL layer can invoke the mini-driver registered
callback functions (set up during EMAC_open) for updating statistics and
reporting errors. On receiving a packet, it can hand over the packet to be
passed up the stack or for memory allocation/free of buffers in BDs.
This layer is OS agnostic, since it uses the NDK OS AL for all memory
and interrupt management operations. However, this layer is device-
dependent since the EMAC peripheral setup requires knowledge of the
capabilities of EMAC on this platform/device and will have to be
customized for each platform and for application needs. So, this layer
needs to be ported and customized from one platform to another.
This layer enables the generic driver architecture by doing the following:
❏ EMAC APIs. It defines the data structures and interfaces (APIs)
required to configure and use EMAC for transmit and receive
operations.
❏ MDIO and SGMII APIs. It exposes APIs for managing the PHY-
related (physical layer) configuration through the MDIO and SGMII (if
the PHY is capable of gigabit speed) modules.
❏ BD logic. It implements the basic logic for CPPI Buffer Descriptor
management (setup, enqueuing, and dequeuing operations).
❏ ISR logic. It contains the central logic for interrupt service routines.
However, it uses the mini-driver's registered callback functions to
report packet reception, statistics, errors, and obtaining or freeing a
buffer for filling up a BD.
This layer is largely generic and doesn't vary much from platform to
platform unless the EMAC capabilities change a whole lot. For example,
the CSL for an EMAC peripheral connecting to a PHY switch would be
very different from an EMAC that connects to a single PHY port. This
layer is easily portable to different devices with similar capabilities.
Ethernet Driver Architecture
Architecture Overview
1-5
Need help?
Do you have a question about the TMS320C6000 and is the answer not in the manual?
Questions and answers