Xilinx is disclosing this user guide, manual, release note, and/or specification (the "Documentation") to you solely for use in the development
of designs to operate with Xilinx hardware devices. You may not reproduce, distribute, republish, download, display, post, or transmit the
Documentation in any form or by any means including, but not limited to, electronic, mechanical, photocopying, recording, or otherwise,
without the prior written consent of Xilinx. Xilinx expressly disclaims any liability arising out of your use of the Documentation. Xilinx reserves
the right, at its sole discretion, to change the Documentation without notice at any time. Xilinx assumes no obligation to correct any errors
contained in the Documentation, or to advise you of any corrections or updates. Xilinx expressly disclaims any liability in connection with
technical support or assistance that may be provided to you in connection with the Information.
THE DOCUMENTATION IS DISCLOSED TO YOU “AS-IS” WITH NO WARRANTY OF ANY KIND. XILINX MAKES NO OTHER
WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY, REGARDING THE DOCUMENTATION, INCLUDING ANY
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT OF THIRD-PARTY
RIGHTS. IN NO EVENT WILL XILINX BE LIABLE FOR ANY CONSEQUENTIAL, INDIRECT, EXEMPLARY, SPECIAL, OR INCIDENTAL
DAMAGES, INCLUDING ANY LOSS OF DATA OR LOST PROFITS, ARISING FROM YOUR USE OF THE DOCUMENTATION.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.comUG074 (v2.2) February 22, 2010
Revision History
www.BDTIC.com/XILINX
The following table shows the revision history for this document.
DateVersionRevision
11/11/041.0Initial Xilinx release.
07/05/051.1In Chapter 2:
• Revised Tab l e 2-6 , pa g e 23, “Tie-Off Pins,” page 24, and Table 2-10, page 25.
In Chapter 3:
• Revised Ta bl e 3- 6 and Figure 3-5. Added information to “Normal Frame Transmission”.
Revised Figure 3-6, “Client Underrun”, Figure 3-7, and Figure 3-9.
• Added information to “Transmit (TX) Client – 16-bit Wide Interface,” page 43.
• Added information to “Auto-Negotiation Interrupt,” page 145.
• Added information to “SGMII Standard,” page 146.
In Chapter 4:
• Revised sample code in “Interfacing to the Processor DCR,” page 150.
In Chapter 5:
•Replaced Figure 5-2, page 154 and Figure 5-3, page 156.
Added Appendix A, “Ethernet MAC Timing Model.”
07/20/051.2Revised figures.
09/07/051.3Corrected items from
“Miscellaneous Functions.” Updated pin 76 in Ta bl e 2 -9 . Revised Figure 3-56, Figure 3-57,
Figure 3-61, Figure 3-63, Figure 3-67, Figure 3-68, Figure 3-72, Figure 5-1, Figure 5-2, and
Figure 5-3. Added “Tri-Mode RGMII v1.3” in Chapter 3. Moved the “Using the DCR Bus as the
Host Bus”, “Description of Ethernet MAC Register Access through the DCR Bus”, and
“Address Code” sections to the “Host Interface” section.
UG074 (v2.2) February 22, 2010www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
version 1.1 and 1.2. Inserted eight new figures into Chapter 5,
DateVersionRevision
www.BDTIC.com/XILINX
02/07/061.4In Chapter 2, “Ethernet MAC Architecture”:
• Added EMAC#CLIENTRXCLIENTCLKOUT to Tabl e 2 -2, p age 1 9.
•Section “10/100/1000 SGMII Clock Management” in Chapter 4: The external, high-quality
reference clock for the RocketIO transceiver changed from 125 MHz to 250 MHz. The GT11
clock schemes are simplified as shown in Figure 4-24.
•Section “1000BASE-X PCS/PMA (8-bit Data Client) Clock Management” in Chapter 4: The
GT11 clock schemes are simplified as shown in Figure 4-27.
•Section “1000BASE-X PCS/PMA Clock Management” in Chapter 4: The external, high-
quality reference clock for the 16-bit Data Client MGT changed from 125 MHz to 250 MHz.
The GT11 clock schemes are simplified as shown in Figure 4-28.
• Ta bl e 4- 1 3: Corrected 4.8:7 Pause, 10 and 11 (reversed)
•Section “MGT Elastic Buffer (Ring Buffer)” in Chapter 4: Corrected underflow/overflow
marks, and as a result corrected maximum frame size (Tab le 4 -4 ).
•Section “Transmit Clocking Scheme” in Chapter 5: Corrected description of inputs used to
generate client-side clock.
•Section “Reading the PHY Registers Using MDIO” in Chapter 6: Corrected decode address.
•Section “Writing to the PHY Registers Using MDIO” in Chapter 6: Corrected register
address for EMAC1 Management Configuration; corrected decode address.
• Chapter 7, “Using the Embedded Ethernet MAC” updated.
03/27/071.6• Tab le 2 - 9: Removed Note (1).
• Ta bl e 2- 11 : Revised Note (1).
• Ta bl e 3- 5 : Removed exception from description of Length/Type Out of Range.
• Ta bl e 3- 2 0: Corrected default value for bit 31 (Promiscuous Mode Enable).
• Chapter 4: Multiple revisions in block schematic diagram figures.
• Chapter 4: Former section “1000BASE-X PCS/PMA (8-bit Data Client) Clock Management”
in Chapter 4incorporated into
• Ta bl e 4- 3 : Consolidated “RISING” and “FALLING” RGMII signals into single signals with
revised descriptions. Added Note (1) to RGMII_TX_CTL_# and RGMII_RX_CTL_#.
UG074 (v2.2) February 22, 2010www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
section “8-Bit Data Client.”
DateVersionRevision
www.BDTIC.com/XILINX
08/20/071.7• Replaced screen shots with updated images from v4.5 software.
• Ta bl e 2- 11 : Revised description of TIEEMAC#CONFIGVEC[63].
•Section “Length/Type Field Error Checks” in Chapter 3: Numerous textual revisions
throughout this section.
•Section “Receiving a PAUSE Control Frame” in Chapter 3: Last paragraph revised.
• Ta bl e 3- 9 : Revised definition of Receiver Configuration register bit [25] (LT_DIS).
• Figure 4-7 through Figure 4-10 and Figure 4-12 through Figure 4-16 and accompanying
text: Added IDELAY element to clock input.
• Figure 4-24: Corrected placement of BUFG to TXCLIENTCLKOUT.
• Made other typographical edits.
02/06/081.8• Added conditions causing assertion of EMAC#CLIENTRXBADFRAME to “Frame
Reception with Errors,” page 53.
• Rewrote description of ALIGNMENT_ERROR bit in Tab l e 3-5 , pag e 70.
• Updated Figure 4-28, page 139.
•Added “Core Latency” in Appendix A.
08/13/081.9• Corrected transposition error in the description column for bit [1] in Table 3-13, page 78
(values 0 and 1 were switched in second sentence).
• Corrected transposition error in the description column for bits 5.8:7 in Table 4-14, page 144
(values 01 and 10 were switched).
• Rewrote item number 1 for 1000BASE-X auto-negotiation summary (“Overview of
Operation,” page 151).
• Updated the link in the first bullet of “Global Buffer Usage,” page 165.
Mode Operation with Byte PHY Enabled (Full-Duplex Only),” page 110, “1 Gb/s
RGMII Clock Management,” page 115, “Tri-Mode RGMII v2.0,” page 117, and “Tri-
Mode RGMII v1.3,” page 120, changed the description of the method used to delay
the received clock (GMII_RX_CLK in case of GMII and RGMII_RXC in case of
RGMII) with respect to data. Original method described use of IDELAY and BUFG.
Revised method describes use of a DCM and BUFG.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com11
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
12www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
About This Guide
This document is the Virtex®-4 FPGA Embedded Tri-Mode Ethernet MAC User Guide.
Guide Contents
This user guide contains the following chapters:
•Chapter 1, “Introduction,” introduces the Virtex-4 FPGA Embedded Tri-Mode
Ethernet MAC and summarizes its features.
•Chapter 2, “Ethernet MAC Architecture,” describes the architecture of the Ethernet
MAC and defines its signals.
•Chapter 3, “Client, Host, and MDIO Interfaces,” provides design information for the
client, host, and MDIO interfaces.
•Chapter 4, “Physical Interface,” describes design considerations for the supported
interfaces when using the Ethernet MAC.
•Chapter 5, “Miscellaneous Functions,” provides useful information for designing
with the Ethernet MAC.
•Chapter 6, “Use Models,” describes some available models and how to interface the
Ethernet MAC to a processor DCR or an FPGA statistics block.
•Chapter 7, “Using the Embedded Ethernet MAC,” describes the Verilog and VHDL
CORE Generator™ wrappers.
•Appendix A, “Ethernet MAC Timing Model,” provides details on the timing
parameters of the Ethernet MAC timing model.
Preface
Additional Resources
For additional information, go to http://www.xilinx.com/support.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com13
UG074 (v2.2) February 22, 2010
Preface: About This Guide
www.BDTIC.com/XILINX
Conventions
This document uses the following conventions. An example illustrates each convention.
Typographical
The typographical conventions in the following table are used in this document:
R
ConventionMeaning or UseExample
Italic font
Byte/bit
Hex and binary
notation
Vertical ellipsis
.
.
.
Horizontal ellipsis . . .
References to other manuals
Emphasis in text
“B” means “byte,”and
“b” means “bit”
EXCEPTIONS:
Hex and binary numbers are in a
monospace typeface.
The 0x prefix is often used to
designate a hex string.
Repetitive material that has
been omitted
Repetitive material that has
been omitted
See the Virtex-4 Data Sheet for
more information.
If a wire is drawn so that it
overlaps the pin of a symbol, the
two nets are not connected.
8B word
64b word
8B/10B = 8 bit/10 bit
64B/66B = 64 bit/66 bit
0 or 1 [binary]
11010011 [binary]
0x0123456789ABCDEF
IOB #1: Name = QOUT’
IOB #2: Name = CLKIN’
.
.
.
allow block block_name
loc1 loc2 ... locn;
Online Document
The cross-reference and linking conventions shown in the following table are used in this
document:
ConventionMeaning or UseExample
Blue text
Red text
Blue, underlined text
14www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
Cross-reference link to a location
in the current document
Cross-reference link to a location
in another document
Hyperlink to a website (URL)
See the section “Additional
Resources” for details.
Refer to “Title Formats” in
Chapter 1 for details.
See the Virtex-4 User Guide.
Go to http://www.xilinx.com
for the latest speed files.
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Introduction
This chapter introduces the Virtex®-4 FPGA Embedded Tri-Mode Ethernet Media Access
Controller (MAC). It contains the following sections:
•“Ethernet MAC Overview”
•“Features”
Ethernet MAC Overview
Figure 1-1 shows the Virtex-4 FPGA Tri-Mode Ethernet MAC that is used to provide
Ethernet connectivity to the Virtex-4 FX family of devices.
Chapter 1
FPGA Auxiliary
Processor Port
IS-PLB Port
DS-PLB Port
DCR
Interface
Physical
Interface
Processor Block
APU
Control
Te st
Reset and
Control
DCR
Control
APU
ISPLB
DSPLB
DCR
ISOCM
Control
ISOCM
PPC405
Processor
DSOCM
DSOCM
Control
EMAC
Block
DCR
Bus
Physical
Interface
Figure 1-1:Virtex-4 FPGA Embedded Tri-Mode Ethernet MAC
Client Data
Interface
EMAC
Host
Interface
EMAC
Client Data
Client
Statistics
Interface
Generic
Host Bus
Client
Statistics
Interface
Interface
UG074_1_01_012408
The Virtex-4 FPGA Ethernet MAC has two Ethernet MACs sharing a single host interface.
Either or both of the Ethernet MACs can be selected to access the Ethernet MAC registers.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com15
UG074 (v2.2) February 22, 2010
Chapter 1: Introduction
www.BDTIC.com/XILINX
Features
R
The key features of the Virtex-4 FPGA Ethernet MAC are:
•Fully integrated 10/100/1000 Mb/s Ethernet MAC
•Designed to the IEEE Std 802.3-2002 specification
•Configurable full-duplex operation in 10/100/1000 Mb/s
•Configurable half-duplex operation in 10/100 Mb/s
•Management Data Input/Output (MDIO) interface to manage objects in the physical
layer
•User-accessible raw statistic vector outputs
•Support for VLAN frames
•Configurable inter-frame gap (IFG) adjustment in full-duplex operation
•Configurable in-band Frame Check Sequence (FCS) field passing on both transmit
and receive paths
•Auto padding on transmits and stripping on receives
•Configured and monitored through a host interface
•Hardware-selectable Device Control Register (DCR) bus or generic host bus interface
•Configurable flow control through Ethernet MAC Control PAUSE frames;
symmetrically or asymmetrically enabled
•Configurable support for jumbo frames of any length
•Configurable receive address filter for unicast, multicast, and broadcast addresses
•Media Independent Interface (MII), Gigabit Media Independent Interface (GMII), and
Reduced Gigabit Media Independent Interface (RGMII)
•Includes a 1000BASE-X Physical Coding Sublayer (PCS) and a Physical Medium
Attachment (PMA) sublayer for use with the RocketIO™ Multi-Gigabit Transceiver
(MGT) to provide a complete on-chip 1000BASE-X implementation
•Serial Gigabit Media Independent Interface (SGMII) supported through MGT
interface to external copper PHY layer for full-duplex operation only
16www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Ethernet MAC Architecture
This chapter describes the architecture of the Virtex®-4 FPGA Embedded Tri-Mode
Ethernet Media Access Controller (MAC). It contains the following sections:
•“Architecture Overview”
•“Ethernet MAC Primitive”
•“Ethernet MAC Signal Descriptions”
Architecture Overview
The Virtex-4 FPGA Embedded Tri-Mode Ethernet MAC supports 10/100/1000 Mb/s data
rates and is designed to IEEE Std 802.3-2002 specifications. The Ethernet MAC can operate
as a single speed Ethernet MAC at 10, 100, or 1000 Mb/s or as a tri-mode Ethernet MAC.
The Ethernet MAC supports the IEEE standard GMII and the RGMII protocols to reduce
the width of the bus to the external physical interface. A 1000BASE-X PCS/PMA sublayer,
when used in conjunction with the Virtex-4 FPGA RocketIO™ Multi-Gigabit Transceiver
(MGT), provides a complete on-chip 1000BASE-X implementation.
Chapter 2
Figure 2-1 shows a block diagram of the Ethernet MAC block. The block contains two
Ethernet MACs sharing a single host interface. The host interface can use either the generic
host bus or the DCR bus through the DCR bridge. Each Ethernet MAC has an address filter
to accept or reject incoming frames on the receive datapath. The Ethernet MAC outputs
raw statistic vectors to enable statistics gathering. The statistics vectors are multiplexed to
reduce the number of pins at the block boundary. An external module (StatsIP0 and/or
StatsIP1) can be designed and implemented in the FPGA fabric to accumulate all the
statistics of the Ethernet MAC. The “Interfacing to an FPGA Fabric-Based Statistics Block”
section provides additional information on the statistics block.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com17
UG074 (v2.2) February 22, 2010
Chapter 2: Ethernet MAC Architecture
www.BDTIC.com/XILINX
R
StatsIP1
Rx Stats MUX1Tx Stats MUX1
ClientTx1/Rx1
To PowerPC 405 block
Generic Host Bus
ClientTx0/Rx0
FPGA Fabric
DCR Bus
Ethernet MAC
Block
EMAC1
DCR
Bridge
Rx Stats MUX0Tx Stats MUX0
Host Interface
EMAC0
StatsIP0
Tx1/Rx1
PHY
Tx0/Rx0
ug074_2_01_091704
Figure 2-1:Ethernet MAC Block
A detailed block diagram of the 10/100/1000 Ethernet MAC is shown in Figure 2-2. On the
physical side, it consists of the GMII and RGMII interfaces using standard I/Os to access
data and control signals to an external physical interface. In addition, the PCS/PMA
sublayer interfaces directly to the MGT.
The client side consists of the user transmit and receive interfaces. The flow control module
keeps traffic from being congested in the Ethernet MAC. The Management Data I/O
interface, (MDIO), allows access to the control and status registers in the external physical
interface or in the PCS sublayer when configured in 1000BASE-X and SGMII modes.
The clock management module automatically configures the output clocks to the correct
frequency based on the internal speed of the Ethernet MAC (10 Mb/s, 100 Mb/s, or
1000 Mb/s) and the Ethernet MAC mode settings (GMII, MII, RGMII, SGMII, and
1000BASE-X).
18www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Architecture Overview
Clock Management
MII / GMII / RGMII Interface
TX
Tr ansmit Engine
to External PHY
Flow Control
MGT
Generic
Host Bus
DCR Bus
RX
16-bit or 8-bit Client Interface
Receive Engine
MII / GMII / RGMII Interface
Address Filter Registers
Host
Interface
MDIO Interface
Configuration Registers
tx_stats_vec rx_stats_vec
Figure 2-2:Functional Block Diagram of 10/100/1000 Ethernet MAC
PCS / PMA Sublayer
MDIO Interface
to External PHY
Statistics
UG074_2_02_081308
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com19
UG074 (v2.2) February 22, 2010
Chapter 2: Ethernet MAC Architecture
www.BDTIC.com/XILINX
Ethernet MAC Primitive
The Virtex-4 FPGA Embedded Tri-Mode Ethernet MAC has an EMAC primitive. The
primitive contains access to both Ethernet MACs (EMAC0 and EMAC1).
By using the Ethernet MAC primitive, any of these supported interfaces can be created:
•Gigabit Media Independent Interface (GMII)
•Media Independent Interface (MII)
•Reduced Gigabit Media Independent Interface (RGMII)
•Serial Gigabit Media Independent Interface (SGMII)
•1000BASE-X Physical Coding Sublayer (PCS) and Physical Medium Attachment
(PMA)
Detailed connections to support/create these interfaces using the Ethernet MAC primitive
are found in Chapter 4, “Physical Interface.”
The Ethernet MAC primitive is discussed in different sections:
•Receive / Transmit Client Interface
•See “Client Interface” in Chapter 3.
•Flow Control
See “Flow Control Block” in Chapter 3.
R
•Generic Host Bus
Interface to any host (i.e., PowerPC
and status of both Ethernet MACs. See “Host Interface” in Chapter 3.
•DCR Bus
Interface to the PowerPC processor through the DCR bus to access the control and
status of both Ethernet MACs. See “Using the DCR Bus as the Host Bus” in Chapter 3.
•Physical Interface
Physical interface depending on the mode of configuration. See Chapter 4, “Physical
Interface.”
•Multi-Gigabit Transceiver
Interface to the RocketIO transceivers when the Ethernet MAC is configured in either
SGMII or 1000BASE-X PCS/PMA mode. See “10/100/1000 Serial Gigabit Media
Independent Interface (SGMII)” or “1000BASE-X PCS/PMA” in Chapter 4.
•Management Data I/O (MDIO)
Interface to the Management Data I/O of either an external physical interface or the
PCS sublayer when configured in SGMII or 1000BASE-X PCS/PMA mode. See “MDIO
Interface” in Chapter 3.
The Ethernet MAC primitive can be simplified for specific customer needs using Ethernet
MAC wrappers. Chapter 7, “Using the Embedded Ethernet MAC,” describes how
Ethernet MAC wrappers use the CORE Generator™ software to simplify the Ethernet
MAC primitives.
®
or MicroBlaze™ processor) to access the control
Figure 2-3 illustrates the Ethernet MAC primitive. The # sign denotes both Ethernet MACs
(EMAC0 and EMAC1) in the EMAC primitive.
20www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
CLIENTEMAC#DCMLOCKED
EMAC#CLIENTRXCLIENTCLKOUT
CLIENTEMAC#RXCLIENTCLKIN
EMAC#CLIENTRXD[15:0]
EMAC#CLIENTRXDVLD
EMAC#CLIENTRXDVLDMSW
EMAC#CLIENTRXGOODFRAME
EMAC#CLIENTRXBADFRAME
RX ClientTX Client
EMAC#CLIENTRXFRAMEDROP
EMAC#CLIENTRXDVREG6
EMAC#CLIENTRXSTATS[6:0]
EMAC#CLIENTRXSTATSBYTEVLD
EMAC#CLIENTRXSTATSVLD
EMAC#CLIENTTXCLIENTCLKOUT
CLIENTEMAC#TXCLIENTCLKIN
CLIENTEMAC#TXD[15:0]
CLIENTEMAC#TXDVLD
CLIENTEMAC#TXDVLDMSW
EMAC#CLIENTTXACK
CLIENTEMAC#TXUNDERRUN
EMAC#CLIENTTXCOLLISION
EMAC#CLIENTTXRETRANSMIT
CLIENTEMAC#TXIFGDELAY[7:0]
CLIENTEMAC#TXFIRSTBYTE
EMAC#CLIENTTXSTATS
EMAC#CLIENTTXSTATSBYTEVLD
EMAC#CLIENTTXSTATSVLD
CLIENTEMAC#PAUSEREQ
CLIENTEMAC#PAUSEVAL[15:0]
Flow
Control
Generic
Host Bus
Bus
DCR
HOSTADDR[9:0]
HOSTCLK
HOSTMIIMSEL
HOSTOPCODE[1:0]
HOSTREQ
HOSTMIIMRDY
HOSTRDDATA[31:0]
HOSTWRDATA[31:0]
HOSTEMAC1SEL
DCREMACENABLE
EMACDCRACK
EMACDCRDBUS[0:31]
DCREMACABUS[8:9]
DCREMACCLK
DCREMACDBUS[0:31]
DCREMACREAD
DCREMACWRITE
DCRHOSTDONEIR
EMAC#
Primitive
Ethernet MAC Primitive
RESET
PHYEMAC#GTXCLK
TIEEMAC#CONFIGVEC[79:0]
TIEEMAC#UNICASTADDR[47:0]
EMAC#CLIENTTXGMIIMIICLKOUT
CLIENTEMAC#TXGMIIMIICLKIN
PHYEMAC#RXCLK
PHYEMAC#RXD[7:0]
PHYEMAC#RXDV
PHYEMAC#RXER
PHYEMAC#MIITXCLK
EMAC#PHYTXCLK
EMAC#PHYTXD[7:0]
EMAC#PHYTXEN
EMAC#PHYTXER
PHYEMAC#COL
PHYEMAC#CRS
PHYEMAC#SIGNALDET
PHYEMAC#PHYAD[4:0]
EMAC#PHYENCOMMAALIGN
EMAC#PHYLOOPBACKMSB
EMAC#PHYMGTRXRESET
EMAC#PHYMGTTXRESET
EMAC#PHYPOWERDOWN
EMAC#PHYSYNCACQSTATUS
PHYEMAC#RXCLKCORCNT[2:0]
PHYEMAC#RXBUFSTATUS[1:0]
PHYEMAC#RXCHARISCOMMA
PHYEMAC#RXCHARISK
PHYEMAC#RXCHECKINGCRC
PHYEMAC#RXCOMMADET
PHYEMAC#RXDISPERR
PHYEMAC#RXLOSSOFSYNC[1:0]
PHYEMAC#RXNOTINTABLE
PHYEMAC#RXRUNDISP
PHYEMAC#RXBUFERR
EMAC#CLIENTANINTERRUPT
EMAC#PHYTXCHARDISPMODE
EMAC#PHYTXCHARDISPVAL
EMAC#PHYTXCHARISK
PHYEMAC#TXBUFERR
EMAC#PHYMCLKOUT
PHYEMAC#MCLKIN
PHYEMAC#MDIN
EMAC#PHYMDOUT
EMAC#PHYMDTRI
Physical Interface
Multi-Gigabit Transceiver
Management
Data I/O
Figure 2-3:Ethernet MAC Primitive
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com21
UG074 (v2.2) February 22, 2010
ug074_2_03_101804
Chapter 2: Ethernet MAC Architecture
www.BDTIC.com/XILINX
Ethernet MAC Signal Descriptions
This section defines all of the Ethernet MAC primitive signals. The signals are divided into
the following categories:
•“Client Signals,” page 22
•“Clock Signals,” page 25
•“Host Interface Signals,” page 26
•“Reset and CLIENTEMAC#DCMLOCKED Signals,” page 27
•“Tie-Off Pins,” page 28
•“Management Data Input/Output (MDIO) Interface Signals,” page 32
All the signals available in the Ethernet MAC primitive are described in this section. The #
symbol denotes the EMAC0 or EMAC1 signals.
Client Signals
R
Client-Side Transmit (TX) Signals
Tab le 2 -1 describes the client-side transmit signals in the Ethernet MAC. These signals are
used to transmit data from the client to the Ethernet MAC.
Table 2-1:Transmit Client Interface Signals
SignalDirectionDescription
CLIENTEMAC#TXD[15:0]Input
CLIENTEMAC#TXDVLDInput
CLIENTEMAC#TXDVLDMSWInput
CLIENTEMAC#TXFIRSTBYTEInput
Frame data for transmit. The data path can be configured to be
either 8 or 16 bits wide. Bits [7:0] are used for 8-bit width. The
16-bit interface is available only in 1000BASE-X PCS/PMA
mode. See “Transmit (TX) Client – 16-bit Wide Interface” in
Chapter 3.
Asserted by the client to indicate a valid data input at
CLIENTEMAC#TXD[7:0].
When the width of CLIENTEMAC#TXD is set to 16 bits wide,
this signal denotes an odd number of bytes in the transmit data
path. In the frame with an odd number of bytes, the
CLIENTEMAC#TXD[7:0] is valid on the last byte.
When the width of CLIENTEMAC#TXD is set to 8 bits wide, this
signal is connected to ground.
Is asserted High for one clock cycle to indicate the start of data
flow on CLIENTEMAC#TXD. See Figure 3-3, “Normal Frame
Transmission Across Client Interface” in Chapter 3. Can be
grounded if not used.
CLIENTEMAC#TXIFGDELAY[7:0]Input
CLIENTEMAC#TXUNDERRUNInput
CLIENTEMAC#TXCLIENTCLKINInputSee “Transmit Clocking Scheme” in Chapter 5.
22www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
Configurable inter-frame gap (IFG) adjustment for full-duplex
mode.
Asserted by the client to force the Ethernet MAC to corrupt the
current frame.
Handshake signal – Asserted when the Ethernet MAC accepts
EMAC#CLIENTTXACKOutput
EMAC#CLIENTTXCOLLISIONOutput
EMAC#CLIENTTXRETRANSMITOutput
EMAC#CLIENTTXSTATSOutput
EMAC#CLIENTTXSTATSBYTEVLDOutput
the first byte of data. On the next and subsequent rising clock
edges, the client must provide the remainder of the frame data.
See “Normal Frame Transmission” in Chapter 3.
Asserted by the Ethernet MAC to signal a collision on the
medium. Any transmission in progress should be aborted. This
signal is always deasserted in full-duplex mode.
Asserted by the Ethernet MAC at the same time as the
EMAC#CLIENTTXCOLLISION signal. The client should resupply the aborted frame to the Ethernet MAC for
retransmission. This signal is always deasserted in full-duplex
mode.
The statistics data on the last data frame sent. The 32-bit TX raw
statistics vector is output by one bit per cycle for statistics
gathering. See “Transmitter Statistics Vector” in Chapter 3.
Asserted if an Ethernet MAC frame byte is transmitted
(including destination address to FCS). This is valid on every TX
clock cycle.
Ethernet MAC Signal Descriptions
Asserted by the Ethernet MAC after a frame transmission to
EMAC#CLIENTTXSTATSVLDOutput
EMAC#CLIENTTXCLIENTCLKOUTOutputSee “Transmit Clocking Scheme” in Chapter 5.
indicate a valid EMAC#CLIENTTXSTATS output. See
“Transmitter Statistics Vector” in Chapter 3.
Client-Side Receive (RX) Signals
Tab le 2 -2 describes the client-side receive signals. These signals are used by the Ethernet
MAC to transfer data to the client.
Table 2-2:Receive Client Interface Signals
SignalDirectionDescription
CLIENTEMAC#RXCLIENTCLKINInputSee “Receive Clocking Scheme” in Chapter 5.
Frame data received from the Ethernet MAC. The data path can
be co nfigure d t o either 8 bits or 16 bits wide. Bits [7:0] are used fo r
EMAC#CLIENTRXD[15:0]Output
EMAC#CLIENTRXDVLDOutput
EMAC#CLIENTRXFRAMEDROPOutput
8-bit width. The 16-bit interface is intended to be used in
1000BASE-X PCS/PMA mode. See “Receive (RX) Client – 16-bit
Wide Interface” in Chapter 3.
The Ethernet MAC indicates to the client the receipt of valid
frame data.
This signal is asserted to notify the client that an incoming receive
frames destination address does not match any addresses in the
address filter. The signal functions even when the address filter is
not enabled.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com23
UG074 (v2.2) February 22, 2010
This signal denotes an odd number of bytes in the receive data
path when the width of EMAC#CLIENTRXD is set to 16 bits
wide.
EMAC#CLIENTRXDVLDMSWOutput
In a frame with an odd number of bytes, the
EMAC#CLIENTRXD[7:0] byte is valid on the last byte.
When the width of EMAC#CLIENTRXD is set to 8 bits wide, this
signal should be left unconnected.
R
EMAC#CLIENTRXGOODFRAMEOutput
EMAC#CLIENTRXBADFRAMEOutput
EMAC#CLIENTRXSTATS[6:0]Output
EMAC#CLIENTRXSTATSBYTEVLDOutput
EMAC#CLIENTRXSTATSVLDOutput
EMAC#CLIENTRXCLIENTCLKOUTOutputSee “Receive Clocking Scheme” in Chapter 5.
EMAC#CLIENTRXDVREG6OutputReserved - not used.
This signal is asserted after the last receipt of data to indicate the
reception of a compliant frame.
This signal is asserted after the last receipt of data to indicate the
reception of a non-compliant frame.
The statistics data on the last received data frame. The 27-bit raw
RX statistics vector is multiplexed into a seven-bits per RX clock
cycle output for statistics gathering. See “Receiver Statistics
Vector” in Chapter 3.
Asserted if an Ethernet MAC frame byte (including destination
address to FCS) is received. Valid on every RX clock cycle.
Asserted by the Ethernet MAC after the end of receiving a frame
to indicate a valid EMAC#CLIENTRXSTATS[6:0] output.
Flow Control Client-Side Interface Signals
Tab le 2 -3 describes the signals used by the client to request a flow control action from the
transmit engine. The flow control block is designed per the specifications in Clause 31 of
the IEEE Std 802.3-2002 standard. Flow control frames received by the Ethernet MAC are
automatically handled.
Table 2-3:Flow Control Interface Signals
SignalDirectionDescription
CLIENTEMAC#PAUSEREQInputAsserted by client to transmit a pause frame.
CLIENTEMAC#PAUSEVAL[15:0]Input
24www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
The amount of pause time for the transmitter as defined in the
IEEE Std 802.3-2002 specification.
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Clock Signals
Tab le 2 -4 shows the clock signals necessary to drive the Ethernet MAC.
Table 2-4:Clock Signals
SignalDirectionDescription
PHYEMAC#GTXCLKInput
Ethernet MAC Signal Descriptions
Clock supplied by the user to derive the other transmit clocks.
Clock tolerance must be within the IEEE Std 802.3-2002
specification.
EMAC#CLIENTRXCLIENTCLKOUTOutput
EMAC#CLIENTTXCLIENTCLKOUT Output
CLIENTEMAC#RXCLIENTCLKINInput
CLIENTEMAC#TXCLIENTCLKINInput
EMAC#CLIENTTXGMIIMIICLKOUT Output
CLIENTEMAC#TXGMIIMIICLKIN Input
Notes:
1. The Ethernet MAC uses this clock to generate an internal clock that eliminates clock skew between the Ethernet MAC and the client
logic in the FPGA.
Clock for receive client generated by the clock generator of the
Ethernet MAC.
Clock for transmit client generated by the clock generator of the
Ethernet MAC.
Clock from receive client for the running of the receiver engine of
the Ethernet MAC.
Clock from transmit client for the running of the transmitter
engine of the Ethernet MAC.
Clock for MII, GMII, and RGMII modules. Generated by the clock
generator of the Ethernet MAC.
Clock from MII, GMII, and RGMII modules for the running of the
MII/GMII/RGMII transmitter layer of the Ethernet MAC.
(1)
(1)
(1)
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com25
UG074 (v2.2) February 22, 2010
Chapter 2: Ethernet MAC Architecture
www.BDTIC.com/XILINX
Host Interface Signals
Host Bus Signals
Tab le 2 -5 outlines the host bus interface signals.
Table 2-5:Host Bus Signals
SignalDirectionDescription
R
HOSTCLKInput
HOSTOPCODE[1:0]Input
HOSTADDR[9:0]InputAddress of register to be accessed.
HOSTWRDATA[31:0]InputData bus to write to register.
HOSTRDDATA[31:0]OutputData bus to read from register.
HOSTMIIMSELInput
HOSTREQInputUsed to signal a transaction on the MDIO interface.
HOSTEMAC1SELInput
HOSTMIIMRDYOutput
Notes:
1. All signals are synchronous to HOSTCLK and are active High.
2. When using the PowerPC 405 processor as a host processor and using the DCR bus for host access, the host bus signals are used to
read the optional FPGA fabric-based statistics registers. See “Interfacing to an FPGA Fabric-Based Statistics Block” in Chapter 6.
Clock supplied for running the host. User must supply this clock
at all times even if the host interface is not used.
Defines operation to be performed over MDIO interface. Bit [1] is
also used in configuration register access. See “Configuration
Registers” in Chapter 3.
When asserted, the MDIO interface is accessed. When
deasserted, the Ethernet MAC internal configuration registers
are accessed.
This signal is asserted when EMAC1 is being accessed through
the host interface and deasserted when EMAC0 is being accessed
through the host interface. It is ignored when the host interface is
not used.
When High, the MDIO interface has completed any pending
transaction and is ready for a new transaction.
26www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Ethernet MAC Signal Descriptions
DCR Bus Interface Signals
Tab le 2 -6 outlines the DCR bus interface signals.
Table 2-6:DCR Bus Signals
SignalDirectionDescription
DCREMACCLKInputClock for the DCR interface from the PowerPC processor.
DCREMACABUS[8:9]Input
DCREMACREADInputDCR read request.
DCREMACWRITEInputDCR write request.
DCREMACDBUS[0:31]InputDCR write data bus.
(1)
(1)
Input
Output
DCREMACENABLE
EMACDCRDBUS[0:31]OutputDCR read data bus.
EMACDCRACKOutputDCR acknowledge.
DCRHOSTDONEIR
Two LSBs of the DCR address bus. Bits[0] through [7] are decoded
in conjunction with the PowerPC block.
When using the DCR bus, this signal is connected directly to the
PPC405 output port DCREMACENABLER for DCR bus access.
When using the host bus interface, the signal is connected to the
logic ground.
Interrupt signal to the PowerPC processor when the Ethernet
MAC register access is done.
Notes:
1. All the DCR bus signals are internally connected to the PowerPC processor except for the DCREMACENABLE and
DCRHOSTDONEIR signals.
Reset and CLIENTEMAC#DCMLOCKED Signals
Tab le 2 -7 describes the Reset signal.
Table 2-7:Reset Signal
SignalDirectionDescription
ResetInputAsynchronous reset of both Ethernet MACs.
Tab le 2 -8 describes the CLIENTEMAC#DCMLOCKED signal.
Table 2-8:CLIENTEMAC#DCMLOCKED Signal
SignalDirectionDescription
If a DCM is used to derive any of the clock signals, the LOCKED
port of the DCM must be connected to the
CLIENTEMAC#DCMLOCKED port. The Ethernet MAC is held
CLIENTEMAC#DCMLOCKEDInput
in reset until CLIENTEMAC#DCMLOCKED is asserted High.
If a DCM is not used, both CLIENTEMAC#DCMLOCKED ports
from EMAC0 and EMAC1 must be tied High.
If any Ethernet MAC is not used, CLIENTEMAC#DCMLOCKED
must be tied to High.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com27
UG074 (v2.2) February 22, 2010
Chapter 2: Ethernet MAC Architecture
www.BDTIC.com/XILINX
Tie-Off Pins
Configuration Vectors
This section describes the 80 tie-off pins (TIEEMAC#CONFIGVEC[79:0]) used to configure
the Virtex-4 FPGA Embedded Tri-Mode Ethernet MAC. The values of these tie-off pins are
loaded into the Ethernet MAC at power-up or when the Ethernet MAC is reset.
When TIEEMAC#CONFIGVEC[67] is High, the host interface is selected. Tie-off pins preconfigure the internal control registers of the Ethernet MAC. The host interface is then used
to dynamically change the register contents or to read the registers. When the host
interface is not selected, the tie-off pins directly control the behavior of the Ethernet MAC.
However, dynamically changing the register contents using the tie-off pins is not
recommended.
The configuration vectors are divided into three sections: physical interface configuration
vectors (Ta bl e 2 -9 ), mode configuration vectors (Tab le 2 -1 0), and MAC configuration
vectors (Ta bl e 2 -1 1). The MAC and physical interface configuration vectors can be
configured through the host interface and are intended to be used dynamically to change
register contents or read status registers. The mode configuration vectors preconfigure the
internal control registers (16-bit, PCS/PMA, Host, SGMII, RGMII, and MDIO interfaces)
but are not dynamically reconfigurable.
R
Table 2-9:Physical Interface Configuration Pins
SignalDirectionDescription
TIEEMAC#CONFIGVEC[79]InputReserved, set to 1.
TIEEMAC#CONFIGVEC[78:74] — Only used in SGMII or 1000BASE-X modes. When MDIO and host are omitted from
the Ethernet MAC, this alternative can be used.
TIEEMAC#CONFIGVEC[78]Input
TIEEMAC#CONFIGVEC[77]Input
TIEEMAC#CONFIGVEC[76]Input
TIEEMAC#CONFIGVEC[75]Input
TIEEMAC#CONFIGVEC[74]Input
PHY_RESET: Asserting this pin resets the PCS/PMA module.
PHY_INIT_AN_ENABLE: Asserting this pin enables autonegotiation of the PCS/PMA module.
PHY_ISOLATE: Asserting this pin causes the PCS/PMA
sublayer logic to behave as if it is electrically isolated from the
attached Ethernet MAC, as defined in IEEE Std 802.3, Clause
22.2.4.1.6. Therefore, frames transmitted by the Ethernet MAC
are not forwarded through the PCS/PMA. Frames received by
the PCS/PMA are not relayed to the Ethernet MAC.
PHY_POWERDOWN: Asserting this pin causes the MGT to be
placed in a Low power state. A reset must be applied to clear the
Low power state.
PHY_LOOPBACK_MSB: Asserting this pin sets serial loopback
in the MGT.
28www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Table 2-10:Mode Configuration Pins
SignalDirectionDescription
Ethernet MAC Signal Descriptions
TIEEMAC#CONFIGVEC[73]Input
TIEEMAC#CONFIGVEC[72:71] — These pins determine the speed of the Ethernet MAC after reset or power-up. These
bits can be changed in the Ethernet MAC mode configuration register (Table 3-12, page 77) through the host interface
when the host interface is selected (by setting TIEEMAC#CONFIG[67] High). When TIEEMAC#CONFIG[67] is Low,
the speed of the Ethernet MAC is directly set by these two bits.
10 = 1000 Mb/s
01 = 100 Mb/s
00 =10Mb/s
11 = not applicable
TIEEMAC#CONFIGVEC[72]Input
TIEEMAC#CONFIGVEC[71]Input
TIEEMAC#CONFIGVEC[70:68] — Defines the physical interface of the Ethernet MAC. These pins are mutually
exclusive. 10/100 MII and GMII modes are enabled when TIEEMAC#CONFIGVEC[70:68] are deasserted; the RGMII,
SGMII, and 1000BASE-X modes are not set.
TIEEMAC#CONFIGVEC[70]Input
TIEEMAC#CONFIGVEC[69]Input
TIEEMAC#CONFIGVEC[68]Input
MDIO enable. Asserting this pin enables the use of MDIO in the
Ethernet MAC. See “MDIO Interface” in Chapter 3.
SPEED[1]
SPEED[0]
RGMII mode enable. Asserting this pin sets the Ethernet MAC in
RGMII mode.
SGMII mode enable. Asserting this pin sets the Ethernet MAC in
SGMII mode.
1000BASE-X PCS/PMA mode enable. Asserting this pin sets the
Ethernet MAC in 1000BASE-X mode.
TIEEMAC#CONFIGVEC[67]Input
TIEEMAC#CONFIGVEC[66]Input
TIEEMAC#CONFIGVEC[65]Input
Host Interface enable. Asserting this pin enables the use of the
Ethernet MAC host interface.
Transmit 16-bit client interface enable. When asserted, the TX
client data interface is 16 bits wide. When deasserted, the TX
client data interface is 8 bits wide.
Receive 16-bit client interface enable. When asserted, the RX
client data interface is 16 bits wide. When deasserted, the RX
client data interface is 8 bits wide.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com29
UG074 (v2.2) February 22, 2010
Chapter 2: Ethernet MAC Architecture
www.BDTIC.com/XILINX
Table 2-11:MAC Configuration Pins
SignalDirectionDescription
R
TIEEMAC#CONFIGVEC[64]Input
TIEEMAC#CONFIGVEC[63]Input
TIEEMAC#CONFIGVEC[62:61] — These pins configure the Ethernet MAC flow control module.
TIEEMAC#CONFIGVEC[62]Input
TIEEMAC#CONFIGVEC[61]Input
TIEEMAC#CONFIGVEC[60:54] — Configures the transmit engine of the Ethernet MAC.
TIEEMAC#CONFIGVEC[60]Input
TIEEMAC#CONFIGVEC[59]Input
Address Filter Enable: Asserting this pin enables the use of the
address filter module in the Ethernet MAC.
Length/Type Check Disable: When this pin is asserted, it
disables the comparison of the L/T field with the size of the data.
Receive Flow Control Enable. When this bit is
mode is enabled,
transmitter operation. When this bit is 0, the received flow
frames are passed up to the client.
Transmit Flow Control Enable. When this bit is
mode is enabled,
signal causes the Ethernet MAC to send a flow control frame out
from the transmitter. When 0, asserting the
CLIENTEMAC#PAUSE_REQ signal has no effect.
Transmitter Reset. When this bit is
transmitter is held in reset. This signal is an input to the reset
circuit for the transmitter block.
Transmitter Jumbo Frame Enable. When this bit is 1, the Ethernet
MAC transmitter allows frames larger than the maximum legal
frame length specified in IEEE Std 802.3-2002 to be sent. When
this bit is 0, the Ethernet MAC transmitter only allows frames up
to the legal maximum to be sent.
the received flow control frames inhibit
asserting the CLIENTEMAC#PAUSE_REQ
1, the Ethernet MAC
1 and full-duplex
1 and full duplex
TIEEMAC#CONFIGVEC[58]Input
TIEEMAC#CONFIGVEC[57]Input
TIEEMAC#CONFIGVEC[56]Input
TIEEMAC#CONFIGVEC[55]Input
TIEEMAC#CONFIGVEC[54]Input
Transmitter In-Band FCS Enable. When this bit is
MAC transmitter expects the FCS field to be passed in by the
client. When this bit is 0, the Ethernet MAC transmitter appends
padding as required, computes the FCS, and appends it to the
frame.
Transmitter Enable. When this bit is
operational. When this bit is 0, the transmitter is disabled.
Transmitter VLAN Enable. When this bit is
allows the transmission of VLAN tagged frames.
Transmitter Half Duplex. When this bit is
operates in half-duplex mode. When this bit is 0, the transmitter
operates in full-duplex mode.
Transmitter IFG Adjust enable. When this bit is
reads the value of the CLIENTEMAC#TXIFGDELAY[7:0] port
and sets the IFG accordingly. When this bit is 0, the transmitter
always inserts at least the legal minimum IFG.
1, the transmitter is
1, the transmitter
1, the Ethernet
1, the transmitter
1, the transmitter
30www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Ethernet MAC Signal Descriptions
Table 2-11:MAC Configuration Pins (Cont’d)
SignalDirectionDescription
TIEEMAC#CONFIGVEC[53:0] — Configures the receive engine of the Ethernet MAC.
TIEEMAC#CONFIGVEC[53]Input
TIEEMAC#CONFIGVEC[52]Input
TIEEMAC#CONFIGVEC[51]Input
TIEEMAC#CONFIGVEC[50]Input
TIEEMAC#CONFIGVEC[49]Input
TIEEMAC#CONFIGVEC[48]Input
TIEEMAC#CONFIGVEC[47:0]Input
Receiver Reset. When this bit is
This signal is an input to the reset circuit for the receiver block.
Receiver Jumbo Frame Enable. When this bit is 0, the receiver
does not pass frames longer than the maximum legal frame size
specified in IEEE Std 802.3-2002. When this bit is
does not have an upper limit on frame size.
Receiver In-band FCS Enable. When this bit is
MAC receiver passes the FCS field up to the client. When this bit
is 0, the Ethernet MAC receiver does not pass the FCS field. In
both cases, the FCS field are verified on the frame.
Receiver Enable. When this bit is
operational. When this bit is 0, the block ignores activity on the
physical interface RX port.
Receiver VLAN Enable. When this bit is
are accepted by the receiver.
Receiver Half Duplex. When this bit is
half-duplex mode. When this bit is 0, the receiver operates in full-
duplex mode.
Pause frame Ethernet MAC Source Address[47:0]. This address is
used by the Ethernet MAC to match against the destination
address of any incoming flow control frames, and as the source
address for any outbound flow control frames.
The address is ordered for the least significant byte in the register
to have the first byte transmitted or received; for example, an
Ethernet MAC address of AA-BB-CC-DD-EE-FF is stored in byte
[47:0] as 0xFFEEDDCCBBAA.
Tied to the same Ethernet MAC address as
TIEEMAC#UNICASTADDR[47:0].
1, the receiver is held in reset.
1, the receiver
1, the Ethernet
1, the receiver block is
1, VLAN tagged frames
1, the receiver operates in
Notes:
1. A reset is needed before changes on TIEEMAC#CONFIGVEC[73] and [70:64] take effect.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com31
UG074 (v2.2) February 22, 2010
Chapter 2: Ethernet MAC Architecture
www.BDTIC.com/XILINX
Unicast Address
Tab le 2 -1 2 describes the 48 tie-off pins (TIEEMAC#UNICASTADDR[47:0]) used to set the
Ethernet MAC address for the Virtex-4 FPGA Embedded Tri-Mode Ethernet MAC.
Table 2-12:Unicast Address Pins
SignalDirectionDescription
This 48-bit wide tie-off is used to set the Ethernet MAC unicast
address used by the address filter block to see if the incoming
frame is destined for the Ethernet MAC.
TIEEMAC#UNICASTADDR[47:0]Input
Notes:
1. All of the TIEEMAC#UNICASTADDR[47:0] bits are registered on input and can be treated as asynchronous inputs.
The address is ordered for the least significant byte in the register
to have the first byte transmitted or received; for example, an
Ethernet MAC address of 06-05-04-03-02-01 is stored in byte
[47:0] as 0x010203040506.
Management Data Input/Output (MDIO) Interface Signals
R
Tab le 2 -1 3 describes the Management Data Input/Output (MDIO) interface signals. The
MDIO format is defined in IEEE Std 802.3, Clause 22.
Table 2-13:MDIO Interface Signals
SignalDirectionDescription
EMAC#PHYMCLKOUTOutput
PHYEMAC#MCLKINInput
PHYEMAC#MDINInput
EMAC#PHYMDOUTOutput
EMAC#PHYMDTRIOutputThe 3-state control to accompany EMAC#PHYMDOUT.
Management clock derived from the host clock or
PHYEMAC#MCLKIN.
When the host is not used, access to the PCS must be provided by
an external MDIO controller. In this situation, the management
clock is an input to the core.
Signal from the physical interface for communicating the
configuration and status. If unused, must be tied High.
Signal to output the configuration and command to the physical
interface.
Mode-Dependent Signals
The Ethernet MAC has several signals that change definition depending on the selected
operating mode. This section describes the basic signals in the various operating modes.
Data and Control Signals
Tab le 2 -1 4 shows the data and control signals for the different modes. They are set from the
tie-off pins. These signals are multiplexed, and their functionality is defined when the
mode is set.
32www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Table 2-14:PHY Data and Control Signals
SignalDirectionModeDescription
Ethernet MAC Signal Descriptions
10/100 MII
PHYEMAC#MIITXCLK Input
EMAC#PHYTXCLKOutputGMII
EMAC#CLIENTTXGMIIMIICLKOUTOutput
EMAC#PHYTXENOutput
EMAC#PHYTXEROutput
16-bit client
interface
used in
1000BASE-X
PCS/PMA
GMII
RGMII
10/100 MII
GMII
RGMIIThe RGMII_TX_CTL_RISING signal to the PHY.
10/100 MII
GMII
RGMII
10/100 MII
The TX clock generated from the PHY when
operating in 10/100 MII mode.
When the transmit client interface is configured
to be 16 bits wide, this is the clock input port for
the CLIENTEMAC#TXCLIENTCLKIN/2. See
“Transmit (TX) Client – 16-bit Wide Interface” in
Chapter 3.
The TX clock out to the PHY in GMII 1000 Mb/s
mode only.
The TX clock out to the PHY for GMII tri-speed
mode operation and RGMII.
The data enable control signal to the PHY.
The error control signal to the PHY.
The RGMII_TX_CTL_FALLING signal to the
PHY.
EMAC#PHYTXD[3:0] is the transmit data signal
to the PHY. EMAC#PHYTXD[7:4] are driven
Low.
EMAC#PHYTXD[7:0]Output
PHYEMAC#RXCLKInput
GMIIThe transmit data signal to the PHY.
EMAC#PHYTXD[3:0] is the
RGMII
SGMII
1000BASE-X
10/100 MII
GMII
RGMII
16-bit client
interface
used in
1000BASE-X
PCS/PMA
RGMII_TXD_RISING and EMAC#PHYTXD[7:4]
is the RGMII_TXD_FALLING signal to the PHY.
The TX_DATA signal to the MGT.
The recovered clock from received data stream
by the PHY.
When the receive client interface is configured to
be 16 bits wide, this signal is the clock input port
for the CLIENTEMAC#RXCLIENTCLKIN/2.
See “Receive (RX) Client – 16-bit Wide Interface”
in Chapter 3.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com33
UG074 (v2.2) February 22, 2010
Chapter 2: Ethernet MAC Architecture
www.BDTIC.com/XILINX
Table 2-14:PHY Data and Control Signals (Cont’d)
SignalDirectionModeDescription
R
PHYEMAC#RXDVInput
PHYEMAC#RXERInput
PHYEMAC#RXD[7:0]Input
10/100 MII
GMII
RGMIIThe RGMII_RX_CTL_RISING signal.
SGMII
1000BASE-X
10/100 MII
GMII
RGMII
10/100 MII
GMIIThe received data signal to the PHY.
RGMII
SGMII
1000BASE-X
The data valid control signal from the PHY.
The RXREALIGN signal from the MGT.
The error control signal from the PHY.
The RGMII_RX_CTL_FALLING signal from the
PHY.
PHYEMAC#RXD [3:0] is the received data signal
from the PHY. PHYEMAC#RXD [7:4] is left
unconnected.
PHYEMAC#RXD [3:0] is the
RGMII_RXD_RISING and PHYEMAC#RXD
[7:4] is the RGMII_RXD_FALLING signal from
the PHY.
The RX_DATA from the MGT.
10/100 MII
PHYEMAC#COLInput
PHYEMAC#CRSInput10/100 MII
SGMII
1000BASE-X
The collision control signal from the PHY, used
in half-duplex mode.
The TXRUNDISP signal from the MGT.
The carrier sense control signal from the PHY,
used in half-duplex mode.
RocketIO Multi-Gigabit Transceiver Signals
Tab le 2 -1 5 shows the signals used to connect the Ethernet MAC to the RocketIO Multi-
Gigabit Transceiver (see UG076
Table 2-15:Multi-Gigabit Transceiver Connections
SignalDirectionDescription
EMAC#PHYENCOMMAALIGNOutputEnable RocketIO PMA layer to realign to commas.
EMAC#PHYLOOPBACKMSBOutputLoopback tests within the RocketIO Multi-Gigabit Transceivers.
EMAC#PHYMGTRXRESETOutputReset to RocketIO RXRESET.
EMAC#PHYMGTTXRESETOutputReset to RocketIO TXRESET.
EMAC#PHYPOWERDOWNOutputPower-down the RocketIO Multi-Gigabit Transceivers.
, Virtex-4 RocketIO Multi-Gigabit Transceiver User Guide).
34www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
PHYEMAC#RXCLKCORCNT[2:0]InputStatus showing the occurrence of a clock correction.
PHYEMAC#TXBUFERRInputTX buffer error (overflow or underflow).
Receiver Elastic Buffer Status: Bit[1] asserted indicates overflow
or underflow.
K character received or extra data bit in RXDATA. When
RXNOTINTABLE is asserted, this signal becomes the tenth bit in
RXDATA.
Running disparity in the received serial data. When
RXNOTINTABLE is asserted in RXDATA, this signal becomes
the ninth data bit.
Tab le 2 -1 6 shows the PCS/PMA signals.
Table 2-16:PCS/PMA Signals
SignalDirectionDescription
PHYEMAC#PHYAD[4:0]Input
PHYEMAC#SIGNALDET Input
EMAC#CLIENTANINTERRUPTOutputInterrupt upon auto-negotiation.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com35
UG074 (v2.2) February 22, 2010
Physical interface address of MDIO register set for the PCS
sublayer.
Signal direct from PMD sublayer indicating the presence of light
detected at the optical receiver, as defined in IEEE Std 802.3,
Clause 36. If asserted High, the optical receiver has detected light.
If deasserted Low, indicates the absence of light.
If unused, this signal should be tied High for correct operation.
Chapter 2: Ethernet MAC Architecture
www.BDTIC.com/XILINX
R
36www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Chapter 3
Client, Host, and MDIO Interfaces
This chapter provides useful design information for user interaction with the Virtex®-4
FPGA Tri-Mode Ethernet MAC. It contains the following sections:
•“Client Interface,” page 37
•“Host Interface,” page 72
•“MDIO Interface,” page 93
Client Interface
The client interface is designed for maximum flexibility for matching the client switching
fabric or network processor interface.
Both the transmit and receive data pathway can be configured to be either 8 bits wide or
16 bits wide, with each pathway synchronous to the CLIENTEMAC#TXCLIENTCLKIN
(transmit) or CLIENTEMAC#RXCLIENTCLKIN (receive) for completely independent
full-duplex operation.
Figure 3-1 shows a block diagram of the transmit client interface. In 16-bit client mode,
PHYEMAC#MIITXCLK functions as CLIENTEMAC#TXCLIENTCLKIN/2.
TIEEMAC#CONFIGVEC[66] selects between an 8-bit or 16-bit client interface.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com37
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
R
PHYCLIENT
CLIENTEMAC#TXCLIENTCLKIN
PHYEMAC#MIITXCLK
CLIENTEMAC#TXD[15:0]
CLIENTEMAC#TXDVLDMSW
CLIENTEMAC#TXDVLD
EMAC#CLIENTTXACK
EMAC#CLIENTTXRETRANSMIT
EMAC#CLIENTTXCOLLISION
CLIENTEMAC#TXUNDERRUN
CLIENTEMAC#TXFIRSTBYTE
TIEEMAC#CONFIGVEC[66]
CLIENTEMAC#TXIFGDELAY[7:0]
FPGA Fabric
Tr ansmit
Client
Interface
(Internal Signal)
TX_DATA[7:0]
(Internal Signal)
TX_ACK_EARLY
(Internal Signal)
TX_ACK
(Internal signal)
TX_RETRANSMIT
(Internal Signal)
TX_COLLISION
(Internal Signal)
TX_UNDERRUN
(Internal Signal)
TXFIRSTBYTEREG
(Internal Signal)
TX_IFG_DELAY[7:0]
(Internal Signal)
Tr ansmit
Engine
TX_DATA_VALID
Ethernet MAC Block
Figure 3-1:Transmit Client Block Diagram
PHYEMAC#GTXCLK
EMAC#PHYTXCLK
EMAC#PHYTXD[7:0]
EMAC#PHYTXEN
EMAC#PHYTXER
ug074_3_03_070105
38www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Client Interface
Figure 3-2 shows a block diagram of the receive client interface. In 16-bit client mode,
PHYEMAC#RXCLK functions as CLIENTEMAC#RXCLIENTCLKIN/2.
TIEEMAC#CONFIGVEC[65] selects between an 8-bit or 16-bit client interface.
CLIENTPHY
CLIENTEMAC#RXCLIENTCLKIN
PHYEMAC#RXCLK
EMAC#CLIENTRXD[15:0]
EMAC#CLIENTRXDVLDMSW
EMAC#CLIENTRXDVLD
EMAC#CLIENTRXGOODFRAME
EMAC#CLIENTRXBADFRAME
CLIENTEMAC#RXCLIENTCLKIN
TIEEMAC#CONFIGVEC[65]
FPGA Fabric
Tab le 3 -1 defines the abbreviations used throughout this chapter.
Table 3-1:Abbreviations Used in this Chapter
Receive
Client
Interface
RX_GOOD_FRAME
Ethernet MAC Block
RX_CLK
(Internal Signal)
RX_DATA_VALID
(Internal Signal)
RX_DATA[7:0]
(Internal Signal)
(Internal Signal)
RX_BAD_FRAME
(Internal Signal)
Receive
Engine
PHYEMAC#RXCLK
PHYEMAC#RXD[7:0]
PHYEMAC#RXDV
PHYEMAC#RXER
ug074_3_04_070105
Figure 3-2:Receive Client Interface Block Diagram
AbbreviationDefinitionLength
DADestination address6 bytes
SASource address6 bytes
L/TLength/Type field2 bytes
FCSFrame check sequences4 bytes
SGMII and 1000BASE-X PCS/PMA Only:
PREPreamble7 bytes
SFDStart of frame delimiter1 byte
/I1/IDLE_1 (K28.5/D5.6)2 bytes
/I2/IDLE_2 (K28.5/D16.2)2 bytes
/R/Carrier Extend (K23.7)1 byte
/S/Start of Packet (K27.7)1 byte
/T/End of Packet (K29.7)1 byte
/V/Error Propagation (K30.7)1 byte
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com39
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
Transmit (TX) Client – 8-bit Wide Interface
In this configuration, CLIENTEMAC#TXD[15:8] and CLIENTEMAC#TXDVLDMSW must
be tied to ground.
Normal Frame Transmission
The timing of a normal outbound frame transfer is shown in Figure 3-3. When the client
transmits a frame, the first column of data is placed on the CLIENTEMAC#TXD[7:0] port,
and CLIENTEMAC#TXDVLD is asserted High. After the Ethernet MAC reads the first
byte of data, it asserts the EMAC#CLIENTTXACK signal. On subsequent rising clock
edges, the client must provide the rest of the frame data. CLIENTEMAC#TXDVLD is
deasserted Low to signal an end-of-frame to the Ethernet MAC. In SGMII or 1000BASE-X
PCS/PMA mode, the PCS engine inserts code characters in the data stream from
CLIENTEMAC#TXD. Tab le 3- 1 describes these code characters, and IEEE Std 802.3, Clause
36 has further definitions. The encapsulated data stream then appears on EMAC#PHYTXD
and goes to the MGT. Along with EMAC#PHYTXCHARISK and
EMAC#PHYTXCHARDISPMODE, the MGT encodes the incoming data to the appropriate
8B/10B stream.
CLIENTEMAC#TXCLIENTCLKIN
R
CLIENTEMAC#TXDVLD
EMAC#CLIENTTXACK
CLIENTEMAC#TXFIRSTBYTE
CLIENTEMAC#TXUNDERRUN
EMAC#CLIENTTXCOLLISION
EMAC#CLIENTTXRETRANSMIT
CLIENTEMAC#TXD[7:0]
EMAC#PHYTXD[7:0]
(SGMII or 1000BASE-X
PCS/PMA only)
EMAC#PHYTXCHARISK
(SGMII or 1000BASE-X
PCS/PMA only)
EMAC#PHYTXCHARDISPMODE
(SGMII or 1000BASE-X
PCS/PMA only)
DASADATAL/T
/S//I1//I2//I2//I2//I2/
PRE
SFD
FCS
/I1/
/T/ /R/
ug074_3_05_080705
Figure 3-3:Normal Frame Transmission Across Client Interface
40www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
In-Band Parameter Encoding
The Ethernet MAC frame parameters, destination address, source address, length/type,
and the FCS are encoded within the same data stream used to transfer the frame payload
instead of separate ports. This provides the maximum flexibility in switching applications.
Padding
When fewer than 46 bytes of data are supplied by the client to the Ethernet MAC, the
transmitter module adds padding – up to the minimum frame length. However, if the
Ethernet MAC is configured for client-passed FCS, the client must also supply the padding
to maintain the minimum frame length (see “Client-Supplied FCS Passing,” page 41).
Client-Supplied FCS Passing
In the transmission timing case shown in Figure 3-4, an Ethernet MAC is configured to
have the FCS field passed in by the client (see “Configuration Registers,” page 74). The
client must ensure that the frame meets the Ethernet minimum frame length requirements;
the Ethernet MAC does not pad the payload.
CLIENTEMAC#TXCLIENTCLKIN
Client Interface
CLIENTEMAC#TXDVLD
EMAC#CLIENTTXACK
CLIENTEMAC#TXFIRSTBYTE
CLIENTEMAC#TXUNDERRUN
EMAC#CLIENTTXCOLLISION
EMAC#CLIENTTXRETRANSMIT
CLIENTEMAC#TXD[7:0]
EMAC#PHYTXD[7:0]
(SGMII or 1000BASE-X
PCS/PMA only)
EMAC#PHYTXCHARISK
(SGMII or 1000BASE-X
PCS/PMA only)
EMAC#PHYCHARDISPMODE
(SGMII or 1000BASE-X
PCS/PMA only)
DASADATAF CSL/T
/I1//I2//I2//I2//I2/
/S/
PRE
SFD
FCS
/I1/
/T/ /R/
ug074_3_06_072705
Figure 3-4:Frame Transmission with Client-Supplied FCS
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com41
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
Client Underrun
The timing of an aborted transfer is shown in Figure 3-5. An aborted transfer can occur if a
FIFO connected to the client interface empties, before a frame is completed. When the
client asserts CLIENTEMAC#TXUNDERRUN during a frame transmission, the
EMAC#PHYTXER is asserted for one clock cycle to notify the external PHY that the frame
is corrupted in MII and GMII modes. In 1000BASE-X PCS/PMA mode, the Ethernet MAC
inserts an error code (/V/) into the current frame to signal corruption. It then falls back to
idle transmission. EMAC#PHYTXER is asserted some cycles after. The client must requeue
the aborted frame for transmission.
When an underrun occurs, to request a new transmission, reassert
CLIENTEMAC#TXDVLD on the clock cycle after the CLIENTEMAC#TXUNDERRUN is
asserted.
CLIENTEMAC#TXCLIENTCLKIN
CLIENTEMAC#TXDVLD
EMAC#CLIENTTXACK
R
CLIENTEMAC#TXFIRSTBYTE
CLIENTEMAC#TXUNDERRUN
EMAC#CLIENTTXCOLLISION
EMAC#CLIENTTXRETRANSMIT
EMAC#PHYTXER
CLIENTEMAC#TXD[7:0]
EMAC#PHYTXD[7:0]
(SGMII or 1000BASE-X
PCS/PMA only)
EMAC#PHYTXCHARISK
(SGMII or 1000BASE-X
PCS/PMA only)
EMAC#PHYCHARDISPMODE
(SGMII or 1000BASE-X
PCS/PMA only)
DASADATAL/T
/I1//I2//I2//I2//I2/
/S/
PRE
SFD
/V/
Figure 3-5:Frame Transmission with Underrun
DATA
FCS
/T/ /R/
/I1/
ug074_3_07_072705
42www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Back-to-Back Transfers
CLIENTEMAC#TXCLIENTCLKIN
CLIENTEMAC#TXDVLD
EMAC#CLIENTTXACK
CLIENTEMAC#TXFIRSTBYTE
CLIENTEMAC#TXUNDERRUN
Client Interface
Back-to-back transfers can occur when the Ethernet MAC client is immediately ready to
transmit a second frame of data following completion of the first frame. In Figure 3-6, the
end of the first frame is shown on the left. At the clock cycle immediately following the
final byte of the first frame, CLIENTEMAC#TXDVLD is deasserted by the client. One clock
cycle later, CLIENTEMAC#TXDVLD is asserted High. This indicates that the first byte of
the destination address of the second frame is awaiting transmission on
CLIENTEMAC#TXD.
EMAC#CLIENTTXCOLLISION
EMAC#CLIENTTXRETRANSMIT
CLIENTEMAC#TXD[7:0]
EMAC#PHYTXD[7:0]
(SGMII or 1000BASE-X
PCS/PMA only)
EMAC#PHYTXCHARISK
(SGMII or 1000BASE-X
PCS/PMA only)
EMAC#PHYCHARDISPMODE
(SGMII or 1000BASE-X
PCS/PMA only)
DASA
FCS
/T/ /R//S//I2//I2//I2//I2//I1/
ug074_3_08_063005
Figure 3-6:Back-to-Back Frame Transmission
When the Ethernet MAC is ready to accept data, EMAC#CLIENTTXACK is asserted and
the transmission continues in the same manner as the single frame case. The Ethernet MAC
defers the assertion of EMAC#CLIENTTXACK to comply with inter-packet gap
requirements and flow control requests.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com43
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
Virtual LAN (VLAN) Tagged Frames
Figure 3-7 shows the transmission of a VLAN tagged frame (if enabled). The handshaking
signals across the interface do not change. However, the VLAN type tag 0x8100 must be
supplied by the client to show the frame as VLAN tagged. The client also supplies the two
bytes of tag control information, V1 and V2, at the appropriate times in the data stream.
More information on the contents of these two bytes can be found in the IEEE Std 802.32002 specification.
CLIENTEMAC#TXCLIENTCLKIN
CLIENTEMAC#TXDVLD
EMAC#CLIENTTXACK
CLIENTEMAC#TXFIRSTBYTE
CLIENTEMAC#TXUNDERRUN
R
EMAC#CLIENTTXCOLLISION
EMAC#CLIENTTXRETRANSMIT
CLIENTEMAC#TXD[7:0]
EMAC#PHYTXD[7:0]
(SGMII or 1000BASE-X
PCS/PMA only)
EMAC#PHYTXCHARISK
(SGMII or 1000BASE-X
PCS/PMA only)
EMAC#PHYCHARDISPMODE
(SGMII or 1000BASE-X
PCS/PMA only)
Maximum Permitted Frame Length and Jumbo Frames
81 00 V1 V2
DASADATA
/I1//I2//I2//I2//I2/
/S/
tag
PRE
SFD
L/TVLAN
FCS
/T/ /R/
/I1/
ug074_3_09_062105
Figure 3-7:Transmission of a VLAN Tagged Frame
The maximum length of a frame specified in the IEEE Std 802.3-2002 specification is
1518 bytes for non-VLAN tagged frames. VLAN tagged frames can be extended to
1522 bytes. When jumbo frame handling is disabled and the client attempts to transmit a
frame that exceeds the maximum legal length, the Ethernet MAC inserts an error code to
corrupt the current frame and the frame is truncated to the maximum legal length. When
jumbo frame handling is enabled, frames longer than the legal maximum are transmitted
error free.
For more information on enabling and disabling jumbo frame handling, see
“Configuration Registers,” page 74.
44www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
In half-duplex Ethernet operation, collisions occur on the medium. This is how the
arbitration algorithm is fulfilled. When there is a collision, the Ethernet MAC signals to the
client a need to have data re-supplied as follows:
•If there is a collision, the EMAC#CLIENTTXCOLLISION signal is set to 1 by the
Ethernet MAC. If a frame is in progress, the client must abort the transfer and
CLIENTEMAC#TXDVLD is deasserted to 0.
•If the EMAC#CLIENTTXRETRANSMIT signal is 1 in the same clock cycle as the
EMAC#CLIENTTXCOLLISION signal is 1, the client must resubmit the previous
frame to the Ethernet MAC for retransmission; CLIENTEMAC#TXDVLD must be
asserted to the Ethernet MAC within eight clock cycles of the
EMAC#CLIENTTXCOLLISION signal to meet Ethernet timing requirements. This
operation is shown in Figure 3-8.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com45
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
•If the EMAC#CLIENTTXRETRANSMIT signal is 0 in the same clock cycle when the
EMAC#CLIENTTXCOLLISION signal is
exceeded the Ethernet specification, and the frame should be dropped by the client.
The client can then make any new frame available to the Ethernet MAC for
transmission without timing restriction. This process is shown in Figure 3-9.
CLIENTEMAC#TXCLIENTCLKIN
CLIENTEMAC#TXD[7:0]
CLIENTEMAC#TXDVLD
EMAC#CLIENTTXACK
CLIENTEMAC#TXFIRSTBYTE
CLIENTEMAC#TXUNDERRUN
EMAC#CLIENTTXCOLLISION
R
1, the number of retries for this frame has
EMAC#CLIENTTXRETRANSMIT
Figure 3-9:Collision Handling - No Frame Retransmission Required
IFG Adjustment
The length of the IFG can be varied in full-duplex mode. If this function is selected (using
a configuration bit in the transmitter control register, see “Configuration Registers,”
page 74), then the Ethernet MAC exerts back pressure to delay the transmission of the next
frame, until the requested number of idle cycles has elapsed. The number of idle cycles is
controlled by the value on the CLIENTEMAC#TXIFGDELAY port at the start-of-frame
transmission. Figure 3-10 shows the Ethernet MAC operating in this mode.
In full-duplex configurations, the minimum IFG is 12 bytes (96 bit times). In half-duplex
configurations, the minimum supported IFG is 18 bytes (144 bit times) when using the MII
physical interface, or 26 bytes (208 bit times) when using the RGMII physical interface.
ug074_3_11_101004
46www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
CLIENTEMAC#TXCLIENTCLKIN
CLIENTEMAC#TXD[7:0]
CLIENTEMAC#TXDVLD
EMAC#CLIENTTXACK
CLIENTEMAC#TXFIRSTBYTE
DASA
Client Interface
DA
CLIENTEMAC#TXIFGDELAY
0x0D
IFG ADJUST VALUE
Figure 3-10:IFG Adjustment
Transmit (TX) Client – 16-bit Wide Interface
This optional configuration can only be used when the Ethernet MAC is configured in
1000BASE-X PCS/PMA mode. The frequency of the transmit client clock is half the
frequency of the internal transmit. The 16-bit client interface allows the Ethernet MAC to
run at an internal clock frequency of greater than 125 MHz. The Ethernet MAC can run at
a line rate greater than 1 Gb/s as specified in IEEE Std 802.3. Therefore, this interface
should not be used for Ethernet compliant designs, but it can be useful for backplane
applications.
The PHYEMAC#MIITXCLK is used as the input clock port for the
CLIENTEMAC#TXCLIENTCLKOUT, divided by two, as shown in Figure 3-1, page 38.
Using a DCM with the transmit client clock (EMACCLIENT#TXCLIENTCLKOUT) as an
input, the divide-by-two clock signal is generated. See Figure 4-28, page 139 for more
information.
As in the 8-bit client interface, the PCS engine inserts code characters in the data stream
from CLIENTEMAC#TXD. Tab le 3 -1 describes these code characters, and IEEE Std 802.3,
Clause 36 has further definitions. CLIENTEMAC#TXD[7:0] is transmitted to
EMAC#PHYTXD first. Along with EMAC#PHYTXCHARISK and
EMAC#PHYTXCHARDISPMODE, the MGT encodes the incoming data to the appropriate
8B/10B stream.
Next IFG
ADJUST VALUE
13 Idles Inserted
ug074_3_12_101004
Figure 3-11 shows the timing of a normal outbound frame transfer for the case with an
even number of bytes in the frame.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com47
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
CLIENTEMAC#TXCLIENTCLKIN
R
(CLIENTEMAC#TXCLIENTCLKIN/2)
PHYEMAC#MIITXCLK
CLIENTEMAC#TXDVLD
CLIENTEMAC#TXDVLDMSW
EMAC#CLIENTTXACK
CLIENTEMAC#TXFIRSTBYTE
CLIENTEMAC#TXUNDERRUN
EMAC#CLIENTTXCOLLISION
EMAC#CLIENTTXRETRANSMIT
CLIENTEMAC#TXD[15:0]
EMAC#PHYTXD[7:0]
(SGMII or 1000BASE-X
PCS/PMA only)
EMAC#PHYTXCHARISK
(SGMII or 1000BASE-X
PCS/PMA only)
EMAC#PHYTXCHARDISPMODE
(SGMII or 1000BASE-X
PCS/PMA only)
DASADATA
/I1//I2//I2//I2//I2/
/S/
PRE
SFD
Figure 3-11:16-Bit Transmit (Even Byte Case)
FCS
/I1/
/T/ /R/
ug074_3_13_080705
Figure 3-12 shows the timing of a normal outbound frame transfer for the case with an odd
number of bytes in the frame.
48www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
CLIENTEMAC#TXCLIENTCLKIN
Client Interface
(CLIENTEMAC#TXCLIENTCLKIN/2)
PHYEMAC#MIITXCLK
CLIENTEMAC#TXDVLD
CLIENTEMAC#TXDVLDMSW
EMAC#CLIENTTXACK
CLIENTEMAC#TXFIRSTBYTE
CLIENTEMAC#TXUNDERRUN
EMAC#CLIENTTXCOLLISION
EMAC#CLIENTTXRETRANSMIT
CLIENTEMAC#TXD[15:0]
EMAC#PHYTXD[7:0]
(SGMII or 1000BASE-X
PCS/PMA only)
EMAC#PHYTXCHARISK
(SGMII or 1000BASE-X
PCS/PMA only)
EMAC#PHYTXCHARDISPMODE
(SGMII or 1000BASE-X
PCS/PMA only)
DASADATA
/I1//I2//I2//I2//I2/
/S/
PRE
SFD
Figure 3-12:16-Bit Transmit (Odd Byte Case)
FCS
/R/
/T/ /R/
ug074_3_14_080705
/I1/
As shown in Figure 3-12, CLIENTEMAC#TXDVLDMSW denotes an odd number of bytes
in the frame. In the odd byte case, CLIENTEMAC#TXDVLDMSW is deasserted one clock
cycle earlier than the CLIENTEMAC#TXDVLD signal, after the transmission of the frame.
Otherwise, these data valid signals are the same as shown in the even byte case
(Figure 3-11).
Back-to-Back Transfers
For back-to-back transfers, both the CLIENTEMAC#TXDVLD and
CLIENTEMAC#TXDVLDMSW must be deasserted for one PHYEMAC#MIITXCLK clock
cycle (half the clock frequency of CLIENTEMAC#TXCLIENTCLKIN) after the first frame.
During the following PHYEMAC#MIITXCLK clock cycle, both CLIENTEMAC#TXDLVD
and CLIENTEMAC#TXDVLDMSW must be set High to indicate that the first two bytes of
the destination address of the second frame is ready for transmission on
CLIENTEMAC#TXD[15:0]. In 16-bit mode, this one PHYEMAC#MIITXCLK clock cycle
IFG corresponds to a 2-byte gap (versus a 1-byte gap in 8-bit mode) between frames in the
back-to-back transfer.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com49
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
Figure 3-13 shows the timing diagram for 16-bit transmit for an even-byte case, and
Figure 3-14 shows the timing diagram for an odd-byte case.
CLIENTEMAC#TXCLIENTCLKIN
R
(CLIENTEMAC#TXCLIENTCLKIN/2)
PHYEMAC#MIITXCLK
CLIENTEMAC#TXD[15:0]
CLIENTEMAC#TXDVLD
CLIENTEMAC#TXDVLDMSW
EMAC#CLIENTTXACK
CLIENTEMAC#TXFIRSTBYTE
CLIENTEMAC#TXUNDERRUN
EMAC#CLIENTTXCOLLISION
EMAC#CLIENTTXRETRANSMIT
Figure 3-13:16-Bit Transmit Back-to-Back Transfer (Even Byte Case)
Figure 3-14:16-Bit Transmit Back-to-Back Transfer (Odd Byte Case)
D(n-1), D(n-2)DA1, DA0DA3, DA2DA5, DA4
0xXX, D(n)
1st FrameIFG2nd Frame
ug074_3_16_101004
50www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Receive (RX) Client – 8-bit Wide Interface
In this configuration, EMAC#CLIENTRXD[15:8] and EMAC#CLIENTRXDVLDMSW
signals are left unconnected.
Normal Frame Reception
The timing of a normal inbound frame transfer is shown in Figure 3-15. The client must
accept data at any time; there is no buffering within the Ethernet MAC to allow for receive
client latency. After frame reception begins, data is transferred on consecutive clock cycles
to the receive client until the frame is complete. The Ethernet MAC asserts the
EMAC#CLIENTRXGOODFRAME signal to indicate successful receipt of the frame and
the ability to analyze the frame by the client.
CLIENTEMAC#RXCLIENTCLKIN
EMAC#CLIENTRXD[7:0]
DASADATAL/T
EMAC#CLIENTRXDVLD
Client Interface
EMAC#CLIENTRXGOODFRAME
EMAC#CLIENTRXBADFRAME
Frame parameters (destination address, source address, LT, data, and optionally FCS) are
supplied on the data bus as shown in the timing diagram. The abbreviations are the same
as those described in Tab le 3 -1, pa g e 3 9 .
If the LT field has a length interpretation, the inbound frame could be padded to meet the
Ethernet minimum frame size specification. This padding is not passed to the client in the
data payload; an exception is when FCS passing is enabled. See “Client-Supplied FCS
Passing,” page 54.
Therefore, when client-supplied FCS passing is disabled, EMAC#CLIENTRXDVLD = 0
between frames for the duration of the padding field (if present), the FCS field, carrier
extension (if present), the IFG following the frame, and the preamble field of the next
frame. When client-supplied FCS passing is enabled, EMAC#CLIENTRXDVLD = 0
between frames for the duration of carrier extension (if present), the IFG, and the preamble
field of the following frame.
Although the timing diagram in Figure 3-15 shows the EMAC#CLIENTRXGOODFRAME
signal asserted shortly after the last valid data on EMAC#CLIENTRXD[7:0], this is not
always the case. The EMAC#CLIENTRXGOODFRAME or
EMAC#CLIENTRXBADFRAME signals are asserted only after completing all the frame
checks. This is after receipt of the FCS field (and after reception of the carrier extension if
present).
ug074_3_17_051704
Figure 3-15:Normal Frame Reception
Therefore, either EMAC#CLIENTRXGOODFRAME or EMAC#CLIENTRXBADFRAME is
asserted following frame reception at the beginning of the IFG.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com51
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
SGMII/1000BASE-X PCS/PMA
In SGMII or 1000BASE-X PCS/PMA mode, an entire data stream received from
PHYEMAC#RXD is passed on to EMAC#CLIENTRXD with some latency. This includes
the code group described in Tab le 3- 1. The assertion of EMAC#RXCLIENTDVLD indicates
the position of the first destination address byte all the way to the last byte of the payload.
Figure 3-16 and Figure 3-17 show the timing of a normal inbound frame transfer in SGMII
and 1000BASE-X PCS/PMA mode.
CLIENTEMAC#RXCLIENTCLKIN
PHYEMAC#RXCHARISCOMMA
PHYEMAC#RXCHARISK
/I1/ /I2/ /I2/ /I2/ /I2/ /S/
PHYEMAC#RXD[7:0]
PREAMBLE
DASAData
TL
R
EMAC#CLIENTRXD[7:0]
EMAC#RXCLIENTDVLD
EMAC#CLIENTRXGOODFRAME
EMAC#CLIENTRXBADFRAME
EMAC#CLIENTRXSTATS[6:0]
EMAC#CLIENTRXSTATSVLD
CLIENTEMAC#RXCLIENTCLKIN
PHYEMAC#RXCHARISCOMMA
PHYEMAC#RXCHARISK
PHYEMAC#RXD[7:0]
PRE
UG074_3_18_072705
Figure 3-16:Inbound Frame Transfer (Front)
110 20 30 40
FCS/I1/ /R//T/
DATA
EMAC#CLIENTRXD[7:0]
EMAC#RXCLIENTDVLD
EMAC#CLIENTRXGOODFRAME
EMAC#CLIENTRXBADFRAME
EMAC#CLIENTRXSTATS[6:0]
EMAC#CLIENTRXSTATSVLD
PREAMBLEDA
Figure 3-17:Inbound Frame Transfer (Back)
52www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
SA
TL
Data
UG074_3_19_072705
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Frame Reception with Errors
An unsuccessful frame reception (for example, a fragment frame or a frame with an
incorrect FCS) is shown in Figure 3-18. In this case, the EMAC#CLIENTRXBADFRAME
signal is asserted to the client at the end of the frame. The client is responsible for dropping
the data already transferred for this frame.
CLIENTEMAC#RXCLIENTCLKIN
EMAC#CLIENTRXD[7:0]
EMAC#CLIENTRXDVLD
EMAC#CLIENTRXGOODFRAME
EMAC#CLIENTRXBADFRAME
Client Interface
DASADATAL/T
Figure 3-19 shows the timing of an unsuccessful frame reception in SGMII and
1000BASE-X PCS/PMA modes.
CLIENTEMAC#RXCLIENTCLKIN
PHYEMAC#RXCHARISCOMMA
PHYEMAC#RXCHARISK
PHYEMAC#RXD[7:0]
EMAC#CLIENTRXD[7:0]
EMAC#CLIENTRXDVLD
EMAC#CLIENTRXGOODFRAME
EMAC#CLIENTRXBADFRAME
ug074_3_20_080805
Figure 3-18:Frame Reception with Error
/T/ /R/ /l1/
FCS
/V/
PREDASADataFCS
UG074_3_21_081805
Figure 3-19:Unsuccessful Frame Reception (SGMII and 1000BASE-X PCS/PMA Modes)
The following conditions cause the assertion of EMAC#CLIENTRXBADFRAME:
•Standard Conditions:
•FCS errors occur.
•Packets are shorter than 64 bytes (undersize or fragment frames).
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com53
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
•VLAN frames of length 1519 to 1522 are received when VLAN frames are not
enabled.
•Jumbo frames are received when jumbo frames are not enabled.
•A value of 0x0000 to 0x002D is in the type/length field. In this situation, the
frame should be padded to the minimum length. If not padded to exactly the
minimum frame length, the frame is marked as bad (when length/type checking
is enabled).
•A value of 0x002E to 0x0600 is in the type/length field, but the real length of the
received frame does not match this value (when length/type checking is
enabled).
•Any control frame that is received is not exactly the minimum frame length
(64 bytes).
•PHYEMAC#RXER is asserted at any point during frame reception.
•An error code is received in the 1-Gb frame extension field.
•A valid pause frame, addressed to the Ethernet MAC, is received when flow
control is enabled.
Refer to “Flow Control Block,” page 61 for more information.
•1000BASE-X/SGMII Specific Conditions:
When in 1000BASE-X or SGMII mode, these errors can also cause a frame to be marked
as bad:
R
•Unrecognized 8B/10B code group received during the packet.
•8B/10B running disparity errors occurred during the packet.
•Unexpected K characters or sequences appeared in the wrong order/byte
position.
Client-Supplied FCS Passing
Figure 3-20 shows the handling of the case where the Ethernet MAC is configured to pass
the FCS field to the client (see “Configuration Registers,” page 74). In this case, any
padding inserted into the frame to meet Ethernet minimum frame length specifications is
left intact and passed to the client.
Even though the FCS is passed up to the client, it is also verified by the Ethernet MAC, and
EMAC#CLIENTRXBADFRAME is asserted if the FCS check fails.
54www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
CLIENTEMAC#RXCLIENTCLKIN
EMAC#CLIENTRXD[7:0]
EMAC#CLIENTRXDVLD
EMAC#CLIENTRXGOODFRAME
EMAC#CLIENTRXBADFRAME
Figure 3-20:Frame Reception with In-Band FCS Field
VLAN Tagged Frames
The reception of a VLAN tagged frame (if enabled) is shown in Figure 3-21. The VLAN
frame is passed to the client to identify the frame as VLAN tagged. This is followed by the
tag control information bytes, V1 and V2. More information on the interpretation of these
bytes is described in the IEEE Std 802.3-2002 standard.
Client Interface
DASADATAL/TFCS
ug074_3_22_080805
CLIENTEMAC#RXCLIENTCLKIN
EMAC#CLIENTRXD[7:0]
EMAC#CLIENTRXDVLD
EMAC#CLIENTRXGOODFRAME
EMAC#CLIENTRXBADFRAME
Maximum Permitted Frame Length/ Jumbo Frames
The maximum length of a frame specified in the IEEE Std 802.3-2002 standard is 1518 bytes
for non-VLAN tagged frames. VLAN tagged frames can be extended to 1522 bytes. When
jumbo frame handling is disabled and the Ethernet MAC receives a frame exceeding the
maximum legal length, EMAC#CLIENTRXBADFRAME is asserted. When jumbo frame
handling is enabled, frames longer than the legal maximum are received in the same way
as shorter frames.
81 00 V1 V2
DASAD ATAL/T
VLAN
Tag
Figure 3-21:Reception of a VLAN Tagged Frame
ug074_3_23_080805
For more information on enabling and disabling jumbo frame handling, see
“Configuration Registers,” page 74.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com55
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
Length/Type Field Error Checks
Length/Type Field Error checking is specified in IEEE Std 802.3. The Length/Type Field
Error checks consist of comparing the value in the Length/Type field with the actual size of
the data field received. This check is only performed when the value in the Length/Type
field is less than 1536 (0x600). This check does not perform any checks on the total length
of the frame. This functionality must be enabled to comply with this specification.
Disabling Length/Type checking is intended only for specific applications, such as when
using over a proprietary backplane.
Enabled
When Length/Type error checking is enabled (see “Receiver Configuration Register (Word
1),” page 75), the following checks are made on frames with a value less than 1536 (0x600)
in the Length/Type field. (If either of these checks fails, EMAC#CLIENTRXBADFRAME is
asserted):
•A value greater than or equal to decimal 46 but less than decimal 1536 (a length
interpretation) in the Length/Type field is checked against the actual data length
received.
•A value less than decimal 46 in the Length/Type field is checked to ensure the data
field is padded to exactly 46 bytes.
R
Furthermore, if padding is indicated (the Length/Type field is less than decimal 46) and
client-supplied FCS passing is disabled, then the length value in the Length/Type field is
used to deassert EMAC#CLIENTRXDVLD after the indicated number of data bytes,
removing the padding bytes from the frame.
Disabled
When the Length/Type error checking is disabled (see “Receiver Configuration Register
(Word 1),” page 75), the Length/Type error checks described above are not performed. A
frame containing only these errors causes EMAC#CLIENTRXGOODFRAME to be
asserted. Disabling this check does not disable total frame length checks. Any frame of less
than 64 total bytes (minimum frame size) or any frame exceeding the maximum frame size
checks (if enabled) will still cause EMAC#CLIENTRXBADFRAME to be asserted. Control
frames will still be marked bad if they are not exactly 64 bytes in total length.
Furthermore, if padding is indicated and client-supplied FCS passing is disabled, then a
length value in the Length/Type field is not used to deassert EMAC#CLIENTRXDVLD.
Instead EMAC#CLIENTRXDVLD is deasserted before the start of the FCS field; in this
way, any padding is not removed from the frame.
Receive (RX) Client – 16-bit Wide Interface
This optional configuration can only be used when the Ethernet MAC is configured in
1000BASE-X PCS/PMA mode. The frequency of the receive client clock is half the
frequency of the internal receive clock. The 16-bit client interface allows the Ethernet MAC
to run at an internal clock frequency of greater than 125 MHz. The interface allows the
Ethernet MAC to run at a line rate greater than 1 Gb/s as specified in IEEE Std 802.3.
Therefore, the interface should not be used for Ethernet compliant applications, but it can
be useful for customer’s backplane applications.
The PHYEMAC#RXCLK is used as the input clock port for the
CLIENTEMAC#RXCLIENTCLKOUT divided by two, as shown in the receive client block
diagram in Figure 3-2, page 39. Using a DCM with the receive client clock,
56www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
EMACCLIENT#RXCLIENTCLKOUT as an input, the divide-by-two clock signal is
generated. See Figure 4-28, page 139 for more information.
Figure 3-22 shows the timing of a normal inbound frame transfer for the case with an even
number of bytes in the frame.
CLIENTEMAC#RXCLIENTCLKIN
PHYEMAC#RXCLK
(CLIENTEMAC#RXCLIENTCLKIN/2)
EMAC#CLIENTRXD[15:0]
EMAC#CLIENTRXDVLD
EMAC#CLIENTRXDVLDMSW
EMAC#CLIENTRXGOODFRAME
Client Interface
DASAD ATA
EMAC#CLIENTRXBADFRAME
Figure 3-22:16-Bit Receive (Even Byte Case)
Figure 3-23 shows the timing of a normal inbound frame transfer for the case with an odd
number of bytes in the frame.
CLIENTEMAC#RXCLIENTCLKIN
PHYEMAC#RXCLK
(CLIENTEMAC#RXCLIENTCLKIN/2)
EMAC#CLIENTRXD[15:0]
EMAC#CLIENTRXDVLD
EMAC#CLIENTRXDVLD MSW
EMAC#CLIENTRXGOODFRAME
EMAC#CLIENTRXBADFRAME
ug074_3_24_082007
DASAD ATA
ug074_3_25_080805
Figure 3-23:16-Bit Receive (Odd Byte Case)
As shown in Figure 3-22 and Figure 3-23, EMAC#CLIENTRXDVLDMSW is used to denote
an odd number of bytes in the frame. The data valid signals are shown in the even byte
case (Figure 3-22). In the odd byte case (Figure 3-23), EMAC#CLIENTRXDVLDMSW is
deasserted one clock cycle earlier compared to the EMAC#CLIENTRXDVLD signal, after
the reception of the frame. EMAC#CLIENTRXD[7:0] contains the data in this odd byte
case.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com57
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
Address Filtering
The address filtering block accepts or rejects frames by examining the destination address
of an incoming frame. This block includes:
•Optional pass-through mode with address filter disabled (promiscuous mode)
•Pause control frame address recognition (0x0100_00C2_8001)
The Address Filter (AF) protects the client from extraneous traffic. With this technique, the
hardware matches the Destination Address (DA) field of the Ethernet MAC frame. This
relieves the task from the bus and software.
The AF is programmed in software through the host interface. Typically this includes
unicast and multicast addresses. Pause-frame addresses and broadcast address are
hardwired; they do not need to be programmed. The AF can be enabled and disabled
under software control, using an enable bit in the control register. See “Address Filter
Registers,” page 80 for the control register.
When the function is enabled, Ethernet frames are passed to the client interface only if they
pass the filter. When the AF function is disabled, all incoming RX frames are passed to the
client interface.
R
For system monitoring, the event of a frame failing the filter is signaled. Equally, when a
frame passes the filter, a match is indicated to the client by using the output pins
EMAC#CLIENTRXDVLD and EMAC#CLIENTRXFRAMEDROP together. Ta bl e 3 -2
shows the values of the two signals for possible outcomes of an incoming RX frame when
the AF is enabled. Ta bl e 3 -3 shows the two signal values when the AF is disabled (in
promiscuous mode).
When the AF is enabled, it is impossible to determine if there is an incoming RX frame or
if the AF has rejected incoming RX frames (using only EMAC#CLIENTRXDVLD) because
in both cases, the EMAC#CLIENTRXDVLD is deasserted. See Ta bl e 3- 2. However, using
the EMAC#CLIENTRXFRAMEDROP signal, the nature of an incoming RX frame can be
distinguished for system monitoring.
Table 3-2: EMAC#CLIENTRXDVLD and EMAC#CLIENTRXFRAMEDROP Values When AF is Enabled
EMAC#CLIENTRXDVLDEMAC#CLIENTRXFRAMEDROPResult of an Incoming RX Frame
00No incoming RX frame
01AF rejects RX frame
10AF passes RX frame
11N/A
Table 3-3:EMAC#CLIENTRXDVLD and EMAC#CLIENTRXFRAMEDROP Values When AF is Disabled
EMAC#CLIENTRXDVLDEMAC#CLIENTRXFRAMEDROPResult of an Incoming RX Frame
00No incoming RX frame
01N/A
10AF passes RX frame
11AF rejects RX frame
58www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Host/Tie Interface
The host/tie interfaces provide the host, or fabric, access to the control registers for the
address filter.
The tie-off interface allows the unicast address register, pause frame source address, and
address filter promiscuous mode bit to be set directly by the fabric when the FPGA is
configured. In this way, the address filter performs functions with the unicast address
without using the host interface. The TIEEMAC#UNICASTADDR[47:0] and
TIEEMAC#CONFIGVEC[47:0] should both be tied to the unicast address.
TIEEMAC#UNICASTADDR[47:0] initializes unicast address word 0 [31:0] and unicast
address word 1 [15:0] while TIEEMAC#CONFIGVEC[47:0] initializes the pause frame
source address of the receiver configuration register word 0 [31:0] and receiver
configuration register word 1[15:0]. TIEEMAC#CONFIGVEC[64] initializes the
promiscuous mode bit (bit [31] of the address filter mode register). The tie interface does
not initialize the four multicast address register values.
When the host interface is used, all the address filter registers are accessible by software,
using either the DCR bus or the generic host bus. The tie interface initialization values to
the registers can be overridden by the software through the host interface. Also, the four
multicast address registers are programmed through the host interface.
Client Interface
Client RX Data/Control Interface
The AF generates the EMAC#CLIENTRXFRAMEDROP signal to inform the client that the
destination MAC address of an incoming receive Ethernet frame does not match with any
of the acceptable addresses stored in the AF. This control signal is asserted regardless of
whether the AF is enabled or disabled (promiscuous mode).
Figure 3-24 shows the timing diagram when a frame matches a valid location in the AF
(8-bit mode). The address filter is disabled in this timing diagram.
The flow control block is designed to Clause 31 of the IEEE Std 802.3-2002 standard. The
Ethernet MAC can be configured to send pause frames to act upon the pause frame’s
reception during full-duplex operation. These two behaviors can be configured
asymmetrically (see “Configuration Registers,” page 74).
Requirement for Flow Control
Figure 3-28 illustrates the requirement for flow control. The Ethernet MAC on the right
side of the figure has a reference clock slightly faster than the nominal 125 MHz. The
Ethernet MAC on the left side of the figure has a reference clock slightly slower than the
nominal 125 MHz. This results in the Ethernet MAC on the left side of the figure not being
able to match the full line rate of the Ethernet MAC on the right side (due to clock
tolerances). The left Ethernet MAC is illustrated as performing a loopback
implementation; this results in the FIFO filling up over time. Without flow control, this
FIFO eventually fills and overflows, resulting in the corruption or loss of Ethernet frames.
Previous Frame
Passed
DA1, DA0 DA3, DA2 DA5, DA4
DA
Current Frame
Dropped
ug074_3_29_080805
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com61
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
R
Client Logic
Application
FIFO
MAC
Tx
Rx
Figure 3-28:Requirement for Flow Control
125 MHz –100 ppm
125 MHz +100 ppm
MAC
Rx
Tx
ug074_3_30_080705
Flow Control Basics
An Ethernet MAC transmits a pause control frame for the link partner to cease
transmission for a defined period of time. For example, the left Ethernet MAC of
Figure 3-28 initiates a pause request when the client FIFO (illustrated) reaches a nearly full
state.
An Ethernet MAC responds to received pause control frames by ceasing transmission of
frames for the period of time defined in the received pause control frame. For example, the
right Ethernet MAC of Figure 3-28 ceases transmission after receiving the pause control
frame transmitted by the left Ethernet MAC. In a well-designed system, the right Ethernet
MAC ceases transmission before the client FIFO of the left Ethernet MAC is overflowed.
This provides time to empty the FIFO to a safe level before normal operation resumes. It
also safe guards the system against FIFO overflow conditions and frame loss.
62www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Transmitting a PAUSE Control Frame
The client initiates a flow control frame by asserting CLIENTEMAC#PAUSEREQ, when
the pause value is on the CLIENTEMAC#PAUSEVAL[15:0] bus. These signals are
synchronous to CLIENTEMAC#TXCLIENTCLKIN. The timing is shown in Figure 3-29.
CLIENTEMAC#TXCLIENTCLKIN
CLIENTEMAC#PAUSEREQ
CLIENTEMAC#PAUSEVAL[15:0]
Figure 3-29:Pause Request Timing
When the Ethernet MAC is configured to support transmit flow control, a PAUSE control
frame is transmitted on the link. When CLIENTEMAC#PAUSEREQ is asserted, the PAUSE
parameter is set to the CLIENTEMAC#PAUSEVAL[15:0] value. This does not disrupt any
frame transmission in progress, but it takes priority over any pending frame transmission.
The PAUSE control frame is transmitted even if the transmitter is in a paused state. An
example of a PAUSE frame (not drawn to scale) is shown in Figure 3-30.
Client Interface
ug074_3_31_080805
64-Byte Data Field
Pause Destination
Address
01-80-C2-00-00-01
Source
Address
MAC
Control
Ty pe
0x8808
MAC
Control
OPCODE
0x0001
Pause
Time
46-Byte Data Field
Figure 3-30:Pause Frame Example
The pause destination address can be configured using the “Configuration Registers”. The
pause_time in the PAUSE frame is the value from the CLIENTEMAC#PAUSEVAL[15:0].
Receiving a PAUSE Control Frame
When an error-free frame is received by the Ethernet MAC, it examines the following
information:
•The destination address field is matched against the Ethernet MAC control multicast
address and the configured source address for the Ethernet MAC (see “Configuration
Registers,” page 74).
•The LT field is matched against the Ethernet MAC control type code.
•If the second match is true, the OPCODE field contents are matched against the
Ethernet MAC control OPCODE.
FCS
ug074_3_32_080805
If any match is false or the Ethernet MAC flow control logic for the receiver is disabled, the
frame is ignored by the flow control logic and passed up to the client.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com63
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
If the frame passes all of the previous checks, is of minimum legal size, and the Ethernet
MAC flow control logic for the receiver is enabled, then the pause value parameter in the
frame is used to inhibit transmitter operation for a time defined in the IEEE Std 802.3-2002
specification. This inhibit is implemented using the same back pressure scheme shown in
Figure 3-6. Because the received pause frame is completed, it is passed to the client with
EMAC#CLIENTRXBADFRAME asserted, indicating to the client that the frame should be
dropped.
If the second match is true and the frame is not 64 bytes in length, the reception of any
frame is considered to be an invalid control frame. This frame is ignored by the flow
control logic and passed to the client with EMAC#CLIENTRXBADFRAME asserted.
EMAC#CLIENTRXBADFRAME will be asserted even if flow control is not enabled.
Flow Control Implementation Example
In the system illustrated in Figure 3-28, the Ethernet MAC on the left side of the figure
cannot match the full line rate of the right Ethernet MAC due to clock tolerances. Over
time, the FIFO fills and overflows.
This example implements a flow control method to reduce, over a long time period, the full
line rate of the right Ethernet MAC to less than the full line rate capability of the left
Ethernet MAC.
R
Method
1.Choose a FIFO with a nearly full occupancy threshold. A 7/8 occupancy is used in this
description, but the choice of threshold is implementation specific. When the
occupancy of the FIFO exceeds this occupancy, initiate a single pause control frame
with 0xFFFF used as the pause_quantum duration (0xFFFF is placed on
pause_val[15:0]). This is the maximum pause duration and causes the right Ethernet
MAC to cease transmission and the FIFO of the left Ethernet MAC to start emptying.
2.Choose a second FIFO with an occupancy threshold of 3/4 (the choice of threshold is
implementation specific). When the occupancy of the FIFO falls below this occupancy,
initiate a second pause control frame with 0x0000 used as the pause_quantum duration
(0x0000 is placed on pause_val[15:0]). This indicates a zero pause duration, and upon
receiving this pause control frame, the right Ethernet MAC immediately resumes
transmission (i.e., there is no wait for the original requested pause duration to expire).
This PAUSE control frame can, therefore, be considered a “pause cancel” command.
64www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Client Interface
Operation
Figure 3-31 illustrates the FIFO occupancy over time.
Full
A
7/8
3/4
FIFO Occupancy
B
5/8
1/2
Figure 3-31:Flow Control Implementation Triggered from FIFO Occupancy
1.The average FIFO occupancy of the left Ethernet MAC gradually increases over time
due to the clock tolerances. At point A, the occupancy has reached the threshold of 7/8
occupancy, triggering the maximum duration pause control frame request.
2.Upon receiving the pause control frame, the right Ethernet MAC ceases transmission.
3.After the right Ethernet MAC ceases transmission, the occupancy of the FIFO attached
to the left Ethernet MAC rapidly empties. The occupancy falls to the second threshold
of 3/4 occupancy at point B, triggering the zero duration pause control frame request
(the pause cancel command).
4.Upon receiving this second pause control frame, the right hand Ethernet MAC
resumes transmission.
5.Normal operation resumes, and the FIFO occupancy again gradually increases over
time. At point C, the flow control cycle repeats.
C
Time
ug074_3_33a_052005
Statistics Vector
Transmitter Statistics Vector
TX_STATISTICS_VECTOR contains the statistics for the frame transmitted. The vector is
driven synchronously by the transmitter clock, CLIENTEMAC#TXCLIENTCLKIN,
following frame transmission. The bit field definition for the transmitter statistics vector is
defined in Tab le 3- 4.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com65
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
The TX_STATISTICS_VECTOR is a 32-bit wide vector and is internal in the transmit
engine. This vector is muxed out to a one-bit signal, EMAC#CLIENTTXSTATS, as shown in
Figure 3-32.
CLIENTEMAC#TXCLIENTCLKIN
R
TX_STAT ISTICS_VALID
(internal signal)
TX_STAT ISTICS_VECTOR[31:0]
(internal signal)
EMAC#CLIENTTXSTAT SVLD
EMAC#CLIENTTXSTAT S
The block diagram for the transmitter statistics mux in the Ethernet MAC is shown in
All bit fields in EMAC#CLIENTTXSTATS are only valid when the
EMAC#CLIENTTXSTATSVLD is asserted as illustrated in Figure 3-34.
EMAC#CLIENTTXSTATSBYTEVLD is asserted if an Ethernet MAC frame byte (DA to FCS
inclusive) is being transmitted. The signal is valid on every
CLIENTEMAC#TXCLIENTCLKIN cycle.
66www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
TX_STATISTICS_VECTOR (bits 28 down to 20 inclusive) are only for half-duplex mode.
When operating in full-duplex mode these bits are set to a logic 0.
CLIENTEMAC#TXCLIENTCLKIN
CLIENTEMAC#TXD[7:0]
CLIENTEMAC#TXDVLD
EMAC#CLIENTTXACK
CLIENTEMAC#TXFIRSTBYTE
EMAC#CLIENTTXSTAT SBYTEVLD
EMAC#CLIENTTXSTAT SVLD
Client Interface
DA SA DATA L/T
EMAC#CLIENTTXSTAT S
Figure 3-34:Transmitter Statistics Vector Timing
Table 3-4:Bit Definitions for the Transmitter Statistics Vector
TX_STATISTICS_VECTORNameDescription
Asserted if the previous frame was a pause frame
31PAUSE_FRAME_TRANSMITTED
30ReservedUndefined.
29ReservedReturns a logic 0.
[28:25]TX_ATTEMPTS[3:0]
24ReservedReturns a logic 0.
23EXCESSIVE_COLLISION
22LATE_COLLISION
initiated by the Ethernet MAC in response to
asserting CLIENTEMAC#PAUSEREQ.
The number of attempts made to transmit the
previous frame. A 4-bit number where 0x0 = one
attempt; 0x
describes 16 attempts.
Asserted if a collision is detected on each of the
last 16 attempts to transmit the previous frame.
Asserted if a late collision occurred during frame
transmission.
1 = two attempts, up to 0xF which
0 1 31
ug074_3_36_080805
21EXCESSIVE_DEFERRAL
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com67
UG074 (v2.2) February 22, 2010
Asserted if the previous frame was deferred for
an excessive amount of time as defined by the
maxDeferTime constant in the IEEE Std 802.32002 specification.
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
Table 3-4:Bit Definitions for the Transmitter Statistics Vector (Cont’d)
TX_STATISTICS_VECTORNameDescription
R
20TX_DEFERRED
19VLAN_FRAME
[18:5]FRAME_LENGTH_COUNT
4CONTROL_FRAME
3UNDERRUN_FRAME
2MULTICAST_FRAME
1BROADCAST_FRAME
0SUCCESSFUL_FRAME
Notes:
1. Bits [28:20] of TX_STATISTICS_VECTOR are valid for half-duplex mode only.
Asserted if transmission of the frame was
deferred.
Asserted if the previous frame contains a VLAN
identifier in the LT field when transmitter VLAN
operation is enabled.
The length of the previous frame in number of
bytes. The count sticks at 16383 for jumbo frames
larger than this value. Stops at 16383.
Asserted if the previous frame has the special
Ethernet MAC control type code
88-08 in the LT field.
Asserted if the previous frame contains an
underrun error.
Asserted if the previous frame contains a
multicast address in the destination address field.
Asserted if the previous frame contains a
broadcast address in the destination address
field.
Asserted if the previous frame is transmitted
without error.
Receiver Statistics Vector
RX_STATISTICS_VECTOR contains the statistics for the frame received. The vector is
driven synchronously by the receiver clock, CLIENTEMAC#RXCLIENTCLKIN, following
frame reception. The bit field definition for the receiver statistics vector is defined in
Tab le 3 -5 .
The RX_STATISTICS_VECTOR is a 27-bit wide vector, and is internal in the receive engine.
This vector is muxed out to a seven-bit wide signal EMAC#CLIENTRXSTATS[6:0] as
shown in Figure 3-35.
CLIENTEMAC#RXCLIENTCLKIN
RX_STAT ISTICS_VALID
(internal signal)
RX_STAT ISTICS_VECTOR[26:0]
(internal signal)
EMAC#CLIENTRXSTAT SVLD
EMAC#CLIENTRXSTAT S[6:0]
[6:0][13:7][20:14][26:21]
Figure 3-35:Receiver Statistics MUX Timing
ug074_3_37_080805
68www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Client Interface
The block diagram for the receiver statistics MUX in the Ethernet MAC is shown in
Figure 3-36.
Ethernet MAC
RX_STAT ISTICS_VECTOR[26:0]
CLIENTEMAC#RXCLIENTCLKIN
EMAC#CLIENTRXSTAT SBYTEVLD
EMAC#CLIENTRXSTAT S[6:0]
CLIENTEMAC#RXCLIENTCLKIN
CLIENTEMAC#RXCLIENTCLKIN
(Internal Signal)
[26:0]
RXSTAT SMUX
RXSTAT SDEMUX
RESET
RXSTAT SVEC[26:0] RXSTATSVLD
User Defined
Statistics Processing Block
RX_STAT ISTICS_VALID
(Internal Signal)
Ethernet MAC Block
#CLIENTRXSTAT SVLD
EMAC
FPGA Fabric
Figure 3-36:Receiver Statistics MUX Block Diagram
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com69
UG074 (v2.2) February 22, 2010
ug074_3_38_080805
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
All bit fields for the EMAC#CLIENTRXSTATS[6:0] are valid only when the
EMAC#CLIENTRXSTATSVLD is asserted as illustrated in Figure 3-37.
EMAC#CLIENTRXSTATSBYTEVLD is asserted if an Ethernet MAC frame byte (DA to
FCS inclusive) is received. This is valid on every CLIENTEMAC#RXCLIENTCLKIN cycle.
CLIENTEMAC#RXCLIENTCLKIN
EMAC#CLIENTRXD[7:0]
EMAC#CLIENTRXDVLD
EMAC#CLIENTRXDVLDMSW
EMAC#CLIENTRXGOODFRAME
EMAC#CLIENTRXSTATSBYTEVLD
R
DASADATAL/T
EMAC#CLIENTRXSTATSVLD
EMAC#CLIENTRXSTATS[6:0]
Figure 3-37:Receiver Statistics Vector Timing
Table 3-5:Bit Definitions for the Receiver Statistics Vector
RX_STATISTICS_VECTORNameDescription
Used in 10/100 MII mode. If an odd number of nibbles
is received, the last nibble is ignored. If the frame
26ALIGNMENT_ERROR
25Length/Type Out of Range
24BAD_OPCODE
without this nibble has an incorrect FCS, this bit is
asserted. If the frame has a valid FCS, this bit is not
asserted.
Asserted if the LT field contains a length value that
does not match the number of Ethernet MAC client
data bytes received. Also asserted High if the LT field
indicates that the frame contains padding but the
number of Ethernet MAC client data bytes received is
not equal to 46 bytes (minimum frame size).
Asserted if the previous frame is error free, contains the
special control frame identifier in the LT field, but
contains an OPCODE unsupported by the Ethernet
MAC (any OPCODE other than PAUSE).
[6:0][26:21]
ug074_3_39_010906
70www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Table 3-5:Bit Definitions for the Receiver Statistics Vector (Cont’d)
RX_STATISTICS_VECTORNameDescription
Asserted if the previous frame is error-free. Contains
the special control frame identifier in the LT field.
Contains a destination address matching either the
23FLOW_CONTROL_FRAME
22Reserved.Undefined.
21VLAN_FRAME
20OUT_OF_BOUNDS
Ethernet MAC control multicast address or the
configured source address of the Ethernet MAC.
Contains the supported PAUSE OPCODE and is acted
upon by the Ethernet MAC.
Asserted if the previous frame contains a VLAN
identifier in the LT field when receiver VLAN
operation is enabled.
Asserted if the previous frame exceeded the specified
IEEE Std 802.3-2002 maximum legal length (see
“Maximum Permitted Frame Length/ Jumbo Frames,”
page 55). This is only valid if jumbo frames are
disabled.
Client Interface
19CONTROL_FRAME
[18:5]FRAME_LENGTH_COUNT
4MULTICAST_FRAME
3BROADCAST_FRAME
2FCS_ERROR
1BAD_FRAME
0GOOD_FRAME
Notes:
1. If the length/type field error checks are disabled, then a frame containing this type of error is marked as a GOOD_FRAME,
providing no additional errors were detected.
(1)
(1)
Asserted if the previous frame contains the special
control frame identifier in the LT field.
The length of the previous frame in number of bytes.
The count sticks at 16383 for any jumbo frames larger
than this value.
Asserted if the previous frame contains a multicast
address in the destination address field.
Asserted if the previous frame contained the broadcast
address in the destination address field.
Asserted if the previous frame received has an
incorrect FCS value or the Ethernet MAC detects error
codes during frame reception.
Asserted if the previous frame received contains errors.
Asserted if the previous frame received is error-free.
Statistics Registers/Counters
The Ethernet MAC does not collect statistics on the success and failure of various
operations. A custom statistics counter can be implemented in the FPGA fabric to collect
the statistics. A parameterizable Ethernet statistics core is available from the LogiCORE™
libraries. For more information, see:
When the PowerPC 405 processor is used as a host processor, it can access the statistics
counter registers in the FPGA fabric through the DCR bridge in the host interface. “Inter-
facing to an FPGA Fabric-Based Statistics Block” in Chapter 6 describes the access method.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com71
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
Host Interface
To access the Ethernet MAC registers through the host interface, the user must set
TIEEMACCONFIGURE[67] = 1. The host interface allows the user to:
•Program the configuration registers in the Ethernet MAC
•Read the accumulated statistics from the statistics unit implemented in the fabric
(optional)
•Access the configuration registers and multicast address table register in the address
filtering unit
•Access the Management Data I/O (MDIO) registers of the physical components
attached to the Ethernet MACs
The two Ethernet MACs share a single host interface. The host interface brings the Ethernet
MAC host bus from the Ethernet MAC out to the fabric. The host interface unit also
contains a DCR bus bridge. This allows the user to access the Ethernet MAC registers
through the DCR bus. Figure 3-38 shows the internal structure of the host interface. The
EMAC1 signal is provided by the HOSTEMAC1SEL input signal when using the generic
host bus or generated by the DCR bridge when using the DCR bus.
The DCREMACENABLE signal is used to select either the generic host bus or the DCR
bus. When this signal is asserted, the host interface uses the DCR bus.
R
DCRHOSTDONEIR
DCREMACENABLE
Virtex- 4 FPGA
DCR Bus
PPC405
Processor Block
Generic Host Bus
DCR
Bridge
Host Interface
Ethernet MAC Block
10
EMAC1
10
EMAC1
EMAC0
ug074_3_40_080805
Figure 3-38:Host Interface
72www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
HOSTOPCODE[1:0]
HOSTREQ
HOSTWRDATA[31:0]
HOSTRDDATA[31:0]
HOSTMIIMRDY
HOSTCLK
HOSTMIIMSEL
HOSTADDR[9:0]
HOSTEMAC1SEL
DCREMACENABLE
DCRHOSTDONEIR
Figure 3-39 shows the block diagram of the host interface.
MIIMSEL0
REQ0
OPCODE0
ADDR0
WRD0
MIIMRDY0
DCR Bus
(Connected internally
to PowerPC)
Host Interface
RDD0
(All internal signals)
MIIMSEL1
REQ1
OPCODE1
ADDR1
WRD1
MIIMRDY1
RDD1
Host Interface
EMAC0
EMAC1
Ethernet MAC Block
FPGA Fabric
ug074_3_41_080805
Figure 3-39:Ethernet MAC Host Interface Block Diagram
Generic Host Bus
When the generic host bus is used, the HOSTEMAC1SEL signal selects between the host
access of EMAC0 or EMAC1. When HOSTEMAC1SEL is asserted, the host accesses
EMAC1. If only one Ethernet MAC is used, this signal can be tied-off to use either one of
the Ethernet MACs.
To use the DCR bus for the host interface, the DCREMACENABLE signal is asserted.
Because the DCREMACENABLE signal is input from the fabric, it can be tied-off to select
between the DCR bus or the generic host bus during the FPGA power-up configuration.
When using the PowerPC processor and its DCR bus interface to control the Ethernet MAC
registers, either connect the EMAC DCREMACENABLE port to the PPC405
DCREMACENABLER port or assert the DCREMACENABLE input to the EMAC.
The PowerPC processor serves as host processor when a DCR bus is used. Interrupt
request is one of the methods used by the PowerPC processor to determine when the host
interface completes a DCR host access command.
The interrupt request DCRHOSTDONEIR signal is only active when the DCR bus is used,
and the host interface register IRENABLE is programmed to enable interrupt. This signal is
active High and level sensitive. When a host access through the DCR bus is completed, the
DCRHOSTDONEIR signal is asserted. The host needs to service the interrupt request and
clear the host interface register (IRSTATUS) to deassert this signal. See “Using the DCR Bus
as the Host Bus,” page 83 for a description of the DCR.
Access to the management interface depends on the type of transaction. Ta bl e 3- 6 shows
the access method required for each transaction type.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com73
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
Table 3-6:Management Interface Transaction Types
TransactionHOSTMIIMSELHOSTADDR[9]
Configuration/Address Filter01
MDIO access1X
Host Clock Frequency
The host clock (HOSTCLK) is used to derive the MDIO clock, MDC, and is subject to the
same frequency restrictions. See the Virtex-4 FPGA Data Sheet
parameters.
Configuration Registers
The Ethernet MAC has seven configuration registers. These registers are accessed through
the host interface and can be written to at any time. Both the receiver and transmitter logic
only respond to configuration changes during IFGs. The configurable resets are the only
exception, because the reset is immediate.
Configuration of the Ethernet MAC is performed through a register bank accessed through
the Host interface. Any time an address shown in Tab le 3- 7 is accessed, a 32-bit read or
write is performed from the same configuration word, with the exception of the read-only
Ethernet MAC mode configuration register and the RGMII/SGMII configuration register.
Only the speed selection is both readable and writable in the Ethernet MAC mode
configuration register.
RGMII link: Valid in RGMII mode configuration only. When this
bit is 1, the link is up. When this bit is 0, the link is down. This
[0]
displays the link information from PHY to Ethernet MAC,
0R
encoded by GMII_RX_DV and GMII_RX_ER during the IFG.
RGMII half-duplex mode: Valid in RGMII mode configuration
only. This bit is 0 for half-duplex mode and 1 for full-duplex
[1]
mode. This displays the duplex information from PHY to
0R
Ethernet MAC, encoded by GMII_RX_DV and GMII_RX_ER
during the IFG.
RGMII speed: Valid in RGMII mode configuration only. Link
information from PHY to Ethernet MAC as encoded by
GMII_RX_DV and GMII_RX_ER during the IFG. This 2-bit
[3:2]
vector is defined with the following values:
10 = 1000 Mb/s
All 0sR
01 = 100 Mb/s
00 = 10 Mb/s
11 =N/A
RGMIIHDRGMII
LSB
Link
[29:4]Reserved–
SGMII speed: Valid in SGMII mode configuration only. This
displays the SGMII speed information, as received by
TX_CONFIG_REG[11:10] in the PCS/PMA register. See
Table 4-8, page 134. This 2-bit vector is defined with the
[31:30]
following values:
All 0sR
10 = 1000 Mb/s
01 = 100 Mb/s
00 = 10 Mb/s
11 =N/A
78www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
Clock divide [5:0]: This value is used to derive the
[5:0]
EMAC#PHYMCLKOUT for external devices.
All 0sR/W
See “MDIO Interface,” page 93.
MDIO enable: When this bit is 1, the MDIO interface is used to
access the PHY. When this bit is 0, the MDIO interface is
[6]
disabled, and the MDIO signals remain inactive.
TIEEMAC#CONFIGVEC[73]R/W
See “MDIO Interface,” page 93.
[31:7]Reserved.–
Figure 3-40 shows the write timing for the configuration registers through the
management interface. When accessing the configuration registers (i.e., when
HOSTADDR[9] = 1 and HOSTMIIMSEL = 0), the upper bit of HOSTOPCODE functions as
an active Low write-enable signal. The lower HOSTOPCODE bit (bit[0]) is a “don’t care.”
LSB
HOSTCLK
HOSTMIIMSEL
HOSTOPCODE[1]
HOSTADDR[8:0]
HOSTADDR[9]
HOSTWRDATA[31:0]
ug074_3_42_080805
Figure 3-40:Configuration Register Write Timing
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com79
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
Figure 3-41 shows the read timing from the configuration registers. The words are similar,
but the upper HOSTOPCODE bit = 1. The contents of the register appear on
HOSTRDDATA[31:0] the HOSTCLK edge after the register address is asserted onto
HOSTADDR. HOSTMIIMSEL acts as a read enable. It must be held Low for an even
number of clock cycles during a read operation.
HOSTMIIMSEL
HOSTOPCODE[1]
HOSTADDR[8:0]
HOSTADDR[9]
R
HOSTCLK
HOSTRDDATA[31:0]
Figure 3-41:Configuration Register Read Timing
Address Filter Registers
Address Filter Register access includes the address filter registers and the multicast
address table registers. The Ethernet MAC has five address filter registers with access
through the host interface (Tab le 3 - 15 ).
Table 3-15:Address Filter Register
AddressRegister Description
0x380Unicast Address (Word 0)
0x384Unicast Address (Word 1)
0x388Multicast Address Table Access (Word 0)
0x38CMulticast Address Table Access (Word 1)
0x390Address Filter Mode
ug074_3_43_080805
80www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Host Interface
Figure 3-42 shows the multicast address table memory diagram.
Multicast Address [31:0]. The multicast address bits [31:0] are temporarily
deposited into this register for writing into a multicast address register.
Multicast Address [47:32]. The multicast address bits [47:32] are temporarily
deposited into this register for writing into a multicast address register.
All 0sR/W
Multicast Address: This 2-bit vector is used to choose the multicast address
register to access.
Promiscuous Mode enable: When this bit is 1, the Address Filter
block is disabled. When this bit is 0, the Address Filter block is
enabled.
A timing diagram for writing to the Address Filter Registers is the same as the one shown
for writing to the Ethernet MAC Configuration Registers (Figure 3-40).
LSB
R/W
82www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Figure 3-43 shows the timing diagram for reading the multicast address from one of the
four multicast address registers.
For reading a multicast address register in HOSTWRDATA[31:0], the RNW field is set to 1,
and the multicast address field should be set with the register number to be read. The
multicast address register read data is returned in HOSTRDDATA[31:0]. The LSW is the
multicast address [31:0]. The MSW contains 0x0000 and the multicast address [47:32]. For
examples of accessing a multicast address register, see “Interfacing to the Processor DCR”
in Chapter 6.
HOSTMIIMSEL acts as a read enable. It must be held Low for an even number of clock
cycles during a read operation.
When the DCR bus is used to access the internal registers of the Ethernet MAC, the DCR
bus bridge in the host interface translates commands carried over the DCR bus into
Ethernet MAC host bus signals. These signals are then input into one of the Ethernet
MACs.
The DCR bus bridge contains four device control registers. The first two are used as data
registers, each is 32 bits wide (dataRegMSW and dataRegLSW). The third is used as a
control register (cntlReg).
The fourth device control register is used as a ready status register (RDYstatus). The
PowerPC 405 processor polls this register to determine access completion status. The bits
in this register are asserted when there is no access in progress. When an access is in
progress, a bit corresponding to the type of access is automatically deasserted. The bit is
automatically reasserted when the access is complete. Alternatively, the host interface can
also provide an interrupt request to inform the host of access completion. The user can
select either the polling or the interrupt method to inform the host of access status.
0x38C
LSW
MSWHOSTRDDATA[31:0]
UG074_3_45_080805
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com83
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
The DCR bridge ignores any new DCR command for host access until the current host
access is complete. Therefore, it is essential to determine when the host access is complete
before issuing a new DCR command.
Tab le 3 -2 1 shows the DCR addresses for the DCRs. The user assigns the DCR address bits
[9:2] in the DCR address space. UG018
describes the DCR operation.
Table 3-21:Ethernet MAC Host Interface Device Control Register Addresses
DCR AddressDCR NameRegister WidthR/W
**_****_1100dataRegMSW32 bitsR/W
**_****_1101dataRegLSW32 bitsR/W
**_****_1110cntlReg32 bitsR/W
**_****_1111RDYstatus32 bitsR
Notes:
1. This register is Read Only.
The four registers and the contents of the registers are shown in Tab le 3- 22 through
1. For more information on Statistics IP, see “Interfacing to an FPGA Fabric-Based Statistics Block” in Chapter 6.
(1)
In addition to the DCRs, the DCR bus bridge contains three registers. These registers are
accessed indirectly through the DCRs.
When the interrupt method is selected to inform the host of access completion status, the
IRSTATUS register contains the interrupt request when an access is completed. When the
host services the interrupt, it reads this register to determine the type of host access
completed. Before exiting the interrupt service routine, the host writes to this register to
clear the interrupt request bit.
The IRENABLE register is programmed to allow updating of the interrupt request in the
IRSTATUS register. When an enable bit is cleared, the corresponding bit in the IRSTATUS
register is not updated. The MIIMWRDATA register temporarily holds MDIO write data
for output to the MDIO write data bus. In the case of an MDIO read, there is no need to
1
86www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
program the MIIMWRDATA register. Writing to the address of the MIIMCNTL register
starts the MDIO read or write transaction using the physical and register address in the
DCR dataRegLSW register.
The host interface interrupt request registers (IRENABLE and IRSTATUS) and the contents
of the registers are shown in Tab le 3- 26 and Tab le 3- 27 . The MIIMWRDATA register is
shown in Tab le 3 -2 8.
[16:31]Data- temporarily holds MDIO write data for output onto the host write data bus.undefined
Notes:
1. See “Interfacing to an FPGA Fabric-Based Statistics Block” in Chapter 6.
88www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Host Interface
Description of Ethernet MAC Register Access through the DCR Bus
To write data to an Ethernet MAC register through the DCR bus, the host processor must
first write the data into the DCR dataRegLSW. The host processor then writes the EMAC0
or EMAC1 select bit, the write control bit, and the Ethernet MAC register address code into
the DCRcntlReg. The Ethernet MAC register address code in the cntlReg,
ADDRESS_CODE (Tab le 3 -24 ), is translated into the corresponding Ethernet MAC register
address in the Ethernet MAC, and the address is output on the address bus
HOSTADDR#[9:0]. See Figure 3-39, page 73. The mapping of the ADDRESS_CODE field to
the set of Ethernet MAC registers is also shown in Figure 3-44.
The DCR registers (dataRegMSW, dataRegLSW, cntlReg, and RDYstatus) and the DCR
bridge registers (IRSTATUS, IRENABLE, and MIIMWRDATA) use the big endian bit
numbering convention. However, the Ethernet MAC host registers, such as Receiver
Configuration (Word 0) (host address 0x200) register, use the little endian bit numbering
convention. In the DCR bridge implementation, there is no conversion to or from big
endian to little endian. The bit positions are mapped directly in a one-to-one
correspondence, (big endian bit [0] is mapped directly to little endian bit [31], big endian
bit [1] is mapped directly to little endian bit [30] and onward).
DCR-to-Ethernet MAC
MSB
Host Interface Memory Map
310
0x200
Receiver Configuration (Word 0)
LSB
MSB
0162131
DCR Offset
0x2
WENEMAC1 SEL
22
ADDRESS_CODERESERVED
LSB
0x240
0x280
0x2C0
0x300
0x320
0x340
0x380
0x384
0x388
0x38C
0x390
0x3A0
0x3A4
0x3B0
0x3B4
Receiver Configuration (Word 1)
Transmitter Configuration
Flow Control Configuration
Ethernet MAC Mode Configuration
RGMII/SGMII Configuration
Management Configuration
Unicast Address (Word 0)
Unicast Address (Word 1)
Multicast Address (Word 0)
Multicast Address (Word 1)
Address Filter Mode
IRSTATUS
IRENABLE
MDIO Write Data
MIIMCNTL
ug074_3_48_082205
Figure 3-44:DCR to Ethernet MAC Host Interface Memory Map
The decode of the address code also generates the control signals MIIMSEL#, REQ#, and
OPCODE#[1:0] (see Figure 3-39, page 73). Data in the dataRegLSW is output on the
WRD#[31:0]. These signals are output to EMAC0 or EMAC1 when selected by the
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com89
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
EMACISEL bit. All writes to Ethernet MAC registers are accomplished in a single host
clock cycle except for the MDIO registers.
To read data from an Ethernet MAC register through the DCR bus, the DCR cntlReg is
programmed for read, EMAC0 or EMAC1 select, and the address code. The Ethernet MAC
address code is translated and output from the host interface on the address bus
ADDR#[9:0].
The decode of the address code generates the control signals MIIMSEL#, REQ#, and
OPCODE#[1:0] that are output to the selected Ethernet MAC. The data read out from the
Ethernet MAC is deposited in DCR dataRegLSW and dataRegMSW (in the case of an
address filter or statistics IP register read) in the host interface.
Reading the configuration registers for the Ethernet MAC and the address filter registers
takes a single host clock cycle, while reading from the Ethernet MAC statistics IP registers
and MDIO registers takes multiple host clock cycles. An Ethernet MAC statistics IP register
read takes six host clock cycles. MDIO registers reads take a multiple number of host clock
cycles depending on the physical interface device. To write to any of the PCS layer registers
(“Management Registers,” page 140), the data must be written to the MDIO Write Data
register shown in Figure 3-44. The PHY address and PCS register number are then written
to the DCR dataRegLSW register. The mapping is shown in Figure 3-45.
R
MSB
0 31
DCR Offset
0x1
22
Figure 3-45:MDIO Address Register to Access PCS Sublayer Register Block
The DCR bridge runs at the same clock frequency as the PowerPC processor. Because the
host bus is not a high performance bus, HOSTCLK runs at a lower frequency. The
HOSTCLK frequency must be an integer divide of the DCR clock frequency, and the two
clocks must be phase aligned. The DCR bridge ignores any new DCR command in the
DCR clock domain until a host access in the HOSTCLK domain is complete. Hence, the
PowerPC processor must determine when a host access is complete.
If the interrupt request method is selected, the host interface interrupt request output pin
DCRHOSTDONEIR is used to notify the host when an access is completed. In the case of a
read, when the host services the interrupt, it must issue DCR reads to dataRegLSW and
dataRegMSW to read out the Ethernet MAC register data.
26 27
MSB
PCS Sublayer Managed Register Block
15 0
REG_ADDR
0
LSB
REG_ADDR PHY_ADDR
1
2
3
4
Auto-Negotiation Advertisement Register
Control Register
Status Register
PHY Identifier Register
PHY Identifier Register
ug074_3_49_080805
LSB
The interrupt request register is located in the IRSTATUS register (Address Code 0x3A0).
After servicing the interrupt request, the host must clear the interrupt request. In addition,
the DCR RDYstatus register is provided to indicate when a multiple-cycle access is ready.
This register is allows the host to use the polling method for accesses requiring only a few
multiple host clock cycles.
90www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
The IRENABLE register (Address Code 0x3A4) in the host interface is used to enable
interrupt bits in the IRSTATUS register. To enable an interrupt, the corresponding bit is set.
When the enable bit is cleared, the interrupt status is not updated.
For examples of DCR read and write accesses, see “Interfacing to the Processor DCR” in
Chapter 6.
Address Code
The address codes for the Ethernet MAC registers are divided into three groups as shown
in Tab le 3 -2 9. The unused address codes are reserved. The detailed address codes for each
register are described in Tab le 3- 30 . The address codes for the Ethernet MAC registers and
registers in the host interface are encoded in hardware. Address codes for statistics IP
registers and Ethernet MAC Configuration registers match the 1G Ethernet MAC Host Bus
address as specified in the Xilinx® 1G Ethernet MAC core at:
92www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
MDIO Interface
Introduction to MDIO
MDIO Interface
The MDIO interface for 1 Gb/s operation (and slower speeds) is defined in IEEE Std 802.3,
Clause 22. This two-wire interface consists of a clock (MDC) and a shared serial data line
(MDIO).
An MDIO bus in a system consists of a single Station Management (STA) master
management entity and a number of MDIO Managed Device (MMD) slave entities.
Figure 3-46 illustrates a typical system. All transactions, read or write, are initiated by the
STA entity. All MMD devices, if addressed, must respond to the transactions from the STA.
MAC 1MAC 2
MDIO
STA
MDC
MMD
MMD
MMD
Figure 3-46:Typical MDIO-Managed System
The two different MDIO transaction types for writes and reads are described in “Write
Transaction,” and “Read Transaction.”
These abbreviations are used in this chapter:
OP Operation code
PHYAD PHY address
PRE Preamble
REGAD Register address
ST Start of frame
TA Tur n aroun d
MMD
MMD
MMD
UG074_3_71_112705
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com93
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
Write Transaction
Figure 3-47 shows a Write transaction across the MDIO, as defined by OP = 0b01. The
addressed MMD (PHYAD) device takes the 16-bit word in the Data field and writes it to
the register at REGAD.
MDC
MDIO
R
STA drives MDIO
IDLEIDLE32 bits
MDC
MDIO
IDLEIDLE32 bits
1ZZZ
STOPPHYADREGADTA16-bit WRITE DATA
PRE
Read Transaction
Figure 3-48 shows a Read transaction as defined by OP = 0b10. The addressed MMD
(PHYAD) device returns the 16-bit word from the register at REGAD.
STA drives MDIOMMD drives MDIO
1ZZZ
STOPPHYADREGADTA16-bit READ DATA
PRE
The IEEE specification 802.3-2002 provides details of the register map of MMD (PHY layer
devices) and a fuller description of the operation of the MDIO interface.
D13
D14
D11
D12
D10D9D8D7D6D5D4D3D2D1D0
Figure 3-47:MDIO Write Transaction
D13
D14
D11
D12
D10D9D8D7D6D5D4D3D2D1D0
Figure 3-48:MDIO Read Transaction
Z1 1 1 00 1 P4 P3 P2 P1P0 R4R3 R2R1 R0 1 0 D15
UG074_3_72_112705
Z1 1 1 01 0 P4 P3 P2 P1P0 R4R3 R2R1 R0 Z 0 D15
UG074_3_73_103106
Special Note on the Physical Addresses
The PHYAD field for the MDIO frame is defined in IEEE Std 802.3, Clause 22.2.4.5.5. This
address field is a 5-bit binary value capable of addressing 32 unique addresses. However,
every MMD must respond to address 0. Therefore, this address location can be used to
write a single command that is obeyed by all attached MMDs such as a reset or powerdown command.
This requirement dictates that the PHYAD for any particular MMD must not be set to 0 to
avoid possible MDIO contention.
94www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
MDIO Implementation in the EMAC
The EMAC implements an STA (MDIO master), controlled through the host interface,
which can be connected to one or more MMDs (PHY devices) to access their management
registers.
The PCS/PMA sublayer of the EMAC, used for 1000BASE-X or SGMII, also contains an
MMD (MDIO slave). The physical address of this MMD is set via the
PHYEMAC#PHYAD[4:0] port of the EMAC. However, the PCS/PMA sublayer also
responds to a PHYAD of zero.
Example Use Models
Figure 3-49 illustrates a user case example, where the Host Interface is used as the MDIO
master to access the configuration registers of an external PHY.
EMAC#
Address Filter Registers
Host
Interface
MDIO Interface
(STA MDIO Master)
Configuration Registers
PCS/PMA
Sublayer
(MMD
MDIO Slave)
MDIO
Arbitration
PHYEMAC#MCLKIN
EMAC#PHYMCLKOUT
PHYEMAC#MDIN
EMAC#PHYMDOUT
EMAC#PHYMDTRI
GND
O
OBUF
IOBUF
MDIO Interface
OPAD
OI
Connect to
external PHY
(MMD
MDIO Slave)
MDC
MDIO
I
T
IOPAD
IO
UG074_3_74_112705
Figure 3-49:User Case 1: MDIO Access to External PHY
PHYEMAC#MDIN, EMAC#PHYMDOUT, and EMAC#PHYMDTRI must be connected to
a 3-state buffer to create the bidirectional wire, MDIO. This 3-state buffer can be either
external to the FPGA or internally integrated by using an IOBUF with an appropriate I/O
standard for the external PHY as illustrated in Figure 3-49.
To obtain this functionality whenever the host interface is used, the EMAC’s Management
Data Input/Output (MDIO) Interface signals are wired as shown in Figure 3-49 with
TIEEMAC#CONFIGVEC[73] (MDIO enable) tied High.
This example intentionally does not use the PCS/PMA sublayer (a GMII or RGMII
physical interface can be selected, or the PCS/PMA sublayer can be configured only
through its tie-off vectors, TIEEMAC#CONFIGVEC[78:74]). However, it is still internally
connected to the MDIO and replies to a read or write transaction, if addressed. The
PHYAD of the PCS/PMA sublayer must not be addressed.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com95
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
Figure 3-50 illustrates a second implementation example. The host interface is used as the
MDIO master to access the configuration registers of the PCS/PMA sublayer logic, which
contains an MDIO slave. All connections are internal and are enabled by pulling
TIEEMAC#CONFIGVEC[73] (MDIO enable) High.
EMAC#
Address Filter Registers
Host
Interface
MDIO Interface
(STA MDIO Master)
Configuration Registers
PCS/PMA
Sublayer
(MMD
MDIO Slave)
MDIO
Arbitration
PHYEMAC#MCLKIN
EMAC#PHYMCLKOUT
PHYEMAC#MDIN
EMAC#PHYMDOUT
EMAC#PHYMDTRI
R
GND
NC
VCC
NC
NC
UG074_3_75_112705
Figure 3-50:User Case 2: Internal MDIO Access to PCS/PMA Sublayer
In this example, the EMAC’s Managements Data Input/Output (MDIO) Interface signals
are not used. The output signals are left unconnected, and the input signals are tied to a
logic level. PHYEMAC#MDIN must be tied High when not connected to an external PHY.
Alternatively, the EMAC’s Managements Data Input/Output (MDIO) can be connected to
a second MMD (for example, an external PHY device) by providing the connections
illustrated in Figure 3-49. Externally connected MMDs (MDIO slaves) must have different
non-zero physical addresses (PHYAD) from the non-zero address of the PCS/PMA
sublayer.
96www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
MDIO Interface
Figure 3-51 illustrates a third user case example that does not use the host interface, but
instead uses an external STA (MDIO master). Figure 3-51 shows this as an external device
to the FPGA, but the EMAC’s Managements Data Input/Output (MDIO) Interface signals
can alternatively be connected directly to a STA implemented in the FPGA fabric.
.
Host
Interface
EMAC#
Address Filter Registers
MDIO Interface
(STA MDIO Master)
Configuration Registers
PCS/PMA
Sublayer
(MMD
MDIO Slave)
MDIO
Arbitration
PHYEMAC#MCLKIN
EMAC#PHYMCLKOUT
PHYEMAC#MDIN
EMAC#PHYMDOUT
EMAC#PHYMDTRI
NC
IBUF
O
O
I
T
I
IOBUF
IO
Figure 3-51:User Case 3: External MDIO Access to the PCS/PMA Sublayer
This functionality is obtained by asserting High TIEEMAC#CONFIGVEC[73] (MDIO
enable) and pulling Low TIEEMAC#CONFIGVEC[67] (Host Interface enable) when not
using the host interface. In this case, the MDC clock must be provided through the input
port PHYEMAC#MCKIN.
IPAD
MDC
External STA
(MDIO Master)
MDIO
IOPAD
UG074_3_76_112705
Accessing MDIO via the EMAC Host Interface
The host interface can be used to provide STA (MDIO master) functionality. The remainder
of this chapter details how to access this functionality via the host interface.
The MDIO interface supplies a clock to the external devices, EMAC#PHYMCLKOUT
when the host interface is enabled. This clock is derived from the HOSTCLK signal using
the value in the Clock Divide[5:0] configuration register. The frequency of the MDIO clock
is given by the following equation:
To comply with the IEEE Std 802.3-2002 specification for this interface, the frequency of
EMAC#PHYMCLKOUT should not exceed 2.5 MHz. To prevent EMAC#PHYMCLKOUT
from being out of specification, the Clock Divide[5:0] value powers up at 000000. While
this value is in the register, it is impossible to enable the MDIO interface. Given this, even
if the user has enabled the host interface and the MDIO interface by tieing both
TIEEMAC#CONFIGVEC[67] and TIEEMAC#CONFIGVEC[73] High. Upon reset, the
MDIO port is still disabled until a non-zero value has been written into the clock divide
bits. When the host interface is disabled, the user can still access the management registers
in the internal PCS/PMA layer by providing PHYEMAC#MCLKIN and tying
TIEEMAC#CONFIGVEC[73] High.
Access to the MDIO interface through the management interface is shown in the
Figure 3-52 timing diagram.
HOSTCLK
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com97
UG074 (v2.2) February 22, 2010
Chapter 3: Client, Host, and MDIO Interfaces
www.BDTIC.com/XILINX
In MDIO transactions, the following applies:
•HOSTOPCODE maps to the OPCODE field of the MDIO frame.
•HOSTADDR maps to the two address fields of the MDIO frame; PHY_ADDR is
HOSTADDR[9:5], and REG_ADDR is HOSTADDR[4:0].
•HOSTWRDATA[15:0] maps into the data field of the MDIO frame during a write
operation.
•The data field of the MDIO frame maps into HOSTRDDATA[15:0] during a read
operation.
The Ethernet MAC signals to the host that it is ready for an MDIO transaction by asserting
HOSTMIIMRDY. A read or write transaction on the MDIO is initiated by a pulse on the
HOSTREQ signal. This pulse is ignored if the MDIO interface already has a transaction in
progress. The Ethernet MAC deasserts the HOSTMIIMRDY signal while the transaction
across the MDIO is in progress. When the transaction across the MDIO interface is
completed, the HOSTMIIMRDY signal is asserted by the Ethernet MAC. If the transaction
is a read, the data is also available on the HOSTRDATA[15:0] bus.
As noted in Figure 3-52, if a read transaction is initiated, the HOSTRDDATA bus is valid at
the point indicated. If a write transaction is initiated, the HOSTWRDATA bus must be
valid at the point indicated. Simultaneous read and write is not permitted.
R
HOSTCLK
HOSTMIIMSEL
HOSTREQ
HOSTOPCODE[1:0]
HOSTADDR[9:0]
HOSTWRDATA[15:0]
HOSTMIIMRDY
HOSTRDDATA[15:0]
ug074_3_46_080805
Figure 3-52:MDIO Access Through the Management Interface
For register map details of the physical layer devices and a complete description of the
operation of the MDIO interface itself, see IEEE specification 802.3-2002.
98www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074 (v2.2) February 22, 2010
R
www.BDTIC.com/XILINX
Physical Interface
The following sections describe the design considerations when using the Ethernet MAC
for the supported interfaces. The wrapper for the different physical interfaces are provided
in the Xilinx® CORE Generator™ tool. The interfaces are available in both VHDL and
Verilog. The wrapper files created by the CORE Generator tool will contain the clocking
logic. By using the CORE Generator tool, the time required to instantiate the Ethernet
MAC into a usable design is greatly reduced. See “Using the Embedded Ethernet MAC,”
page 167. The # in the following sections denotes either EMAC0 or EMAC1.
Media Independent Interface (MII)
MII is designed to IEEE Std 802.3-2002, Clause 22. It is used for 10 Mb/s and 100 Mb/s.
Chapter 4
MII Interface
Figure 4-1 shows the Ethernet MAC configured with MII as the physical interface. In this
interface, not all the ports of the Ethernet MAC are used.
Embedded Tri-Mode Ethernet MAC User Guidewww.xilinx.com99
UG074 (v2.2) February 22, 2010
Chapter 4: Physical Interface
www.BDTIC.com/XILINX
R
CLIENTEMAC#DCMLOCKED
EMAC#CLIENTRXCLIENTCLKOUT
CLIENTEMAC#RXCLIENTCLKIN
EMAC#CLIENTRXD[15:0]
EMAC#CLIENTRXDVLD
EMAC#CLIENTRXDVLDMSW
EMAC#CLIENTRXGOODFRAME
EMAC#CLIENTRXBADFRAME
EMAC#CLIENTRXFRAMEDROP
EMAC#CLIENTRXDVREG6
EMAC#CLIENTRXSTATS[6:0]
EMAC#CLIENTRXSTATSBYTEVLD
EMAC#CLIENTRXSTATSVLD
EMAC#CLIENTTXCLIENTCLKOUT
CLIENTEMAC#TXCLIENTCLKIN
CLIENTEMAC#TXD[15:0]
CLIENTEMAC#TXDVLD
CLIENTEMAC#TXDVLDMSW
EMAC#CLIENTTXACK
CLIENTEMAC#TXUNDERRUN
TX ClientRX Client
EMAC#CLIENTTXCOLLISION
EMAC#CLIENTTXRETRANSMIT
CLIENTEMAC#TXIFGDELAY[7:0]
CLIENTEMAC#TXFIRSTBYTE
EMAC#CLIENTTXSTATS
EMAC#CLIENTTXSTATSBYTEVLD
C#CLIENTTXSTAT SVLD
EMA
CLIENTEMAC#PAUSEREQ
CLIENTEMAC#PAUSEVAL[15:0]
Flow
Control
DCRHOST
HOSTADDR[9:0]
HOSTCLK
HOSTMIIMSEL
HOSTOPCODE[1:0]
HOSTREQ
HOSTMIIMRDY
HOSTRDDATA[31:0]
HOSTWRDATA[31:0]
HOSTEMAC1SEL
DCREMACENABLE
EMACDCRACK
EMACDCRDBUS[0:31]
DCREMACABUS[8:9]
DCREMACCLK
DCREMACDBUS[0:31]
DCREMACREAD
DCREMACWRITE
DCRHOSTDONEIR
MII
Ethernet
MAC
WRAPPER
VHDL/Verilog
RESET
MII_RX_CLK_#
MII_RXD[3:0]_#
MII_RX_DV_#
MII_RX_ER_#
MII_TX_CLK_#
MII_TXD[3:0]_#
MII_TX_EN_#
MII_TX_ER_#
MII_COL_#
MII_CRS_#
Physical Interface
Figure 4-1:Ethernet MAC Configured in MII Mode
100www.xilinx.comEmbedded Tri-Mode Ethernet MAC User Guide
UG074_3_50_022007
UG074 (v2.2) February 22, 2010
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.