20.06.2013 Views

Xilinx UG194 Virtex-5 FPGA Embedded Tri-Mode Ethernet MAC ...

Xilinx UG194 Virtex-5 FPGA Embedded Tri-Mode Ethernet MAC ...

Xilinx UG194 Virtex-5 FPGA Embedded Tri-Mode Ethernet MAC ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Embedded</strong><br />

<strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong><br />

User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


<strong>Xilinx</strong> is disclosing this user guide, manual, release note, and/or specification (the "Documentation") to you solely for use in the development<br />

of designs to operate with <strong>Xilinx</strong> hardware devices. You may not reproduce, distribute, republish, download, display, post, or transmit the<br />

Documentation in any form or by any means including, but not limited to, electronic, mechanical, photocopying, recording, or otherwise,<br />

without the prior written consent of <strong>Xilinx</strong>. <strong>Xilinx</strong> expressly disclaims any liability arising out of your use of the Documentation. <strong>Xilinx</strong> reserves<br />

the right, at its sole discretion, to change the Documentation without notice at any time. <strong>Xilinx</strong> assumes no obligation to correct any errors<br />

contained in the Documentation, or to advise you of any corrections or updates. <strong>Xilinx</strong> expressly disclaims any liability in connection with<br />

technical support or assistance that may be provided to you in connection with the Information.<br />

THE DOCUMENTATION IS DISCLOSED TO YOU “AS-IS” WITH NO WARRANTY OF ANY KIND. XILINX MAKES NO OTHER<br />

WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY, REGARDING THE DOCUMENTATION, INCLUDING ANY<br />

WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT OF THIRD-PARTY<br />

RIGHTS. IN NO EVENT WILL XILINX BE LIABLE FOR ANY CONSEQUENTIAL, INDIRECT, EXEMPLARY, SPECIAL, OR INCIDENTAL<br />

DAMAGES, INCLUDING ANY LOSS OF DATA OR LOST PROFITS, ARISING FROM YOUR USE OF THE DOCUMENTATION.<br />

© 2006–2011 <strong>Xilinx</strong>, Inc. XILINX, the <strong>Xilinx</strong> logo, <strong>Virtex</strong>, Spartan, ISE, and other designated brands included herein are trademarks of <strong>Xilinx</strong><br />

in the United States and other countries. All other trademarks are the property of their respective owners.<br />

Revision History<br />

The following table shows the revision history for this document.<br />

Date Version Revision<br />

09/06/06 1.0 Initial <strong>Xilinx</strong> release on CD.<br />

10/13/06 1.1 Added further descriptions and figures to “SGMII RX Elastic Buffer” in Chapter 6.<br />

03/06/07 1.2 Modified RGMII IDELAY placement and inputs in Figure 6-3, Figure 6-4, Figure 6-6<br />

through Figure 6-10, and Figure 6-12 through Figure 6-17.<br />

08/08/07 1.3 Chapter 1: Minor grammatical edits in “Preamble” and “<strong>Mode</strong>l Considerations.”<br />

Chapter 2: Modified description of E<strong>MAC</strong>#_LTCHECK_DISABLE in Table 2-17.<br />

Chapter 3:<br />

Added “Standard Conditions” and “1000BASE-X/SGMII Specific Conditions”<br />

sections.<br />

Added new paragraph to “Enabled.”<br />

Modified paragraph in “Receiving a PAUSE Control Frame.”<br />

Chapter 4:<br />

Modified Figure 4-1.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com <strong>UG194</strong> (v1.10) February 14, 2011<br />

R


Date Version Revision<br />

08/08/07<br />

(cont’d)<br />

1.3<br />

(cont’d)<br />

Edited text in “Clocking Requirements.”<br />

Minor grammatical edits in paragraph above Table 4-16, and “<strong>Ethernet</strong> <strong>MAC</strong><br />

Configuration and Address Filter Access.”<br />

Chapter 6:<br />

Added IDELAY elements to GMII_RX_CLK and GMII_RXD[7:0] lines in Figure 6-6 to<br />

Figure 6-10.<br />

Added description of fixed-mode IDELAYs to “Gigabit Media Independent Interface<br />

(GMII).”<br />

Added IDELAY elements to RGMII_RXC lines between IBUFG and BUFG in<br />

Figure 6-12 to Figure 6-17.<br />

Modified description of IDELAY in “Reduced Gigabit Media Independent Interface<br />

(RGMII).”<br />

Modified speed data in Table 6-2.<br />

Modified <strong>Ethernet</strong> <strong>MAC</strong> connections in Figure 6-36 and Figure 6-37.<br />

03/31/08 1.4 Updated the following: Table 3-4, Figure 6-3, Figure 6-4, Figure 6-6, Figure 6-7,<br />

Figure 6-10, Figure 6-12, Figure 6-13, Figure 6-15, Figure 6-17, Figure 6-20,<br />

Figure 6-21, Figure 6-22 (and notes), Figure 6-34, Figure 6-35, Figure 6-36, Figure 6-39,<br />

and Figure 6-40.<br />

Updated the following sections: “<strong>Ethernet</strong> Communications Port for an <strong>Embedded</strong><br />

Processor,” “RocketIO Serial Transceiver Signals,” “Statistics Registers/Counters,”<br />

“GMII Clock Management for 1 Gb/s Only,” “GMII Clock Management for <strong>Tri</strong>-Speed<br />

Operation Using Clock Enables,” “16-Bit Data Client,” “RocketIO Serial Transceiver<br />

Logic Using the RX Elastic Buffer in <strong>FPGA</strong> Logic,” “SGMII Clock Management (LXT<br />

and SXT Devices),” “1000BASE-X PCS/PMA (16-Bit Data Client) <strong>Mode</strong>,” and “Host<br />

Clock.”<br />

Added LXT device information.<br />

Added Figure 6-23, Figure 6-24, Figure 6-36, and Figure 6-37.<br />

06/06/08 1.5 Chapter 2: Updated Table 2-16.<br />

Chapter 3:<br />

Updated “Client-Supplied FCS Passing,” page 53, “Frame Collisions - Half-Duplex<br />

10/100 Mb/s Operation Only,” page 56, “VLAN Tagged Frames,” page 66, and the<br />

enabled discussion in “Length/Type Field Error Checks.”<br />

Chapter 4:<br />

Updated Table 4-7, Table 4-8, Figure 4-1, Figure 4-4, and Figure 4-5.<br />

Updated “Introduction to the <strong>Ethernet</strong> <strong>MAC</strong> Host Interface.”<br />

Chapter 6: Updated “Overview of Operation.”<br />

Appendix C: Updated “DCR Bus Modifications.”<br />

Added Appendix D, “Differences between Soft IP Cores and the <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong><br />

<strong>MAC</strong>.”<br />

07/24/08 1.6 Updated “Transmitting a PAUSE Control Frame,” Table 5-6, and Table 5-7.<br />

10/17/08 1.7 Added HOSTE<strong>MAC</strong>1SEL signal to Figure 4-6 and Figure 4-7.<br />

Added host_stats_lsw_rdy and host_stats_msw_rdy signals to Figure 7-1.<br />

<strong>UG194</strong> (v1.10) February 14, 2011 www.xilinx.com TE<strong>MAC</strong> User Guide


Date Version Revision<br />

04/28/09 1.8 All chapters:<br />

Changed references to FXT devices to include both TXT and FXT devices.<br />

Replaced the term platform with the term device.<br />

Replaced the term Smart<strong>Mode</strong>l with the term SecureIP model.<br />

Chapter 2:<br />

Changed references to GTP transceiver to GTP/GTX transceiver in Figure 2-1,<br />

page 27, Figure 2-2, page 29, and Figure 2-3, page 32.<br />

Chapter 3:<br />

Revised the text of “Client-Supplied FCS Passing” on page 53.<br />

Chapter 5:<br />

Changed references to GTP transceiver to GTP/GTX transceiver in Figure 5-4,<br />

page 119, Figure 5-6, page 121, Figure 5-7, page 122, and Figure 5-8, page 130.<br />

Chapter 6:<br />

Revised Note 1 to indicate the clock input of IFD can be driven by a BUFIO in<br />

Figure 6-3, page 141, Figure 6-8, page 148, Figure 6-14, page 157, and<br />

Figure 6-15, page 159.<br />

Added Note 1 indicating a BUFG buffer can be replaced by a BUFR and the<br />

clock input of IFD can be driven by a BUFIO in Figure 6-4, page 142, Figure 6-6,<br />

page 145, Figure 6-7, page 147, and Figure 6-10, page 152.<br />

Added Note 1 indicating a BUFG buffer can be replaced by a BUFR and the<br />

clock input of IDDR can be driven by a BUFIO in Figure 6-12, page 154,<br />

Figure 6-13, page 156, Figure 6-16, page 160, and Figure 6-17, page 162.<br />

Where a RocketIO® transceiver is shown, added the term RocketIO in<br />

Figure 6-21, page 169, Figure 6-22, page 170, Figure 6-36, page 191, and<br />

Figure 6-37, page 192.<br />

Revised schematic by adding a BUFGMUX to the PHYE<strong>MAC</strong>#MIITXCLK<br />

input in Figure 6-8, page 148.<br />

Revised schematic by changing the I0 input source for the BUFGMUX on the<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN input in Figure 6-8, page 148.<br />

Revised schematic by adding a BUFG buffer between the transceiver<br />

REFCLKOUT output and the DCM CLKIN input in Figure 6-22, page 170,<br />

Figure 6-23, page 172, Figure 6-24, page 173, Figure 6-38, page 194, and<br />

Figure 6-39, page 195.<br />

Changed references to GTP transceiver to GTP/GTX transceiver in Figure 6-28,<br />

page 179, Figure 6-29, page 182, Figure 6-33, page 186, and Figure 6-41,<br />

page 198.<br />

Added link to UG198 in “RX Elastic Buffer Implementations” on page 181 and<br />

“The <strong>FPGA</strong> RX Elastic Buffer Requirement” on page 181.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com <strong>UG194</strong> (v1.10) February 14, 2011


Date Version Revision<br />

10/01/09 1.9 Chapter 1:<br />

Revised first paragraph in “Frame Transmission and Interframe Gap,” page 23.<br />

Chapter 2:<br />

Revised E<strong>MAC</strong>#_RXFLOWCTRL_ENABLE and<br />

E<strong>MAC</strong>#_TXFLOWCTRL_ENABLE descriptions in Table 2-17, page 45.<br />

Chapter 3:<br />

Revised first paragraph in “Flow Control Block,” page 73.<br />

Chapter 5:<br />

Revised Link Status description in Table 5-4, page 124.<br />

02/14/11 1.10 Updated description of E<strong>MAC</strong>#_PAUSEADDR[47:0] in Table 2-17.<br />

Added description of standard and alternative clock management to “Transmitter<br />

Statistics Vector” and “Receiver Statistics Vector.”<br />

Updated Table 4-14.<br />

Added “Use of Clock Correction Sequences.”<br />

<strong>UG194</strong> (v1.10) February 14, 2011 www.xilinx.com TE<strong>MAC</strong> User Guide


TE<strong>MAC</strong> User Guide www.xilinx.com <strong>UG194</strong> (v1.10) February 14, 2011


Table of Contents<br />

Guide Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11<br />

Additional Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12<br />

Additional Support Resources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br />

User Guide Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br />

Acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13<br />

Typographical. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15<br />

Online Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15<br />

Chapter 1: Introduction<br />

Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17<br />

Typical <strong>Ethernet</strong> Application Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18<br />

<strong>Ethernet</strong> Switch or Router. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18<br />

<strong>Ethernet</strong> Communications Port for an <strong>Embedded</strong> Processor . . . . . . . . . . . . . . . . . . . . 19<br />

<strong>Ethernet</strong> Protocol Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20<br />

<strong>Ethernet</strong> Sublayer Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20<br />

<strong>Ethernet</strong> Data Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21<br />

Frame Transmission and Interframe Gap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23<br />

Using the <strong>Embedded</strong> <strong>Ethernet</strong> <strong>MAC</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24<br />

Accessing the <strong>Ethernet</strong> <strong>MAC</strong> from the CORE Generator Tool . . . . . . . . . . . . . . . . . . . 25<br />

Simulating the <strong>Ethernet</strong> <strong>MAC</strong> using SecureIP <strong>Mode</strong>ls . . . . . . . . . . . . . . . . . . . . . . . . . 25<br />

Chapter 2: <strong>Ethernet</strong> <strong>MAC</strong> Overview<br />

Architecture Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27<br />

<strong>Ethernet</strong> <strong>MAC</strong> Configuration Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30<br />

<strong>Ethernet</strong> <strong>MAC</strong> Primitive. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31<br />

<strong>Ethernet</strong> <strong>MAC</strong> Signal Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33<br />

Client-Side Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33<br />

Host Interface Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36<br />

Management Data Input/Output (MDIO) Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37<br />

MII/GMII/RGMII Physical Interface Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37<br />

RocketIO Serial Transceiver Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39<br />

Global Clock and Reset Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41<br />

<strong>Ethernet</strong> <strong>MAC</strong> Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42<br />

Chapter 3: Client Interface<br />

Transmit (TX) Client: 8-Bit Interface (without Clock Enables) . . . . . . . . . . . . . . . . 52<br />

Normal Frame Transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53<br />

In-Band Parameter Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53<br />

Padding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53<br />

Client-Supplied FCS Passing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53<br />

Client Underrun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54<br />

Back-to-Back Transfers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55<br />

Virtual LAN (VLAN) Tagged Frames. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 7<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Maximum Permitted Frame Length/Jumbo Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . 56<br />

Frame Collisions - Half-Duplex 10/100 Mb/s Operation Only . . . . . . . . . . . . . . . . . . 56<br />

IFG Adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58<br />

Transmit (TX) Client: 8-Bit Interface (with Clock Enables) . . . . . . . . . . . . . . . . . . . 58<br />

Normal Frame Transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59<br />

Transmit (TX) Client: 16-Bit Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60<br />

Back-to-Back Transfers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62<br />

Receive (RX) Client: 8-Bit Interface (without Clock Enables) . . . . . . . . . . . . . . . . . 63<br />

Normal Frame Reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64<br />

Frame Reception with Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65<br />

Client-Supplied FCS Passing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66<br />

VLAN Tagged Frames. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66<br />

Maximum Permitted Frame Length/Jumbo Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . 66<br />

Length/Type Field Error Checks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67<br />

Receive (RX) Client: 8-Bit Interface (with Clock Enables). . . . . . . . . . . . . . . . . . . . . 67<br />

Receive (RX) Client: 16-Bit Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69<br />

Address Filtering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71<br />

Address Filter Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71<br />

Client RX Data/Control Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72<br />

Flow Control Block. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73<br />

Requirement for Flow Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74<br />

Flow Control Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74<br />

Transmitting a PAUSE Control Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75<br />

Receiving a PAUSE Control Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75<br />

Flow Control Implementation Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76<br />

Statistics Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78<br />

Transmitter Statistics Vector. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78<br />

Receiver Statistics Vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81<br />

Statistics Registers/Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84<br />

Chapter 4: Host/DCR Bus Interfaces<br />

Introduction to the <strong>Ethernet</strong> <strong>MAC</strong> Host Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85<br />

<strong>Ethernet</strong> <strong>MAC</strong> Register Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87<br />

Configuration Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88<br />

Address Filter Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94<br />

Using the Host Bus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97<br />

Clocking Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97<br />

Reading and Writing <strong>MAC</strong> Configuration Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . 98<br />

Reading and Writing Address Filter Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99<br />

PCS/PMA Sublayer or External Device Access via MDIO . . . . . . . . . . . . . . . . . . . . . 100<br />

Using the DCR Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101<br />

Clocking Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101<br />

Device Control Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102<br />

Interfacing to a Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107<br />

DCR Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107<br />

<strong>Ethernet</strong> <strong>MAC</strong> Configuration and Address Filter Access . . . . . . . . . . . . . . . . . . . . . . 109<br />

PCS/PMA Sublayer or External Device Access via MDIO . . . . . . . . . . . . . . . . . . . . . 111<br />

Accessing <strong>FPGA</strong> Logic via Unused Host Bus Pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113<br />

8 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Chapter 5: MDIO Interface<br />

Introduction to MDIO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116<br />

MDIO Bus System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116<br />

MDIO Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117<br />

MDIO Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118<br />

MDIO Implementation in the <strong>Ethernet</strong> <strong>MAC</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119<br />

Accessing MDIO through the Host Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119<br />

Accessing PCS/PMA Sublayer Management Registers using MDIO . . . . . . . . . . . . 121<br />

1000BASE-X PCS/PMA Management Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122<br />

Link Status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125<br />

SGMII Management Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130<br />

Chapter 6: Physical Interface<br />

Introduction to the Physical Interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138<br />

Media Independent Interface (MII). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140<br />

MII Standard Clock Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141<br />

MII Clock Management using Clock Enables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142<br />

Gigabit Media Independent Interface (GMII). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143<br />

GMII Clock Management for 1 Gb/s Only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144<br />

GMII Standard Clock Management for <strong>Tri</strong>-Speed Operation . . . . . . . . . . . . . . . . . . . 148<br />

GMII Clock Management for <strong>Tri</strong>-Speed Operation Using Byte PHY . . . . . . . . . . . . 149<br />

GMII Clock Management for <strong>Tri</strong>-Speed Operation Using Clock Enables. . . . . . . . . 151<br />

Reduced Gigabit Media Independent Interface (RGMII). . . . . . . . . . . . . . . . . . . . 153<br />

RGMII Clock Management for 1 Gb/s Only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154<br />

RGMII Standard Clock Management for <strong>Tri</strong>-Speed Operation . . . . . . . . . . . . . . . . . 157<br />

RGMII Clock Management for <strong>Tri</strong>-Speed Operation Using Clock Enables . . . . . . . 160<br />

1000BASE-X PCS/PMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164<br />

<strong>Ethernet</strong> <strong>MAC</strong> PCS/PMA Sublayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164<br />

Introduction to the 1000BASE-X PCS/PMA Implementation. . . . . . . . . . . . . . . . . . . 164<br />

<strong>Ethernet</strong> <strong>MAC</strong> to RocketIO Serial Transceiver Connections . . . . . . . . . . . . . . . . . . . . 167<br />

1000BASE-X PCS/PMA Clock Management (LXT and SXT Devices) . . . . . . . . . . . . 169<br />

1000BASE-X PCS/PMA Clock Management (TXT and FXT Devices). . . . . . . . . . . . 171<br />

1000BASE-X Auto-Negotiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174<br />

Loopback When Using the PCS/PMA Sublayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177<br />

Serial Gigabit Media Independent Interface (SGMII) . . . . . . . . . . . . . . . . . . . . . . . 178<br />

<strong>Ethernet</strong> <strong>MAC</strong> PCS/PMA Sublayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178<br />

Introduction to the SGMII Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179<br />

SGMII RX Elastic Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180<br />

SGMII Clock Management (LXT and SXT Devices) . . . . . . . . . . . . . . . . . . . . . . . . . . . 191<br />

SGMII Clock Management (TXT and FXT Devices) . . . . . . . . . . . . . . . . . . . . . . . . . . . 193<br />

SGMII Auto-Negotiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196<br />

Loopback When Using the PCS/PMA Sublayer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197<br />

Chapter 7: Interfacing to a Statistics Block<br />

Using the Host Bus to Access Statistics Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . 199<br />

Using the DCR Bus to Access Statistics Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . 201<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 9<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Appendix A: Pinout Guidelines<br />

Appendix B: <strong>Ethernet</strong> <strong>MAC</strong> Clocks<br />

<strong>Ethernet</strong> <strong>MAC</strong> Internal Clock Logic Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205<br />

<strong>Ethernet</strong> <strong>MAC</strong> Clock Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206<br />

<strong>Ethernet</strong> <strong>MAC</strong> Input Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206<br />

Clock Connections to and from <strong>FPGA</strong> Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206<br />

Standard Clocking Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207<br />

Advanced Clocking Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208<br />

Clock Definitions and Frequencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211<br />

PHYE<strong>MAC</strong>#GTXCLK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211<br />

PHYE<strong>MAC</strong>#MIITXCLK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212<br />

PHYE<strong>MAC</strong>#RXCLK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT, PHYE<strong>MAC</strong>#TXGMIIMIICLKIN . . . . . . . . . . . . 213<br />

E<strong>MAC</strong>#PHYTXCLK. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT, CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN . . . . . . . 214<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT, CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN . . . . . . 215<br />

Appendix C: <strong>Virtex</strong>-4 to <strong>Virtex</strong>-5 <strong>FPGA</strong> Enhancements<br />

New Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217<br />

Unidirectional Enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217<br />

Programmable Auto-Negotiation Link Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217<br />

GT Loopback. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217<br />

DCR Bus Modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218<br />

Clocking Scheme Enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218<br />

Host Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218<br />

Advanced Clocking Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218<br />

Modifications Related to the Physical Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219<br />

Collision Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219<br />

RGMII Version 2.0 Clock Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219<br />

Port Map Changes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219<br />

Tie-Off Pins Changed to Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220<br />

Additional Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221<br />

Appendix D: Differences between Soft IP Cores and<br />

the <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong><br />

Features Exclusive to the <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong>. . . . . . . . . . . . . . . 223<br />

Features Exclusive to Soft IP Cores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223<br />

10 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

About This Guide<br />

Guide Contents<br />

Preface<br />

This user guide is a description of the <strong>Virtex</strong>®-5 <strong>FPGA</strong> <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong><br />

<strong>MAC</strong>. Complete and up-to-date documentation of the <strong>Virtex</strong>-5 family of <strong>FPGA</strong>s is<br />

available on the <strong>Xilinx</strong>® website at http://www.xilinx.com/virtex5.<br />

This user guide contains the following chapters:<br />

Chapter 1, “Introduction,” introduces the <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong><br />

<strong>Ethernet</strong> <strong>MAC</strong> and describes how to get started using the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

Chapter 2, “<strong>Ethernet</strong> <strong>MAC</strong> Overview,” describes the architecture of the <strong>Ethernet</strong><br />

<strong>MAC</strong>, defines its signal interface, and gives an overview of its possible configurations.<br />

Chapter 3, “Client Interface,” provides details of the client interface protocol and the<br />

<strong>Ethernet</strong> functionality associated with the client interface.<br />

Chapter 4, “Host/DCR Bus Interfaces,” describes how to access registers in the<br />

<strong>Ethernet</strong> <strong>MAC</strong> using either the generic host bus or the DCR bus. The <strong>Ethernet</strong> <strong>MAC</strong><br />

register descriptions are also found in this chapter.<br />

Chapter 5, “MDIO Interface,” describes the MDIO interface protocol and the MDIO<br />

implementation in the <strong>Ethernet</strong> <strong>MAC</strong>. The SGMII and 1000BASE-X PCS/PMA<br />

management register descriptions are also found in this chapter.<br />

Chapter 6, “Physical Interface,” describes all of the possible configurations for the<br />

physical interface and includes a description of optimized clocking schemes that can<br />

be used with the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

Chapter 7, “Interfacing to a Statistics Block,” provides details on how to use the<br />

<strong>Ethernet</strong> <strong>MAC</strong> with an <strong>FPGA</strong> logic-based statistics block.<br />

Appendix A, “Pinout Guidelines,” lists recommendations to improve design timing<br />

when using the <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong>.<br />

Appendix B, “<strong>Ethernet</strong> <strong>MAC</strong> Clocks,” gives an overview of the internal clock logic of<br />

the <strong>Ethernet</strong> <strong>MAC</strong> and summarizes the main clocking schemes. Definitions of each<br />

clock and its frequency, in all possible <strong>Ethernet</strong> <strong>MAC</strong> configurations, are also<br />

provided.<br />

Appendix C, “<strong>Virtex</strong>-4 to <strong>Virtex</strong>-5 <strong>FPGA</strong> Enhancements,” documents some key<br />

enhancements and a few minor modifications.<br />

Appendix D, “Differences between Soft IP Cores and the <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong>,”<br />

explains the differences between soft IP cores and the <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> by<br />

listing the features exclusive to both.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 11<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Preface: About This Guide<br />

Additional Documentation<br />

The following documents are also available for download at<br />

http://www.xilinx.com/virtex5.<br />

<strong>Virtex</strong>-5 Family Overview<br />

The features and product selection of the <strong>Virtex</strong>-5 family are outlined in this overview.<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong> Data Sheet: DC and Switching Characteristics<br />

This data sheet contains the DC and Switching Characteristic specifications for the<br />

<strong>Virtex</strong>-5 family.<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong> User Guide<br />

This user guide includes chapters on:<br />

Clocking Resources<br />

Clock Management Technology (CMT)<br />

Phase-Locked Loops (PLLs)<br />

Block RAM<br />

Configurable Logic Blocks (CLBs)<br />

SelectIO Resources<br />

SelectIO Logic Resources<br />

Advanced SelectIO Logic Resources<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong> RocketIO GTP Transceiver User Guide<br />

This guide describes the RocketIO GTP transceivers available in the <strong>Virtex</strong>-5 LXT<br />

and SXT devices.<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong> RocketIO GTX Transceiver User Guide<br />

This guide describes the RocketIO GTX transceivers available in the <strong>Virtex</strong>-5 TXT and<br />

FXT devices.<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Embedded</strong> Processor Block for PowerPC® 440 Designs<br />

This reference guide is a description of the embedded processor block available in the<br />

<strong>Virtex</strong>-5 TXT and FXT devices.<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong> Integrated Endpoint Block User Guide for PCI Express Designs<br />

This guide describes the integrated Endpoint blocks in the <strong>Virtex</strong>-5 LXT, SXT, TXT, and<br />

FXT devices used for PCI Express® designs.<br />

XtremeDSP Design Considerations<br />

This guide describes the XtremeDSP slice and includes reference designs for using<br />

the DSP48E slice.<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong> Configuration Guide<br />

This all-encompassing configuration guide includes chapters on configuration<br />

interfaces (serial and SelectMAP), bitstream encryption, Boundary-Scan and JTAG<br />

configuration, reconfiguration techniques, and readback through the SelectMAP and<br />

JTAG interfaces.<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong> System Monitor User Guide<br />

The System Monitor functionality available in all the <strong>Virtex</strong>-5 devices is outlined in<br />

this guide.<br />

12 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Additional Support Resources<br />

User Guide Conventions<br />

Acronyms<br />

Additional Support Resources<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong> Packaging and Pinout Specifications<br />

This specification includes the tables for device/package combinations and maximum<br />

I/Os, pin definitions, pinout tables, pinout diagrams, mechanical drawings, and<br />

thermal specifications.<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong> PCB Designer’s Guide<br />

This guide provides information on PCB design for <strong>Virtex</strong>-5 devices, with a focus on<br />

strategies for making design decisions at the PCB and interface level.<br />

To search the database of silicon and software questions and answers, or to create a<br />

technical support case in WebCase, see the <strong>Xilinx</strong> website at:<br />

http://www.xilinx.com/support.<br />

This document uses the following conventions.<br />

Table 1-1 lists the acronyms and abbreviations that are used throughout this User Guide.<br />

Table 1-1: Acronyms and Abbreviations in this User Guide<br />

Acronym Definition<br />

Byte PHY Name given to a particular <strong>Ethernet</strong> <strong>MAC</strong> clocking scheme described<br />

in this User Guide<br />

CRC Cyclic Redundancy Check<br />

CSMA/CD Carrier Sense Multiple Access with Collision Detection<br />

DA Destination Address (<strong>MAC</strong> frame)<br />

DCR Device Control Register<br />

DMA Direct Memory Access<br />

EDK <strong>Embedded</strong> Development Kit (<strong>Xilinx</strong> software)<br />

FCS Frame Check Sequence (<strong>MAC</strong> frame)<br />

FIFO First In, First Out memory<br />

<strong>FPGA</strong> Field Programmable Gate Array<br />

GBIC Gigabit Interface Converter (optical transceiver)<br />

Gb/s Gigabits per second<br />

GMII Gigabit Media Independent Interface<br />

GTP High-speed serial transceivers offered in the <strong>Virtex</strong>-5 LXT and SXT<br />

platforms<br />

GTX High-speed serial transceivers offered in the <strong>Virtex</strong>-5 FXT and TXT<br />

platforms<br />

IFG Interframe Gap (<strong>MAC</strong> frame)<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 13<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Preface: About This Guide<br />

Table 1-1: Acronyms and Abbreviations in this User Guide<br />

Acronym Definition<br />

IOB Input/Output Block<br />

ISE <strong>Xilinx</strong> Integrated Software Environment<br />

L/T Length/Type field (<strong>MAC</strong> frame)<br />

LAN Local Area Network<br />

<strong>MAC</strong> Media Access Controller<br />

Mb/s Megabits per second<br />

MDIO Management Data Input/Output<br />

MII Media Independent Interface<br />

OP Operation code (read or write) for MDIO frame (sometimes called<br />

OPCODE in text)<br />

OSI Open Systems Interconnection<br />

PCB Printed Circuit Board<br />

PCS Physical Coding Sublayer<br />

PHY Physical Layer<br />

The term refers to all physical sublayers (PCS, PMA, PMD). Often<br />

applied to a device, e.g., BASE-T PHY: an external chip which can<br />

connect to the <strong>Ethernet</strong> <strong>MAC</strong> to perform this physical standard<br />

PHYAD Physical Address (MDIO Frame)<br />

PLB Processor Local Bus<br />

PMA Physical Medium Attachment<br />

PMD Physical Medium Dependent<br />

PRE Preamble (MDIO Frame)<br />

REGAD Register Address (MDIO Frame)<br />

RGMII Reduced Gigabit Media Independent Interface<br />

RX Receiver<br />

SA Source Address (<strong>MAC</strong> frame)<br />

SFD Start of Frame Delimiter (<strong>MAC</strong> frame)<br />

SFP Small Form-factor Pluggable (optical transceiver)<br />

SGMII Serial Gigabit Media Independent Interface<br />

ST Start Code (MDIO Frame) or Start of Frame<br />

Stats Abbreviation of Statistics<br />

TA Turnaround (MDIO Frame)<br />

TX Transmitter<br />

VLAN Virtual Local Area Network<br />

14 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Typographical<br />

Online Document<br />

User Guide Conventions<br />

This document uses the following typographical conventions. An example illustrates each<br />

convention.<br />

Convention Meaning or Use Example<br />

Italic font<br />

References to other documents<br />

Emphasis in text<br />

The following conventions are used in this document:<br />

See the <strong>Virtex</strong>-5 User Guide for<br />

more information.<br />

The address (F) is asserted after<br />

clock event 2.<br />

Underlined Text Indicates a link to a web page. http://www.xilinx.com/virtex5<br />

Blue text<br />

Convention Meaning or Use Example<br />

Cross-reference link to a location<br />

in the current document<br />

Blue, underlined text Hyperlink to a website (URL)<br />

See the section “Additional<br />

Documentation” for details.<br />

Refer to “Address Filtering” in<br />

Chapter 3 for details.<br />

Go to http://www.xilinx.com<br />

for the latest documentation.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 15<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Preface: About This Guide<br />

16 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


Introduction<br />

Key Features<br />

R<br />

Chapter 1<br />

This chapter introduces the <strong>Virtex</strong>®-5 <strong>FPGA</strong> <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> and<br />

provides an overview of typical <strong>Ethernet</strong> applications and the <strong>Ethernet</strong> protocol. It also<br />

provides guidance on how to successfully incorporate the <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Ethernet</strong> Media<br />

Access Controller (<strong>MAC</strong>) into a larger design using two alternative <strong>Xilinx</strong>® tools.<br />

The <strong>Virtex</strong>-5 device family contains paired embedded <strong>Ethernet</strong> <strong>MAC</strong>s that are<br />

independently configurable to meet all common <strong>Ethernet</strong> system connectivity needs.<br />

Table 1 in the <strong>Virtex</strong>-5 Family Overview lists the device type versus the number of available<br />

<strong>Ethernet</strong> <strong>MAC</strong>s.<br />

This chapter contains the following sections:<br />

“Key Features”<br />

“Typical <strong>Ethernet</strong> Application Overview”<br />

“<strong>Ethernet</strong> Protocol Overview”<br />

“Using the <strong>Embedded</strong> <strong>Ethernet</strong> <strong>MAC</strong>”<br />

The key features of the <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Ethernet</strong> <strong>MAC</strong> are:<br />

Fully integrated 10/100/1000 Mb/s <strong>Ethernet</strong> <strong>MAC</strong><br />

Designed to the IEEE Std 802.3-2002 specification<br />

Configurable full-duplex operation in 10/100/1000 Mb/s<br />

Configurable half-duplex operation in 10/100 Mb/s<br />

Management Data Input/Output (MDIO) interface to manage objects in the physical<br />

layer<br />

User-accessible raw statistic vector outputs<br />

Support for VLAN frames<br />

Configurable interframe gap (IFG) adjustment in full-duplex operation<br />

Configurable in-band Frame Check Sequence (FCS) field passing on both transmit<br />

and receive paths<br />

Auto padding on transmit and stripping on receive paths<br />

Configured and monitored through a host interface<br />

Hardware-selectable Device Control Register (DCR) bus or generic host bus interface<br />

Configurable flow control through <strong>Ethernet</strong> <strong>MAC</strong> Control PAUSE frames;<br />

symmetrically or asymmetrically enabled<br />

Configurable support for jumbo frames of any length<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 17<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 1: Introduction<br />

Configurable receive address filter for unicast, general, and broadcast addresses<br />

Media Independent Interface (MII), Gigabit Media Independent Interface (GMII), and<br />

Reduced Gigabit Media Independent Interface (RGMII)<br />

1000BASE-X Physical Coding Sublayer (PCS) and a Physical Medium Attachment<br />

(PMA) sublayer included for use with the <strong>Virtex</strong>-5 RocketIO serial transceivers to<br />

provide a complete on-chip 1000BASE-X implementation<br />

Serial Gigabit Media Independent Interface (SGMII) supported through the RocketIO<br />

serial transceivers’ interfaces to external copper PHY layer for full-duplex operation<br />

Typical <strong>Ethernet</strong> Application Overview<br />

Typical applications for the <strong>Ethernet</strong> <strong>MAC</strong> include:<br />

“<strong>Ethernet</strong> Switch or Router”<br />

“<strong>Ethernet</strong> Communications Port for an <strong>Embedded</strong> Processor”<br />

<strong>Ethernet</strong> Switch or Router<br />

<strong>Virtex</strong>-5 Device<br />

Switch or<br />

Router<br />

Figure 1-1 illustrates a typical application for a single <strong>Ethernet</strong> <strong>MAC</strong>. The PHY side of the<br />

core is connected to an off-the-shelf <strong>Ethernet</strong> PHY device, which performs the BASE-T<br />

standard at 1 Gb/s, 100 Mb/s, and 10 Mb/s speeds. The PHY device can be connected<br />

using any of the following supported interfaces: GMII/MII, RGMII, or SGMII.<br />

The client side of the <strong>Embedded</strong> <strong>Ethernet</strong> <strong>MAC</strong> is connected to a FIFO to complete a single<br />

<strong>Ethernet</strong> port. This port is connected to a Switch or Routing matrix, which can contain<br />

several ports.<br />

For this application, the recommended place to start is in “Accessing the <strong>Ethernet</strong> <strong>MAC</strong><br />

from the CORE Generator Tool,” page 25. The CORE Generator tool provides an<br />

example design for the <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> for any of the<br />

supported physical interfaces. A FIFO example is also generated, which can be used as the<br />

FIFO in the illustration, for a typical application.<br />

Packet FIFO<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

<strong>MAC</strong><br />

Figure 1-1: Typical Application: <strong>Ethernet</strong> Switch or Router<br />

GMII/MII,<br />

RGMII,<br />

or SGMII<br />

Copper<br />

Medium<br />

18 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

IOBs<br />

<strong>Tri</strong>-Speed<br />

BASE-T<br />

PHY<br />

1 Gb/s,<br />

100 Mb/s,<br />

or<br />

10 Mb/s<br />

<strong>UG194</strong>_1_01_072306<br />

R


R<br />

Typical <strong>Ethernet</strong> Application Overview<br />

<strong>Ethernet</strong> Communications Port for an <strong>Embedded</strong> Processor<br />

<strong>Virtex</strong>-5 Device<br />

Processor<br />

CPU<br />

Bus<br />

Figure 1-2 illustrates a typical application for a single <strong>Ethernet</strong> <strong>MAC</strong>. The PHY side of the<br />

core is connected to an off-the-shelf <strong>Ethernet</strong> PHY device, which performs the BASE-T<br />

standard at 1 Gb/s, 100 Mb/s, and 10 Mb/s speeds. The PHY device can be connected<br />

using any of the following supported interfaces: GMII/MII, RGMII, or SGMII.<br />

A soft core is provided as part of the <strong>Xilinx</strong> Platform Studio (XPS), <strong>Embedded</strong><br />

Development Kit (EDK) IP portfolio to connect the client interface of the <strong>Embedded</strong><br />

<strong>Ethernet</strong> <strong>MAC</strong> to the DMA port of a processor. DS537, XPSLL TE<strong>MAC</strong> Data Sheet, describes<br />

the XPS_LL_TE<strong>MAC</strong>, which can be instantiated for an intended processor application.<br />

DMA<br />

Engine<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

<strong>MAC</strong><br />

GMII/MII,<br />

RGMII,<br />

or SGMII<br />

Figure 1-2: Typical Application: <strong>Ethernet</strong> Communications Port for <strong>Embedded</strong> Processor<br />

Copper<br />

Medium<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 19<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

IOBs<br />

<strong>Tri</strong>-Speed<br />

BASE-T<br />

PHY<br />

1 Gb/s,<br />

100 Mb/s,<br />

or<br />

10 Mb/s<br />

<strong>UG194</strong>_1_02_081006


Chapter 1: Introduction<br />

<strong>Ethernet</strong> Protocol Overview<br />

This section gives an overview of where the <strong>Ethernet</strong> <strong>MAC</strong> fits into an <strong>Ethernet</strong> system and<br />

provides a description of some basic <strong>Ethernet</strong> terminology.<br />

<strong>Ethernet</strong> Sublayer Architecture<br />

OSI<br />

Reference<br />

<strong>Mode</strong>l<br />

Layers<br />

Application<br />

Presentation<br />

Session<br />

Transport<br />

Network<br />

Data Link<br />

PHY - Physical<br />

Figure 1-3 illustrates the relationship between the OSI reference model and the <strong>Ethernet</strong><br />

<strong>MAC</strong>, as defined in the IEEE 802.3 specification. The grayed-in layers show the<br />

functionality that the <strong>Ethernet</strong> <strong>MAC</strong> handles. Figure 1-3 also shows where the supported<br />

physical interfaces fit into the architecture.<br />

PCS - Physical Coding Sublayer<br />

PMA - Physical Medium Attachment<br />

PMD - Physical Medium Dependent<br />

PCS<br />

PMA<br />

PMD<br />

Medium<br />

1000BASE-X<br />

(e.g., Optical Fiber Medium)<br />

Figure 1-3: IEEE 802_3.2002 <strong>Ethernet</strong> <strong>Mode</strong>l<br />

<strong>MAC</strong> and <strong>MAC</strong> CONTROL Sublayer<br />

LAN<br />

CSMA/CD<br />

Layers<br />

Higher Layers<br />

LLC-Logical Link Control<br />

<strong>MAC</strong> Control (Optional)<br />

<strong>MAC</strong> - Media Access Control<br />

Reconciliation<br />

MII - Media Independent Interface<br />

The <strong>Ethernet</strong> <strong>MAC</strong> is defined in the IEEE 802.3 specification in clauses 2, 3, and 4. A <strong>MAC</strong><br />

is responsible for the <strong>Ethernet</strong> framing protocols described in “<strong>Ethernet</strong> Data Format” and<br />

error detection of these frames. The <strong>MAC</strong> is independent of and can connect to any type of<br />

physical layer device.<br />

The <strong>MAC</strong> Control sublayer is defined in the IEEE 802.3 specification, clause 31. This<br />

provides real-time flow control manipulation of the <strong>MAC</strong> sublayer.<br />

Both the <strong>MAC</strong> CONTROL and <strong>MAC</strong> sublayers are provided by the <strong>Ethernet</strong> <strong>MAC</strong> in all<br />

modes of operation.<br />

20 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

PCS<br />

PMA<br />

PMD<br />

Medium<br />

1000BASE-T<br />

100BASE-T<br />

10BASE-T<br />

(e.g., Copper Medium)<br />

GMII - Gigabit Media Independent Interface<br />

RGMII - Reduced Gigabit Media Independent Interface<br />

SGMII - Serial Gigabit Media Independent Interface<br />

GMII/MII<br />

RGMII<br />

SGMII<br />

<strong>UG194</strong>_1_03_072306<br />

R


R<br />

Number<br />

of Bytes<br />

Physical Sublayers PCS, PMA, and PMD<br />

<strong>Ethernet</strong> Protocol Overview<br />

The combination of the Physical Coding Sublayer (PCS), the Physical Medium Attachment<br />

(PMA), and the Physical Medium Dependent (PMD) sublayer constitute the physical<br />

layers for the protocol. Two main physical standards are specified:<br />

<strong>Ethernet</strong> Data Format<br />

Number<br />

of Bytes<br />

Preamble<br />

Preamble<br />

BASE-T PHYs provide a link between the <strong>MAC</strong> and copper mediums. This<br />

functionality is not offered within the <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong><br />

<strong>MAC</strong>. However, external BASE-T PHY devices are readily available on the market.<br />

These can connect to the <strong>Ethernet</strong> <strong>MAC</strong>, using GMII/MII, RGMII, or SGMII<br />

interfaces.<br />

BASE-X PHYs provide a link between the <strong>MAC</strong> and (usually) fibre optic mediums.<br />

The <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> is capable of supporting the<br />

1 Gb/s BASE-X standard; 1000BASE-X PCS and PMA sublayers can be offered by<br />

connecting the <strong>Ethernet</strong> <strong>MAC</strong> to a RocketIO serial transceiver. An optical transceiver<br />

can be directly connected to the RocketIO serial transceiver to complete the PMD<br />

sublayer functionality.<br />

<strong>Ethernet</strong> data is encapsulated in frames, as shown in Figure 1-4, for standard <strong>Ethernet</strong><br />

frames. The fields in the frame are transmitted from left to right. The bytes within the<br />

frame are transmitted from left to right (from least significant bit to most significant bit<br />

unless specified otherwise). The <strong>Ethernet</strong> <strong>MAC</strong> can handle jumbo <strong>Ethernet</strong> frames where<br />

the data field can be much larger than 1500 bytes.<br />

7 1 6 6 2 0 - 1500 0 - 46 4<br />

Start of Frame Destination<br />

Delimiter (SFD) Address<br />

Source<br />

Address<br />

Length/<br />

Type<br />

64 - 1518 Bytes<br />

Figure 1-4: Standard <strong>Ethernet</strong> Frame Format<br />

Data Pad<br />

<strong>UG194</strong>_1_04_072306<br />

The <strong>Ethernet</strong> <strong>MAC</strong> can also accept VLAN frames. The VLAN frame format is shown in<br />

Figure 1-5. If the frame is a VLAN type frame, the <strong>Ethernet</strong> <strong>MAC</strong> accepts four additional<br />

bytes.<br />

7 1 6 6 2 2 2 0 - 1500 0 - 46 4<br />

Start of Frame Destination<br />

Delimiter (SFD) Address<br />

Source<br />

Address<br />

0x<br />

8100<br />

VLAN<br />

Tag<br />

Len/<br />

Type<br />

Data Pad FCS<br />

64 - 1522 bytes<br />

Figure 1-5: <strong>Ethernet</strong> VLAN Frame Format<br />

<strong>Ethernet</strong> pause/flow control frames can be transmitted and received by the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

Figure 3-29, page 75 shows how a pause/flow control frame differs from the standard<br />

<strong>Ethernet</strong> frame format.<br />

The following subsections describe the individual fields of an <strong>Ethernet</strong> frame and some<br />

basic functionality of the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 21<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

FCS<br />

<strong>UG194</strong>_1_05_020807


Chapter 1: Introduction<br />

Preamble<br />

For transmission, this field is automatically inserted by the <strong>Ethernet</strong> <strong>MAC</strong>. The preamble<br />

field was historically used for synchronization and contains seven bytes with the pattern<br />

0x55, transmitted from left to right. For reception, this field is always stripped from the<br />

incoming frame, before the data is passed to the client. The <strong>Ethernet</strong> <strong>MAC</strong> can receive<br />

<strong>Ethernet</strong> frames, even if the preamble does not exist, as long as a valid start of frame is<br />

available.<br />

Start of Frame Delimiter<br />

The start of frame delimiter field marks the start of the frame and must contain the pattern<br />

0xD5.<br />

For transmission on the physical interface, this field is automatically inserted by the<br />

<strong>Ethernet</strong> <strong>MAC</strong>. For reception, this field is always stripped from the incoming frame before<br />

the data is passed to the client.<br />

Destination Address<br />

The least significant bit of the destination address determines if the address is an<br />

individual/unicast (0) or group/multicast (1) address. Multicast addresses are used to<br />

group logically related stations. The broadcast address (destination address field is all 1s)<br />

is a multicast address that addresses all stations on the LAN. The <strong>Ethernet</strong> <strong>MAC</strong> supports<br />

transmission and reception of unicast, multicast, and broadcast packets.<br />

This field is the first field of the <strong>Ethernet</strong> frame that is always provided in the packet data<br />

for transmissions and is always retained in the receive packet data.<br />

Source Address<br />

For transmission, the source address of the <strong>Ethernet</strong> frame should be provided by the client<br />

because it is unmodified by the <strong>Ethernet</strong> <strong>MAC</strong>. The unicast address for the <strong>Ethernet</strong> <strong>MAC</strong><br />

is used as the source address when the <strong>Ethernet</strong> <strong>MAC</strong> creates pause control frames. The<br />

source address field is always retained in the receive packet data.<br />

Length/Type<br />

The value of this field determines if it is interpreted as a length or a type field, as defined<br />

by the IEEE 802.3 standard. A value of 1536 decimal or greater is interpreted by the<br />

<strong>Ethernet</strong> <strong>MAC</strong> as a type field.<br />

When used as a length field, the value in this field represents the number of bytes in the<br />

following data field. This value does not include any bytes that can be inserted in the pad<br />

field following the data field.<br />

A length/type field value of 0x8100 hex indicates that the frame is a VLAN frame, and a<br />

value of 0x8808 hex indicates a pause <strong>MAC</strong> control frame.<br />

For transmission, the <strong>Ethernet</strong> <strong>MAC</strong> does not perform any processing of the length/type<br />

field.<br />

For reception, if this field is a length field, the <strong>Ethernet</strong> <strong>MAC</strong> receive engine interprets this<br />

value and removes any padding in the pad field (if necessary). If the field is a length field<br />

and length/type checking is enabled, the <strong>Ethernet</strong> <strong>MAC</strong> compares the length against the<br />

actual data field length and flags an error if a mismatch occurs. If the field is a type field,<br />

the <strong>Ethernet</strong> <strong>MAC</strong> ignores the value and passes it along with the packet data with no<br />

further processing. The length/type field is always retained in the receive packet data.<br />

22 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Data<br />

Pad<br />

FCS<br />

<strong>Ethernet</strong> Protocol Overview<br />

The data field can vary from 0 to 1500 bytes in length for a normal frame. The <strong>Ethernet</strong><br />

<strong>MAC</strong> can handle jumbo frames of any length.<br />

This field is always provided in the packet data for transmissions and is always retained in<br />

the receive packet data.<br />

The pad field can vary from 0 to 46 bytes in length. This field is used to ensure that the<br />

frame length is at least 64 bytes in length (the preamble and SFD fields are not considered<br />

part of the frame for this calculation), which is required for successful CSMA/CD<br />

operation. The values in this field are used in the frame check sequence calculation but are<br />

not included in the length field value, if it is used. The length of this field and the data field<br />

combined must be at least 46 bytes. If the data field contains 0 bytes, the pad field is<br />

46 bytes. If the data field is 46 bytes or more, the pad field has 0 bytes.<br />

For transmission, this field can be inserted automatically by the <strong>Ethernet</strong> <strong>MAC</strong> or can be<br />

supplied by the client. If the pad field is inserted by the <strong>Ethernet</strong> <strong>MAC</strong>, the FCS field is<br />

calculated and inserted by the <strong>Ethernet</strong> <strong>MAC</strong>. If the pad field is supplied by the client, the<br />

FCS can be either inserted by the <strong>Ethernet</strong> <strong>MAC</strong> or provided by the client, as indicated by<br />

a configuration register bit.<br />

For reception, if the length/type field has a length interpretation, any pad field in the<br />

incoming frame is not be passed to the client, unless the <strong>Ethernet</strong> <strong>MAC</strong> is configured to<br />

pass the FCS field on to the client.<br />

The value of the FCS field is calculated over the destination address, source address,<br />

length/type, data, and pad fields using a 32-bit Cyclic Redundancy Check (CRC), as<br />

defined in IEEE Std 802.3-2002 para. 3.2.8:<br />

G(x) = x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x1 + x0 The CRC bits are placed in the FCS field with the x31 term in the left-most bit of the first<br />

byte, and the x0 term is the right-most bit of the last byte (i.e., the bits of the CRC are<br />

transmitted in the order x31 , x30 ,..., x1 , x0 ).<br />

For transmission, this field can be either inserted automatically by the <strong>Ethernet</strong> <strong>MAC</strong> or<br />

supplied by the client, as indicated by a configuration register bit.<br />

For reception, the incoming FCS value is verified on every frame. If an incorrect FCS value<br />

is received, the <strong>Ethernet</strong> <strong>MAC</strong> indicates to the client that it has received a bad frame. The<br />

FCS field can either be passed on to the client or be dropped by the <strong>Ethernet</strong> <strong>MAC</strong>, as<br />

indicated by a configuration register bit.<br />

Frame Transmission and Interframe Gap<br />

Frames are transmitted over the <strong>Ethernet</strong> medium with an interframe gap, as specified by<br />

IEEE Std 802.3. For full-duplex systems, the minimum IFG is 96 bit times (9.6 µs for<br />

10 Mb/s, 0.96 µs for 100 Mb/s, and 96 ns for 1 Gb/s). For half-duplex systems, the<br />

minimum IFG is 208 bit times and 144 bit times for RGMII and MII respectively. The<br />

defined IFG is a minimum and can be increased with a resulting decrease in throughput.<br />

The process for frame transmission is different for half-duplex and full-duplex systems.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 23<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 1: Introduction<br />

Half-Duplex Frame Transmission<br />

In a half-duplex system, the CSMA/CD media access method defines how two or more<br />

stations share a common medium.<br />

1. Even when it has nothing to transmit, the <strong>Ethernet</strong> <strong>MAC</strong> monitors the <strong>Ethernet</strong><br />

medium for traffic by watching the carrier sense signal (CRS) from the external PHY.<br />

Whenever the medium is busy (CRS = 1), the <strong>Ethernet</strong> <strong>MAC</strong> defers to the passing<br />

frame by delaying any pending transmission of its own.<br />

2. After the last bit of the passing frame (when the carrier sense signal changes from<br />

TRUE to FALSE), the <strong>Ethernet</strong> <strong>MAC</strong> starts the timing of the interframe gap.<br />

3. The <strong>Ethernet</strong> <strong>MAC</strong> resets the interframe gap timer if the carrier sense becomes TRUE<br />

during the period defined by “interframe gap part 1 (IFG1).” The IEEE Std 802.3 states<br />

that this should be the first 2/3 of the interframe gap timing interval (64 bit times) but<br />

can be shorter and as small as zero. The purpose of this option is to support a possible<br />

brief failure of the carrier sense signal during a collision condition and is described in<br />

paragraph 4.2.3.2.1 of the IEEE standard.<br />

4. The <strong>Ethernet</strong> <strong>MAC</strong> does not reset the interframe gap timer if carrier sense becomes<br />

TRUE during the period defined by “interframe gap part 2 (IFG2)” to ensure fair<br />

access to the bus. The IEEE Std 802.3 states that this should be the last 1/3 of the<br />

interframe gap timing interval.<br />

If, after initiating a transmission, the message collides with the message of another station<br />

(COL = 1), then each transmitting station intentionally continues to transmit (jam) for an<br />

additional predefined period (32 bit times for 10/100 Mb/s) to ensure propagation of the<br />

collision throughout the system. The station remains silent for a random amount of time<br />

(backoff) before attempting to transmit again.<br />

A station can experience a collision during the beginning of its transmission (the collision<br />

window) before its transmission has had time to propagate to all stations on the bus. After<br />

the collision window has passed, a transmitting station has acquired the bus. Subsequent<br />

collisions (late collisions) are avoided because all other (properly functioning) stations are<br />

assumed to have detected the transmission and are deferring to it.<br />

Full-Duplex Frame Transmission<br />

In a full-duplex system, there is a point-to-point dedicated connection between two<br />

<strong>Ethernet</strong> devices, capable of simultaneous transmit and receive with no possibility of<br />

collisions. The <strong>Ethernet</strong> <strong>MAC</strong> does not use the carrier sense signal from the external PHY<br />

because the medium is not shared, and the <strong>Ethernet</strong> <strong>MAC</strong> only needs to monitor its own<br />

transmissions. After the last bit of an <strong>Ethernet</strong> <strong>MAC</strong> frame transmission, the <strong>Ethernet</strong><br />

<strong>MAC</strong> starts the interframe gap timer and defers transmissions until it reaches 96 bit times<br />

the value represented by CLIENTE<strong>MAC</strong>#TXIFGDELAY.<br />

Using the <strong>Embedded</strong> <strong>Ethernet</strong> <strong>MAC</strong><br />

This section describes how the TE<strong>MAC</strong> User Guide can be easily incorporated into<br />

customer designs using <strong>Xilinx</strong> software:<br />

“Accessing the <strong>Ethernet</strong> <strong>MAC</strong> from the CORE Generator Tool”: The CORE Generator<br />

tool provides wrapper files to help instantiate and configure the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

“Simulating the <strong>Ethernet</strong> <strong>MAC</strong> using SecureIP <strong>Mode</strong>ls”: SecureIP models are<br />

provided with the ISE® software to allow the <strong>Ethernet</strong> <strong>MAC</strong> to be simulated both<br />

functionally and with timing information.<br />

24 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Using the <strong>Embedded</strong> <strong>Ethernet</strong> <strong>MAC</strong><br />

This section provides more information on how to use these <strong>Xilinx</strong> software tools to access<br />

the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

Accessing the <strong>Ethernet</strong> <strong>MAC</strong> from the CORE Generator Tool<br />

Generating the <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> wrapper files greatly<br />

simplifies the use of the <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Ethernet</strong> <strong>MAC</strong>. The <strong>Ethernet</strong> <strong>MAC</strong> is highly<br />

configurable, and not all pins/interfaces are required for every configuration. The CORE<br />

Generator tool allows the configuration of the <strong>Ethernet</strong> <strong>MAC</strong> to be selected using a GUI<br />

and generates HDL wrapper files for the configuration. These wrapper files hide much of<br />

the complexity of the <strong>Ethernet</strong> <strong>MAC</strong> by only bringing out interface signals for the selected<br />

configuration. Accessing the <strong>Ethernet</strong> <strong>MAC</strong> from the CORE Generator tool provides the<br />

following features:<br />

Allows selection of one or both of the two <strong>Ethernet</strong> <strong>MAC</strong>s (E<strong>MAC</strong>0/E<strong>MAC</strong>1) from<br />

the <strong>Embedded</strong> <strong>Ethernet</strong> <strong>MAC</strong> primitive<br />

Sets the values of the E<strong>MAC</strong>0/E<strong>MAC</strong>1 attributes based on user options<br />

Provides user-configurable <strong>Ethernet</strong> <strong>MAC</strong> physical interfaces<br />

Supports MII, GMII, RGMII v1.3, RGMII v2.0, SGMII, and 1000BASE-X<br />

PCS/PMA interfaces<br />

Provides off-chip connections for physical interfaces by instantiating RocketIO<br />

serial transceivers, and logic as required, for the selected physical interfaces<br />

Provides an optimized clocking scheme for the selected physical interface and<br />

instantiates the required clock buffers, DCMs, etc.<br />

Provides a simple FIFO-loopback example design, which is connected to the <strong>MAC</strong><br />

client interfaces<br />

Provides a simple demonstration test bench based on the selected configuration<br />

Generates VHDL or Verilog wrapper files<br />

For further details, refer to DS550, <strong>Virtex</strong>-5 <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> Wrapper Data<br />

Sheet.<br />

Simulating the <strong>Ethernet</strong> <strong>MAC</strong> using SecureIP <strong>Mode</strong>ls<br />

SecureIP models are encrypted versions of the actual HDL code that allow the user to<br />

simulate the actual functionality of the design without the overhead of simulating RTL. A<br />

Verilog LRM-IEEE Std 1364-2005 encryption-compliant simulator is required to use<br />

SecureIP.<br />

The SecureIP model of the <strong>Ethernet</strong> <strong>MAC</strong> is installed with the <strong>Xilinx</strong> tools and can be<br />

precompiled into UniSim and SimPrim libraries. These libraries are used for functional<br />

and timing simulations, respectively. In addition, VHDL and Verilog wrappers are<br />

generated by the <strong>Xilinx</strong> CORE Generator tool in the ISE software, as well as the scripts to<br />

simulate the SecureIP model.<br />

For further help using the <strong>Ethernet</strong> <strong>MAC</strong> SecureIP model, see the documentation supplied<br />

with ISE, especially the Synthesis and Simulation Design Guide at:<br />

http://www.xilinx.com/support/software_manuals.htm.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 25<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 1: Introduction<br />

<strong>Mode</strong>l Considerations<br />

If the <strong>Ethernet</strong> <strong>MAC</strong> is configured in either SGMII or 1000BASE-X PCS/PMA mode,<br />

simulation times are much longer than when using other physical interfaces due to the<br />

auto-negotiation sequence. It is recommended that auto negotiation is disabled (by setting<br />

the E<strong>MAC</strong>#_PHYINITAUTONEG_ENABLE attribute to FALSE or by disabling autonegotiation<br />

by writing through the host interface) to allow frame transmission to occur<br />

within a reasonable period of simulation time. See “<strong>Ethernet</strong> <strong>MAC</strong> Attributes,” page 42. If<br />

simulating auto-negotiation, then simulation time can be reduced by setting the<br />

programmable link timer to a small value. This is achieved by modifying the<br />

E<strong>MAC</strong>#_LINKTIMERVAL[8:0] attribute.<br />

26 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

<strong>Ethernet</strong> <strong>MAC</strong> Overview<br />

Chapter 2<br />

This chapter describes the architecture of the <strong>Virtex</strong>®-5 <strong>Tri</strong>-<strong>Mode</strong> <strong>Embedded</strong> <strong>Ethernet</strong><br />

Media Access Controller (<strong>MAC</strong>) block. It contains the following sections:<br />

“Architecture Description”<br />

“<strong>Ethernet</strong> <strong>MAC</strong> Configuration Options”<br />

“<strong>Ethernet</strong> <strong>MAC</strong> Primitive”<br />

Architecture Description<br />

Client Client TX0<br />

Interface<br />

Client RX0<br />

Generic Host Bus<br />

<strong>FPGA</strong> Logic<br />

“<strong>Ethernet</strong> <strong>MAC</strong> Signal Descriptions”<br />

“<strong>Ethernet</strong> <strong>MAC</strong> Attributes”<br />

Figure 2-1 shows a block diagram of the <strong>Ethernet</strong> <strong>MAC</strong> block. The block contains two<br />

<strong>Ethernet</strong> <strong>MAC</strong>s sharing a single host interface.<br />

DCR Bus<br />

Client Client TX1<br />

Interface<br />

Client RX1<br />

Statistics IP0<br />

TX Stats MUX0 RX Stats MUX0<br />

32<br />

E<strong>MAC</strong>0<br />

<strong>Ethernet</strong> <strong>MAC</strong> Block<br />

Host Interface<br />

DCR Bridge<br />

E<strong>MAC</strong>1<br />

Figure 2-1: <strong>Embedded</strong> <strong>Ethernet</strong> <strong>MAC</strong> Block<br />

7<br />

32<br />

32 32<br />

TX Stats MUX1 RX Stats MUX1<br />

Statistics IP1<br />

7<br />

MII/GMII/RGMII TX0<br />

MII/GMII/RGMII RX0 Physical<br />

GTP/GTX Transceiver TX0 Interface<br />

GTP/GTX Transceiver RX0<br />

MDIO Interface 0<br />

MII/GMII/RGMII TX1<br />

MII/GMII/RGMII RX1 Physical<br />

GTP/GTX Transceiver TX1 Interface<br />

GTP/GTX Transceiver RX1<br />

MDIO Interface 1<br />

<strong>UG194</strong>_2_01_031009<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 27<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 2: <strong>Ethernet</strong> <strong>MAC</strong> Overview<br />

The <strong>Ethernet</strong> <strong>MAC</strong>s within the block are the same. When describing the functionality of<br />

the <strong>Ethernet</strong> <strong>MAC</strong>s in this document, E<strong>MAC</strong># is used when the description is for E<strong>MAC</strong>0<br />

or E<strong>MAC</strong>1.<br />

Each <strong>Ethernet</strong> <strong>MAC</strong> has an independent transmit (TX) and receive (RX) datapath,<br />

providing full-duplex capability.<br />

The host interface of the <strong>Ethernet</strong> <strong>MAC</strong> provides access to the configuration registers of<br />

both <strong>Ethernet</strong> <strong>MAC</strong>s, illustrated in Figure 2-1. The host interface can be accessed using<br />

either the generic host bus or the DCR bus through the DCR bridge.<br />

The physical interface of each <strong>Ethernet</strong> <strong>MAC</strong> can be configured as either MII, GMII,<br />

RGMII, SGMII, or 1000BASE-X. Figure 2-1 shows all possible data ports for the physical<br />

interface; however, only one set of these TX and RX interfaces is active per <strong>Ethernet</strong> <strong>MAC</strong>,<br />

based on the selected physical interface configuration. The individual <strong>Ethernet</strong> <strong>MAC</strong>s can<br />

be configured to have different physical interfaces.<br />

Each <strong>Ethernet</strong> <strong>MAC</strong> has an optional Management Data I/O interface (MDIO), allowing<br />

access to the management registers of an external PHY or access to the physical interface<br />

management registers within the <strong>Ethernet</strong> <strong>MAC</strong> (used only when it is configured in either<br />

1000BASE-X or SGMII modes).<br />

Each <strong>Ethernet</strong> <strong>MAC</strong> outputs statistics vectors containing information about the <strong>Ethernet</strong><br />

frames seen on its transmit and receive datapaths. The statistics vectors are multiplexed to<br />

reduce the number of pins at the block boundary. An external module (Statistics IP0<br />

and/or Statistics IP1) can be designed and implemented in the <strong>FPGA</strong> logic to accumulate<br />

all the TX and RX datapath statistics of each <strong>Ethernet</strong> <strong>MAC</strong>. Additional information on<br />

interfacing to the statistics block is provided in Chapter 7, “Interfacing to a Statistics<br />

Block.”<br />

A detailed functional block diagram of a single <strong>Ethernet</strong> <strong>MAC</strong> is shown in Figure 2-2. This<br />

is labeled as E<strong>MAC</strong>#, which can represent either E<strong>MAC</strong>0 or E<strong>MAC</strong>1 from Figure 2-1.<br />

28 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


Generic<br />

Host Bus<br />

DCR Bus<br />

R<br />

Flow Control<br />

Interface<br />

Host<br />

Interface<br />

DCR Bridge<br />

E<strong>MAC</strong>#<br />

TX<br />

RX<br />

16- or 8-bit Client Interface<br />

Transmit Engine<br />

Flow Control<br />

Receive Engine<br />

Address Filter<br />

Registers<br />

MDIO Interface<br />

<strong>MAC</strong> Configuration<br />

Registers<br />

TX RX<br />

Statistics<br />

Clock Management<br />

Architecture Description<br />

Figure 2-2: Functional Block Diagram of Single <strong>Ethernet</strong> <strong>MAC</strong> (with Host Interface)<br />

MII/GMII/RGMII<br />

Interface to<br />

External PHY<br />

GTP/GTX Transceiver<br />

Interface<br />

MDIO Interface<br />

to External PHY<br />

The client interface shows the user transmit and receive interfaces connected to the<br />

transmit and receive engines of the <strong>Ethernet</strong> <strong>MAC</strong>, respectively. For detailed information<br />

on the protocol for data transmission and reception on this interface, refer to “Client<br />

Interface,” page 51.<br />

The flow control interface allows the client logic to force the physical layer to stop sending<br />

frames until the client is capable of accepting more. A description of how to use this<br />

interface from the client logic can be found in “Flow Control Block,” page 73.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> has a programmable address filter to accept or reject incoming frames<br />

on the receive datapath. The full functionality of the <strong>Ethernet</strong> <strong>MAC</strong> address filter is<br />

described in “Address Filtering,” page 71.<br />

The shared host interface can access the <strong>MAC</strong> Configuration registers and the Address<br />

Filter registers. See “Host/DCR Bus Interfaces,” page 85 to learn how to interface to any<br />

host via the generic host bus, or how to interface to a processor through the DCR bus.<br />

The host interface can also initiate transactions on the MDIO interface, when the MDIO<br />

interface is enabled. This allows the host interface to access the PCS Management Registers<br />

within the <strong>Ethernet</strong> <strong>MAC</strong>, when it is configured in 1000BASE-X or SGMII mode. It is also<br />

possible for the host interface to initiate transactions via the MDIO interface to an external<br />

PHY device. When the MDIO interface is enabled and the host interface is disabled, an<br />

external device can still access the PCS Management Registers of the <strong>Ethernet</strong> <strong>MAC</strong> when<br />

it is configured in 1000BASE-X or SGMII mode. Information on these configurations and<br />

on using the MDIO protocol to access PCS Management registers can be found in “MDIO<br />

Interface,” page 115.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 29<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

MII/GMII/RGMII Interface<br />

TX<br />

RX<br />

TX<br />

RX<br />

PCS/PMA Sublayer<br />

PCS Management<br />

Registers<br />

MDIO Arbitration<br />

<strong>UG194</strong>_c2_02_062309


Chapter 2: <strong>Ethernet</strong> <strong>MAC</strong> Overview<br />

On the physical side of the <strong>Ethernet</strong> <strong>MAC</strong>, a common MII/GMII/RGMII interface block is<br />

shown. When the physical interface of the <strong>Ethernet</strong> <strong>MAC</strong> is configured to MII/GMII or<br />

RGMII, these signals can be used via standard I/Os to connect to an external physical<br />

interface. When the physical interface is configured in 1000BASE-X or SGMII mode, the<br />

PCS/PMA sublayer block in the <strong>Ethernet</strong> <strong>MAC</strong> is enabled. The PCS/PMA sublayer block<br />

interfaces directly to the RocketIO serial transceiver. See “Physical Interface,” page 137<br />

for information on all physical interfaces, including clocking schemes and interfacing with<br />

serial transceivers.<br />

The clock management module automatically configures the output clocks to the correct<br />

frequency based on the internal speed of the <strong>Ethernet</strong> <strong>MAC</strong> (10 Mb/s, 100 Mb/s, or<br />

1000 Mb/s) and the <strong>Ethernet</strong> <strong>MAC</strong> mode settings (GMII, MII, RGMII, SGMII, and<br />

1000BASE-X).<br />

<strong>Ethernet</strong> <strong>MAC</strong> Configuration Options<br />

The <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> addresses all common<br />

configuration requirements for embedded <strong>Ethernet</strong> connectivity. This section provides an<br />

overview of the possible options for each <strong>Ethernet</strong> <strong>MAC</strong>. A full list of the mode<br />

configuration options is in Table 2-16, and further details on the configuration options and<br />

how to set these using the CORE Generator tool can be found in “Accessing the <strong>Ethernet</strong><br />

<strong>MAC</strong> from the CORE Generator Tool,” page 25.<br />

The choice of physical interface for the <strong>Ethernet</strong> <strong>MAC</strong> affects some of the other<br />

configuration options. Table 2-1 provides a breakdown of compatible parameters.<br />

Table 2-1: <strong>Ethernet</strong> <strong>MAC</strong> Block Static Configurations<br />

Physical<br />

Interface<br />

Client Interface Speed Advanced Clocking<br />

8-Bit 16-Bit<br />

<strong>Tri</strong>-<br />

Speed<br />

1G 10/100M<br />

Clock<br />

Enable<br />

Byte PHY<br />

MII only Y N N N Y Y N<br />

GMII only Y N N Y N N N<br />

GMII/MII<br />

Y N Y Y Y<br />

Y<br />

(<strong>Tri</strong>-speed)<br />

Y<br />

(<strong>Tri</strong>-speed)<br />

RGMII<br />

Y N Y Y Y<br />

Y<br />

(<strong>Tri</strong>-speed)<br />

N<br />

SGMII Y N Y Y Y N N<br />

1000BASE-X Y Y N Y N N N<br />

A 16-bit client interface can only be used when the <strong>Ethernet</strong> <strong>MAC</strong> physical interface is<br />

configured to be 1000BASE-X. The 16-bit client interface allows the <strong>Ethernet</strong> <strong>MAC</strong> to run at<br />

an internal clock frequency of greater than 125 MHz. The <strong>Ethernet</strong> <strong>MAC</strong> can run at a line<br />

rate greater than 1 Gb/s, as specified in IEEE Std 802.3. Therefore, this interface should not<br />

be used for <strong>Ethernet</strong> compliant designs, but it can be useful for backplane applications.<br />

The possible speed configurations for the <strong>Ethernet</strong> <strong>MAC</strong> vary with the physical interface<br />

configuration. An initial value for the speed can be chosen for the <strong>Ethernet</strong> <strong>MAC</strong> at<br />

instantiation, and depending on the mode, this speed can later be modified by writing to<br />

the <strong>Ethernet</strong> <strong>MAC</strong> mode configuration register.<br />

30 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

<strong>Ethernet</strong> <strong>MAC</strong> Primitive<br />

<strong>Ethernet</strong> <strong>MAC</strong> Primitive<br />

To minimize resource utilization, advanced (optimized) clocking schemes are available for<br />

specific physical interface configurations.<br />

In addition to the configuration options listed in Table 2-1, it is also possible to statically<br />

configure other interfaces:<br />

Out of the pair of <strong>Ethernet</strong> <strong>MAC</strong>s, either or both can be enabled. To use a single<br />

<strong>Ethernet</strong> <strong>MAC</strong>, a pair is instantiated and one can be disabled.<br />

The host interface can be enabled/disabled. This affects both <strong>Ethernet</strong> <strong>MAC</strong>s.<br />

Per <strong>Ethernet</strong> <strong>MAC</strong>, the MDIO interface can be enabled/disabled.<br />

Within the paired <strong>Ethernet</strong> <strong>MAC</strong>s, the individual <strong>MAC</strong>s can have different configuration<br />

settings.<br />

The <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> is available to the <strong>Xilinx</strong>® software<br />

tools as a library primitive, named TE<strong>MAC</strong>. This primitive encompasses the <strong>Ethernet</strong><br />

<strong>MAC</strong> block as illustrated in Figure 2-1; it includes a pair of <strong>Ethernet</strong> <strong>MAC</strong>s (E<strong>MAC</strong>0 and<br />

E<strong>MAC</strong>1) sharing a common host interface.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> primitive can be simplified for specific customer needs by using the<br />

CORE Generator tool to create <strong>Ethernet</strong> <strong>MAC</strong> wrappers. “Accessing the <strong>Ethernet</strong> <strong>MAC</strong><br />

from the CORE Generator Tool,” page 25 describes how to use the CORE Generator<br />

software to simplify the <strong>Ethernet</strong> <strong>MAC</strong> primitive.<br />

Figure 2-3 illustrates the <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> primitive. The # sign denotes that a port<br />

of that name exists for each of the <strong>Ethernet</strong> <strong>MAC</strong>s (E<strong>MAC</strong>0 and E<strong>MAC</strong>1) in the TE<strong>MAC</strong><br />

primitive.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 31<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 2: <strong>Ethernet</strong> <strong>MAC</strong> Overview<br />

RX Client<br />

TX Client<br />

Flow<br />

Control<br />

Generic<br />

Host Bus<br />

DCR<br />

Bus<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXD[15:0]<br />

E<strong>MAC</strong>#CLIENTRXDVLD<br />

E<strong>MAC</strong>#CLIENTRXDVLDMSW<br />

E<strong>MAC</strong>#CLIENTRXGOODFRAME<br />

E<strong>MAC</strong>#CLIENTRXBADFRAME<br />

E<strong>MAC</strong>#CLIENTRXFRAMEDROP<br />

E<strong>MAC</strong>#CLIENTRXSTATS[6:0]<br />

E<strong>MAC</strong>#CLIENTRXSTATSBYTEVLD<br />

E<strong>MAC</strong>#CLIENTRXSTATSVLD<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#TXD[15:0]<br />

CLIENTE<strong>MAC</strong>#TXDVLD<br />

CLIENTE<strong>MAC</strong>#TXDVLDMSW<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

CLIENTE<strong>MAC</strong>#TXUNDERRUN<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION<br />

E<strong>MAC</strong>#CLIENTTXRETRANSMIT<br />

CLIENTE<strong>MAC</strong>#TXIFGDELAY[7:0]<br />

CLIENTE<strong>MAC</strong>#TXFIRSTBYTE<br />

E<strong>MAC</strong>#CLIENTTXSTATS<br />

E<strong>MAC</strong>#CLIENTTXSTATSBYTEVLD<br />

E<strong>MAC</strong>#CLIENTTXSTATSVLD<br />

CLIENTE<strong>MAC</strong>#PAUSEREQ<br />

CLIENTE<strong>MAC</strong>#PAUSEVAL[15:0]<br />

HOSTADDR[9:0]<br />

HOSTCLK<br />

HOSTMIIMSEL<br />

HOSTOPCODE[1:0]<br />

HOSTREQ<br />

HOSTMIIMRDY<br />

HOSTRDDATA[31:0]<br />

HOSTWRDATA[31:0]<br />

HOSTE<strong>MAC</strong>1SEL<br />

DCRE<strong>MAC</strong>ENABLE<br />

E<strong>MAC</strong>DCRACK<br />

E<strong>MAC</strong>DCRDBUS[0:31]<br />

DCRE<strong>MAC</strong>ABUS[0:9]<br />

DCRE<strong>MAC</strong>CLK<br />

DCRE<strong>MAC</strong>DBUS[0:31]<br />

DCRE<strong>MAC</strong>READ<br />

DCRE<strong>MAC</strong>WRITE<br />

DCRHOSTDONEIR<br />

E<strong>MAC</strong>#<br />

Primitive<br />

Figure 2-3: <strong>Ethernet</strong> <strong>MAC</strong> Primitive<br />

RESET<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

E<strong>MAC</strong>#SPEEDIS10100<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

PHYE<strong>MAC</strong>#RXCLK<br />

PHYE<strong>MAC</strong>#RXD[7:0]<br />

PHYE<strong>MAC</strong>#RXDV<br />

PHYE<strong>MAC</strong>#RXER<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

E<strong>MAC</strong>#PHYTXCLK<br />

E<strong>MAC</strong>#PHYTXD[7:0]<br />

E<strong>MAC</strong>#PHYTXEN<br />

E<strong>MAC</strong>#PHYTXER<br />

PHYE<strong>MAC</strong>#COL<br />

PHYE<strong>MAC</strong>#CRS<br />

PHYE<strong>MAC</strong>#SIGNALDET<br />

PHYE<strong>MAC</strong>#PHYAD[4:0]<br />

E<strong>MAC</strong>#PHYENCOMMAALIGN<br />

E<strong>MAC</strong>#PHYLOOPBACKMSB<br />

E<strong>MAC</strong>#PHYMGTRXRESET<br />

E<strong>MAC</strong>#PHYMGTTXRESET<br />

E<strong>MAC</strong>#PHYPOWERDOWN<br />

E<strong>MAC</strong>#PHYSYNCACQSTATUS<br />

PHYE<strong>MAC</strong>#RXCLKCORCNT[2:0]<br />

PHYE<strong>MAC</strong>#RXBUFSTATUS[1:0]<br />

PHYE<strong>MAC</strong>#RXCHARISCOMMA<br />

PHYE<strong>MAC</strong>#RXCHARISK<br />

PHYE<strong>MAC</strong>#RXCHECKINGCRC<br />

PHYE<strong>MAC</strong>#RXCOMMADET<br />

PHYE<strong>MAC</strong>#RXDISPERR<br />

PHYE<strong>MAC</strong>#RXLOSSOFSYNC[1:0]<br />

PHYE<strong>MAC</strong>#RXNOTINTABLE<br />

PHYE<strong>MAC</strong>#RXRUNDISP<br />

PHYE<strong>MAC</strong>#RXBUFERR<br />

E<strong>MAC</strong>#CLIENTANINTERRUPT<br />

E<strong>MAC</strong>#PHYTXCHARDISPMODE<br />

E<strong>MAC</strong>#PHYTXCHARDISPVAL<br />

E<strong>MAC</strong>#PHYTXCHARISK<br />

PHYE<strong>MAC</strong>#TXBUFERR<br />

E<strong>MAC</strong>#PHYMCLKOUT<br />

PHYE<strong>MAC</strong>#MCLKIN<br />

PHYE<strong>MAC</strong>#MDIN<br />

E<strong>MAC</strong>#PHYMDOUT<br />

E<strong>MAC</strong>#PHYMDTRI<br />

32 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

Physical Interface<br />

GTP/GTX Transceiver<br />

Management<br />

Data I/O<br />

<strong>UG194</strong>_2_03_072306<br />

R


R<br />

<strong>Ethernet</strong> <strong>MAC</strong> Signal Descriptions<br />

<strong>Ethernet</strong> <strong>MAC</strong> Signal Descriptions<br />

This section defines all of the <strong>Ethernet</strong> <strong>MAC</strong> primitive signals. The signals are divided into<br />

the following categories:<br />

“Client-Side Signals”<br />

“Host Interface Signals”<br />

“Management Data Input/Output (MDIO) Signals”<br />

“MII/GMII/RGMII Physical Interface Signals”<br />

“RocketIO Serial Transceiver Signals”<br />

“Global Clock and Reset Signals”<br />

All the signals available in the <strong>Ethernet</strong> <strong>MAC</strong> primitive are described in this section. The #<br />

symbol denotes the E<strong>MAC</strong>0 or E<strong>MAC</strong>1 signals.<br />

Client-Side Signals<br />

TX Client Signals<br />

Table 2-2: Transmit Client Interface Signals<br />

Table 2-2 describes the client-side transmit signals in the <strong>Ethernet</strong> <strong>MAC</strong>. These signals are<br />

used to transmit data from the client to the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

Signal Direction Description<br />

CLIENTE<strong>MAC</strong>#TXD[15:0] Input Frame data for transmit. The datapath can be configured to be<br />

either 8 or 16 bits wide. Bits [7:0] are used for 8-bit width. The<br />

16-bit interface is available only in 1000BASE-X PCS/PMA mode.<br />

See “Transmit (TX) Client: 16-Bit Interface,” page 60.<br />

CLIENTE<strong>MAC</strong>#TXDVLD Input Asserted by the client to indicate a valid data input at<br />

CLIENTE<strong>MAC</strong>#TXD[7:0].<br />

CLIENTE<strong>MAC</strong>#TXDVLDMSW Input When the width of CLIENTE<strong>MAC</strong>#TXD is set to 16 bits, this signal<br />

denotes an odd number of bytes in the transmit datapath. In the<br />

frame with an odd number of bytes, the<br />

CLIENTE<strong>MAC</strong>#TXD[7:0] is valid on the last byte.<br />

When the width of CLIENTE<strong>MAC</strong>#TXD is set to 8 bits, this signal<br />

is connected to ground.<br />

CLIENTE<strong>MAC</strong>#TXFIRSTBYTE Input This signal should be tied Low.<br />

CLIENTE<strong>MAC</strong>#TXIFGDELAY[7:0] Input Configurable interframe gap (IFG) adjustment for full-duplex<br />

mode.<br />

CLIENTE<strong>MAC</strong>#TXUNDERRUN Input Asserted by the client to force the <strong>Ethernet</strong> <strong>MAC</strong> to corrupt the<br />

current frame.<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN Input See “<strong>Ethernet</strong> <strong>MAC</strong> Clocks,” page 205.<br />

E<strong>MAC</strong>#CLIENTTXACK Output Handshake signal – Asserted when the <strong>Ethernet</strong> <strong>MAC</strong> accepts the<br />

first byte of data. On the next and subsequent rising clock edges,<br />

the client must provide the remainder of the frame data. See<br />

“Normal Frame Transmission Across Client Interface,” page 53.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 33<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 2: <strong>Ethernet</strong> <strong>MAC</strong> Overview<br />

Table 2-2: Transmit Client Interface Signals (Cont’d)<br />

Signal Direction Description<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION Output Asserted by the <strong>Ethernet</strong> <strong>MAC</strong> to signal a collision on the<br />

medium. Any transmission in progress must be aborted. This<br />

signal is always deasserted in full-duplex mode.<br />

E<strong>MAC</strong>#CLIENTTXRETRANSMIT Output Asserted by the <strong>Ethernet</strong> <strong>MAC</strong> at the same time as the<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION signal. The client should resupply<br />

the aborted frame to the <strong>Ethernet</strong> <strong>MAC</strong> for retransmission. This<br />

signal is always deasserted in full-duplex mode.<br />

E<strong>MAC</strong>#CLIENTTXSTATS Output The statistics data on the last data frame sent. The 32-bit TX raw<br />

statistics vector is output by one bit per cycle for statistics<br />

gathering. See “Transmitter Statistics Vector,” page 78.<br />

E<strong>MAC</strong>#CLIENTTXSTATSBYTEVLD Output Asserted if an <strong>Ethernet</strong> <strong>MAC</strong> frame byte is transmitted (including<br />

destination address to FCS). This is valid on every TX clock cycle.<br />

E<strong>MAC</strong>#CLIENTTXSTATSVLD Output Asserted by the <strong>Ethernet</strong> <strong>MAC</strong> after a frame transmission to<br />

indicate a valid E<strong>MAC</strong>#CLIENTTXSTATS output. See “Transmitter<br />

Statistics Vector,” page 78.<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT Output See “<strong>Ethernet</strong> <strong>MAC</strong> Clocks,” page 205.<br />

RX Client Signals<br />

Table 2-3: Receive Client Interface Signals<br />

Table 2-3 describes the client-side receive signals. These signals are used by the <strong>Ethernet</strong><br />

<strong>MAC</strong> to transfer data to the client.<br />

Signal Direction Description<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN Input See “<strong>Ethernet</strong> <strong>MAC</strong> Clocks,” page 205.<br />

E<strong>MAC</strong>#CLIENTRXD[15:0] Output Frame data received from the <strong>Ethernet</strong> <strong>MAC</strong>. The datapath can be<br />

configured to either 8 bits or 16 bits wide. Bits [7:0] are used for<br />

8-bit widths. The 16-bit interface is used in 1000BASE-X<br />

PCS/PMA mode. See “Receive (RX) Client: 16-Bit Interface,” page<br />

69.<br />

E<strong>MAC</strong>#CLIENTRXDVLD Output The <strong>Ethernet</strong> <strong>MAC</strong> indicates to the client the receipt of valid frame<br />

data.<br />

E<strong>MAC</strong>#CLIENTRXFRAMEDROP Output This signal is asserted to notify the client that an incoming receive<br />

frames destination address does not match any addresses in the<br />

address filter. The signal functions even when the address filter is<br />

not enabled.<br />

E<strong>MAC</strong>#CLIENTRXDVLDMSW Output This signal denotes an odd number of bytes in the receive<br />

datapath when the width of E<strong>MAC</strong>#CLIENTRXD is set to 16 bits.<br />

In a frame with an odd number of bytes, the<br />

E<strong>MAC</strong>#CLIENTRXD[7:0] byte is valid on the last byte.<br />

When the width of E<strong>MAC</strong>#CLIENTRXD is set to 8 bits, this signal<br />

should be left unconnected.<br />

E<strong>MAC</strong>#CLIENTRXGOODFRAME Output This signal is asserted after the last receipt of data to indicate the<br />

reception of a compliant frame.<br />

34 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Table 2-3: Receive Client Interface Signals (Cont’d)<br />

Signal Direction Description<br />

Flow Control Signals<br />

<strong>Ethernet</strong> <strong>MAC</strong> Signal Descriptions<br />

E<strong>MAC</strong>#CLIENTRXBADFRAME Output This signal is asserted after the last receipt of data to indicate the<br />

reception of a non-compliant frame.<br />

E<strong>MAC</strong>#CLIENTRXSTATS[6:0] Output The statistics data on the last received data frame. The 27-bit raw<br />

RX statistics vector is multiplexed into a 7-bits-per-RX clock cycle<br />

output for statistics gathering. See “Receiver Statistics Vector,”<br />

page 81.<br />

E<strong>MAC</strong>#CLIENTRXSTATSBYTEVLD Output Asserted if an <strong>Ethernet</strong> <strong>MAC</strong> frame byte (including destination<br />

address to FCS) is received. Valid on every RX clock cycle.<br />

E<strong>MAC</strong>#CLIENTRXSTATSVLD Output Asserted by the <strong>Ethernet</strong> <strong>MAC</strong> after the end of receiving a frame<br />

to indicate a valid E<strong>MAC</strong>#CLIENTRXSTATS[6:0] output.<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT Output See “<strong>Ethernet</strong> <strong>MAC</strong> Clocks,” page 205.<br />

Table 2-4: Flow Control Interface Signals<br />

Table 2-4 describes the signals used by the client to request a flow control action from the<br />

transmit engine. The flow control block is designed per the specifications in clause 31 of the<br />

IEEE Std 802.3-2002 specification. Flow control frames received by the <strong>Ethernet</strong> <strong>MAC</strong> are<br />

automatically handled.<br />

Signal Direction Description<br />

CLIENTE<strong>MAC</strong>#PAUSEREQ Input Asserted by client to transmit a pause frame.<br />

CLIENTE<strong>MAC</strong>#PAUSEVAL[15:0] Input The amount of pause time for the transmitter as defined in the<br />

IEEE Std 802.3-2002 specification.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 35<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 2: <strong>Ethernet</strong> <strong>MAC</strong> Overview<br />

Host Interface Signals<br />

Generic Host Bus Signals<br />

Table 2-5: Generic Host Bus Signals<br />

Table 2-5 outlines the host bus interface signals.<br />

Signal Direction Description<br />

HOSTCLK Input Clock supplied for running the host.<br />

HOSTOPCODE[1:0] Input Defines the operation to be performed over the MDIO interface. Bit 1 is also used<br />

in configuration register access. See “Using the Host Bus,” page 97.<br />

HOSTADDR[9:0] Input Address of register to be accessed.<br />

HOSTWRDATA[31:0] Input Data bus to write to register.<br />

HOSTRDDATA[31:0] Output Data bus to read from register.<br />

HOSTMIIMSEL Input When asserted, the MDIO interface is accessed. When deasserted, the <strong>Ethernet</strong><br />

<strong>MAC</strong> internal configuration registers are accessed.<br />

HOSTREQ Input Used to signal a transaction on the MDIO interface.<br />

HOSTE<strong>MAC</strong>1SEL Input This signal is asserted when E<strong>MAC</strong>1 is being accessed through the host interface<br />

and deasserted when E<strong>MAC</strong>0 is being accessed through the host interface. It is<br />

ignored when the host interface is not used.<br />

HOSTMIIMRDY Output When High, the MDIO interface has completed any pending transaction and is<br />

ready for a new transaction.<br />

Notes:<br />

1. All signals are synchronous to HOSTCLK and are active High.<br />

2. When using a host processor with the DCR bus, the host bus signals are used to read the optional <strong>FPGA</strong> logic-based statistics<br />

registers. See Chapter 7, “Interfacing to a Statistics Block.”<br />

36 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

DCR Bus Signals<br />

Table 2-6: DCR Bus Signals<br />

Table 2-6 outlines the DCR bus interface signals.<br />

Signal Direction Description<br />

DCRE<strong>MAC</strong>CLK Input Clock for the DCR interface.<br />

Management Data Input/Output (MDIO) Signals<br />

<strong>Ethernet</strong> <strong>MAC</strong> Signal Descriptions<br />

DCRE<strong>MAC</strong>ABUS[0:9] Input DCR address bus.<br />

Bits 0 through 7 must be driven to match DCR base address of one of the<br />

<strong>Ethernet</strong> <strong>MAC</strong>s, as set by the E<strong>MAC</strong>#_DCRBASEADDR[7:0] attribute. See<br />

Table 2-20, page 49 for more information on this attribute.<br />

DCRE<strong>MAC</strong>READ Input DCR read request.<br />

DCRE<strong>MAC</strong>WRITE Input DCR write request.<br />

DCRE<strong>MAC</strong>DBUS[0:31] Input DCR write data bus.<br />

DCRE<strong>MAC</strong>ENABLE Input When using the DCR bus, this signal is asserted High.<br />

When using the host bus interface, the signal is asserted Low.<br />

E<strong>MAC</strong>DCRDBUS[0:31] Output DCR read data bus.<br />

E<strong>MAC</strong>DCRACK Output DCR acknowledge.<br />

DCRHOSTDONEIR Output Interrupt signal to indicate when the <strong>Ethernet</strong> <strong>MAC</strong> register access is complete.<br />

Table 2-7: MDIO Interface Signals<br />

Table 2-7 describes the Management Data Input/Output (MDIO) interface signals. The<br />

MDIO format is defined in IEEE Std 802.3, clause 22.<br />

Signal Direction Description<br />

E<strong>MAC</strong>#PHYMCLKOUT Output Management clock derived from the host clock or PHYE<strong>MAC</strong>#MCLKIN.<br />

PHYE<strong>MAC</strong>#MCLKIN Input When the host is not used, access to the PCS must be provided by an<br />

external MDIO controller. In this situation, the management clock is an<br />

input to the E<strong>MAC</strong> block.<br />

PHYE<strong>MAC</strong>#MDIN Input Signal from the physical interface for communicating the configuration<br />

and status. If unused, must be tied High.<br />

E<strong>MAC</strong>#PHYMDOUT Output Signal to output the configuration and command to the physical<br />

interface.<br />

E<strong>MAC</strong>#PHYMDTRI Output The three-state control to accompany E<strong>MAC</strong>#PHYMDOUT.<br />

MII/GMII/RGMII Physical Interface Signals<br />

The <strong>Ethernet</strong> <strong>MAC</strong> has several signals that change definition depending on the selected<br />

physical interface configuration. This section describes the physical interface signals when<br />

the <strong>Ethernet</strong> <strong>MAC</strong> physical interface configuration is set to either MII, GMII, or RGMII.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 37<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 2: <strong>Ethernet</strong> <strong>MAC</strong> Overview<br />

Data and Control Signals<br />

Table 2-8 shows the data and control signals for the different physical interface modes. The<br />

functionality of each of these signals is defined after the static configuration mode is set.<br />

This is achieved via attributes, as described in “<strong>Ethernet</strong> <strong>MAC</strong> Attributes,” page 42.<br />

Table 2-8: PHY Data and Control Signals<br />

Signal Direction <strong>Mode</strong> Description<br />

E<strong>MAC</strong>#PHYTXEN Output<br />

E<strong>MAC</strong>#PHYTXER Output<br />

E<strong>MAC</strong>#PHYTXD[7:0] Output<br />

PHYE<strong>MAC</strong>#RXDV Input<br />

PHYE<strong>MAC</strong>#RXER Input<br />

PHYE<strong>MAC</strong>#RXD[7:0] Input<br />

GMII<br />

RGMII<br />

The data enable control signal to the PHY.<br />

RGMII The RGMII_TX_CTL_RISING signal to the PHY.<br />

10/100 MII<br />

GMII<br />

The error control signal to the PHY.<br />

RGMII The RGMII_TX_CTL_FALLING signal to the PHY.<br />

10/100 MII<br />

E<strong>MAC</strong>#PHYTXD[3:0] is the transmit data bus to the<br />

PHY. E<strong>MAC</strong>#PHYTXD[7:4] are driven Low.<br />

GMII The transmit data signal to the PHY.<br />

RGMII<br />

SGMII<br />

1000BASE-X<br />

10/100 MII<br />

GMII<br />

E<strong>MAC</strong>#PHYTXD[3:0] are the RGMII_TXD_RISING<br />

signals and E<strong>MAC</strong>#PHYTXD[7:4] are the<br />

RGMII_TXD_FALLING signals to the PHY.<br />

The TX_DATA signal to the RocketIO serial transceiver.<br />

The data valid control signal from the PHY.<br />

RGMII The RGMII_RX_CTL_RISING signal.<br />

SGMII The RXREALIGN signal from the RocketIO serial<br />

transceiver.<br />

1000BASE-X<br />

10/100 MII<br />

GMII<br />

The error control signal from the PHY.<br />

RGMII The RGMII_RX_CTL_FALLING signal from the PHY.<br />

10/100 MII<br />

PHYE<strong>MAC</strong>#RXD[3:0] are the received data signals<br />

from the PHY. PHYE<strong>MAC</strong>#RXD[7:4] are left<br />

unconnected.<br />

GMII The received data signal to the PHY.<br />

RGMII<br />

PHYE<strong>MAC</strong>#RXD[3:0] are the RGMII_RXD_RISING<br />

signals and PHYE<strong>MAC</strong>#RXD[7:4] are the<br />

RGMII_RXD_FALLING signals from the PHY.<br />

SGMII The RX_DATA signal from the RocketIO serial<br />

transceiver.<br />

1000BASE-X<br />

38 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Table 2-8: PHY Data and Control Signals (Cont’d)<br />

Signal Direction <strong>Mode</strong> Description<br />

PHYE<strong>MAC</strong>#COL Input<br />

10/100 MII<br />

PHYE<strong>MAC</strong>#CRS Input 10/100 MII<br />

<strong>Ethernet</strong> <strong>MAC</strong> Signal Descriptions<br />

The usage of the <strong>Ethernet</strong> <strong>MAC</strong> clock signals associated with the physical interface also<br />

changes, based on the selected configuration. This is fully described in Appendix B,<br />

“<strong>Ethernet</strong> <strong>MAC</strong> Clocks.” Table 2-9 lists the physical interface clock signals and references<br />

the associated descriptions of each clock.<br />

Table 2-9: PHY Clock Signals<br />

Table 2-10 shows <strong>Ethernet</strong> <strong>MAC</strong> output that indicates the current operating speed of the<br />

<strong>Ethernet</strong> <strong>MAC</strong>.<br />

RocketIO Serial Transceiver Signals<br />

The collision control signal from the PHY, used in halfduplex<br />

mode.<br />

SGMII The TXRUNDISP signal from the RocketIO serial<br />

transceiver.<br />

1000BASE-X<br />

The carrier sense control signal from the PHY, used in<br />

half-duplex mode.<br />

Signal Direction Description<br />

PHYE<strong>MAC</strong>#MIITXCLK Input See “PHYE<strong>MAC</strong>#MIITXCLK,” page 212.<br />

E<strong>MAC</strong>#PHYTXCLK Output See “E<strong>MAC</strong>#PHYTXCLK,” page 214.<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT Output<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN Input<br />

See “E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT,<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN,” page 213.<br />

See “E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT,<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN,” page 213.<br />

PHYE<strong>MAC</strong>#RXCLK Input See “PHYE<strong>MAC</strong>#RXCLK,” page 212.<br />

Table 2-10: Physical Interface Speed Signal<br />

Signal Direction Description<br />

E<strong>MAC</strong>#SPEEDIS10100 Output When asserted High, the physical interface is operating at 10 Mb/s or<br />

100 Mb/s.<br />

When asserted Low, the physical interface is operating at 1 Gb/s.<br />

RocketIO serial transceivers are defined by device family in the following way:<br />

<strong>Virtex</strong>-5 LXT and SXT devices: RocketIO GTP transceivers<br />

<strong>Virtex</strong>-5 TXT and FXT devices: RocketIO GTX transceivers<br />

RocketIO GTP serial transceivers are placed as dual transceiver GTP_DUAL tiles in<br />

<strong>Virtex</strong>-5 LXT and SXT devices. RocketIO GTX serial transceivers are placed as dual<br />

transceiver GTX_DUAL tiles in <strong>Virtex</strong>-5 TXT and FXT devices. Throughout this guide, the<br />

term RocketIO transceiver is used to represent any or all of the RocketIO transceivers; the<br />

RocketIO transceiver that is specific to the desired target device should be selected.<br />

Table 2-11 shows the signals used to connect the <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Ethernet</strong> <strong>MAC</strong> to the<br />

RocketIO serial transceiver (see the UG196, <strong>Virtex</strong>-5 <strong>FPGA</strong> RocketIO GTP Transceiver User<br />

Guide and UG198, <strong>Virtex</strong>-5 <strong>FPGA</strong> RocketIO GTX Transceiver User Guide).<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 39<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 2: <strong>Ethernet</strong> <strong>MAC</strong> Overview<br />

Table 2-11: RocketIO Serial Transceiver Connections<br />

Signal Direction Description<br />

E<strong>MAC</strong>#PHYENCOMMAALIGN Output Enable RocketIO serial transceiver PMA layer to realign to<br />

commas.<br />

E<strong>MAC</strong>#PHYLOOPBACKMSB Output Perform loopback testing in the RocketIO serial transceiver from<br />

TX to RX.<br />

E<strong>MAC</strong>#PHYMGTRXRESET Output Reset to RocketIO serial transceiver RXRESET.<br />

E<strong>MAC</strong>#PHYMGTTXRESET Output Reset to RocketIO serial transceiver TXRESET.<br />

E<strong>MAC</strong>#PHYPOWERDOWN Output Power-down the RocketIO serial transceiver.<br />

E<strong>MAC</strong>#PHYSYNCACQSTATUS Output The output from the receiver’s synchronization state machine of<br />

IEEE Std 802.3, clause 36.<br />

When asserted High, the received bitstream is synchronized. The<br />

state machine is in one of the SYNC_ACQUIRED states of IEEE Std<br />

802.3, figures 36-39.<br />

When deasserted Low, no synchronization has been obtained.<br />

E<strong>MAC</strong>#PHYTXCHARDISPMODE Output Set running disparity for current byte.<br />

E<strong>MAC</strong>#PHYTXCHARDISPVAL Output Set running disparity value.<br />

E<strong>MAC</strong>#PHYTXCHARISK Output K character transmitted in TXDATA.<br />

PHYE<strong>MAC</strong>#RXBUFSTATUS[1:0] Input Receiver Elastic Buffer Status: Bit 1 asserted indicates overflow or<br />

underflow.<br />

PHYE<strong>MAC</strong>#RXCHARISCOMMA Input Comma detected in RXDATA.<br />

PHYE<strong>MAC</strong>#RXCHARISK Input K character received or extra data bit in RXDATA. When<br />

RXNOTINTABLE is asserted, this signal becomes the tenth bit in<br />

RXDATA.<br />

PHYE<strong>MAC</strong>#RXCHECKINGCRC Input Reserved - tied to GND.<br />

PHYE<strong>MAC</strong>#RXBUFERR Input Reserved - tied to GND.<br />

PHYE<strong>MAC</strong>#RXCOMMADET Input Reserved - tied to GND.<br />

PHYE<strong>MAC</strong>#RXDISPERR Input Disparity error in RXDATA.<br />

PHYE<strong>MAC</strong>#RXLOSSOFSYNC[1:0] Input Reserved - tied to GND.<br />

PHYE<strong>MAC</strong>#RXNOTINTABLE Input Indicates non-existent 8B/10 code.<br />

PHYE<strong>MAC</strong>#RXRUNDISP Input Running disparity in the received serial data. When<br />

RXNOTINTABLE is asserted in RXDATA, this signal becomes the<br />

ninth data bit.<br />

PHYE<strong>MAC</strong>#RXCLKCORCNT[2:0] Input Status showing the occurrence of a clock correction.<br />

PHYE<strong>MAC</strong>#TXBUFERR Input TX buffer error (overflow or underflow).<br />

40 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Table 2-12: PCS/PMA Signals<br />

Table 2-12 shows the PCS/PMA signals.<br />

Signal Direction Description<br />

Global Clock and Reset Signals<br />

Global Clock Signal<br />

<<br />

Table 2-13: Global Clock Signals<br />

<strong>Ethernet</strong> <strong>MAC</strong> Signal Descriptions<br />

PHYE<strong>MAC</strong>#PHYAD[4:0] Input Physical interface address of MDIO register set for the PCS<br />

sublayer.<br />

PHYE<strong>MAC</strong>#SIGNALDET Input Signal direct from PMD sublayer indicating the presence of light<br />

detected at the optical receiver, as defined in IEEE Std 802.3,<br />

clause 36. If asserted High, the optical receiver has detected light. If<br />

deasserted Low, indicates the absence of light.<br />

If unused, this signal should be tied High for correct operation.<br />

E<strong>MAC</strong>#CLIENTANINTERRUPT Output Interrupt upon auto-negotiation.<br />

Table 2-13 shows the global clock signal that is necessary for most configurations of the<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Ethernet</strong> <strong>MAC</strong>. See Appendix B, “<strong>Ethernet</strong> <strong>MAC</strong> Clocks” for further<br />

details.<br />

Signal Direction Description<br />

PHYE<strong>MAC</strong>#GTXCLK Input Clock supplied by the user to derive the other transmit clocks.<br />

Clock tolerance must be within the IEEE Std 802.3-2002<br />

specification.<br />

Reset Signal<br />

Table 2-14: Reset Signal<br />

Table 2-14 describes the Reset signal.<br />

Signal Direction Description<br />

Reset Input Asynchronous reset of the entire <strong>Ethernet</strong> <strong>MAC</strong>.<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED Signal<br />

Table 2-15 describes the CLIENTE<strong>MAC</strong>#DCMLOCKED signal.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 41<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 2: <strong>Ethernet</strong> <strong>MAC</strong> Overview<br />

Table 2-15: CLIENTE<strong>MAC</strong>#DCMLOCKED Signal<br />

Signal Direction Description<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED Input If a DCM is used to derive any of the clock signals, the LOCKED<br />

port of the DCM must be connected to the<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED port. The <strong>Ethernet</strong> <strong>MAC</strong> is held in reset<br />

until CLIENTE<strong>MAC</strong>#DCMLOCKED is asserted High. If the RocketIO<br />

serial transceiver PLL is used, the PLLLKDET signal should be<br />

ANDed with the DCM LOCK signal.<br />

If a DCM is not used, both CLIENTE<strong>MAC</strong>#DCMLOCKED ports from<br />

E<strong>MAC</strong>0 and E<strong>MAC</strong> 1 must be tied High.<br />

If any <strong>Ethernet</strong> <strong>MAC</strong> is not used, CLIENTE<strong>MAC</strong>#DCMLOCKED must be<br />

tied to High.<br />

<strong>Ethernet</strong> <strong>MAC</strong> Attributes<br />

This section describes the attributes (control parameters) that are used to configure the<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong>. Some of these attributes control the<br />

static configuration of the <strong>Ethernet</strong> <strong>MAC</strong> and others are used to preconfigure the internal<br />

control registers. The values of these attributes are loaded into the <strong>Ethernet</strong> <strong>MAC</strong> at powerup<br />

or when the <strong>Ethernet</strong> <strong>MAC</strong> is reset (1) .<br />

The attributes are divided into five sections: mode configuration, <strong>MAC</strong> configuration,<br />

physical interface, address filter, and DCR base address attributes.<br />

The mode configuration attributes control the static behavior of the <strong>Ethernet</strong> <strong>MAC</strong>,<br />

including whether the <strong>Ethernet</strong> <strong>MAC</strong> has a host interface, the type of physical interface,<br />

the width of the client interface and whether the MDIO interface is enabled. These<br />

attributes are not dynamically reconfigurable.<br />

All other attributes described in Table 2-16 (unless stated otherwise) define default values<br />

for internal registers. If the host interface is not enabled on the <strong>Ethernet</strong> <strong>MAC</strong>, these<br />

attributes allow the user to set the internal control register defaults. If the host interface is<br />

enabled (by setting the E<strong>MAC</strong>#_HOST_ENABLE attribute to be TRUE), then the host<br />

interface can be used to dynamically change the associated register contents or to read the<br />

register contents.<br />

1. An attribute value of TRUE is translated into a bit value of 1; a value of FALSE equals a bit value of 0.<br />

42 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Table 2-16: <strong>Mode</strong> Configuration Attributes<br />

Attribute Type Description<br />

Attribute to Configure Default Register Values for<br />

Management Configuration Register<br />

<strong>Ethernet</strong> <strong>MAC</strong> Attributes<br />

See “Management Configuration Register,” page 94 for register<br />

details.<br />

The MDIO interface can be enabled/disabled using the host<br />

interface, when the host interface is enabled. (The host interface is<br />

enabled by setting the E<strong>MAC</strong>#_HOST_ENABLE attribute to<br />

TRUE). If the host interface is not enabled then the MDIO enable<br />

value is fixed by this attribute.<br />

E<strong>MAC</strong>#_MDIO_ENABLE Boolean When E<strong>MAC</strong>#_HOST_ENABLE is FALSE, setting this attribute to<br />

TRUE enables the use of MDIO in the <strong>Ethernet</strong> <strong>MAC</strong>. When<br />

E<strong>MAC</strong>#_HOST_ENABLE and E<strong>MAC</strong>#_MDIO_ENABLE are both<br />

TRUE, the MDIO interface is enabled when the MDIO enable bit is<br />

set in the <strong>Ethernet</strong> <strong>MAC</strong> Management Configuration Register. See<br />

“MDIO Interface,” page 115.<br />

Attributes to Configure Fixed <strong>Mode</strong> for the<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

See “<strong>Ethernet</strong> <strong>MAC</strong> <strong>Mode</strong> Configuration Register,” page 92 for<br />

register details.<br />

E<strong>MAC</strong>#_HOST_ENABLE Boolean Setting this attribute to TRUE enables the use of the <strong>Ethernet</strong> <strong>MAC</strong><br />

host interface via either the generic host bus or the DCR bus.<br />

E<strong>MAC</strong>#_TX16BITCLIENT_ENABLE Boolean When this attribute is set to TRUE, the TX client data interface is<br />

16 bits wide. When this attribute is set to FALSE, the TX client data<br />

interface is 8 bits wide.<br />

E<strong>MAC</strong>#_RX16BITCLIENT_ENABLE Boolean When this attribute is set to TRUE, the RX client data interface is<br />

16 bits wide. When this attribute is set to FALSE, the RX client data<br />

interface is 8 bits wide.<br />

Attributes to Configure Fixed Physical Interface<br />

for the <strong>Ethernet</strong> <strong>MAC</strong><br />

The following three attributes define the physical interface of the<br />

<strong>Ethernet</strong> <strong>MAC</strong>. These attributes are mutually exclusive. If none of<br />

these three attributes is set to TRUE, then the physical interface is<br />

enabled for 10/100 MII and GMII modes. See “<strong>Ethernet</strong> <strong>MAC</strong><br />

<strong>Mode</strong> Configuration Register,” page 92 for register details.<br />

E<strong>MAC</strong>#_RGMII_ENABLE Boolean Setting this attribute to TRUE enables the <strong>Ethernet</strong> <strong>MAC</strong> for RGMII<br />

mode.<br />

E<strong>MAC</strong>#_SGMII_ENABLE Boolean Setting this attribute to TRUE enables the <strong>Ethernet</strong> <strong>MAC</strong> for SGMII<br />

mode.<br />

E<strong>MAC</strong>#_1000BASEX_ENABLE Boolean Setting this attribute to TRUE enables the <strong>Ethernet</strong> <strong>MAC</strong> for<br />

1000BASE-X mode.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 43<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 2: <strong>Ethernet</strong> <strong>MAC</strong> Overview<br />

Table 2-16: <strong>Mode</strong> Configuration Attributes (Cont’d)<br />

Attribute Type Description<br />

Attributes to Configure Fixed Speed for the<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

These attributes determine the speed of the <strong>Ethernet</strong> <strong>MAC</strong> after<br />

reset or power-up.<br />

The speed of the <strong>Ethernet</strong> <strong>MAC</strong> can be changed in multi-speed<br />

configurations using the host interface, when the host interface is<br />

enabled. (The host interface is enabled by setting the<br />

E<strong>MAC</strong>#_HOST_ENABLE attribute to TRUE). If the host interface is<br />

not enabled, then the speed of the <strong>Ethernet</strong> <strong>MAC</strong> is directly set by<br />

these two attributes.<br />

(E<strong>MAC</strong>#_SPEED_MSB: E<strong>MAC</strong>#_SPEED_LSB)<br />

1:0 = 1000 Mb/s<br />

0:1 = 100 Mb/s<br />

0:0 = 10 Mb/s<br />

1:1 = not applicable<br />

See “<strong>Ethernet</strong> <strong>MAC</strong> <strong>Mode</strong> Configuration Register,” page 92 for<br />

register details.<br />

E<strong>MAC</strong>#_SPEED_MSB Boolean E<strong>MAC</strong>#_SPEED[1]. (TRUE takes the bit value 1 in the table cell<br />

above.)<br />

E<strong>MAC</strong>#_SPEED_LSB Boolean E<strong>MAC</strong>#_SPEED[0]. (TRUE takes the bit value 1 in the table cell<br />

above.)<br />

Attributes to Configure Advanced Clocking<br />

Scheme for the <strong>Ethernet</strong> <strong>MAC</strong><br />

To reduce the number of BUFGs used for the <strong>Ethernet</strong> <strong>MAC</strong>,<br />

optimized clocking modes are available. See “Clock Connections to<br />

and from <strong>FPGA</strong> Logic,” page 206 for a description of the possible<br />

clocking mode options.<br />

E<strong>MAC</strong>#_BYTEPHY Boolean When this attribute is set to TRUE, the GMII/MII interface bus<br />

remains the same as GMII interface. Specifically, it is 8 bits wide<br />

and runs at the E<strong>MAC</strong> block’s ½ clock rate of 12.5 MHz or<br />

1.25 MHz. See “Advanced Clocking Schemes,” page 208 for an<br />

introduction to this clocking mode option.<br />

E<strong>MAC</strong>#_USECLKEN Boolean When this attribute is set to TRUE, the client interface clock output<br />

is switched to clock enable, thus eliminating BUFGs on the client<br />

interface. See “Advanced Clocking Schemes,” page 208 for an<br />

introduction to this clocking mode option.<br />

44 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Table 2-17: <strong>MAC</strong> Configuration Attributes<br />

Attribute Type Description<br />

Attribute to Configure Default Register Value for<br />

the Address Filter <strong>Mode</strong> Register<br />

<strong>Ethernet</strong> <strong>MAC</strong> Attributes<br />

The address filter can be enabled/disabled using the host<br />

interface, when the host interface is enabled. (The host interface<br />

is enabled by setting the E<strong>MAC</strong>#_HOST_ENABLE attribute to<br />

TRUE). If the host interface is not enabled, the address filter<br />

mode is fixed by the following attribute value.<br />

See “Address Filter <strong>Mode</strong>,” page 97 for register details.<br />

E<strong>MAC</strong>#_ADDRFILTER_ENABLE Boolean Address Filter Enable: This attribute sets the default value of the<br />

Promiscuous <strong>Mode</strong> enable bit in the Address Filter <strong>Mode</strong><br />

register.<br />

Setting this attribute to TRUE enables the use of the address filter<br />

module in the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

Attributes to Configure Default Register Value for<br />

the Flow Control Configuration Register<br />

The following two attributes configure the <strong>Ethernet</strong> <strong>MAC</strong> flow<br />

control module. See “Flow Control Configuration Register,” page<br />

91 for register details.<br />

E<strong>MAC</strong>#_RXFLOWCTRL_ENABLE Boolean Receive Flow Control Enable: This attribute sets the default value<br />

of the Flow control enable (RX) bit in the Flow Control<br />

Configuration Register.<br />

When this attribute is set to TRUE and full-duplex mode is<br />

enabled, receive flow control is enabled. Any flow control frames<br />

received by the <strong>Ethernet</strong> <strong>MAC</strong> cause the transmitter operation to<br />

be inhibited. When this attribute is set to FALSE, any flow control<br />

frames received by the <strong>Ethernet</strong> <strong>MAC</strong> are passed on to the client.<br />

See “Flow Control Block,” page 73 for description of flow control<br />

functionality.<br />

E<strong>MAC</strong>#_TXFLOWCTRL_ENABLE Boolean Transmit Flow Control Enable: This attribute sets the default<br />

value of the Flow control enable (TX) bit in the Flow Control<br />

Configuration Register.<br />

When this attribute is set to TRUE and full-duplex mode is<br />

enabled, asserting the CLIENTE<strong>MAC</strong>#PAUSEREQ signal causes the<br />

<strong>Ethernet</strong> <strong>MAC</strong> to send a flow control frame out from the<br />

transmitter.<br />

When this attribute is set to FALSE, asserting the<br />

CLIENTE<strong>MAC</strong>#PAUSEREQ signal has no effect.<br />

Attributes to Configure Default Register Value for<br />

the Transmitter Configuration Register<br />

The following attributes configure the transmit engine of the<br />

<strong>Ethernet</strong> <strong>MAC</strong>. See “Transmitter Configuration Register,” page<br />

90 for register details.<br />

E<strong>MAC</strong>#_TXRESET Boolean This attribute sets the default value of the Reset bit in the<br />

Transmitter Configuration Register.<br />

When this attribute is set to TRUE, the <strong>Ethernet</strong> <strong>MAC</strong> transmitter<br />

is reset. This reset also sets all of the transmitter configuration<br />

registers to their default values.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 45<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 2: <strong>Ethernet</strong> <strong>MAC</strong> Overview<br />

Table 2-17: <strong>MAC</strong> Configuration Attributes (Cont’d)<br />

Attribute Type Description<br />

E<strong>MAC</strong>#_TXJUMBOFRAME_ENABLE Boolean This attribute sets the default value of the Jumbo Frame Enable<br />

bit in the Transmitter Configuration Register.<br />

When this attribute is set to TRUE, the <strong>Ethernet</strong> <strong>MAC</strong> transmitter<br />

allows frames larger than the maximum legal frame length<br />

specified in IEEE Std 802.3-2002 to be sent. When FALSE, the<br />

<strong>Ethernet</strong> <strong>MAC</strong> transmitter only allows frames up to the legal<br />

maximum to be sent.<br />

E<strong>MAC</strong>#_TXINBANDFCS_ENABLE Boolean This attribute sets the default value of the In-Band FCS Enable bit<br />

in the Transmitter Configuration Register.<br />

When this attribute is set to TRUE, the <strong>Ethernet</strong> <strong>MAC</strong> transmitter<br />

expects the FCS field to be passed in by the client. When FALSE,<br />

the <strong>Ethernet</strong> <strong>MAC</strong> transmitter appends padding as required,<br />

computes the FCS, and appends it to the frame.<br />

E<strong>MAC</strong>#_TX_ENABLE Boolean This attribute sets the default value of the Transmit Enable bit in<br />

the Transmitter Configuration Register.<br />

When this attribute is set to TRUE, the transmitter is operational.<br />

When FALSE, the transmitter is disabled.<br />

E<strong>MAC</strong>#_TXVLAN_ENABLE Boolean This attribute sets the default value of the VLAN Enable bit in the<br />

Transmitter Configuration Register.<br />

When this attribute is set to TRUE, the transmitter allows the<br />

transmission of VLAN tagged frames.<br />

E<strong>MAC</strong>#_TXHALFDUPLEX Boolean This attribute sets the default value of the Half Duplex mode bit<br />

in the Transmitter Configuration Register.<br />

When this attribute is set to TRUE, the transmitter operates in<br />

half-duplex mode. When FALSE, the transmitter operates in fullduplex<br />

mode.<br />

E<strong>MAC</strong>#_TXIFGADJUST_ENABLE Boolean This attribute sets the default value of the IFG Adjustment<br />

Enable bit in the Transmitter Configuration Register.<br />

When this attribute is set to TRUE, the transmitter reads the<br />

value of the CLIENTE<strong>MAC</strong>#TXIFGDELAY[7:0] port and sets the<br />

IFG accordingly. When FALSE, the transmitter always inserts at<br />

least the legal minimum IFG.<br />

Attributes to Configure Default Register Value for<br />

the Receiver Configuration Registers<br />

Configures the receive engine of the <strong>Ethernet</strong> <strong>MAC</strong>. See<br />

“Receiver Configuration Register (Word 0)” and “Receiver<br />

Configuration Register (Word 1),” page 89 for register details.<br />

E<strong>MAC</strong>#_RXRESET Boolean This attribute sets the default value of the Reset bit in the<br />

Receiver Configuration Register.<br />

When this attribute is set to TRUE, the receiver is held in reset.<br />

This signal is an input to the reset circuit for the receiver block.<br />

E<strong>MAC</strong>#_RXJUMBOFRAME_ENABLE Boolean This attribute sets the default value of the Jumbo Frame Enable<br />

bit in the Receiver Configuration Register.<br />

When this attribute is set to FALSE, the receiver does not pass<br />

frames longer than the maximum legal frame size specified in<br />

IEEE Std 802.3-2002. When TRUE, the receiver does not have an<br />

upper limit on frame size.<br />

46 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Table 2-17: <strong>MAC</strong> Configuration Attributes (Cont’d)<br />

Attribute Type Description<br />

<strong>Ethernet</strong> <strong>MAC</strong> Attributes<br />

E<strong>MAC</strong>#_RXINBANDFCS_ENABLE Boolean This attribute sets the default value of the In-band FCS Enable bit<br />

in the Receiver Configuration Register.<br />

When this attribute is set to TRUE, the <strong>Ethernet</strong> <strong>MAC</strong> receiver<br />

passes the FCS field up to the client. When FALSE, the <strong>Ethernet</strong><br />

<strong>MAC</strong> receiver does not pass the FCS field. In both cases, the FCS<br />

field is verified on the frame.<br />

E<strong>MAC</strong>#_RX_ENABLE Boolean This attribute sets the default value of the Receive Enable bit in<br />

the Receiver Configuration Register.<br />

When this attribute is set to TRUE, the receiver block is<br />

operational. When FALSE, the block ignores activity on the<br />

physical interface RX port.<br />

E<strong>MAC</strong>#_RXVLAN_ENABLE Boolean This attribute sets the default value of the VLAN Enable bit in the<br />

Receiver Configuration Register.<br />

When this attribute is set to TRUE, VLAN tagged frames are<br />

accepted by the receiver.<br />

E<strong>MAC</strong>#_RXHALFDUPLEX Boolean This attribute sets the default value of the Half Duplex mode bit<br />

in the Receiver Configuration Register.<br />

When this attribute is set to TRUE, the receiver operates in halfduplex<br />

mode. When FALSE, the receiver operates in full-duplex<br />

mode.<br />

E<strong>MAC</strong>#_LTCHECK_DISABLE Boolean This attribute sets the default value of the Length/Type Check<br />

Disable bit in the Receiver Configuration register.<br />

Setting this attribute to TRUE disables the Length/Type check on<br />

received frames where the Length/Type field is less than<br />

0x0600. See “Length/Type Field Error Checks” for more<br />

information.<br />

E<strong>MAC</strong>#_PAUSEADDR[47:0] 48-bit<br />

Binary<br />

This attribute sets the default value of the Pause Frame <strong>Ethernet</strong><br />

<strong>MAC</strong> Address [47:0] in the Receiver Configuration (Word 0) and<br />

(Word 1) registers.<br />

This address is used by the <strong>Ethernet</strong> <strong>MAC</strong> to match against the<br />

destination address of any incoming flow control frames and as<br />

the source address for any outbound flow control frames.<br />

The address is ordered for the least significant byte in the register<br />

to have the first byte transmitted or received; for example, an<br />

<strong>Ethernet</strong> <strong>MAC</strong> address of AA-BB-CC-DD-EE-FF is stored in byte<br />

[47:0] as 0xFFEEDDCCBBAA.<br />

The Pause frame address should be set to the same <strong>Ethernet</strong><br />

<strong>MAC</strong> address as the E<strong>MAC</strong>#_UNICASTADDR[47:0] attributes.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 47<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 2: <strong>Ethernet</strong> <strong>MAC</strong> Overview<br />

Table 2-18: Physical Interface Attributes<br />

Attribute Type Description<br />

E<strong>MAC</strong>#_CONFIGVEC_79 Boolean Reserved, set to TRUE.<br />

Attributes to Configure Default Register Values for<br />

SGMII or 1000BASE-X Management Registers<br />

The following attributes are only used in SGMII or 1000BASE-<br />

X modes. See “1000BASE-X PCS/PMA Management<br />

Registers,” page 122 and “SGMII Management Registers,”<br />

page 130 for register details. See “MDIO Implementation in<br />

the <strong>Ethernet</strong> <strong>MAC</strong>,” page 119 for information on how to<br />

access these registers.<br />

E<strong>MAC</strong>#_PHYRESET Boolean This attribute sets the default value of the Reset bit in the<br />

PCS/PMA Management Register 0 (Control Register). A<br />

value of TRUE resets the PCS/PMA module.<br />

E<strong>MAC</strong>#_PHYINITAUTONEG_ENABLE Boolean This attribute sets the default value of the Auto-Negotiation<br />

Enable bit in the PCS/PMA Management Register 0 (Control<br />

Register). A value of TRUE enables auto-negotiation of the<br />

PCS/PMA module.<br />

E<strong>MAC</strong>#_PHYISOLATE Boolean This attribute sets the default value of the Isolate bit in the<br />

PCS/PMA Management Register 0 (Control Register). A<br />

value of TRUE causes the PCS/PMA sublayer logic to behave<br />

as if it is electrically isolated from the attached <strong>Ethernet</strong> <strong>MAC</strong>,<br />

as defined in IEEE Std 802.3, clause 22.2.4.1.6. Therefore,<br />

frames transmitted by the <strong>Ethernet</strong> <strong>MAC</strong> are not forwarded<br />

through the PCS/PMA. Frames received by the PCS/PMA<br />

are not relayed to the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

E<strong>MAC</strong>#_PHYPOWERDOWN Boolean This attribute sets the default value of the Power Down bit in<br />

the PCS/PMA Management Register 0 (Control Register). A<br />

value of TRUE causes the RocketIO serial transceiver to be<br />

placed in a Low power state. A reset must be applied to clear<br />

the Low power state.<br />

E<strong>MAC</strong>#_PHYLOOPBACKMSB Boolean This attribute sets the default value of the Loopback bit in the<br />

PCS/PMA Management Register 0 (Control Register). A<br />

value of TRUE for this attribute enables loopback.<br />

E<strong>MAC</strong>#_GTLOOPBACK sets if the loopback occurs in the<br />

<strong>Ethernet</strong> <strong>MAC</strong> or in the RocketIO serial transceiver.<br />

E<strong>MAC</strong>#_UNIDIRECTION_ENABLE Boolean This attribute sets the default value of the unidirection enable<br />

bit in the PCS/PMA Management Register 0 (Control<br />

Register). Setting this attribute to TRUE allows the <strong>Ethernet</strong><br />

<strong>MAC</strong> to transmit regardless of whether a valid link has been<br />

established.<br />

E<strong>MAC</strong>#_GTLOOPBACK Boolean This attribute sets the default value of the GT Loopback bit in<br />

“Vendor-Specific Register: Loopback Control Register<br />

(Register 17),” page 129. This attribute controls where the<br />

loopback happens when loopback is selected.<br />

When E<strong>MAC</strong>#_GTLOOPBACK is TRUE, the loopback occurs<br />

in the RocketIO serial transceiver. Near-End parallel PCS<br />

loopback is used.<br />

When E<strong>MAC</strong>#_GTLOOPBACK is FALSE, the loopback is<br />

internal to the E<strong>MAC</strong>. In this state, idles are transmitted to the<br />

RocketIO serial transceiver.<br />

48 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Table 2-18: Physical Interface Attributes (Cont’d)<br />

Attribute Type Description<br />

<strong>Ethernet</strong> <strong>MAC</strong> Attributes<br />

Attribute to Configure Auto-negotiation Parameters See the following sections for details on attribute value<br />

settings for Physical interface settings of SGMII or 1000BASE-<br />

X:<br />

SGMII: “Auto-Negotiation Link Timer,” page 197.<br />

1000BASE-X: “Auto-Negotiation Link Timer,” page 175.<br />

E<strong>MAC</strong>#_LINKTIMERVAL[8:0] 9-bit<br />

Binary<br />

Table 2-19: Address Filter Attributes<br />

Programmable auto-negotiation link timer value.<br />

Attribute Type Description<br />

Attribute to Configure Default Register Value for<br />

the Unicast Address Register<br />

E<strong>MAC</strong>#_UNICASTADDR[47:0] 48-bit<br />

Binary<br />

Table 2-20: DCR Base Address Attributes<br />

This attribute sets the default value of the Unicast Address[47:0] in<br />

the Unicast Address (Word 0) and (Word 1) registers. See “Unicast<br />

Address (Word 0),” page 95 and “Unicast Address (Word 1),” page<br />

95 for register details.<br />

This 48-bit attribute is used to set the <strong>Ethernet</strong> <strong>MAC</strong> unicast<br />

address used by the address filter block to see if the incoming frame<br />

is destined for the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

The address is ordered for the least significant byte in the register<br />

to have the first byte transmitted or received; for example, an<br />

<strong>Ethernet</strong> <strong>MAC</strong> address of 06-05-04-03-02-01 is stored in bits [47:0] as<br />

0x010203040506.<br />

This default value for the unicast address can be overridden by<br />

software through the host interface.<br />

Attribute Type Description<br />

Attribute to Configure Default Value for DCR<br />

Base Address<br />

E<strong>MAC</strong>#_DCRBASEADDR[7:0] 8-bit<br />

Binary<br />

See “Using the DCR Bus,” page 101 for a description of how the<br />

DCR Base Addresses are used to access different registers.<br />

This attribute allows separate DCR base addresses to be used for<br />

each <strong>Ethernet</strong> <strong>MAC</strong>.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 49<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 2: <strong>Ethernet</strong> <strong>MAC</strong> Overview<br />

50 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Client Interface<br />

Chapter 3<br />

This chapter provides useful design information for the <strong>Virtex</strong>®-5 <strong>Ethernet</strong> <strong>MAC</strong>. It<br />

contains the following sections:<br />

“Transmit (TX) Client: 8-Bit Interface (without Clock Enables)”<br />

“Transmit (TX) Client: 8-Bit Interface (with Clock Enables)”<br />

“Transmit (TX) Client: 16-Bit Interface”<br />

“Receive (RX) Client: 8-Bit Interface (without Clock Enables)”<br />

“Receive (RX) Client: 8-Bit Interface (with Clock Enables)”<br />

“Receive (RX) Client: 16-Bit Interface”<br />

“Address Filtering”<br />

“Flow Control Block”<br />

“Statistics Vectors”<br />

The client interface is designed for maximum flexibility for matching the client switching<br />

logic or network processor interface.<br />

The transmit and receive client interfaces can be configured to handle either 8-bit data<br />

transfers or 16-bit data transfers, where the default is 8 bits.<br />

The 8-bit client operation supports all physical interfaces and is offered in two alterative<br />

clocking modes: the standard clocking scheme without clock enables or an alternative<br />

clock enable scheme. “<strong>Ethernet</strong> <strong>MAC</strong> Clocks,” page 205 introduces these two clocking<br />

models and describes how the clock enable scheme can be used to reduce the number of<br />

global clock buffers required for the design. Table 2-1, page 30 illustrates the physical<br />

interface configurations that can use the advanced clock enable scheme.<br />

The 16-bit client operation is enabled by setting the E<strong>MAC</strong>#_RX16BITCLIENT_ENABLE<br />

and E<strong>MAC</strong>#_TX16BITCLIENT_ENABLE attributes to TRUE. This mode of operation is<br />

only available with the 1000BASE-X PCS/PMA physical interface. Using this scheme, the<br />

<strong>Ethernet</strong> <strong>MAC</strong> can be over-clocked to provide operation above 1 Gb/s. “16-Bit Data<br />

Client,” page 170 provides a description of the clocking scheme for this mode.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 51<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 3: Client Interface<br />

Table 3-1 defines the abbreviations used throughout this chapter.<br />

Table 3-1: Abbreviations Used in this Chapter<br />

Abbreviation Definition Length<br />

DA Destination address 6 bytes<br />

SA Source address 6 bytes<br />

L/T Length/Type field 2 bytes<br />

FCS Frame check sequences 4 bytes<br />

Transmit (TX) Client: 8-Bit Interface (without Clock Enables)<br />

This section covers the client transmit interface when it is configured to be eight bits wide<br />

and when the default clocking scheme is used. “<strong>Ethernet</strong> <strong>MAC</strong> Attributes,” page 42<br />

describes the E<strong>MAC</strong>#_USECLKEN attribute, which is set to FALSE for this configuration.<br />

In this configuration, CLIENTE<strong>MAC</strong>#TXD[15:8] and CLIENTE<strong>MAC</strong>#TXDVLDMSW must be tied<br />

to ground because the upper eight bits of the data bus are not necessary.<br />

See “<strong>Ethernet</strong> <strong>MAC</strong> Clocks,” page 205 for some general information on this standard<br />

clocking scheme. More details are available for specific physical interface configurations in<br />

the following sections:<br />

MII<br />

“MII Standard Clock Management”<br />

GMII<br />

“GMII Clock Management for 1 Gb/s Only”<br />

“GMII Standard Clock Management for <strong>Tri</strong>-Speed Operation”<br />

“GMII Clock Management for <strong>Tri</strong>-Speed Operation Using Byte PHY”<br />

RGMII<br />

“RGMII Clock Management for 1 Gb/s Only”<br />

“RGMII Standard Clock Management for <strong>Tri</strong>-Speed Operation”<br />

SGMII<br />

“SGMII Clock Management (LXT and SXT Devices)”<br />

“SGMII Clock Management (TXT and FXT Devices)”<br />

1000BASE-X<br />

“1000BASE-X PCS/PMA Clock Management (LXT and SXT Devices)”<br />

“1000BASE-X PCS/PMA Clock Management (TXT and FXT Devices)”<br />

52 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Normal Frame Transmission<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#TXD[7:0]<br />

CLIENTE<strong>MAC</strong>#TXDVLD<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

CLIENTE<strong>MAC</strong>#TXUNDERRUN<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION<br />

E<strong>MAC</strong>#CLIENTTXRETRANSMIT<br />

Transmit (TX) Client: 8-Bit Interface (without Clock Enables)<br />

The timing of a normal outbound frame transfer is shown in Figure 3-1. When the client<br />

transmits a frame, the first column of data is placed on the CLIENTE<strong>MAC</strong>#TXD[7:0] port,<br />

and CLIENTE<strong>MAC</strong>#TXDVLD is asserted High. After the <strong>Ethernet</strong> <strong>MAC</strong> reads the first byte of<br />

data, it asserts the E<strong>MAC</strong>#CLIENTTXACK signal. On subsequent rising clock edges, the client<br />

must provide the rest of the frame data. CLIENTE<strong>MAC</strong>#TXDVLD is deasserted Low to signal<br />

an end-of-frame to the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

In-Band Parameter Encoding<br />

Padding<br />

Figure 3-1: Normal Frame Transmission Across Client Interface<br />

The <strong>Ethernet</strong> <strong>MAC</strong> frame parameters, destination address, source address, length/type,<br />

and the FCS are encoded within the same data stream used to transfer the frame payload<br />

instead of separate ports. This provides the maximum flexibility in switching applications.<br />

The preamble, and optionally the FCS, are added to the frame by the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

When fewer than 46 bytes of data are supplied by the client to the <strong>Ethernet</strong> <strong>MAC</strong>, the<br />

transmitter module adds padding – up to the minimum frame length. However, if the<br />

<strong>Ethernet</strong> <strong>MAC</strong> is configured for client-passed FCS, the client must also supply the padding<br />

to maintain the minimum frame length (see “Client-Supplied FCS Passing,” page 53).<br />

Client-Supplied FCS Passing<br />

DA SA L/T<br />

DATA<br />

<strong>UG194</strong>_3_01_072206<br />

In the transmission timing case shown in Figure 3-2, an <strong>Ethernet</strong> <strong>MAC</strong> is configured to<br />

have the FCS field passed in by the client (see “Configuration Registers,” page 88). The<br />

client must ensure that the frame meets the <strong>Ethernet</strong> minimum frame length requirements.<br />

If the frame does not meet these requirements, the <strong>Ethernet</strong> <strong>MAC</strong> pads the frame to the<br />

minimum frame length. Although this does not cause the transmitter statistics vector to<br />

indicate a bad frame, it will result in an errored frame as received by the link partner<br />

<strong>Ethernet</strong> <strong>MAC</strong>.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 53<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 3: Client Interface<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#TXD[7:0]<br />

CLIENTE<strong>MAC</strong>#TXDVLD<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

CLIENTE<strong>MAC</strong>#TXUNDERRUN<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION<br />

E<strong>MAC</strong>#CLIENTTXRETRANSMIT<br />

Client Underrun<br />

DA SA L/T DATA FCS<br />

Figure 3-2: Frame Transmission with Client-Supplied FCS<br />

<strong>UG194</strong>_3_02_072206<br />

The timing of an aborted transfer is shown in Figure 3-3. An aborted transfer can occur if a<br />

FIFO connected to the client interface empties before a frame is completed. The<br />

CLIENTE<strong>MAC</strong>#TXUNDERRUN signal on the client interface is used to signal to the <strong>MAC</strong> that an<br />

underrun condition exists.<br />

When the client asserts CLIENTE<strong>MAC</strong>#TXUNDERRUN during a frame transmission, the<br />

E<strong>MAC</strong>#PHYTXER output is asserted for one clock cycle to notify the external GMII, RGMII, or<br />

MII PHY that the frame is corrupted.<br />

If 1000BASE-X PCS/PMA or SGMII mode is operational, the <strong>MAC</strong> inserts an error code<br />

into the current frame to signal corruption. The <strong>Ethernet</strong> <strong>MAC</strong> then falls back to idle<br />

transmission. The client must requeue the aborted frame for transmission.<br />

After an underrun occurs, CLIENTE<strong>MAC</strong>#TXDVLD must be deasserted for at least one clock<br />

cycle before transmission can recommence. CLIENTE<strong>MAC</strong>#TXDVLD can be deasserted on the<br />

same cycle as underrun is asserted. There is no requirement to deassert<br />

CLIENTE<strong>MAC</strong>#TXDVLD when underrun is asserted; it can be deasserted later.<br />

54 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#TXD[7:0]<br />

CLIENTE<strong>MAC</strong>#TXDVLD<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

CLIENTE<strong>MAC</strong>#TXUNDERRUN<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION<br />

E<strong>MAC</strong>#CLIENTTXRETRANSMIT<br />

E<strong>MAC</strong>#PHYTXER<br />

Back-to-Back Transfers<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#TXD[7:0]<br />

CLIENTE<strong>MAC</strong>#TXDVLD<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

CLIENTE<strong>MAC</strong>#TXUNDERRUN<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION<br />

E<strong>MAC</strong>#CLIENTTXRETRANSMIT<br />

Transmit (TX) Client: 8-Bit Interface (without Clock Enables)<br />

DA SA L/T DATA<br />

Figure 3-3: Frame Transmission with Underrun<br />

<strong>UG194</strong>_3_03_072206<br />

Back-to-back transfers can occur when the <strong>Ethernet</strong> <strong>MAC</strong> client is ready to transmit a<br />

second frame of data immediately following completion of the first frame. In Figure 3-4,<br />

the end of the first frame is shown on the left. At the clock cycle immediately following the<br />

final byte of the first frame, CLIENTE<strong>MAC</strong>#TXDVLD is deasserted by the client. One clock<br />

cycle later, CLIENTE<strong>MAC</strong>#TXDVLD is asserted High, indicating that the first byte of the<br />

destination address of the second frame is awaiting transmission on CLIENTE<strong>MAC</strong>#TXD.<br />

Figure 3-4: Back-to-Back Frame Transmission<br />

DA SA<br />

<strong>UG194</strong>_3_04_072206<br />

When the <strong>Ethernet</strong> <strong>MAC</strong> is ready to accept data, E<strong>MAC</strong>#CLIENTTXACK is asserted and the<br />

transmission continues in the same manner as the single frame case. The <strong>Ethernet</strong> <strong>MAC</strong><br />

defers the assertion of E<strong>MAC</strong>#CLIENTTXACK to comply with inter-packet gap requirements<br />

and flow control requests.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 55<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 3: Client Interface<br />

Virtual LAN (VLAN) Tagged Frames<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#TXD[7:0]<br />

CLIENTE<strong>MAC</strong>#TXDVLD<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

CLIENTE<strong>MAC</strong>#TXUNDERRUN<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION<br />

E<strong>MAC</strong>#CLIENTTXRETRANSMIT<br />

Figure 3-5 shows the transmission of a VLAN tagged frame (if enabled). The handshaking<br />

signals across the interface do not change. However, the VLAN type tag 0x8100 must be<br />

supplied by the client to show the frame as VLAN tagged. The client also supplies the two<br />

bytes of tag control information, V1 and V2, at the appropriate positions in the data stream.<br />

More information on the contents of these two bytes can be found in the IEEE Std 802.3-<br />

2002 specification.<br />

81 00 V1 V2<br />

DA SA VLAN L/T DATA<br />

Tag<br />

Figure 3-5: Transmission of a VLAN Tagged Frame<br />

Maximum Permitted Frame Length/Jumbo Frames<br />

The maximum length of a frame specified in the IEEE Std 802.3-2002 specification is<br />

1518 bytes for non-VLAN tagged frames. VLAN tagged frames can be extended to<br />

1522 bytes. When jumbo frame handling is disabled and the client attempts to transmit a<br />

frame that exceeds the maximum legal length, the <strong>Ethernet</strong> <strong>MAC</strong> inserts an error code to<br />

corrupt the current frame and the frame is truncated to the maximum legal length. When<br />

jumbo frame handling is enabled, frames longer than the legal maximum are transmitted<br />

error free.<br />

For more information on enabling and disabling jumbo frame handling, see<br />

“Configuration Registers,” page 88.<br />

Frame Collisions - Half-Duplex 10/100 Mb/s Operation Only<br />

<strong>UG194</strong>_3_05_072206<br />

In half-duplex <strong>Ethernet</strong> operation, collisions occur on the medium. This is how the<br />

arbitration algorithm is fulfilled. When there is a collision, the <strong>Ethernet</strong> <strong>MAC</strong> signals to the<br />

client a need to have data resupplied as follows:<br />

If there is a collision, the E<strong>MAC</strong>#CLIENTTXCOLLISION signal is set High by the <strong>Ethernet</strong><br />

<strong>MAC</strong>. If a frame is in progress, the client must abort the transfer, and<br />

CLIENTE<strong>MAC</strong>#TXDVLD is deasserted Low.<br />

If the E<strong>MAC</strong>#CLIENTTXRETRANSMIT signal is High in the same clock cycle that the<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION signal is High, the client must resubmit the previous<br />

frame to the <strong>Ethernet</strong> <strong>MAC</strong> for retransmission; CLIENTE<strong>MAC</strong>#TXDVLD must be asserted<br />

56 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#TXD[7:0]<br />

CLIENTE<strong>MAC</strong>#TXDVLD<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

CLIENTE<strong>MAC</strong>#TXUNDERRUN<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION<br />

E<strong>MAC</strong>#CLIENTTXRETRANSMIT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

Transmit (TX) Client: 8-Bit Interface (without Clock Enables)<br />

to the <strong>Ethernet</strong> <strong>MAC</strong> within eight clock cycles of the E<strong>MAC</strong>#CLIENTTXCOLLISION signal<br />

to meet <strong>Ethernet</strong> timing requirements. This operation is shown in Figure 3-6. If the<br />

frame presented to the client interface is shorter than the collision window (slot time)<br />

defined in IEEE Std 802.3-2002, a retransmission request can occur after the end of the<br />

frame on the client interface. This can also occur on slightly longer frames due to the<br />

latency of the transmit section of the <strong>Ethernet</strong> <strong>MAC</strong>. In half duplex mode, the client<br />

should wait until the collision window has passed before submitting a new frame.<br />

8 Clocks<br />

Maximum<br />

Figure 3-6: Collision Handling - Frame Retransmission Required<br />

CLIENTE<strong>MAC</strong>#TXD[7:0]<br />

CLIENTE<strong>MAC</strong>#TXDVLD<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

CLIENTE<strong>MAC</strong>#TXUNDERRUN<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION<br />

E<strong>MAC</strong>#CLIENTTXRETRANSMIT<br />

<strong>UG194</strong>_3_06_072206<br />

If the E<strong>MAC</strong>#CLIENTTXRETRANSMIT signal is Low in the same clock cycle that the<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION signal is High, the number of retries for this frame has<br />

exceeded the <strong>Ethernet</strong> specification, and the frame should be dropped by the client.<br />

The user must drop TXDVLD the cycle after TXCOLLISION is asserted. The client can<br />

then make any new frame available to the <strong>Ethernet</strong> <strong>MAC</strong> for transmission without<br />

timing restriction. This process is shown in Figure 3-7.<br />

Figure 3-7: Collision Handling - No Frame Retransmission Required<br />

<strong>UG194</strong>_3_07_072206<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 57<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 3: Client Interface<br />

IFG Adjustment<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#TXD[7:0]<br />

CLIENTE<strong>MAC</strong>#TXDVLD<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

CLIENTE<strong>MAC</strong>#TXIFGDELAY<br />

The length of the IFG can be varied in full-duplex mode. If this function is selected (using<br />

a configuration bit in the transmitter control register, see “Configuration Registers,” page<br />

88), then the <strong>Ethernet</strong> <strong>MAC</strong> exerts back pressure to delay the transmission of the next<br />

frame until the requested number of idle cycles has elapsed. The number of idle cycles can<br />

be increased. The number of cycles is controlled by the value on the<br />

CLIENTE<strong>MAC</strong>#TXIFGDELAY port at the start-of-frame transmission if the IFG Adjustment<br />

Enable bit in the Transmitter Configuration Register is set. If IFG adjustment is disabled or<br />

the value on CLIENTE<strong>MAC</strong>#TXIFGDELAY is less than the minimum IFG specified in<br />

IEEE 802.3, the minimum IFG (12 idles) is used. Figure 3-8 shows the <strong>Ethernet</strong> <strong>MAC</strong><br />

operating in this mode.<br />

0x0D<br />

IFG ADJUST VALUE<br />

DA SA<br />

Figure 3-8: IFG Adjustment<br />

Transmit (TX) Client: 8-Bit Interface (with Clock Enables)<br />

This section covers the client transmit interface when it is configured to be 8 bits wide and<br />

when the optional clock enable clocking scheme is used. This optional configuration can be<br />

used when the <strong>Ethernet</strong> <strong>MAC</strong> is configured in MII/GMII or RGMII mode. “<strong>Ethernet</strong> <strong>MAC</strong><br />

Attributes,” page 42 describes the E<strong>MAC</strong>#_USECLKEN attribute, which is set to TRUE for<br />

this configuration.<br />

In this mode, the client interface is synchronous to the physical interface clock. This<br />

configuration reduces the number of BUFGs that are used to implement the <strong>Ethernet</strong> <strong>MAC</strong><br />

design. See “<strong>Ethernet</strong> <strong>MAC</strong> Clocks,” page 205 for some general information on this<br />

clocking scheme. More details are available for specific physical interface configurations in<br />

the following sections:<br />

“MII Clock Management using Clock Enables”<br />

13 Idles Inserted<br />

“GMII Clock Management for <strong>Tri</strong>-Speed Operation Using Clock Enables”<br />

“RGMII Clock Management for <strong>Tri</strong>-Speed Operation Using Clock Enables”<br />

For the transmit interface, the PHYE<strong>MAC</strong>#GMIIMIICLKIN signal is used as the clock and<br />

the E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT signal is used as the clock enable.<br />

58 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

DA<br />

Next IFG<br />

ADJUST VALUE<br />

<strong>UG194</strong>_3_08_072506<br />

R


R<br />

Normal Frame Transmission<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#TXD[7:0]<br />

CLIENTE<strong>MAC</strong>#TXDVLD<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

CLIENTE<strong>MAC</strong>#TXUNDERRUN<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION<br />

E<strong>MAC</strong>#CLIENTTXRETRANSMIT<br />

Transmit (TX) Client: 8-Bit Interface (with Clock Enables)<br />

Figure 3-9 shows the transmission of a normal frame at 1 Gb/s. At 1 Gb/s, no clock enable<br />

is required, and the clock enable signal E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT is held High. The<br />

data is input on the rising edge of the 125 MHz PHYE<strong>MAC</strong>#GMIIMIICLKIN clock.<br />

DA SA L/T DATA<br />

Figure 3-9: Normal Frame Transmission at 1 Gb/s with E<strong>MAC</strong>#_USECLKEN Set to TRUE<br />

<strong>UG194</strong>_3_09_072206<br />

At speeds slower than 1 Gb/s, the physical interface clock runs twice as fast as the client<br />

interface clock. The data is still synchronous to PHYE<strong>MAC</strong>#GMIIMIICLKIN, but to maintain<br />

the correct data rate, the E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT clock signal is used as an enable<br />

rather than a clock. The E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT signal is asserted every second<br />

cycle of PHYE<strong>MAC</strong>#GMIIMIICLKIN. Data is presented to the transmitter interface only when<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT is High. This is illustrated in Figure 3-10.<br />

Note: Due to the timing relationship between the internal and external clocks, the<br />

E<strong>MAC</strong>#CLIENTTXACK signal should be registered at the output of the E<strong>MAC</strong> at speed lower than<br />

1Gb/s.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 59<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 3: Client Interface<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#TXD[7:0]<br />

CLIENTE<strong>MAC</strong>#TXDVLD<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

E<strong>MAC</strong>#CLIENTTXACK (Registered)<br />

CLIENTE<strong>MAC</strong>#TXUNDERRUN<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION<br />

E<strong>MAC</strong>#CLIENTTXRETRANSMIT<br />

Figure 3-10: Normal Frame Transmission at 10/100 Mb/s with E<strong>MAC</strong>#_USECLKEN Set to TRUE<br />

Transmit (TX) Client: 16-Bit Interface<br />

DA SA L/T DATA<br />

<strong>UG194</strong>_3_10_072206<br />

This optional configuration can only be used when the <strong>Ethernet</strong> <strong>MAC</strong> physical interface is<br />

configured in 1000BASE-X PCS/PMA mode.<br />

When a 16-bit client interface is selected, the input clock for the <strong>Ethernet</strong> <strong>MAC</strong> TX client<br />

logic (CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN) should be twice the frequency of the clock used for<br />

the TX client logic in the <strong>FPGA</strong> logic. Figure 6-22, page 170 illustrates how this clocking<br />

scheme is achieved for this mode of operation.<br />

This mode can operate with the <strong>Ethernet</strong> <strong>MAC</strong> TX client logic clocked at 125 MHz and the<br />

logic in the <strong>FPGA</strong> logic clocked at 62.5 MHz. However, this mode allows the <strong>Ethernet</strong><br />

<strong>MAC</strong> TX client logic to operate at up to 250 MHz while the logic in the <strong>FPGA</strong> logic is<br />

clocked at 125 MHz. By using the faster clock speeds, a line rate of up to 2.5 Gb/s can be<br />

achieved. This is greater than 1 Gb/s, as specified in IEEE Std 802.3. Therefore, this<br />

interface should not be used for <strong>Ethernet</strong> compliant designs, but it can be useful for<br />

backplane applications.<br />

“<strong>Ethernet</strong> <strong>MAC</strong> Attributes,” page 42 describes the E<strong>MAC</strong>#_TX16BITCLIENT_ENABLE<br />

attribute, which is set to TRUE for this configuration.<br />

Figure 3-11 shows the timing of a normal outbound frame transfer for the case with an<br />

even number of bytes in the frame. The CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN clock is used as an<br />

input to the <strong>Ethernet</strong> <strong>MAC</strong> and the PHYE<strong>MAC</strong>#MIITXCLK clock<br />

(CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN/2) is used to clock the TX client logic in the <strong>FPGA</strong> logic.<br />

60 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

(CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN/2)<br />

CLIENTE<strong>MAC</strong>#TXD[15:0]<br />

CLIENTE<strong>MAC</strong>#TXDVLD<br />

CLIENTE<strong>MAC</strong>#TXDVLDMSW<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

CLIENTE<strong>MAC</strong>#TXUNDERRUN<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION<br />

E<strong>MAC</strong>#CLIENTTXRETRANSMIT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

(CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN/2)<br />

DA SA DATA<br />

Figure 3-11: 16-Bit Transmit (Even Byte Case)<br />

Transmit (TX) Client: 16-Bit Interface<br />

<strong>UG194</strong>_3_11_072206<br />

Figure 3-12 shows the timing of a normal outbound frame transfer for the case with an odd<br />

number of bytes in the frame.<br />

CLIENTE<strong>MAC</strong>#TXD[15:0]<br />

CLIENTE<strong>MAC</strong>#TXDVLD<br />

CLIENTE<strong>MAC</strong>#TXDVLDMSW<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

CLIENTE<strong>MAC</strong>#TXUNDERRUN<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION<br />

E<strong>MAC</strong>#CLIENTTXRETRANSMIT<br />

DA SA DATA<br />

Figure 3-12: 16-Bit Transmit (Odd Byte Case)<br />

<strong>UG194</strong>_3_12_072206<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 61<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 3: Client Interface<br />

As shown in Figure 3-12, CLIENTE<strong>MAC</strong>#TXDVLDMSW denotes an odd number of bytes in the<br />

frame. In the odd byte case, CLIENTE<strong>MAC</strong>#TXDVLDMSW is deasserted one clock cycle earlier<br />

than the CLIENTE<strong>MAC</strong>#TXDVLD signal, after the transmission of the frame. Otherwise, these<br />

data valid signals are the same as shown in the even byte case (Figure 3-11).<br />

Back-to-Back Transfers<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

(CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN/2)<br />

CLIENTE<strong>MAC</strong>#TXD[15:0]<br />

CLIENTE<strong>MAC</strong>#TXDVLD<br />

CLIENTE<strong>MAC</strong>#TXDVLDMSW<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

CLIENTE<strong>MAC</strong>#TXUNDERRUN<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION<br />

E<strong>MAC</strong>#CLIENTTXRETRANSMIT<br />

For back-to-back transfers, both CLIENTE<strong>MAC</strong>#TXDVLD and CLIENTE<strong>MAC</strong>#TXDVLDMSW must<br />

be deasserted for one PHYE<strong>MAC</strong>#MIITXCLK (half the clock frequency of<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN) clock cycle after the first frame. In the following<br />

PHYE<strong>MAC</strong>#MIITXCLK clock cycle, both CLIENTE<strong>MAC</strong>#TXDLVD and CLIENTE<strong>MAC</strong>#TXDVLDMSW<br />

are asserted High to indicate that the first two bytes of the destination address of the<br />

second frame is ready for transmission on CLIENTE<strong>MAC</strong>#TXD[15:0]. In 16-bit mode, this<br />

one PHYE<strong>MAC</strong>#MIITXCLK clock cycle IFG corresponds to a 2-byte gap (versus a 1-byte gap in<br />

8-bit mode) between frames in the back-to-back transfer.<br />

Figure 3-13 shows the timing diagram for 16-bit transmit for an even-byte case, and<br />

Figure 3-14 shows the timing diagram for an odd-byte case.<br />

D(n-2), D(n-3) D(n), D(n-1) DA1, DA0 DA3, DA2 DA5, DA4<br />

1st Frame IFG 2nd Frame<br />

Figure 3-13: 16-Bit Transmit Back-to-Back Transfer (Even Byte Case)<br />

<strong>UG194</strong>_3_13_072206<br />

62 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

(CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN/2)<br />

CLIENTE<strong>MAC</strong>#TXD[15:0]<br />

CLIENTE<strong>MAC</strong>#TXDVLD<br />

CLIENTE<strong>MAC</strong>#TXDVLDMSW<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

CLIENTE<strong>MAC</strong>#TXUNDERRUN<br />

E<strong>MAC</strong>#CLIENTTXCOLLISION<br />

E<strong>MAC</strong>#CLIENTTXRETRANSMIT<br />

Receive (RX) Client: 8-Bit Interface (without Clock Enables)<br />

D(n-1), D(n-2) 0xXX, D(n)<br />

DA1, DA0 DA3, DA2 DA5, DA4<br />

1st Frame IFG 2nd Frame<br />

Figure 3-14: 16-Bit Transmit Back-to-Back Transfer (Odd Byte Case)<br />

Receive (RX) Client: 8-Bit Interface (without Clock Enables)<br />

This section covers the client receive interface when it is configured to be 8 bits wide and<br />

when the default clocking scheme is used. “<strong>Ethernet</strong> <strong>MAC</strong> Attributes,” page 42 describes<br />

the E<strong>MAC</strong>#_USECLKEN attribute, which is set to FALSE for this configuration. In this<br />

configuration, E<strong>MAC</strong>#CLIENTRXD[15:8] and E<strong>MAC</strong>#CLIENTRXDVLDMSW are left unconnected<br />

because the upper eight bits of the data bus are not required.<br />

See “<strong>Ethernet</strong> <strong>MAC</strong> Clocks,” page 205 for some general information on this standard<br />

clocking scheme. More details are available for specific physical interface configurations in<br />

the following sections:<br />

MII<br />

“MII Standard Clock Management”<br />

GMII<br />

“GMII Clock Management for 1 Gb/s Only”<br />

“GMII Standard Clock Management for <strong>Tri</strong>-Speed Operation”<br />

“GMII Clock Management for <strong>Tri</strong>-Speed Operation Using Byte PHY”<br />

RGMII<br />

“RGMII Clock Management for 1 Gb/s Only”<br />

“RGMII Standard Clock Management for <strong>Tri</strong>-Speed Operation”<br />

SGMII<br />

“SGMII Clock Management (LXT and SXT Devices)”<br />

“SGMII Clock Management (TXT and FXT Devices)”<br />

1000BASE-X<br />

“1000BASE-X PCS/PMA Clock Management (LXT and SXT Devices)”<br />

“1000BASE-X PCS/PMA Clock Management (TXT and FXT Devices)”<br />

<strong>UG194</strong>_3_14_072206<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 63<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 3: Client Interface<br />

Normal Frame Reception<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

The timing of a normal inbound frame transfer is shown in Figure 3-15. The client must<br />

accept data at any time; there is no buffering within the <strong>Ethernet</strong> <strong>MAC</strong> to allow for receive<br />

client latency. After frame reception begins, data is transferred on consecutive clock cycles<br />

to the receive client until the frame is complete. The <strong>Ethernet</strong> <strong>MAC</strong> asserts the<br />

E<strong>MAC</strong>#CLIENTRXGOODFRAME signal to indicate successful receipt of the frame and the ability<br />

to analyze the frame by the client.<br />

E<strong>MAC</strong>#CLIENTRXD[7:0]<br />

E<strong>MAC</strong>#CLIENTRXDVLD<br />

E<strong>MAC</strong>#CLIENTRXGOODFRAME<br />

E<strong>MAC</strong>#CLIENTRXBADFRAME<br />

Figure 3-15: Normal Frame Reception<br />

Frame parameters (destination address, source address, LT, data, and optionally FCS) are<br />

supplied on the data bus as shown in the timing diagram. The abbreviations are the same<br />

as those described in Table 3-1, page 52.<br />

If the LT field has a length interpretation, the inbound frame could be padded to meet the<br />

<strong>Ethernet</strong> minimum frame size specification. This padding is not passed to the client in the<br />

data payload; an exception is when FCS passing is enabled. See “Client-Supplied FCS<br />

Passing,” page 66.<br />

Therefore, when client-supplied FCS passing is disabled, E<strong>MAC</strong>#CLIENTRXDVLD is Low<br />

between frames for the duration of the padding field (if present), the FCS field, carrier<br />

extension (if present), the IFG following the frame, and the preamble field of the next<br />

frame. When client-supplied FCS passing is enabled, E<strong>MAC</strong>#CLIENTRXDVLD is Low between<br />

frames for the duration of carrier extension (if present), the IFG, and the preamble field of<br />

the following frame.<br />

Signal Timing of Good/Bad Frame Pulses<br />

DA SA L/T DATA<br />

<strong>UG194</strong>_3_15_072106<br />

Although the timing diagram in Figure 3-15 shows the E<strong>MAC</strong>#CLIENTRXGOODFRAME signal<br />

asserted shortly after the last valid data on E<strong>MAC</strong>#CLIENTRXD[7:0], this is not always the<br />

case. The E<strong>MAC</strong>#CLIENTRXGOODFRAME or E<strong>MAC</strong>#CLIENTRXBADFRAME signals are asserted only<br />

after completing all the frame checks. These frame checks occur only after receipt of any<br />

padding (if present), followed by the FCS and any carrier extension (if present). Therefore,<br />

either E<strong>MAC</strong>#CLIENTRXGOODFRAME or E<strong>MAC</strong>#CLIENTRXBADFRAME is asserted following frame<br />

reception at the beginning of the IFG.<br />

64 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Frame Reception with Errors<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

Receive (RX) Client: 8-Bit Interface (without Clock Enables)<br />

An unsuccessful frame reception (for example, a fragment frame or a frame with an<br />

incorrect FCS) is shown in Figure 3-16. In this case, the E<strong>MAC</strong>#CLIENTRXBADFRAME signal is<br />

asserted to the client after the end of the frame. The client is responsible for dropping the<br />

data already transferred for this frame.<br />

E<strong>MAC</strong>#CLIENTRXD[7:0]<br />

E<strong>MAC</strong>#CLIENTRXDVLD<br />

E<strong>MAC</strong>#CLIENTRXGOODFRAME<br />

E<strong>MAC</strong>#CLIENTRXBADFRAME<br />

The following conditions cause the assertion of BAD_FRAME:<br />

Standard Conditions<br />

Figure 3-16: Frame Reception with Error<br />

FCS errors occur.<br />

Packets are shorter than 64 bytes (undersize or fragment frames).<br />

Jumbo frames are received when jumbo frames are not enabled.<br />

The length/type field is length, but the real length of the received frame does not<br />

match the value in the length/type field (when length/type checking is enabled).<br />

The length/type field is length, in which the length value is less than 46. In this<br />

situation, the frame should be padded to minimum length. If it is not padded to<br />

exactly minimum frame length, the frame is marked as bad (when length/type<br />

checking is enabled).<br />

Any control frame that is received is not exactly the minimum frame length.<br />

PHYE<strong>MAC</strong>#RXER is asserted at any point during frame reception.<br />

An error code is received in the 1-Gigabit frame extension field.<br />

A valid pause frame, addressed to the <strong>MAC</strong>, is received when flow control is enabled.<br />

Please see “Flow Control Block” for more information.<br />

1000BASE-X/SGMII Specific Conditions<br />

DA SA L/T DATA<br />

<strong>UG194</strong>_3_16_072106<br />

When in 1000BASE-X mode or SGMII mode, the following errors can also cause a frame to<br />

be marked as bad:<br />

Unrecognized 8B/10B code group received during the packet.<br />

8B/10B running disparity errors occur during the packet.<br />

Unexpected K characters or sequences appearing in the wrong order/byte position.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 65<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 3: Client Interface<br />

Client-Supplied FCS Passing<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXD[7:0]<br />

E<strong>MAC</strong>#CLIENTRXDVLD<br />

E<strong>MAC</strong>#CLIENTRXGOODFRAME<br />

E<strong>MAC</strong>#CLIENTRXBADFRAME<br />

Figure 3-17 shows how the <strong>Ethernet</strong> <strong>MAC</strong> is configured to pass the FCS field to the client<br />

(see “Configuration Registers,” page 88). In this case, any padding inserted into the frame<br />

to meet <strong>Ethernet</strong> minimum frame length specifications is left intact and passed to the<br />

client. Even though the FCS is passed up to the client, it is also verified by the <strong>Ethernet</strong><br />

<strong>MAC</strong>, and E<strong>MAC</strong>#CLIENTRXBADFRAME is asserted if the FCS check fails.<br />

VLAN Tagged Frames<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXD[7:0]<br />

E<strong>MAC</strong>#CLIENTRXDVLD<br />

E<strong>MAC</strong>#CLIENTRXGOODFRAME<br />

E<strong>MAC</strong>#CLIENTRXBADFRAME<br />

DA SA L/T DATA FCS<br />

Figure 3-17: Frame Reception with In-Band FCS Field<br />

The reception of a VLAN tagged frame (if enabled) is shown in Figure 3-18. The VLAN<br />

frame is passed to the client to identify the frame as VLAN tagged. This is followed by the<br />

tag control information bytes, V1 and V2. The length/type field after the tag control<br />

information bytes is not checked for errors. More information on the interpretation of these<br />

bytes is described in the IEEE Std 802.3-2002 standard.<br />

81 00 V1V2<br />

DA SA VLAN<br />

Tag<br />

L/T DATA<br />

Figure 3-18: Reception of a VLAN Tagged Frame<br />

Maximum Permitted Frame Length/Jumbo Frames<br />

<strong>UG194</strong>_3_17_072106<br />

<strong>UG194</strong>_3_18_072106<br />

The maximum length of a frame specified in the IEEE Std 802.3-2002 standard is 1518 bytes<br />

for non-VLAN tagged frames. VLAN tagged frames can be extended to 1522 bytes. When<br />

jumbo frame handling is disabled and the <strong>Ethernet</strong> <strong>MAC</strong> receives a frame exceeding the<br />

66 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Receive (RX) Client: 8-Bit Interface (with Clock Enables)<br />

maximum legal length, E<strong>MAC</strong>#CLIENTRXBADFRAME is asserted. When jumbo frame<br />

handling is enabled, frames longer than the legal maximum are received in the same way<br />

as shorter frames.<br />

For more information on enabling and disabling jumbo frame handling, see<br />

“Configuration Registers,” page 88.<br />

Length/Type Field Error Checks<br />

Enabled<br />

Length/Type Field Error checking is specified in IEEE Std 802.3. This functionality must be<br />

enabled to comply with this specification. Disabling Length/Type checking is intended<br />

only for specific applications, such as when using over a proprietary backplane.<br />

When length/type error checking is enabled (see “Receiver Configuration Register (Word<br />

1),” page 89), the following checks are made on all frames received. (If either of these<br />

checks fails, E<strong>MAC</strong>#CLIENTRXBADFRAME is asserted):<br />

A value greater than or equal to decimal 46 but less than decimal 1500 (a length<br />

interpretation) in the length/type field is checked against the actual data length<br />

received.<br />

A value less than decimal 46 in the length/type field is checked to ensure the data<br />

field is padded to exactly 46 bytes. The resultant frame is now the minimum frame<br />

size of 64 bytes total in length.<br />

Furthermore, if padding is indicated (the length/type field is less than decimal 46) and<br />

client-supplied FCS passing is disabled, then the length value in the length/type field is<br />

used to deassert E<strong>MAC</strong>#CLIENTRXDVLD after the indicated number of data bytes removing<br />

the padding bytes from the frame.<br />

When a frame is a VLAN frame, only the initial length/type field containing the VLAN<br />

type 0x8100 is checked and interpreted as a type. The subsequent length/type field in the<br />

VLAN frame is not checked.<br />

Disabled<br />

When the length/type error checking is disabled (see “Receiver Configuration Register<br />

(Word 1),” page 89), the length/type error checks previously described are not performed.<br />

A frame containing only these errors causes E<strong>MAC</strong>#CLIENTRXGOODFRAME to be asserted.<br />

Furthermore, if padding is indicated and client-supplied FCS passing is disabled, then a<br />

length value in the length/type field is not used to deassert E<strong>MAC</strong>#CLIENTRXDVLD.<br />

Instead E<strong>MAC</strong>#CLIENTRXDVLD is deasserted before the start of the FCS field; in this way,<br />

any padding is not removed from the frame.<br />

It should be noted that an illegal length frame, e.g., a frame of less than 64 bytes in total<br />

length, is still marked as bad. In addition, the disabling of Length/Type checks has no<br />

effect on control frames. If a control frame is received that is not 64 bytes in total length, it<br />

is still marked as a bad frame.<br />

Receive (RX) Client: 8-Bit Interface (with Clock Enables)<br />

This section covers the client receive interface when it is configured to be 8 bits wide and<br />

when the optional clock enable clocking scheme is used. This optional configuration can be<br />

used when the <strong>Ethernet</strong> <strong>MAC</strong> is configured in MII/GMII or RGMII mode. “<strong>Ethernet</strong> <strong>MAC</strong><br />

TE<strong>MAC</strong> User Guide www.xilinx.com 67<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 3: Client Interface<br />

Attributes,” page 42 describes the E<strong>MAC</strong>#_USECLKEN attribute, which is set to TRUE for<br />

this configuration.<br />

In this mode, the client interface is synchronous to the physical interface clock. This<br />

configuration reduces the number of BUFGs that are used to implement the <strong>Ethernet</strong> <strong>MAC</strong><br />

design. See “<strong>Ethernet</strong> <strong>MAC</strong> Clocks,” page 205 for some general information on this<br />

clocking scheme. More details are available for specific physical interface configurations in<br />

the following sections:<br />

“MII Clock Management using Clock Enables”<br />

“GMII Clock Management for <strong>Tri</strong>-Speed Operation Using Clock Enables”<br />

“RGMII Clock Management for <strong>Tri</strong>-Speed Operation Using Clock Enables”<br />

For the receive interface, the PHYE<strong>MAC</strong>#RXCLK signal is used as the clock, and the<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT signal is used as the clock enable.<br />

Figure 3-19 shows the timing of a normal inbound frame transfer at 1 Gb/s. Data is<br />

transferred to the client on the rising edge of PHYE<strong>MAC</strong>#RXCLK. The output clock enable,<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT, is held High.<br />

PHYE<strong>MAC</strong>#RXCLK<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

E<strong>MAC</strong>#CLIENTRXD[7:0]<br />

E<strong>MAC</strong>#CLIENTRXDVLD<br />

E<strong>MAC</strong>#CLIENTRXGOODFRAME<br />

E<strong>MAC</strong>#CLIENTRXBADFRAME<br />

DA SA L/T DATA<br />

<strong>UG194</strong>_3_19_072106<br />

Figure 3-19: Normal Frame Reception at 1 Gb/s with E<strong>MAC</strong>#_USECLKEN Set to TRUE<br />

Figure 3-20 shows the reception of a frame at speeds below 1 Gb/s. The physical interface<br />

clock runs at twice the speed of the client interface clock and so the output clock enable,<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT, is only asserted on every second cycle of<br />

68 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Receive (RX) Client: 16-Bit Interface<br />

PHYE<strong>MAC</strong>#RXCLK. Data is written into the client on the rising edge of PHYE<strong>MAC</strong>#RXCLK<br />

when E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT is High.<br />

PHYE<strong>MAC</strong>#RXCLK<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

E<strong>MAC</strong>#CLIENTRXD[7:0]<br />

E<strong>MAC</strong>#CLIENTRXDVLD<br />

E<strong>MAC</strong>#CLIENTRXGOODFRAME<br />

E<strong>MAC</strong>#CLIENTRXBADFRAME<br />

Figure 3-20: Normal Frame Reception at 10/100 Mb/s with E<strong>MAC</strong>#_USECLKEN Set to TRUE<br />

Receive (RX) Client: 16-Bit Interface<br />

DA SA L/T DATA<br />

<strong>UG194</strong>_3_20_072106<br />

This optional configuration can only be used when the <strong>Ethernet</strong> <strong>MAC</strong> physical interface is<br />

configured in 1000BASE-X PCS/PMA mode.<br />

When a 16-bit client interface is selected, the input clock for the <strong>Ethernet</strong> <strong>MAC</strong> RX client<br />

logic (CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN) should be twice the frequency of the clock used for<br />

the RX client logic in the <strong>FPGA</strong> logic. Figure 6-22, page 170 illustrates how this clocking<br />

scheme is achieved for this mode of operation.<br />

This mode can operate with the <strong>Ethernet</strong> <strong>MAC</strong> RX client logic clocked at 125 MHz and the<br />

logic in the <strong>FPGA</strong> logic clocked at 62.5 MHz. However, this mode allows the <strong>Ethernet</strong><br />

<strong>MAC</strong> RX client logic to operate at up to 250 MHz while the logic in the <strong>FPGA</strong> logic is<br />

clocked at 125 MHz. By using the faster clock speeds, a line rate of up to 2.5 Gb/s can be<br />

achieved. This is greater than 1 Gb/s as specified in IEEE Std 802.3. Therefore, this<br />

interface should not be used for <strong>Ethernet</strong>-compliant designs, but it can be useful for<br />

backplane applications.<br />

“<strong>Ethernet</strong> <strong>MAC</strong> Attributes,” page 42 describes the E<strong>MAC</strong>#_RX16BITCLIENT_ENABLE<br />

attribute, which is set to TRUE for this configuration.<br />

Figure 3-21 shows the timing of a normal inbound frame transfer for the case with an even<br />

number of bytes in the frame. The CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN clock is used as an<br />

input to the <strong>Ethernet</strong> <strong>MAC</strong> and the PHYE<strong>MAC</strong>#RXCLK clock<br />

(CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN/2) is used to clock the RX client logic in the <strong>FPGA</strong> logic.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 69<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 3: Client Interface<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

PHYE<strong>MAC</strong>#RXCLK<br />

(CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN/2)<br />

E<strong>MAC</strong>#CLIENTRXD[15:0]<br />

E<strong>MAC</strong>#CLIENTRXDVLD<br />

E<strong>MAC</strong>#CLIENTRXDVLDMSW<br />

E<strong>MAC</strong>#CLIENTRXGOODFRAME<br />

E<strong>MAC</strong>#CLIENTRXBADFRAME<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

PHYE<strong>MAC</strong>#RXCLK<br />

(CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN/2)<br />

DA SA DATA<br />

Figure 3-21: 16-Bit Receive (Even Byte Case)<br />

Figure 3-22 shows the timing of a normal inbound frame transfer for the case with an odd<br />

number of bytes in the frame.<br />

E<strong>MAC</strong>#CLIENTRXD[15:0]<br />

E<strong>MAC</strong>#CLIENTRXDVLD<br />

E<strong>MAC</strong>#CLIENTRXDVLD MSW<br />

E<strong>MAC</strong>#CLIENTRXGOODFRAME<br />

E<strong>MAC</strong>#CLIENTRXBADFRAME<br />

DA SA DATA<br />

Figure 3-22: 16-Bit Receive (Odd Byte Case)<br />

<strong>UG194</strong>_3_21_072106<br />

<strong>UG194</strong>_3_22_072106<br />

As shown in Figure 3-21 and Figure 3-22, E<strong>MAC</strong>#CLIENTRXDVLDMSW is used to denote an<br />

odd number of bytes in the frame. The data valid signals are shown in the even byte case<br />

(Figure 3-21). In the odd byte case (Figure 3-22), E<strong>MAC</strong>#CLIENTRXDVLDMSW is deasserted<br />

one clock cycle earlier compared to the E<strong>MAC</strong>#CLIENTRXDVLD signal, after the reception of<br />

the frame. E<strong>MAC</strong>#CLIENTRXD[7:0] contains the data in this odd byte case.<br />

70 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Address Filtering<br />

Address Filtering<br />

The address filtering block accepts or rejects frames by examining the destination address<br />

of an incoming frame. This block includes:<br />

Matching of programmable unicast destination address<br />

Matching of four additional programmable general addresses<br />

Broadcast address recognition (0xFFFF_FFFF_FFFF)<br />

Optional pass-through mode with address filter disabled (promiscuous mode)<br />

Pause control frame address recognition (0x0100_00C2_8001)<br />

The Address Filter (AF) protects the client from extraneous traffic. With this technique, the<br />

hardware matches the Destination Address (DA) field of the <strong>Ethernet</strong> <strong>MAC</strong> frame. This<br />

relieves the task from the bus and software.<br />

The AF is programmed in software through the host interface. Pause-frame addresses and<br />

broadcast address are hardwired; they do not need to be programmed. The AF can be<br />

enabled and disabled under software control, using an enable bit in the control register. See<br />

“Address Filter Registers,” page 94 for the control register.<br />

When the function is enabled, <strong>Ethernet</strong> frames are passed to the client interface only if they<br />

pass the filter. When the AF function is disabled, all incoming RX frames are passed to the<br />

client interface.<br />

For system monitoring, the event of a frame failing the filter is signaled. Equally, when a<br />

frame passes the filter, a match is indicated to the client by using the output pins<br />

E<strong>MAC</strong>#CLIENTRXDVLD and E<strong>MAC</strong>#CLIENTRXFRAMEDROP together. Table 3-2 shows the<br />

values of the two signals for possible outcomes of an incoming RX frame when the AF is<br />

enabled.<br />

When the AF is enabled, it is impossible to determine if there is an incoming RX frame or<br />

if the AF has rejected incoming RX frames (using only E<strong>MAC</strong>#CLIENTRXDVLD) because in<br />

both cases, E<strong>MAC</strong>#CLIENTRXDVLD is deasserted. However, using the<br />

E<strong>MAC</strong>#CLIENTRXFRAMEDROP signal, the nature of an incoming RX frame can be<br />

distinguished for system monitoring. See Table 3-2.<br />

Table 3-2: E<strong>MAC</strong>#CLIENTRXDVLD and E<strong>MAC</strong>#CLIENTRXFRAMEDROP Values<br />

Result of an Incoming RX Frame E<strong>MAC</strong>#CLIENTRXDVLD E<strong>MAC</strong>#CLIENTRXFRAMEDROP<br />

No frame received 0 0<br />

Frame received and AF address match 1 0<br />

Frame received and no AF address match 0 1<br />

Frame received and no AF address match but AF<br />

disabled<br />

Address Filter Attributes<br />

1 1<br />

Frame received and AF address match but AF disabled 1 0<br />

The unicast address register, pause frame source address, and address filter promiscuous<br />

mode bit are set by attributes when the <strong>FPGA</strong> is configured. In this way, the address filter<br />

performs functions with the unicast address without using the host interface. The four<br />

general address register values are not included as attributes.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 71<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 3: Client Interface<br />

When the host interface is used, all the address filter registers are accessible by software,<br />

using either the DCR bus or the generic host bus. The attribute settings of the registers can<br />

be overridden by the software through the host interface. Also, the four general address<br />

registers are programmed through the host interface.<br />

Client RX Data/Control Interface<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

The AF generates the E<strong>MAC</strong>#CLIENTRXFRAMEDROP signal to inform the client that the<br />

destination <strong>MAC</strong> address of an incoming receive <strong>Ethernet</strong> frame does not match any of the<br />

acceptable addresses stored in the AF. This control signal is asserted regardless of whether<br />

the AF is enabled or disabled (promiscuous mode).<br />

Figure 3-23 shows the timing diagram when a frame matches a valid location in the AF<br />

(8-bit mode).<br />

E<strong>MAC</strong>#CLIENTRXDVLD<br />

E<strong>MAC</strong>#CLIENTRXD[7:0]<br />

E<strong>MAC</strong>#CLIENTRXGOODFRAME<br />

E<strong>MAC</strong>#CLIENTRXFRAMEDROP<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

Previous Frame<br />

Dropped<br />

n–2 n–1 n n+1 n+2 n+3 n+4 n+5 n+6 n+7<br />

Figure 3-23: Frame Matching Timing Diagram (8-Bit <strong>Mode</strong>)<br />

DA SA<br />

Current Frame<br />

Passed<br />

<strong>UG194</strong>_3_23_081806<br />

Figure 3-24 shows the timing diagram when a frame matches a valid location in the AF<br />

(16-bit mode).<br />

PHYE<strong>MAC</strong>#RXCLK<br />

E<strong>MAC</strong>#CLIENTRXDVLD<br />

E<strong>MAC</strong>#CLIENTRXDVLDMSW<br />

E<strong>MAC</strong>#CLIENTRXD[15:0]<br />

E<strong>MAC</strong>#CLIENTRXGOODFRAME<br />

E<strong>MAC</strong>#CLIENTRXFRAMEDROP<br />

Previous Frame<br />

Dropped<br />

n–5 n–4 n–3 n–2 n–1 n n+1 n+2 n+3 n+4 n+5 n+6<br />

Figure 3-24: Frame Matching Timing Diagram (16-Bit <strong>Mode</strong>)<br />

DA1, DA0 DA3, DA2 DA5, DA4<br />

Current Frame<br />

Passed<br />

72 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

DA<br />

<strong>UG194</strong>_3_24_081806<br />

R


R<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

Flow Control Block<br />

Flow Control Block<br />

Figure 3-25 shows the timing diagram when a frame fails to match a valid location in the<br />

AF (8-bit mode) and the frame drop signal is generated.<br />

E<strong>MAC</strong>#CLIENTRXDVLD<br />

E<strong>MAC</strong>#CLIENTRXD[7:0]<br />

E<strong>MAC</strong>#CLIENTRXGOODFRAME<br />

E<strong>MAC</strong>#CLIENTRXFRAMEDROP<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

Previous Frame<br />

Passed<br />

n–2 n–1 n n+1 n+2 n+3 n+4 n+5 n+6 n+7<br />

Figure 3-25: Frame Matching Failed Timing Diagram (8-Bit <strong>Mode</strong>)<br />

DA SA<br />

Current Frame<br />

Dropped<br />

<strong>UG194</strong>_3_25_081006<br />

Figure 3-26 shows the timing diagram when a frame fails to match a valid location in the<br />

AF (16-bit mode) and the frame drop signal is generated.<br />

PHYE<strong>MAC</strong>#RXCLK<br />

E<strong>MAC</strong>#CLIENTRXDVLD<br />

E<strong>MAC</strong>#CLIENTRXDVLDMSW<br />

E<strong>MAC</strong>#CLIENTRXD[15:0]<br />

E<strong>MAC</strong>#CLIENTRXGOODFRAME<br />

E<strong>MAC</strong>#CLIENTRXFRAMEDROP<br />

Previous Frame<br />

Passed<br />

n–5 n–4 n–3 n–2 n–1 n n+1 n+2 n+3 n+4 n+5 n+6<br />

Figure 3-26: Frame Matching Failed Timing Diagram (16-Bit <strong>Mode</strong>)<br />

DA1, DA0 DA3, DA2 DA5, DA4<br />

Current Frame<br />

Dropped<br />

The flow control block is designed to clause 31 of the IEEE Std 802.3-2005 standard. The<br />

<strong>Ethernet</strong> <strong>MAC</strong> can be configured to send PAUSE frames and to act upon the PAUSE<br />

frame's reception during full-duplex operation. These two behaviors can be configured<br />

asymmetrically (see “Configuration Registers,” page 88).<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 73<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

DA<br />

<strong>UG194</strong>_3_26_081806


Chapter 3: Client Interface<br />

Requirement for Flow Control<br />

Figure 3-27 illustrates the requirement for flow control. The <strong>Ethernet</strong> <strong>MAC</strong> on the right<br />

side of the figure has a reference clock slightly faster than the nominal 125 MHz. The<br />

<strong>Ethernet</strong> <strong>MAC</strong> on the left side of the figure has a reference clock slightly slower than the<br />

nominal 125 MHz. This results in the <strong>Ethernet</strong> <strong>MAC</strong> on the left side of the figure not being<br />

able to match the full line rate of the <strong>Ethernet</strong> <strong>MAC</strong> on the right side (due to clock<br />

tolerances). The left <strong>Ethernet</strong> <strong>MAC</strong> is illustrated as performing a loopback<br />

implementation; this results in the FIFO filling up over time. Without flow control, this<br />

FIFO eventually fills and overflows, resulting in the corruption or loss of <strong>Ethernet</strong> frames.<br />

Application<br />

Flow Control Basics<br />

Client Logic<br />

FIFO<br />

Figure 3-27: Requirement for Flow Control<br />

An <strong>Ethernet</strong> <strong>MAC</strong> transmits a pause control frame for the link partner to cease<br />

transmission for a defined period of time. For example, the left <strong>Ethernet</strong> <strong>MAC</strong> of<br />

Figure 3-27 initiates a pause request when the client FIFO (illustrated) reaches a nearly full<br />

state.<br />

An <strong>Ethernet</strong> <strong>MAC</strong> responds to received pause control frames by ceasing transmission of<br />

frames for the period of time defined in the received pause control frame. For example, the<br />

right <strong>Ethernet</strong> <strong>MAC</strong> of Figure 3-27 ceases transmission after receiving the pause control<br />

frame transmitted by the left <strong>Ethernet</strong> <strong>MAC</strong>. In a well-designed system, the right <strong>Ethernet</strong><br />

<strong>MAC</strong> ceases transmission before the client FIFO of the left <strong>Ethernet</strong> <strong>MAC</strong> overflows. This<br />

provides time to empty the FIFO to a safe level before normal operation resumes. It also<br />

safeguards the system against FIFO overflow conditions and frame loss.<br />

74 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

<strong>MAC</strong><br />

TX<br />

RX<br />

125 MHz –100 ppm<br />

125 MHz +100 ppm<br />

<strong>MAC</strong><br />

RX<br />

TX<br />

<strong>UG194</strong>_3_27_072606<br />

R


R<br />

Transmitting a PAUSE Control Frame<br />

Flow Control Block<br />

The client initiates a flow control frame by asserting CLIENTE<strong>MAC</strong>#PAUSEREQ when the<br />

pause value is on the CLIENTE<strong>MAC</strong>#PAUSEVAL[15:0] bus. When the optional clock<br />

enables are not used, these signals are synchronous to CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN.<br />

The timing is shown in Figure 3-28.<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#PAUSEVAL[15:0]<br />

When the optional clock enable clocking scheme is used, the signals are synchronous to<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN. These signals are written into the <strong>Ethernet</strong> <strong>MAC</strong> when the<br />

enable signal, E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT, is High.<br />

When the <strong>Ethernet</strong> <strong>MAC</strong> is configured to support transmit flow control, a PAUSE control<br />

frame is transmitted on the link. When CLIENTE<strong>MAC</strong>#PAUSEREQ is asserted, the PAUSE<br />

parameter is set to the CLIENTE<strong>MAC</strong>#PAUSEVAL[15:0] value. This does not disrupt any<br />

frame transmission in progress, but it takes priority over any pending frame transmission.<br />

The PAUSE control frame is transmitted even if the transmitter is in a paused state. An<br />

example of a PAUSE frame (not drawn to scale) is shown in Figure 3-29.<br />

Pause Destination<br />

Address<br />

01-80-C2-00-00-01<br />

CLIENTE<strong>MAC</strong>#PAUSEREQ<br />

The pause source address can be configured using the “Configuration Registers,” page 88.<br />

The pause time transmitted in the PAUSE frame is the current sampled<br />

CLIENTE<strong>MAC</strong>#PAUSEVAL[15:0] value.<br />

Because only a single pause control frame request is stored by the transmitter, if<br />

CLIENTE<strong>MAC</strong>#PAUSEREQ is asserted multiple times prior to the transmission of a control<br />

pause frame (i.e., while the previous frame transmission is still in progress), only a single<br />

pause frame is transmitted.<br />

Receiving a PAUSE Control Frame<br />

Figure 3-28: Pause Request Timing<br />

Source<br />

Address<br />

<strong>MAC</strong><br />

Control<br />

Type<br />

0x8808<br />

64-Byte Data Field<br />

<strong>MAC</strong><br />

Control<br />

OPCODE<br />

0x0001<br />

Figure 3-29: Pause Frame Example<br />

<strong>UG194</strong>_3_28_072106<br />

When an error-free frame is received by the <strong>Ethernet</strong> <strong>MAC</strong>, it examines the following<br />

information:<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 75<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

Pause<br />

Time<br />

46-Byte Data Field<br />

FCS<br />

<strong>UG194</strong>_3_29_072106


Chapter 3: Client Interface<br />

The destination address field is matched against the <strong>Ethernet</strong> <strong>MAC</strong> control multicast<br />

address (01-80-C2-00-00-01) and the configured address for the <strong>Ethernet</strong> <strong>MAC</strong><br />

(see “Address Filter Registers,” page 94).<br />

The LT field is matched against the <strong>Ethernet</strong> <strong>MAC</strong> control type code.<br />

If the second match is TRUE, the OPCODE field contents are matched against the<br />

<strong>Ethernet</strong> <strong>MAC</strong> control OPCODE for pause frames.<br />

If the frame passes all of the previous checks, is of minimum legal size, and the <strong>Ethernet</strong><br />

<strong>MAC</strong> flow control logic for the receiver is enabled, then the pause value parameter in the<br />

frame is used to inhibit transmitter operation for a time defined in the IEEE Std 802.3-2002<br />

specification. This inhibit is implemented by delaying the assertion of<br />

E<strong>MAC</strong>#CLIENTTXACK at the transmitter client interface until the requested pause duration<br />

has expired. Because the received pause frame has been acted upon, it is passed to the<br />

client with E<strong>MAC</strong>#CLIENTRXBADFRAME asserted, indicating to the client that the frame<br />

should be dropped.<br />

If the second match is TRUE and the frame is not exactly 64 bytes in length, the reception<br />

of any frame is considered to be an invalid control frame. This frame is ignored by the flow<br />

control logic and passed to the client with E<strong>MAC</strong>#CLIENTRXBADFRAME asserted.<br />

E<strong>MAC</strong>#CLIENTRXBADFRAME will be asserted even if flow control is not enabled.<br />

If any of the previous matches are FALSE or if the <strong>Ethernet</strong> <strong>MAC</strong> flow control logic for the<br />

receiver is disabled, the frame is ignored by the flow control logic and is passed on to the<br />

client. It is the responsibility of the receiver client logic to drop any frames where the LT<br />

field matches the <strong>Ethernet</strong> <strong>MAC</strong> control type code. The receiver statistics vector (bit 19)<br />

indicates if the previous frame is a control frame. See “Receiver Statistics Vector” for more<br />

information.<br />

Flow Control Implementation Example<br />

Method<br />

In the system illustrated in Figure 3-27, the <strong>Ethernet</strong> <strong>MAC</strong> on the left side of the figure<br />

cannot match the full line rate of the right <strong>Ethernet</strong> <strong>MAC</strong> due to clock tolerances. Over<br />

time, the FIFO fills and overflows.<br />

This example implements a flow control method to reduce, over a long time period, the full<br />

line rate of the right <strong>Ethernet</strong> <strong>MAC</strong> to less than the full line rate capability of the left<br />

<strong>Ethernet</strong> <strong>MAC</strong>.<br />

1. Choose a FIFO with a nearly full occupancy threshold. A 7/8 occupancy is used in this<br />

description, but the choice of threshold is implementation specific. When the<br />

occupancy of the FIFO exceeds this occupancy, initiate a single pause control frame<br />

with 0xFFFF used as the pause_quantum duration (0xFFFF is placed on<br />

pause_val[15:0]). This is the maximum pause duration and causes the right<br />

<strong>Ethernet</strong> <strong>MAC</strong> to cease transmission and the FIFO of the left <strong>Ethernet</strong> <strong>MAC</strong> to start<br />

emptying.<br />

2. Choose a second FIFO with an occupancy threshold of 1/2 (the choice of threshold is<br />

implementation specific). When the occupancy of the FIFO falls below this occupancy,<br />

initiate a second pause control frame with 0x0000 used as the pause_quantum duration<br />

(0x0000 is placed on pause_val[15:0]). This indicates a zero pause duration, and<br />

upon receiving this pause control frame, the right <strong>Ethernet</strong> <strong>MAC</strong> immediately resumes<br />

transmission (there is no wait for the original requested pause duration to expire). This<br />

PAUSE control frame can, therefore, be considered a Pause Cancel command.<br />

76 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Operation<br />

Figure 3-30 illustrates the FIFO occupancy over time.<br />

FIFO Occupancy<br />

Full<br />

7/8<br />

1/2<br />

Empty<br />

Flow Control Block<br />

Figure 3-30: Flow Control Implementation <strong>Tri</strong>ggered from FIFO Occupancy<br />

The FIFO occupancy of the left <strong>Ethernet</strong> <strong>MAC</strong> gradually increases over time due to<br />

the clock tolerances. At point A, the occupancy has reached the threshold of 7/8 full,<br />

triggering the maximum duration pause control frame request.<br />

Upon receiving the pause control frame, the right <strong>Ethernet</strong> <strong>MAC</strong> ceases transmission<br />

at point B. The system designer should ensure sufficient space in the FIFO above the<br />

threshold (point A) to allow the transmitter to stop.<br />

After the right <strong>Ethernet</strong> <strong>MAC</strong> ceases transmission, the occupancy of the FIFO attached<br />

to the left <strong>Ethernet</strong> <strong>MAC</strong> empties. The occupancy falls to the second threshold of 1/2<br />

occupancy at point C, triggering the zero duration pause control frame request (the<br />

pause cancel command).<br />

Upon receiving this second pause control frame, the right hand <strong>Ethernet</strong> <strong>MAC</strong><br />

resumes transmission. To create an efficient system with the maximum possible line<br />

rate, the system designer should ensure sufficient space in the FIFO, below the<br />

threshold (point C), to prevent the FIFO emptying before transmission starts at point<br />

D.<br />

Normal operation resumes, and the FIFO occupancy again gradually increases over<br />

time. At point E, the flow control cycle repeats.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 77<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

A<br />

C<br />

B<br />

D<br />

E<br />

Time<br />

<strong>UG194</strong>_3_30_072106


Chapter 3: Client Interface<br />

Statistics Vectors<br />

Transmitter Statistics Vector<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

TX_STATISTICS_VALID<br />

(internal signal)<br />

TX_STATISTICS_VECTOR[31:0]<br />

(internal signal)<br />

E<strong>MAC</strong>#CLIENTTXSTATSVLD<br />

E<strong>MAC</strong>#CLIENTTXSTATS<br />

TX_STATISTICS_VECTOR contains the statistics for the frame transmitted. The<br />

TX_STATISTICS_VECTOR is a 32-bit vector and an internal signal. This vector is muxed<br />

out to a one-bit signal, E<strong>MAC</strong>#CLIENTTXSTATS, as shown in Figure 3-31 , following frame<br />

transmission. For standard clock management, the vector is driven synchronously by the<br />

transmitter clock, CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN. For alternative clock management,<br />

including the use of clock enables, the vector is driven synchronously to other TX client<br />

logic signals. See Chapter 6, “Physical Interface,” for relevant clocking networks.<br />

The bit-field definition for the transmitter statistics vector is defined in Table 3-3, page 80.<br />

0 1 2 3 4 5 28 29 30 31<br />

Figure 3-31: Transmitter Statistics Mux Timing<br />

<strong>UG194</strong>_03_31_072106<br />

The block diagram for the transmitter statistics MUX in the <strong>Ethernet</strong> <strong>MAC</strong> is shown in<br />

Figure 3-32.<br />

78 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

<strong>Ethernet</strong> <strong>MAC</strong> Block<br />

E<strong>MAC</strong>#CLIENTTXSTATSBYTEVLD<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

TX_STATISTICS_VECTOR[31:0]<br />

(Internal Signal)<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

TXSTATSMUX<br />

TXSTATSDEMUX<br />

User-Defined<br />

Statistics Processing Block<br />

Figure 3-32: Transmitter Statistics MUX Block Diagram<br />

Statistics Vectors<br />

TX_STATISTICS_VALID<br />

(Internal Signal)<br />

<strong>UG194</strong>_3_32_071509<br />

All bit fields in E<strong>MAC</strong>#CLIENTTXSTATS are only valid when E<strong>MAC</strong>#CLIENTTXSTATSVLD<br />

is asserted as illustrated in Figure 3-33. E<strong>MAC</strong>#CLIENTTXSTATSBYTEVLD is asserted if an<br />

<strong>Ethernet</strong> <strong>MAC</strong> frame byte (DA to FCS inclusive) is being transmitted. The signal is valid on<br />

every CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN cycle.<br />

TX_STATISTICS_VECTOR (bits 28 down to 20 inclusive) are only for half-duplex mode.<br />

When operating in full-duplex mode, these bits are reset to a logic 0.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 79<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

[31:0]<br />

E<strong>MAC</strong>#CLIENTTXSTATS<br />

RESET<br />

TXSTATSVEC [31:0]<br />

E<strong>MAC</strong>#CLIENTTXSTATSVLD<br />

TXSTATSVLD<br />

<strong>FPGA</strong> Logic


Chapter 3: Client Interface<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#TXD[7:0]<br />

CLIENTE<strong>MAC</strong>#TXDVLD<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

E<strong>MAC</strong>#CLIENTTXSTATSBYTEVLD<br />

E<strong>MAC</strong>#CLIENTTXSTATSVLD<br />

E<strong>MAC</strong>#CLIENTTXSTATS<br />

DA SA L/T DATA<br />

Figure 3-33: Transmitter Statistics Vector Timing<br />

Table 3-3: Bit Definitions for the Transmitter Statistics Vector<br />

TX_STATISTICS_VECTOR Name Description<br />

0 1 31<br />

<strong>UG194</strong>_3_33_081006<br />

31 PAUSE_FRAME_TRANSMITTED Asserted if the previous frame was a pause frame<br />

initiated by the <strong>Ethernet</strong> <strong>MAC</strong> in response to<br />

asserting CLIENTE<strong>MAC</strong>#PAUSEREQ.<br />

30 Reserved Undefined.<br />

29 Reserved Returns a logic 0.<br />

[28:25] (1) TX_ATTEMPTS[3:0] The number of attempts made to transmit the<br />

previous frame. A 4-bit number where 0 is one<br />

attempt; 1 is two attempts...up to 15 to describe 16<br />

attempts.<br />

24 (1) Reserved Returns a logic 0.<br />

23 (1) EXCESSIVE_COLLISION Asserted if a collision is detected on each of the last<br />

16 attempts to transmit the previous frame.<br />

22 (1) LATE_COLLISION Asserted if a late collision occurred during frame<br />

transmission.<br />

21 (1) EXCESSIVE_DEFERRAL Asserted if the previous frame was deferred for an<br />

excessive amount of time as defined by the<br />

maxDeferTime constant in the IEEE Std 802.3-2002<br />

specification.<br />

20 (1) TX_DEFERRED Asserted if transmission of the frame was deferred.<br />

19 VLAN_FRAME Asserted if the previous frame contains a VLAN<br />

identifier in the LT field when transmitter VLAN<br />

operation is enabled.<br />

[18:5] FRAME_LENGTH_COUNT The length of the previous frame in number of bytes.<br />

The count sticks at 16383 for jumbo frames larger<br />

than this value. Stops at 16383.<br />

80 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Table 3-3: Bit Definitions for the Transmitter Statistics Vector (Cont’d)<br />

TX_STATISTICS_VECTOR Name Description<br />

Receiver Statistics Vector<br />

Statistics Vectors<br />

4 CONTROL_FRAME Asserted if the previous frame has the special<br />

<strong>Ethernet</strong> <strong>MAC</strong> control type code 88-08 in the LT<br />

field.<br />

3 UNDERRUN_FRAME Asserted if the previous frame contains an underrun<br />

error.<br />

2 MULTICAST_FRAME Asserted if the previous frame contains a multicast<br />

address in the destination address field.<br />

1 BROADCAST_FRAME Asserted if the previous frame contains a broadcast<br />

address in the destination address field.<br />

0 SUCCESSFUL_FRAME Asserted if the previous frame is transmitted<br />

without error.<br />

Notes:<br />

1. Bits 28:20 of TX_STATISTICS_VECTOR are valid for half-duplex mode only.<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

RX_STATISTICS_VALID<br />

(internal signal)<br />

RX_STATISTICS_VECTOR[26:0]<br />

(internal signal)<br />

E<strong>MAC</strong>#CLIENTRXSTATSVLD<br />

E<strong>MAC</strong>#CLIENTRXSTATS[6:0]<br />

RX_STATISTICS_VECTOR contains the statistics for the frame received. It is a 27-bit vector<br />

and an internal signal. This vector is muxed out to a 7-bit signal<br />

E<strong>MAC</strong>#CLIENTRXSTATS[6:0], as shown in Figure 3-34 , following frame reception. For<br />

standard clock management, the vector is driven synchronously by the receiver clock,<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN. For alternative clock management, including the use of<br />

clock enables, the vector is driven synchronously to other RX client logic signals. See<br />

Chapter 6, “Physical Interface,” for relevant clocking networks.<br />

The bit-field definition for the receiver statistics vector is defined in Table 3-4.<br />

[6:0] [13:7] [20:14] [26:21]<br />

Figure 3-34: Receiver Statistics MUX Timing<br />

<strong>UG194</strong>_3_34_071509<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 81<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 3: Client Interface<br />

The block diagram for the receiver statistics MUX in the <strong>Ethernet</strong> <strong>MAC</strong> is shown in<br />

Figure 3-35.<br />

<strong>Ethernet</strong> <strong>MAC</strong> Block<br />

E<strong>MAC</strong>#CLIENTRXSTATSBYTEVLD<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

RX_STATISTICS_VECTOR[26:0]<br />

(Internal Signal)<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

RXSTATSMUX<br />

RXSTATSDEMUX<br />

User-Defined<br />

Statistics Processing Block<br />

Figure 3-35: Receiver Statistics MUX Block Diagram<br />

RX_STATISTICS_VALID<br />

(Internal Signal)<br />

<strong>UG194</strong>_3_35_071509<br />

82 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

[26:0]<br />

E<strong>MAC</strong>#CLIENTRXSTATS[6:0]<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

RESET<br />

RXSTATSVEC[26:0] RXSTATSVLD<br />

<strong>FPGA</strong> Logic<br />

E<strong>MAC</strong>#CLIENTRXSTATSVLD<br />

R


R<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXD[7:0]<br />

E<strong>MAC</strong>#CLIENTRXDVLD<br />

E<strong>MAC</strong>#CLIENTRXDVLDMSW<br />

E<strong>MAC</strong>#CLIENTRXGOODFRAME<br />

E<strong>MAC</strong>#CLIENTRXSTATSBYTEVLD<br />

E<strong>MAC</strong>#CLIENTRXSTATSVLD<br />

E<strong>MAC</strong>#CLIENTRXSTATS[6:0]<br />

Statistics Vectors<br />

All bit-fields for E<strong>MAC</strong>#CLIENTRXSTATS[6:0] are valid only when<br />

E<strong>MAC</strong>#CLIENTRXSTATSVLD is asserted as illustrated in Figure 3-36.<br />

E<strong>MAC</strong>#CLIENTRXSTATSBYTEVLD is asserted if an <strong>Ethernet</strong> <strong>MAC</strong> frame byte (DA to FCS<br />

inclusive) is received. This is valid on every CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN cycle.<br />

DA SA L/T DATA<br />

Figure 3-36: Receiver Statistics Vector Timing<br />

Table 3-4: Bit Definitions for the Receiver Statistics Vector<br />

RX_STATISTICS_VECTOR Name Description<br />

[6:0] [26:21]<br />

<strong>UG194</strong>_3_36_072106<br />

26 ALIGNMENT_ERROR Used in 10/100 MII mode. Asserted if the previous frame<br />

received has an incorrect FCS value and a misalignment<br />

occurs when the 4-bit MII data bus is converted to the 8-bit<br />

GMII data bus.<br />

25 Length/Type Out of Range Asserted if the LT field contains a length value that does<br />

not match the number of <strong>Ethernet</strong> <strong>MAC</strong> client data bytes<br />

received. Also asserted High if the LT field indicates that<br />

the frame contains padding but the number of <strong>Ethernet</strong><br />

<strong>MAC</strong> client data bytes received is not equal to 64 bytes<br />

(minimum frame size).<br />

'This bit is not defined when LT field error-checks are<br />

disabled.<br />

24 BAD_OPCODE Asserted if the previous frame is error free, contains the<br />

special control frame identifier in the LT field, but contains<br />

an OPCODE unsupported by the <strong>Ethernet</strong> <strong>MAC</strong> (any<br />

OPCODE other than PAUSE).<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 83<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 3: Client Interface<br />

Table 3-4: Bit Definitions for the Receiver Statistics Vector (Cont’d)<br />

RX_STATISTICS_VECTOR Name Description<br />

23 FLOW_CONTROL_FRAME Asserted if the previous frame is error-free. Contains the<br />

special control frame identifier in the LT field. Contains a<br />

destination address matching either the <strong>Ethernet</strong> <strong>MAC</strong><br />

control multicast address or the configured source address<br />

of the <strong>Ethernet</strong> <strong>MAC</strong>. Contains the supported PAUSE<br />

OPCODE and is acted upon by the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

22 Reserved. Undefined.<br />

21 VLAN_FRAME Asserted if the previous frame contains a VLAN identifier<br />

in the LT field when receiver VLAN operation is enabled.<br />

20 OUT_OF_BOUNDS Asserted if the previous frame exceeded the specified<br />

IEEE Std 802.3-2002 maximum legal length (see<br />

“Maximum Permitted Frame Length/Jumbo Frames,”<br />

page 66). This is only valid if jumbo frames are disabled.<br />

19 CONTROL_FRAME Asserted if the previous frame contains the special control<br />

frame identifier in the LT field.<br />

[18:5] FRAME_LENGTH_COUNT The length of the previous frame in number of bytes. The<br />

count sticks at 16383 for any jumbo frames larger than this<br />

value.<br />

4 MULTICAST_FRAME Asserted if the previous frame contains a multicast<br />

address in the destination address field.<br />

3 BROADCAST_FRAME Asserted if the previous frame contained the broadcast<br />

address in the destination address field.<br />

2 FCS_ERROR Asserted if the previous frame received has an incorrect<br />

FCS value or the <strong>Ethernet</strong> <strong>MAC</strong> detects error codes during<br />

frame reception.<br />

1 BAD_FRAME (1) Asserted if the previous frame received contains errors.<br />

0 GOOD_FRAME (1) Asserted if the previous frame received is error-free.<br />

Notes:<br />

1. If the length/type field error checks are disabled, then a frame containing this type of error is marked as a GOOD_FRAME,<br />

providing no additional errors were detected.<br />

Statistics Registers/Counters<br />

The <strong>Ethernet</strong> <strong>MAC</strong> does not collect statistics on the success and failure of various<br />

operations. A custom statistics counter can be implemented in the <strong>FPGA</strong> logic to collect the<br />

statistics. A parameterizable <strong>Ethernet</strong> statistics core is available from the LogiCORE<br />

libraries. For more information, see:<br />

http://www.xilinx.com/products/ipcenter/ETHERNET_STATS.htm.<br />

When the DCR is used, it can access the statistics counter registers in the <strong>FPGA</strong> logic<br />

through the DCR bridge in the host interface. Chapter 7, “Interfacing to a Statistics Block,”<br />

describes how to integrate <strong>Ethernet</strong> Statistics LogiCORE core into a design, as well as how<br />

to access the statistics registers using either the host bus or the DCR bus.<br />

84 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Host/DCR Bus Interfaces<br />

This chapter contains the following sections:<br />

“Introduction to the <strong>Ethernet</strong> <strong>MAC</strong> Host Interface”<br />

“<strong>Ethernet</strong> <strong>MAC</strong> Register Descriptions”<br />

“Using the Host Bus”<br />

“Using the DCR Bus”<br />

Introduction to the <strong>Ethernet</strong> <strong>MAC</strong> Host Interface<br />

Chapter 4<br />

Access to the <strong>Ethernet</strong> <strong>MAC</strong> in the <strong>Virtex</strong>®-5 <strong>FPGA</strong> through the host interface allows the<br />

user to:<br />

Read and write <strong>Ethernet</strong> <strong>MAC</strong> configuration registers<br />

Read and write <strong>Ethernet</strong> <strong>MAC</strong> address filter registers<br />

Read and write the PCS/PMA sublayer registers<br />

Drive the Management Data I/O (MDIO) interface to control an external device<br />

The <strong>Ethernet</strong> <strong>MAC</strong> host interface can be accessed using either the host bus or the DCR bus.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> should be configured to use the required bus by setting the<br />

DCRE<strong>MAC</strong>ENABLE input bit accordingly, see “DCR Bus Signals,” page 37.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 85<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 4: Host/DCR Bus Interfaces<br />

PLB v4.6<br />

to DCR<br />

Bridge<br />

Processor<br />

System<br />

DCRE<strong>MAC</strong>ENABLE<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong><br />

Figure 4-1 shows the internal structure of the host interface. The two <strong>Ethernet</strong> <strong>MAC</strong>s<br />

within the same block share a single host interface.<br />

DCRHOSTDONEIR<br />

DCR Bus<br />

DCR<br />

Bridge<br />

Host Interface<br />

<strong>Ethernet</strong> <strong>MAC</strong> Block<br />

Host Bus<br />

1 0<br />

Figure 4-1: Host Interface<br />

E<strong>MAC</strong>1SEL<br />

E<strong>MAC</strong>1<br />

E<strong>MAC</strong>0<br />

1 0<br />

<strong>UG194</strong>_4_01_071509<br />

E<strong>MAC</strong>1SEL (internal signal) is driven by the HOSTE<strong>MAC</strong>1SEL input signal when using the<br />

host bus or decoded by the DCR bridge when using the DCR bus.<br />

The XPS_LL_TE<strong>MAC</strong> soft core delivered through the XPS tool controls the <strong>Ethernet</strong> <strong>MAC</strong><br />

via the processor local bus (PLB) v4.6 interface. A bridge is provided to convert between<br />

the PLB v4.6 and DCR bus standards. For more information on the PLB v4.6 interface, see<br />

DS531, Processor Local Bus (PLB) v4.6 (v1.00a).<br />

86 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


HOSTCLK<br />

HOSTMIIMSEL<br />

HOSTREQ<br />

HOSTOPCODE[1:0]<br />

HOSTE<strong>MAC</strong>1SEL<br />

HOSTADDR[9:0]<br />

HOSTWRDATA[31:0]<br />

HOSTMIIMRDY<br />

HOSTRDDATA[31:0]<br />

DCRE<strong>MAC</strong>ENABLE<br />

DCRHOSTDONEIR<br />

R<br />

Figure 4-2 shows the block diagram of the host interface.<br />

DCR Bus<br />

<strong>Ethernet</strong> <strong>MAC</strong> Block<br />

<strong>FPGA</strong> Logic<br />

Host<br />

Interface<br />

Figure 4-2: <strong>Ethernet</strong> <strong>MAC</strong> Host Interface Block Diagram<br />

<strong>Ethernet</strong> <strong>MAC</strong> Register Descriptions<br />

To access management registers in the PCS/PMA sublayer, the MDIO interface is used.<br />

The MDIO interface is described in detail in Chapter 5, “MDIO Interface,” and access to the<br />

MDIO through the host interface is discussed later in this chapter.<br />

<strong>Ethernet</strong> <strong>MAC</strong> Register Descriptions<br />

MIIMSEL0<br />

REQ0<br />

OPCODE0<br />

ADDR0<br />

WRD0<br />

MIIMRDY0<br />

RDD0<br />

(All internal signals)<br />

MIIMSEL1<br />

REQ1<br />

OPCODE1<br />

ADDR1<br />

WRD1<br />

MIIMRDY1<br />

RDD1<br />

E<strong>MAC</strong>0<br />

E<strong>MAC</strong>1<br />

<strong>UG194</strong>_4_02_0080409<br />

Each <strong>Ethernet</strong> <strong>MAC</strong> has twelve configuration and address filter registers. These registers<br />

are accessed through the host interface and can be written to at any time. Both the receiver<br />

and transmitter logic only responds to configuration changes during Inter Frame gaps. The<br />

configurable resets are the only exception that take effect immediately. Writes made to<br />

address filter registers take effect immediately. To avoid corruption of incoming frames,<br />

writing to these registers should be made only while frame reception is not in progress.<br />

Table 4-1: <strong>Ethernet</strong> <strong>MAC</strong> Register Addresses<br />

Configuration<br />

and<br />

Address Filter<br />

Configuration<br />

and<br />

Address Filter<br />

PCS/ PMA0<br />

Management<br />

Registers<br />

PCS/ PMA1<br />

Management<br />

Registers<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 87<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

MDIO<br />

MDIO<br />

ADDRESS[9:0] Register Description<br />

0x200 Receiver Configuration (Word 0)<br />

0x240 Receiver Configuration (Word 1)<br />

0x280 Transmitter Configuration<br />

0x2C0 Flow Control Configuration<br />

0x300 <strong>Ethernet</strong> <strong>MAC</strong> <strong>Mode</strong> Configuration<br />

0x320 RGMII/SGMII Configuration


Chapter 4: Host/DCR Bus Interfaces<br />

Table 4-1: <strong>Ethernet</strong> <strong>MAC</strong> Register Addresses (Cont’d)<br />

Configuration Registers<br />

ADDRESS[9:0] Register Description<br />

0x340 Management Configuration<br />

0x380 Unicast Address (Word 0)<br />

0x384 Unicast Address (Word 1)<br />

0x388 Additional Address Table Access (Word 0)<br />

0x38C Additional Address Table Access (Word 1)<br />

0x390 Address Filter <strong>Mode</strong><br />

The <strong>Ethernet</strong> <strong>MAC</strong> configuration registers and the contents of the registers are shown in<br />

Table 4-2 through Table 4-8.<br />

Table 4-2: Receiver Configuration Register (Word 0)<br />

MSB<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

0x200 PAUSE_FRAME_ADDRESS[31:0]<br />

Bit Description Default Value R/W<br />

[31:0] Pause Frame <strong>Ethernet</strong> <strong>MAC</strong> Address [31:0]. This address is used<br />

to match the <strong>Ethernet</strong> <strong>MAC</strong> against the destination address of<br />

any incoming flow control frames. It is also used by the flow<br />

control block as the source address for any outbound flow<br />

control frames.<br />

The address is ordered so the first byte transmitted/received<br />

is the lowest positioned byte in the register; for example, a<br />

<strong>MAC</strong> address of AA-BB-CC-DD-EE-FF is stored in address<br />

[47:0] as 0xFFEEDDCCBBAA.<br />

Tie to the same value as E<strong>MAC</strong>#_UNICASTADDR[31:0].<br />

88 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

LSB<br />

E<strong>MAC</strong>#_PAUSEADDR[31:0] R/W<br />

R


R<br />

Table 4-3: Receiver Configuration Register (Word 1)<br />

0x240<br />

MSB<br />

<strong>Ethernet</strong> <strong>MAC</strong> Register Descriptions<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

RST<br />

JUM<br />

FCS<br />

RX<br />

VLAN<br />

HD<br />

LT_DIS<br />

RESERVED PAUSE_FRAME_ADDRESS[47:32]<br />

Bit Description Default Value R/W<br />

[15:0] Pause frame <strong>Ethernet</strong> <strong>MAC</strong> Address [47:32]. Tie to the same<br />

value as E<strong>MAC</strong>#_UNICASTADDR[47:32].<br />

[24:16] Reserved. –<br />

[25] Length/Type Check disable. When this bit is 1, it disables<br />

the Length/Type field check on the frame.<br />

[26] Half-duplex mode. When this bit is 1, the receiver operates<br />

in half-duplex mode. When the bit is 0, the receiver operates<br />

in full-duplex mode.<br />

[27] VLAN enable. When this bit is 1, the receiver accepts VLAN<br />

tagged frames. The maximum payload length increases by<br />

four bytes.<br />

[28] Receive enable. When this bit is 1, the receiver block is<br />

enabled to operate. When the bit is 0, the receiver ignores<br />

activity on the physical interface receive port.<br />

[29] In-band FCS enable. When this bit is 1, the receiver passes<br />

the FCS field up to the client. When this bit is 0, the FCS field<br />

is not passed to the client. In either case, the FCS is verified<br />

on the frame.<br />

[30] Jumbo frame enable. When this bit is 1, the <strong>Ethernet</strong> <strong>MAC</strong><br />

receiver accepts frames over the maximum length specified<br />

in IEEE Std 802.3-2002 specification. When this bit is 0, the<br />

receiver only accepts frames up to the specified maximum.<br />

[31] Reset. When this bit is 1, the receiver is reset. The bit<br />

automatically reverts to 0. This reset also sets all of the<br />

receiver configuration registers to their default values.<br />

E<strong>MAC</strong>#_PAUSEADDR[47:32] R/W<br />

E<strong>MAC</strong>#_LTCHECK_DISABLE R/W<br />

E<strong>MAC</strong>#_RXHALFDUPLEX R/W<br />

E<strong>MAC</strong>#_RXVLAN_ENABLE R/W<br />

E<strong>MAC</strong>#_RX_ENABLE R/W<br />

E<strong>MAC</strong>#_RXINBANDFCS_ENABLE R/W<br />

E<strong>MAC</strong>#_RXJUMBOFRAME_ENABLE R/W<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 89<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

LSB<br />

E<strong>MAC</strong>#_RXRESET R/W


Chapter 4: Host/DCR Bus Interfaces<br />

Table 4-4: Transmitter Configuration Register<br />

0x280<br />

MSB<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

RST<br />

JUM<br />

FCS<br />

TX<br />

VLAN<br />

HD<br />

IFG<br />

RESERVED<br />

Bit Description Default Value R/W<br />

[24:0] Reserved. –<br />

[25] IFG adjustment enable. When this bit is 1, the transmitter<br />

reads the value of CLIENTE<strong>MAC</strong>#TXIFGDELAY at the<br />

start of frame transmission and adjusts the IFG.<br />

[26] Half-duplex mode (applicable in 10/100 Mb/s mode only).<br />

When this bit is 1, the transmitter operates in half-duplex<br />

mode. When this bit is 0, the transmitter operates in fullduplex<br />

mode.<br />

[27] VLAN enable. When this bit is 1, the transmitter allows<br />

transmission of the VLAN tagged frames.<br />

[28] Transmit enable. When this bit is 1, the transmitter is<br />

enabled for operation.<br />

[29] In-band FCS enable. When this bit is 1, the <strong>Ethernet</strong> <strong>MAC</strong><br />

transmitter is ready for the FCS field from the client.<br />

[30] Jumbo frame enable. When this bit is 1, the transmitter<br />

sends frames greater than the maximum length specified in<br />

IEEE Std 802.3-2002. When this bit is 0, it only sends frames<br />

less than the specified maximum length.<br />

[31] Reset. When this bit is 1, the transmitter is reset. The bit<br />

automatically reverts to 0. This reset also sets all of the<br />

transmitter configuration registers to their default values.<br />

E<strong>MAC</strong>#_TXIFGADJUST_ENABLE R/W<br />

E<strong>MAC</strong>#_TXHALFDUPLEX R/W<br />

E<strong>MAC</strong>#_TXVLAN_ENABLE R/W<br />

E<strong>MAC</strong>#_TX_ENABLE R/W<br />

E<strong>MAC</strong>#_TXINBANDFCS_ENABLE R/W<br />

E<strong>MAC</strong>#_TXJUMBOFRAME_ENABLE R/W<br />

90 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

LSB<br />

E<strong>MAC</strong>#_TXRESET R/W<br />

R


R<br />

Table 4-5: Flow Control Configuration Register<br />

0x2C0<br />

MSB<br />

<strong>Ethernet</strong> <strong>MAC</strong> Register Descriptions<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

RESERVED<br />

FCTX<br />

FCRX<br />

RESERVED<br />

Bit Description Default Value R/W<br />

[28:0] Reserved. –<br />

[29] Flow control enable (RX). When this bit is 1, the received<br />

flow control frames inhibit transmitter operation. When<br />

this bit is 0, the flow control frame is passed to the client.<br />

[30] Flow control enable (TX). When this bit is 1, the<br />

CLIENTE<strong>MAC</strong>#PAUSEREQ signal is asserted and a flow<br />

control frame is sent from the transmitter. When this bit is<br />

0, the CLIENTE<strong>MAC</strong>#PAUSEREQ signal has no effect.<br />

[31] Reserved. –<br />

E<strong>MAC</strong>#_RXFLOWCTRL_ENABLE R/W<br />

E<strong>MAC</strong>#_TXFLOWCTRL_ENABLE R/W<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 91<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

LSB


Chapter 4: Host/DCR Bus Interfaces<br />

Table 4-6: <strong>Ethernet</strong> <strong>MAC</strong> <strong>Mode</strong> Configuration Register<br />

0x300<br />

MSB<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

LINK<br />

SPEED<br />

RGMII<br />

SGMII<br />

GPCS<br />

HOST<br />

TX16<br />

RX16<br />

RESERVED<br />

Bit Description Default Value R/W<br />

[23:0] Reserved. –<br />

[24] Receive 16-bit Client Interface enable. When this bit is 1, the<br />

receive data client interface is 16 bits wide. When this bit is<br />

0, the receive data client interface is 8 bits wide. This bit is<br />

valid only when using 1000BASE-X PCS/PMA mode.<br />

[25] Transmit 16-bit Client Interface enable. When this bit is 1,<br />

the transmit data client interface is 16 bits wide. When this<br />

bit is 0, the transmit data client interface is 8 bits wide. This<br />

bit is valid only when using 1000BASE-X PCS/PMA mode.<br />

[26] Host Interface enable. When this bit is 1, the host interface<br />

is enabled. When this bit is 0, the host interface is disabled.<br />

See "<strong>Ethernet</strong> <strong>MAC</strong> Attributes" on page 42.<br />

[27] 1000BASE-X mode enable. When this bit is 1, the <strong>Ethernet</strong><br />

<strong>MAC</strong> is configured in 1000BASE-X mode.<br />

[28] SGMII mode enable. When this bit is 1, the <strong>Ethernet</strong> <strong>MAC</strong><br />

is configured in SGMII mode.<br />

[29] RGMII mode enable. When this bit is 1, the <strong>Ethernet</strong> <strong>MAC</strong><br />

is configured in RGMII mode.<br />

[31:30] Speed selection. The speed of the <strong>Ethernet</strong> <strong>MAC</strong> is defined<br />

by the following values:<br />

10 = 1000 Mb/s<br />

01 = 100 Mb/s<br />

00 = 10 Mb/s<br />

11 = N/A<br />

E<strong>MAC</strong>#_RX16BITCLIENT_ENABLE R<br />

E<strong>MAC</strong>#_TX16BITCLIENT_ENABLE R<br />

E<strong>MAC</strong>#_HOST_ENABLE R<br />

E<strong>MAC</strong>#_1000BASEX_ENABLE R<br />

E<strong>MAC</strong>#_SGMII_ENABLE R<br />

E<strong>MAC</strong>#_RGMII_ENABLE R<br />

{E<strong>MAC</strong>#_SPEED_MSB,<br />

E<strong>MAC</strong>#_SPEED_LSB}<br />

92 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

LSB<br />

R/W<br />

R


R<br />

Table 4-7: RGMII/SGMII Configuration Register<br />

MSB<br />

0x320 SGMII<br />

LINK<br />

SPEED<br />

<strong>Ethernet</strong> <strong>MAC</strong> Register Descriptions<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

RESERVED<br />

RGMII<br />

LINK<br />

SPEED RGMII<br />

Bit Description Default Value R/W<br />

[0] RGMII link. Valid in RGMII mode configuration only. When this<br />

bit is 1, the link is up. When this bit is 0, the link is down. This<br />

displays the link information from the PHY to the <strong>Ethernet</strong><br />

<strong>MAC</strong>, encoded by GMII_RX_DV and GMII_RX_ER during the<br />

IFG.<br />

[1] RGMII duplex status. Valid in RGMII mode configuration only.<br />

This bit is 0 for half-duplex and 1 for full-duplex. This displays<br />

the duplex information from the PHY to the <strong>Ethernet</strong> <strong>MAC</strong>,<br />

encoded by GMII_RX_DV and GMII_RX_ER during the IFG.<br />

[3:2] RGMII speed. Valid in RGMII mode configuration only. Link<br />

information from the PHY to the <strong>Ethernet</strong> <strong>MAC</strong> as encoded by<br />

GMII_RX_DV and GMII_RX_ER during the IFG. This two-bit<br />

vector is defined with the following values:<br />

10 = 1000 Mb/s<br />

01 = 100 Mb/s<br />

00 = 10 Mb/s<br />

11 = N/A<br />

[29:4] Reserved –<br />

[31:30] SGMII speed. Valid in SGMII mode configuration only. This<br />

displays the SGMII speed information, as received by<br />

TX_CONFIG_REG[11:10] in the PCS/PMA register. See<br />

Table 5-19, page 133. This two-bit vector is defined with the<br />

following values:<br />

10 = 1000 Mb/s<br />

01 = 100 Mb/s<br />

00 = 10 Mb/s<br />

11 = N/A<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 93<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

LSB<br />

HD<br />

RGMII<br />

Link<br />

0 R<br />

0 R<br />

All 0s R<br />

All 0s R


Chapter 4: Host/DCR Bus Interfaces<br />

Table 4-8: Management Configuration Register<br />

0x340<br />

MSB<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

Address Filter Registers<br />

RESERVED<br />

The <strong>Ethernet</strong> <strong>MAC</strong> Address filter has five address filter registers accessible through the<br />

host interface. One unicast address can be written into the unicast address register and four<br />

additional addresses can be written into the general address table, which is accessed<br />

indirectly through the General Address access registers. Figure 4-3 describes the General<br />

Address table access.<br />

94 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

MDIOEN<br />

LSB<br />

CLOCK_DIVIDE[5:0]<br />

Bit Description Default Value R/W<br />

[5:0] Clock divide [5:0]. This value is used to derive the<br />

E<strong>MAC</strong>#PHYMCLKOUT for external devices. See Chapter 5,<br />

“MDIO Interface.”<br />

[6] MDIO enable. When this bit is 1, the MDIO interface is used to<br />

access the PHY. This bit can only be asserted when clock divide<br />

is also loaded with a non-zero value. When this bit is 0, the<br />

MDIO interface is disabled, and the MDIO signals remain<br />

inactive. See Chapter 5, “MDIO Interface.”<br />

[31:7] Reserved. –<br />

00<br />

01<br />

10<br />

11<br />

General Address Table Access (Word 1)<br />

General Address Register 0<br />

General Address Register 2<br />

Figure 4-3: General Address Table Memory Diagram<br />

All 0s R/W<br />

0 R/W<br />

HOST_ADDR 31 23<br />

17 16 15<br />

0<br />

0x38C<br />

ADDR<br />

MSB<br />

MSB<br />

RNW<br />

ADDR<br />

47 General Address Table<br />

0<br />

General Address Register 1<br />

General Address Register 3<br />

GENERAL_ADDRESS[47:32]<br />

LSB<br />

<strong>UG194</strong>_4_03_072106<br />

LSB<br />

R


R<br />

Table 4-9: Unicast Address (Word 0)<br />

0x380<br />

MSB<br />

<strong>Ethernet</strong> <strong>MAC</strong> Register Descriptions<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

UNICAST_ADDRESS[31:0]<br />

Bit Description Default Value R/W<br />

[31:0] Unicast Address [31:0]. This address is used to match the<br />

<strong>Ethernet</strong> <strong>MAC</strong> against the destination address of any<br />

incoming frames.<br />

The address is ordered so the first byte transmitted/received<br />

is the lowest positioned byte in the register; for example, a<br />

<strong>MAC</strong> address of AA-BB-CC-DD-EE-FF is stored in address<br />

[47:0] as 0xFFEEDDCCBBAA.<br />

Table 4-10: Unicast Address (Word 1)<br />

0x384<br />

MSB<br />

E<strong>MAC</strong>#_UNICASTADDR[31:0] R/W<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

RESERVED UNICAST_ADDRESS[47:32]<br />

Bit Description Default Value R/W<br />

[15:0] Unicast Address [47:32] E<strong>MAC</strong>#_UNICASTADDR[47:32] R/W<br />

[31:16] Reserved. –<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 95<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

LSB<br />

LSB


Chapter 4: Host/DCR Bus Interfaces<br />

Table 4-11: Address Table Access (Word 0)<br />

0x388<br />

MSB<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

GENERAL_ADDRESS[31:0]<br />

Bit Description Default Value R/W<br />

[31:0] General Address [31:0]. The general address bits [31:0] are temporarily<br />

deposited into this register for writing into a general address register.<br />

When a read from an address register has been performed, the address bits<br />

[31:0] are accessible from this register.<br />

The address is ordered so the first byte transmitted/received is the lowest<br />

positioned byte in the register; for example, a <strong>MAC</strong> address of AA-BB-CC-<br />

DD-EE-FF is stored in address [47:0] as 0xFFEEDDCCBBAA.<br />

Table 4-12: Address Table Access (Word 1)<br />

0x38c<br />

MSB<br />

96 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

LSB<br />

All 0s R/W<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

RESERVED<br />

RNW<br />

RESERVED<br />

ADDR<br />

GENERAL_ADDRESS[47:32]<br />

Bit Description Default Value R/W<br />

General Address (Word 1)<br />

[15:0] General Address [47:32]. The general address bits [47:32] are temporarily<br />

deposited into this register for writing into a general address register.<br />

[17:16] Address Table address. This two-bit vector is used to choose the general<br />

address register to access.<br />

00 = General Address Register 0<br />

01 = General Address Register 1<br />

10 = General Address Register 2<br />

11 = General Address Register 3<br />

[22:18] Reserved. –<br />

[23] Address Table read enable (RNW). When this bit is 1, a general address<br />

register is read. When this bit is 0, a general address register is written with<br />

the address set in the general address table register.<br />

[31:24] Reserved. –<br />

LSB<br />

All 0s R/W<br />

All 0s R/W<br />

0 R/W<br />

R


R<br />

Table 4-13: Address Filter <strong>Mode</strong><br />

0x390<br />

MSB<br />

Using the Host Bus<br />

Using the Host Bus<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

PM<br />

To access the host interface using the host bus, the DCRE<strong>MAC</strong>ENABLE signal should be tied<br />

to logic 0.<br />

When using the host bus, the type of transaction initiated is dependant on the host bus<br />

signals HOSTMIIMSEL, HOSTADDR[9], and HOSTE<strong>MAC</strong>1SEL. Table 4-14 shows the access<br />

method required for each transaction type.<br />

Clocking Requirements<br />

RESERVED<br />

Bit Description Default Value R/W<br />

Address Filter <strong>Mode</strong><br />

[30:0] Reserved. –<br />

[31] Promiscuous <strong>Mode</strong> enable. When this bit is 1, the<br />

Address Filter block is disabled. When this bit is 0, the<br />

Address Filter block is enabled.<br />

Table 4-14: Host Bus Transaction Types<br />

1: When E<strong>MAC</strong>#_ADDRFILTERENABLE<br />

is FALSE<br />

0: When E<strong>MAC</strong>#_ADDRFILTERENABLE<br />

is TRUE<br />

Transaction R/W HOSTE<strong>MAC</strong>1SEL HOSTMIIMSEL HOSTADDR[9] HOSTOPCODE[1]HOSTOPCODE[0]<br />

E<strong>MAC</strong>0<br />

Configuration/Address<br />

Filter<br />

Read 0 0 1 1 X<br />

Write 0 0 1 0 X<br />

E<strong>MAC</strong>0 MDIO access Read 0 1 X 1 0<br />

E<strong>MAC</strong>1<br />

Configuration/Address<br />

Filter<br />

Write 0 1 X 0 1<br />

Read 1 0 1 1 X<br />

Write 1 0 1 0 X<br />

E<strong>MAC</strong>1 MDIO access Read 1 1 X 1 0<br />

Write 1 1 X 0 1<br />

The HOSTCLK can operate at speeds of up to 125 MHz. This clock can be tied to a usersupplied,<br />

125 MHz input clock to save on clock resources, such as the 125 MHz clock<br />

provided into the PHYE<strong>MAC</strong>#GTXCLK port (see Appendix C, “<strong>Virtex</strong>-4 to <strong>Virtex</strong>-5 <strong>FPGA</strong><br />

Enhancements”).<br />

The host clock (HOSTCLK) is used to derive the MDIO clock, MDC. Configuring the <strong>Ethernet</strong><br />

<strong>MAC</strong> to derive MDC is detailed in “Accessing MDIO through the Host Interface,” page 119.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 97<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

LSB<br />

R/W


Chapter 4: Host/DCR Bus Interfaces<br />

Reading and Writing <strong>MAC</strong> Configuration Registers<br />

Figure 4-4 shows the write timing for the configuration registers using the host bus. When<br />

accessing the configuration registers (i.e., when HOSTADDR[9] =1 and<br />

HOSTMIIMSEL= 0), HOSTOPCODE[1] functions as an active-Low write enable signal, and<br />

HOSTOPCODE[0] is a don’t care.<br />

HOSTADDR[9:0] takes the address of the configuration register to be accessed, as<br />

described in Table 4-1.<br />

The HOSTE<strong>MAC</strong>1SEL signal selects between the host access of E<strong>MAC</strong>0 or E<strong>MAC</strong>1. When<br />

HOSTE<strong>MAC</strong>1SEL is asserted, the host accesses E<strong>MAC</strong>1. If only one <strong>Ethernet</strong> <strong>MAC</strong> is used,<br />

this signal can be tied-off to use either of the <strong>Ethernet</strong> <strong>MAC</strong>s.<br />

HOSTCLK<br />

HOSTMIIMSEL<br />

HOSTOPCODE[1]<br />

HOSTADDR[8:0]<br />

HOSTADDR[9]<br />

HOSTWRDATA[31:0]<br />

HOSTE<strong>MAC</strong>1SEL<br />

<strong>UG194</strong>_4_04_051208<br />

Figure 4-4: Configuration Register Write Timing<br />

Figure 4-5 shows the read timing from the configuration registers. A High on<br />

HOSTOPCODE[1] indicates a read transaction on the bus. The contents of the register<br />

appear on HOSTRDDATA[31:0] on the HOSTCLK edge after the register address is asserted<br />

onto HOSTADDR. A Low on HOSTMIIMSEL indicates a configuration access. It must be held<br />

Low for an even number of clock cycles during a read operation.<br />

98 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

HOSTCLK<br />

HOSTMIIMSEL<br />

HOSTOPCODE[1]<br />

HOSTADDR[8:0]<br />

HOSTADDR[9]<br />

HOSTRDDATA[31:0]<br />

HOSTE<strong>MAC</strong>1SEL<br />

Figure 4-5: Configuration Register Read Timing<br />

Reading and Writing Address Filter Registers<br />

<strong>UG194</strong>_4_05_051308<br />

Using the Host Bus<br />

Writing to registers in the Address Filter is the same as writing to configuration registers.<br />

The timing diagram shown for writing to the <strong>Ethernet</strong> <strong>MAC</strong> Configuration Registers<br />

(Figure 4-4) holds for Address Filter registers. HOSTADDR[9:0] takes the address of the<br />

address filter register to be accessed, as described in Table 4-1.<br />

To write a general address register, two write operations are required. First bits [31:0] of the<br />

general address must be written into the General Address Table Access Word 0 register.<br />

The upper bits [47:32] of the general address must then be written into the General<br />

Address Table Access Word 1 register, along with the Address Table address and the RNW<br />

bit at logic 0.<br />

Reading the Unicast Address registers and the Address <strong>Mode</strong> register is also the same as<br />

reading from configuration registers. The timing diagram shown for reading the <strong>Ethernet</strong><br />

<strong>MAC</strong> configuration registers (Figure 4-5) applies to accesses for these registers.<br />

Figure 4-6 shows the timing diagram for reading the general address from one of the four<br />

general address registers in the Address Table.<br />

To read a general address register, a write must first be made to the General Address Table<br />

Access Word 1 register. The RNW field is set to 1, and the Address Table address field<br />

should be set with the register number to be read. The general address register data is<br />

returned in HOSTRDDATA[31:0] as shown in Figure 4-6. The LSW is the general address<br />

[31:0]. The MSW contains 0x0000 and the general address [47:32].<br />

A Low on HOSTMIIMSEL indicates a configuration access. It must be held Low for an even<br />

number of clock cycles during a read operation.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 99<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 4: Host/DCR Bus Interfaces<br />

HOSTCLK<br />

HOSTMIIMSEL<br />

HOSTOPCODE[1]<br />

HOSTADDR[9:0]<br />

HOSTWRDATA[31:0]<br />

HOSTRDDATA[31:0]<br />

HOSTE<strong>MAC</strong>1SEL<br />

Figure 4-6: Address Filter General Address Register Read<br />

PCS/PMA Sublayer or External Device Access via MDIO<br />

Access to the MDIO interface through the management interface is shown in the Figure 4-7<br />

timing diagram. See Chapter 5, “MDIO Interface,” for a full description of the MDIO<br />

interface and PCS/PMA sublayer management registers. The MDIO interface must be<br />

enabled using the Management Configuration Register (see Table 4-8). If the MDIO<br />

interface is not enabled, accesses complete in a single cycle (MIIMRDY remains High) but<br />

are ignored.<br />

In MDIO transactions, the following applies:<br />

HOSTMIIMSEL is held High to indicate an MDIO transaction.<br />

HOSTOPCODE maps to the OPCODE field of the MDIO frame.<br />

HOSTADDR maps to the two address fields of the MDIO frame. PHYAD (the physical<br />

address) is HOSTADDR[9:5], and REGAD (the register address) is HOSTADDR[4:0].<br />

HOSTWRDATA[15:0] maps into the data field of the MDIO frame during a write<br />

operation.<br />

The data field of the MDIO frame maps into HOSTRDDATA[15:0] during a read<br />

operation.<br />

A read or write transaction on the MDIO is initiated by a pulse on the HOSTREQ signal.<br />

This pulse is ignored if the MDIO interface already has a transaction in progress. The<br />

<strong>Ethernet</strong> <strong>MAC</strong> deasserts the HOSTMIIMRDY signal while the transaction across the MDIO<br />

is in progress. When the transaction across the MDIO interface is completed, the<br />

HOSTMIIMRDY signal is asserted by the <strong>Ethernet</strong> <strong>MAC</strong>. If the transaction is a read, the data<br />

is also available on the HOSTRDATA[15:0] bus.<br />

100 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

0x38C<br />

LSW<br />

MSW<br />

<strong>UG194</strong>_4_06_101308<br />

R


R<br />

HOSTCLK<br />

HOSTMIIMSEL<br />

HOSTREQ<br />

HOSTOPCODE[1:0]<br />

HOSTADDR[9:0]<br />

HOSTWRDATA[15:0]<br />

HOSTMIIMRDY<br />

HOSTRDDATA[15:0]<br />

HOSTE<strong>MAC</strong>1SEL<br />

Using the DCR Bus<br />

Using the DCR Bus<br />

As noted in Figure 4-7, if a read transaction is initiated, the HOSTRDDATA bus is valid at the<br />

point indicated. If a write transaction is initiated, the HOSTWRDATA bus must be valid at the<br />

point indicated. The bus is locked until the transfer completes.<br />

The DCRE<strong>MAC</strong>ENABLE signal selects between the DCR bus or the host bus during the <strong>FPGA</strong><br />

power-up configuration. To access the host interface through the DCR bus, the<br />

DCRE<strong>MAC</strong>ENABLE signal must be asserted by tying the signal High in the <strong>FPGA</strong> logic.<br />

The address space available on the DCR bus is limited. The host interface is accessed<br />

indirectly using only four registers per E<strong>MAC</strong> in the DCR address space. Accessing the<br />

host interface though the DCR bus requires more software complexity than though the<br />

host bus. For further information, see the example software routines in “Interfacing to a<br />

Processor,” page 107.<br />

When the DCR bus is used to access the internal registers of the <strong>Ethernet</strong> <strong>MAC</strong>, the DCR<br />

bus bridge in the host interface translates commands carried over the DCR bus into<br />

<strong>Ethernet</strong> <strong>MAC</strong> host bus signals. These signals then configure one of the <strong>Ethernet</strong> <strong>MAC</strong>s.<br />

Clocking Requirements<br />

Figure 4-7: MDIO Access Through the Host Bus<br />

<strong>UG194</strong>_4_07_100708<br />

The HOSTCLK frequency must be an integer divide of the DCR clock frequency, and the<br />

two clocks must be phase-aligned.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 101<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 4: Host/DCR Bus Interfaces<br />

Device Control Registers<br />

The DCR bus bridge contains four registers directly addressable through the DCR bus for<br />

each <strong>Ethernet</strong> <strong>MAC</strong>. Of these registers, three are shared but are addressable from either<br />

<strong>Ethernet</strong> <strong>MAC</strong>. The upper bits of the DCR address for these registers are user assigned<br />

through the E<strong>MAC</strong>0_DCBASEADDR and E<strong>MAC</strong>1_DCRBASEADDR attributes.<br />

Figure 4-8 shows how the DCR bridge manages access to the registers within the DCR bus<br />

and to the <strong>FPGA</strong> logic.<br />

0x3FF<br />

E<strong>MAC</strong>1_DCRBASEADDR + 3<br />

E<strong>MAC</strong>1_DCRBASEADDR + 2<br />

E<strong>MAC</strong>1_DCRBASEADDR + 1<br />

E<strong>MAC</strong>1_DCRBASEADDR + 0<br />

E<strong>MAC</strong>0_DCRBASEADDR + 3<br />

E<strong>MAC</strong>0_DCRBASEADDR + 2<br />

E<strong>MAC</strong>0_DCRBASEADDR + 1<br />

E<strong>MAC</strong>0_DCRBASEADDR + 0<br />

0x000<br />

DCR Bus Address Map<br />

RDYstatus_e1<br />

cntlReg<br />

dataRegLSW<br />

dataRegMSW<br />

RDYstatus_e0<br />

cntlReg<br />

dataRegLSW<br />

dataRegMSW<br />

The DCR interface provides<br />

indirect access to the E<strong>MAC</strong><br />

registers on the right.<br />

Note:<br />

The cntlReg, dataRegLSW, dataRegMSW, MDIO Command, and MMIMWRDATA<br />

registers in E<strong>MAC</strong>0 and E<strong>MAC</strong>1 share physical registers. The data in E<strong>MAC</strong>0 can<br />

be overwritten by accessing E<strong>MAC</strong>1 and vice versa. The user should take care to<br />

perform a complete transaction on one E<strong>MAC</strong> before attempting to access the other.<br />

Figure 4-8: DCR Bridge Registers<br />

E<strong>MAC</strong>1 Address Map (cntlReg Address Code)<br />

MDIO Command Register<br />

MIIMWRDATA<br />

IRENABLE_e1<br />

IRSTATUS_e1<br />

E<strong>MAC</strong>1 Configuration Registers<br />

E<strong>MAC</strong>1 Logic Access Registers<br />

E<strong>MAC</strong>1 Logic Access Registers<br />

MDIO Command Register<br />

MIIMWRDATA<br />

IRENABLE_e0<br />

IRSTATUS_e0<br />

E<strong>MAC</strong>0 Configuration Registers<br />

E<strong>MAC</strong>0 Logic Access Registers<br />

E<strong>MAC</strong>0 Logic Access Registers<br />

102 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

0x3FF<br />

0x3B4<br />

0x3B0<br />

0x3A4<br />

0x3A0<br />

0x39F<br />

0x200<br />

0x04F<br />

0x040<br />

0x02F<br />

0x000<br />

E<strong>MAC</strong>0 Address Map (cntlReg Address Code)<br />

0x3FF<br />

0x3B4<br />

0x3B0<br />

0x3A4<br />

0x3A0<br />

0x39F<br />

0x200<br />

0x04F<br />

0x040<br />

0x02F<br />

0x000<br />

<strong>UG194</strong>_4_08_081806<br />

R


R<br />

Using the DCR Bus<br />

The directly addressable dataRegMSW, dataRegLSW, cntlReg, and RDYstatus_e# registers,<br />

can be read or written to using the appropriate DCR address. By writing to the cntlReg<br />

register with a particular address code, the DCR bridge can access the indirect address<br />

registers within the DCR bus, such as IRSTATUS_e#, the <strong>Ethernet</strong> <strong>MAC</strong> configuration<br />

registers, <strong>FPGA</strong> logic-based registers, or perform an MDIO transaction. Data is read and<br />

written to indirect registers through the dataRegLSW register. The dataRegMSW register is<br />

also used for transactions with an MSW of data. Selection between the E<strong>MAC</strong>0 and<br />

E<strong>MAC</strong>1 indirect register address space is determined by writing to the cntlReg register at<br />

either E<strong>MAC</strong>0_DCRBASEADDR[0:7]_10 for an E<strong>MAC</strong>0 access and<br />

E<strong>MAC</strong>1_DCRBASEADDR[0:7]_10 for an E<strong>MAC</strong>1 access.<br />

Address codes for each transaction type are summarized in Table 4-15.<br />

Table 4-15: DCR Address Code Transaction Types<br />

Address Code[9:0] Transaction Description<br />

0x000:0x02F<br />

0x040:0x04F<br />

0x200:0x390<br />

0x3A0<br />

0x3A4<br />

0x3B0<br />

0x3B4<br />

Read from <strong>FPGA</strong> logic through<br />

unused host pins. See<br />

“Accessing <strong>FPGA</strong> Logic via<br />

Unused Host Bus Pins.”<br />

Read from <strong>FPGA</strong> logic through<br />

unused host pins. See<br />

“Accessing <strong>FPGA</strong> Logic via<br />

Unused Host Bus Pins.”<br />

<strong>MAC</strong> configuration or address<br />

filter register access. See<br />

“<strong>Ethernet</strong> <strong>MAC</strong> Configuration<br />

and Address Filter Access.”<br />

Interrupt Status. See “DCR<br />

Interrupts.”<br />

Interrupt Configuration. See<br />

“DCR Interrupts.”<br />

MDIO write. See “PCS/PMA<br />

Sublayer or External Device<br />

Access via MDIO.”<br />

MDIO access. See “PCS/PMA<br />

Sublayer or External Device<br />

Access via MDIO.”<br />

Register Accessible<br />

Through dataRegLSW<br />

User-defined <strong>FPGA</strong> logic<br />

register.<br />

User-defined <strong>FPGA</strong> logic<br />

register.<br />

<strong>MAC</strong> configuration or<br />

address filter register.<br />

Address codes correlate to<br />

<strong>MAC</strong> register addresses in<br />

Table 4-1.<br />

IRSTATUS_e#<br />

IRENABLE_e#<br />

MIIMWRDATA_e#<br />

Registers in PCS/PMA<br />

sublayer or from an external<br />

device via MDIO.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 103<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 4: Host/DCR Bus Interfaces<br />

The register definitions for the DCR bridge registers are shown in Table 4-16 to Table 4-19.<br />

The DCR registers (dataRegMSW, dataRegLSW, cntlReg, and RDYstatus_e#) and the DCR<br />

bridge registers (IRSTATUS_e#, IRENABLE_e#, and MIIMWRDATA) use the big-endian<br />

bit numbering convention. The <strong>Ethernet</strong> <strong>MAC</strong> host registers, such as Receiver<br />

Configuration (Word 0) (host address 0x200) register, use the little-endian bit numbering<br />

convention. In the DCR bridge implementation, there is no conversion to or from big<br />

endian to little endian. The bit positions are mapped directly in a one-to-one<br />

correspondence (big-endian bit [0] is mapped directly to little-endian bit [31], bit [1] is<br />

mapped directly to little endian bit [30], and so forth).<br />

Table 4-16: DCR Data Register dataRegMSW<br />

MSB<br />

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31<br />

dataRegMSW<br />

Bit Description Default Value<br />

[0:31] Data. Data input from the DCR bus for the <strong>Ethernet</strong> <strong>MAC</strong> registers or other accessible<br />

registers is written into this register. The most significant word of data is read out from the<br />

<strong>Ethernet</strong> <strong>MAC</strong> registers or other registers and deposited into this register. Because<br />

dataRegMSW is shared between E<strong>MAC</strong>0 and E<strong>MAC</strong>1, data is overwritten by a read/write<br />

operation to the other <strong>Ethernet</strong> <strong>MAC</strong>.<br />

The MSW data register is used when reading from the General Address table and for a read<br />

from <strong>FPGA</strong> logic registers. For all other transactions, only the LSW data register is used.<br />

Table 4-17: DCR Data Register dataRegLSW<br />

MSB<br />

Undefined<br />

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31<br />

dataRegLSW<br />

Bit Description Default Value<br />

DCR Data Register (dataRegLSW)<br />

[0:31] Data. Data input from the DCR bus for the <strong>Ethernet</strong> <strong>MAC</strong> registers or other registers is<br />

written into this register. The least significant word of data is read out from the <strong>Ethernet</strong><br />

<strong>MAC</strong> registers or other registers is deposited into this register. Because dataRegLSW is<br />

shared between E<strong>MAC</strong>0 and E<strong>MAC</strong>1, data is overwritten by a read/write operation to the<br />

other <strong>Ethernet</strong> <strong>MAC</strong>.<br />

Undefined<br />

104 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

LSB<br />

LSB<br />

R


R<br />

Table 4-18: DCR Control Register cntlReg<br />

MSB<br />

.<br />

Using the DCR Bus<br />

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31<br />

RESERVED<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 105<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

WEN<br />

RESERVED ADDRESS_CODE<br />

Bit Description Default Value<br />

[0:15] Reserved. All 0s<br />

[16] Write Enable. When this bit is asserted, the data in either dataRegLSW or dataRegMSW is<br />

written to the <strong>Ethernet</strong> <strong>MAC</strong> host interface. When this bit is deasserted, the operation to be<br />

performed is read.<br />

[17:21] Reserved. All 0s<br />

[22:31] Address Code. The DCR bus bridge translates the address code for this transaction into the<br />

appropriate signals on the <strong>Ethernet</strong> <strong>MAC</strong> host interface. See Table 4-15, page 103 for a<br />

description of address codes.<br />

Table 4-19: DCR Ready Status Register RDYstatus_e# (Read Only)<br />

MSB<br />

0<br />

All 0s<br />

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31<br />

RESERVED<br />

DCR RDY<br />

RESERVED<br />

Bit Description Default Value<br />

[0:14] Reserved. All 0s<br />

[15] DCR Bridge Ready bit. High when all of the bits in RDYstatus_e0 or RDYstatus_e1 are High. 1<br />

[16:24] Reserved. All 0s<br />

[25] Configuration Write-Ready bit. 1<br />

[26] Configuration Read-Ready bit. 1<br />

[27] Address Filter Write-Ready bit. 1<br />

[28] Address Filter Read-Ready bit. 1<br />

[29] MDIO Write-Ready bit. 1<br />

[30] MDIO Read-Ready bit. 1<br />

[31] <strong>FPGA</strong> Logic Read-Ready bit. 1<br />

CFG WR<br />

CFG RR<br />

AF WR<br />

AF RR<br />

MIIM WR<br />

MIIM RR<br />

LSB<br />

LSB<br />

FABR RR


Chapter 4: Host/DCR Bus Interfaces<br />

The bits in the Ready Status register are set to 1 when there is no access in progress. When<br />

an access is in progress, a bit corresponding to the type of access is automatically cleared.<br />

The bit is automatically set again when the access is complete.<br />

Table 4-20: Interrupt Status Register IRSTATUS_e#<br />

Address Code<br />

0x3A0<br />

MSB<br />

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31<br />

RESERVED<br />

Bit Description Default Value<br />

[0:24] Reserved. 0<br />

[25] Configuration Write Interrupt Request bit. 0<br />

[26] Configuration Read Interrupt Request bit. 0<br />

[27] Address Filter Write Interrupt Request bit. 0<br />

[28] Address Filter Read Interrupt Request bit. 0<br />

[29] MDIO Write Interrupt Request bit. 0<br />

[30] MDIO Read Interrupt Request bit. 0<br />

[31] <strong>FPGA</strong> Logic Read Interrupt Request bit. 0<br />

Table 4-21: Interrupt Enable Register IRENABLE_e#<br />

Address Code<br />

0x3A4<br />

MSB<br />

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31<br />

RESERVED<br />

Bit Description Default Value<br />

[0:24] Reserved. 0<br />

[25] Configuration Write IR-enable bit. 0<br />

[26] Configuration Read IR-enable bit. 0<br />

[27] Address Filter Write IR-enable bit. 0<br />

[28] Address Filter Read IR-enable bit. 0<br />

[29] MDIO Write IR-enable bit. 0<br />

[30] MDIO Read IR-enable bit. 0<br />

[31] <strong>FPGA</strong> Logic Read IR enable bit. 0<br />

106 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

CFG WST<br />

CFG WEN<br />

CFG RST<br />

CFG REN<br />

AF WST<br />

AF WEN<br />

AF RST<br />

AF REN<br />

MIIM WST<br />

MIIM WEN<br />

MIIM RST<br />

MIIM REN<br />

LSB<br />

FABR RST<br />

LSB<br />

FABR REN<br />

R


R<br />

Using the DCR Bus<br />

The IRENABLE_e# register is programmed to allow updating of the interrupt request in<br />

the IRSTATUS_e# register. When an enable bit is cleared, the corresponding bit in the<br />

IRSTATUS_e# register is not updated.<br />

Table 4-22: Host Interface MDIO Write Data Register (MIIMWRDATA)<br />

Address Code<br />

0x3B0<br />

MSB<br />

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31<br />

Interfacing to a Processor<br />

DCR Interrupts<br />

RESERVED MIIMWRDATA<br />

Bit Description Default Value<br />

[0:15] Reserved. All 0s<br />

[16:31] Data. Temporarily holds MDIO write data for output onto the host write data bus. Undefined<br />

The DCR bridge ignores any new DCR command for host access until the current host<br />

access is complete. Therefore, it is essential to determine when the host access is complete<br />

before issuing a new DCR command. While some commands complete within one clock<br />

cycle on the DCR bus, others such as MDIO accesses require multiple clock cycles.<br />

There are two ways to use the DCR bus with the host processor. The user can select either<br />

polling or interrupts as a method of informing the host processor of access status. The<br />

interrupt method is more efficient as it frees the processor to operate while waiting for the<br />

DCR transaction to finish.<br />

Interrupt request informs the host processor when the host interface completes a DCR<br />

host access command. The interrupt request signal, DCRHOSTDONEIR, is only active<br />

when the DCR bus is used, and the host interface register IRENABLE_e# is<br />

programmed to enable interrupt. This signal is active High and level sensitive. When<br />

a host access through the DCR bus is completed, the DCRHOSTDONEIR signal is<br />

asserted. The host processor needs to service the interrupt request and clear the host<br />

interface register (IRSTATUS_e#) to deassert this signal. See “DCR Interrupts” for a<br />

description of the DCR Interrupts.<br />

Polling of the DCR status register RDYstatus_e#. The processor polls this register to<br />

determine access completion status. The bits in this register are asserted when there is<br />

no access in progress. When an access is in progress, a bit corresponding to the type of<br />

access is automatically deasserted. This bit is automatically reasserted when the<br />

access is complete. RDYstatus_e#[15] is asserted only when there are no DCR<br />

transactions in progress, allowing the polling process to check this one bit for all<br />

transaction types, across both E<strong>MAC</strong>s.<br />

The DCRHOSTDONEIR interrupt can be used to manage processor DCR access. The<br />

operation and status of the interrupt can be accessed through the IRSTATUS_e# and<br />

IRENABLE_e# registers.<br />

The IRSTATUS_e# register indicates which transaction type has triggered the interrupt.<br />

This allows the host to read this register to determine the type of host access completed.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 107<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

LSB


Chapter 4: Host/DCR Bus Interfaces<br />

Before exiting the interrupt service routine, the host should write to this register to clear the<br />

interrupt request bit.<br />

To read and clear the IRSTATUS_e# register, the following operations must be performed<br />

on the DCR bus:<br />

1. To access the IRSTATUS_e# register, write an address code of 0x3A0 to the cntlReg<br />

register, addressing cntlReg using E<strong>MAC</strong>0_DCRBASEADDR for IRSTATUS_e0, and<br />

E<strong>MAC</strong>1_DCRBASEADDR for IRSTATUS_e1. The write enable bit should be cleared to<br />

indicate a read.<br />

2. The register information for IRSTATUS_e# is loaded into dataRegLSW. Read this<br />

register to access the data.<br />

3. To clear the interrupt, the contents of the IRSTATUS_e# register should be written to<br />

zero. Write a value of all zeros into the dataRegLSW.<br />

4. Write the cntlReg with the address 0x3A0 to load the data from dataRegLSW into the<br />

register IRSTATUS_e# and clear the interrupt. The write enable bit should be set to 1 to<br />

indicate a write.<br />

To read from the E<strong>MAC</strong>0 IRSTATUS_e0 register and then clear the register:<br />

// Write the address of IRStatus_e0 register 0x3A0 to the<br />

// cntlReg_e0 register. Ensure that the write enable bit is not asserted<br />

dcr_write(E<strong>MAC</strong>0_DCRBASEADDR + 2, 0x000003A0);<br />

// Read the IRSTATUS_e0 data from the dataRegLSW<br />

dcr_read (E<strong>MAC</strong>0_DCRBASEADDR + 1);<br />

// Write a value of all zeros to the dataRegLSW<br />

dcr_write(E<strong>MAC</strong>0_DCRBASEADDR + 1, 0x00000000);<br />

// Write to the cntlReg_e0 register to load the data into the<br />

// IRStatus_e0 register to clear the interrupt<br />

dcr_write(E<strong>MAC</strong>0_DCRBASEADDR + 2, 0x000083A0);<br />

The IRENABLE_e# register is programmed to enable the different interrupt types to<br />

trigger the DCRHOSTDONEIR interrupt. When an enable bit is set, the corresponding bit<br />

in the IRSTATUS_e# register is updated when an interrupt of that type occurs. To read from<br />

this register and then write back, the following steps are required.<br />

1. To read the IRENABLE_e# register, write an address code 0x3A4 to the cntlReg,<br />

addressing the cntlReg using E<strong>MAC</strong>0_DCRBASEADDR for IRENABLE_e0, and<br />

E<strong>MAC</strong>1_DCRBASEADDR for IRENABLE_e1, the write enable bit should be cleared to<br />

indicate a read operation.<br />

2. The register information for IRENABLE_e# is loaded into the dataRegLSW register.<br />

Read this register to access the data.<br />

3. To enable specific interrupts, write the required bitmask value to the dataRegLSW<br />

register.<br />

4. Write to the cntlReg with the address code 0x3A4 to load the data from datRegLSW<br />

into the IRENABLE_e# register. The write enable bit should be set to 1 to indicate a<br />

write operation.<br />

To read from the E<strong>MAC</strong>1 IRENABLE_e1 register and then enable all interrupts:<br />

// Write the address of IRENABLE_e1 register 0x3A4 to the<br />

// cntlReg_e1 register. Ensure that the write enable bit is not asserted<br />

dcr_write(E<strong>MAC</strong>1_DCRBASEADDR + 2, 0x000003A4);<br />

// Read the IRENABLE_e1 data from the dataRegLSW<br />

dcr_read (E<strong>MAC</strong>1_DCRBASEADDR + 1);<br />

// Write a value of all ones to the dataRegLSW<br />

dcr_write(E<strong>MAC</strong>1_DCRBASEADDR + 1, 0x0000007F);<br />

108 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

// Write to the cntlReg_e1 register to load the data into the<br />

// IRENABLE_e1 register and enable all interrupts<br />

dcr_write(E<strong>MAC</strong>1_DCRBASEADDR + 2, 0x000083A4);<br />

<strong>Ethernet</strong> <strong>MAC</strong> Configuration and Address Filter Access<br />

Reading from an <strong>Ethernet</strong> <strong>MAC</strong> Configuration Register<br />

Using the DCR Bus<br />

To read from an <strong>Ethernet</strong> <strong>MAC</strong> configuration register, the user must perform the following<br />

sequence of operations on the DCR bus:<br />

1. To access E<strong>MAC</strong>0, use E<strong>MAC</strong>0_DCRBASEADDR. To access E<strong>MAC</strong>1, use<br />

E<strong>MAC</strong>1_DCRBASEADDR. Write to the cntlReg register, with the write enable bit<br />

cleared to 0, to indicate a read operation and set the address code to the desired<br />

address of the <strong>Ethernet</strong> <strong>MAC</strong> configuration register to be accessed. The address code<br />

maps directly to the <strong>Ethernet</strong> <strong>MAC</strong> address codes given in Table 4-1.<br />

2. Poll the RDYstatus_e# register until the configuration Read-Ready bit is set to 1 or wait<br />

until the DCRHOSTDONEIR interrupt is asserted.<br />

3. Read from the dataRegLSW register to access data from the <strong>Ethernet</strong> <strong>MAC</strong><br />

configuration register.<br />

The following code demonstrates a processor routine to read from an <strong>Ethernet</strong> <strong>MAC</strong><br />

configuration register. To read from the E<strong>MAC</strong>0 transmitter configuration register:<br />

// E<strong>MAC</strong> Configuration Register 0x280 (E<strong>MAC</strong>0 Transmitter Configuration)<br />

// Write the address of E<strong>MAC</strong>0 Transmitter Configuration register to the<br />

// cntlReg_e0 register<br />

dcr_write(E<strong>MAC</strong>0_DCRBASEADDR + 2, 0x00000280);<br />

// Poll the RDYstatus_e0 register<br />

while ( !(dcr_read(E<strong>MAC</strong>0_DCRBASEADDR + 3) & 0x00010000) );<br />

// Read the dataRegLSW with the values returned from the E<strong>MAC</strong>0<br />

// Transmitter Configuration register<br />

dcr_read (E<strong>MAC</strong>0_DCRBASEADDR + 1);<br />

Writing to an <strong>Ethernet</strong> <strong>MAC</strong> Configuration Register<br />

To write to an <strong>Ethernet</strong> <strong>MAC</strong> configuration register, the user must perform the following<br />

sequence of operations on the DCR bus:<br />

1. Write to the dataRegLSW register with the desired value for the <strong>Ethernet</strong> <strong>MAC</strong><br />

configuration register. This value is mapped to the host configuration register.<br />

2. Write to the cntlReg register with the desired address of the <strong>Ethernet</strong> <strong>MAC</strong><br />

configuration register and the write enable bit to logic 1. Use<br />

E<strong>MAC</strong>0_DCRBASEADDR to access E<strong>MAC</strong>0 and E<strong>MAC</strong>1_DCRBASEADDR to access<br />

E<strong>MAC</strong>1.<br />

3. Poll the RDYstatus_e# register until the configuration Write-Ready bit is set to 1 or<br />

wait until the DCRHOSTDONEIR interrupt is asserted.<br />

To write to the E<strong>MAC</strong>1 flow control register:<br />

// E<strong>MAC</strong> Configuration Register 0x2C0 (E<strong>MAC</strong> Flow Control)<br />

// Write to enable the flow control on both the transmit and receive<br />

// side of E<strong>MAC</strong>1, set bits 29 and 30 to 1<br />

dcr_write(E<strong>MAC</strong>1_DCRBASEADDR + 1, 0x60000000);<br />

// Write the address of Flow Control register to the cntlReg_e1<br />

// register, with the write enable bit asserted<br />

dcr_write(E<strong>MAC</strong>1_DCRBASEADDR + 2, 0x000082C0);<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 109<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 4: Host/DCR Bus Interfaces<br />

// Poll the RDYstatus_e1 register<br />

while ( !(dcr_read(E<strong>MAC</strong>1_DCRBASEADDR + 3) & 0x00010000) );<br />

Reading from the General Address Table Register of the Address Filter Block<br />

The same methods used in reading and writing to the <strong>Ethernet</strong> <strong>MAC</strong> configuration<br />

registers through the DCR apply to the address filter configuration registers. The only<br />

operations that differ are reading and writing from the general address table.<br />

To read the desired general address table register of the address filter, a DCR write<br />

operation must be performed.<br />

1. Write to the dataRegLSW register, setting the two-bit address of the general address<br />

table of the register to be accessed (four general address table registers are in the<br />

address filter block) and the RNW bit to 1.<br />

2. Write to the cntlReg register with the address register of general address (Word 1) to<br />

0x38C. Set the Write enable bit to write to the general address (Word 1) (see<br />

Table 4-12). Use E<strong>MAC</strong>0_DCRBASEADDR to access E<strong>MAC</strong>0 and<br />

E<strong>MAC</strong>1_DCRBASEADDR to access E<strong>MAC</strong>1.<br />

3. Poll the RDYstatus_e# register until the address filter Read-Ready bit is set to 1 or wait<br />

until the DCRHOSTDONEIR interrupt is asserted.<br />

4. Read from the dataRegMSW to read the general address [47:32] and dataRegLSW to<br />

read general address [31:0].<br />

To read from the general address table register (2) of E<strong>MAC</strong>0:<br />

// MULTI_ADDR Register 2 of AF Block<br />

// Set the enable bit of the MULTI_ADDR RNW and MULTI_ADDR Register 2<br />

dcr_write(E<strong>MAC</strong>0_DCRBASEADDR + 1, 0x00820000);<br />

// Write the address of E<strong>MAC</strong>0 General Address register to the cntlReg<br />

// register, with the write enable bit asserted<br />

dcr_write(E<strong>MAC</strong>0_DCRBASEADDR + 2, 0x0000838C);<br />

// Poll the RDYstatus_e0 register<br />

while ( !(dcr_read(E<strong>MAC</strong>0_DCRBASEADDR + 3) & 0x00010000) );<br />

// Read the values returned of the General Address Word0 and Word1<br />

// registers (48-bit value)<br />

// from the dataRegMSW and dataRegLSW registers<br />

gen_addr_msw = dcr_read(E<strong>MAC</strong>0_DCRBASEADDR + 0);<br />

gen_addr_lsw = dcr_read(E<strong>MAC</strong>0_DCRBASEADDR + 1);<br />

Writing to the General Address Table Register of the Address Filter Block<br />

The same methods used in reading and writing to the <strong>Ethernet</strong> <strong>MAC</strong> configuration<br />

registers through the DCR apply to the address filter configuration registers. The only<br />

operations that differ are reading and writing from the general address table.<br />

For writing to the desired general address table register of the AF block, two write<br />

operations must be performed:<br />

1. Write to the dataRegLSW register the general address [31:0] to be stored on the desired<br />

general address table register.<br />

2. Write to the cntlReg# register with the address for general address word 0 (0x388),<br />

setting the write enable bit. Use E<strong>MAC</strong>0_DCRBASEADDR to access E<strong>MAC</strong>0 and<br />

E<strong>MAC</strong>1_DCRBASEADDR to access E<strong>MAC</strong>1.<br />

3. Poll the RDYstatus_e# register until the address configuration write bit is set to 1.<br />

110 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


DCR Offset<br />

0x1<br />

MSB<br />

R<br />

Using the DCR Bus<br />

4. Write to the dataRegLSW register the general address [47:32] with the write mask bit<br />

and the value of the general address table register to be accessed.<br />

5. Write to cntlReg register with the address for general address word 1 (0x38C). Set the<br />

write enable bit.<br />

6. Poll the RDYstatus_e# register until the address configuration write bit is set or wait<br />

until the DCRHOSTDONEIR interrupt is asserted.<br />

To write the general address 0xFACEDEAFCAFE to the general address table register 0x1 of<br />

E<strong>MAC</strong>1:<br />

// Write the general address[31:0] to the dataRegLSW register<br />

dcr_write(E<strong>MAC</strong>1_DCRBASEADDR + 1, 0xDEAFCAFE);<br />

// Write the address of E<strong>MAC</strong>1 General Address Word 0 register to the<br />

// cntlReg_e1 register<br />

dcr_write(E<strong>MAC</strong>1_DCRBASEADDR + 2, 0x00008388);<br />

// Poll the RDYstatus_e1 register<br />

while ( !(dcr_read(E<strong>MAC</strong>1_DCRBASEADDR + 3) & 0x00010000) );<br />

// MULTI_ADDR Register 1 of AF Block<br />

// Write the general address [47:32] with the MULTI_ADDR RNW<br />

// write mask bit deasserted to the dataRegLSW register<br />

dcr_write(E<strong>MAC</strong>1_DCRBASEADDR + 1, 0x0001FACE);<br />

// Write the address of E<strong>MAC</strong>1 General Address Word 1 register to the<br />

// cntlReg_e1 register<br />

dcr_write(E<strong>MAC</strong>1_DCRBASEADDR + 2, 0x0000838C);<br />

// Poll the RDYstatus_e1 register<br />

while ( !(dcr_read(E<strong>MAC</strong>1_DCRBASEADDR + 3) & 0x00010000) );<br />

PCS/PMA Sublayer or External Device Access via MDIO<br />

MDIO register reads take a multiple number of host clock cycles depending on the<br />

physical interface device. To write to any of the PCS layer registers (“1000BASE-X<br />

PCS/PMA Management Registers,” page 122), the data must be written to the<br />

MIIMWRDATA register. The physical address (PHYAD) and PCS register number<br />

(REGAD) are written to the DCR dataRegLSW register for both read and write operations.<br />

Writing the address code 0x3B4 to the control register indicates a request for an MDIO<br />

transaction. The format for writing the PHYAD and REGAD into the dataRegLSW register<br />

is shown in Figure 4-9. To access the internal PCS/PMA sublayer registers, the PHYAD<br />

should match that set on the PHYE<strong>MAC</strong>#PHYAD[4:0] input port. The MDIO interface is<br />

described in detail in Chapter 5.<br />

0 22 26 27 31<br />

PHYAD<br />

LSB<br />

REGAD<br />

15 PCS Sublayer Managed Register Block 0<br />

Control Register<br />

PHY Identifier Register<br />

Auto-Negotiation Advertisement Register<br />

Figure 4-9: MDIO Address Register to Access PCS Sublayer Register Block<br />

<strong>UG194</strong>_4_09_072306<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 111<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

REGAD<br />

0<br />

1<br />

2<br />

3<br />

4<br />

MSB<br />

Status Register<br />

PHY Identifier Register<br />

LSB


Chapter 4: Host/DCR Bus Interfaces<br />

Reading the PHY Registers using MDIO<br />

To read from a configuration register either in the <strong>Ethernet</strong> <strong>MAC</strong> PCS/PMA layer or from<br />

an external PHY, the user must perform the following sequence of operations on the DCR<br />

bus:<br />

1. Write to the dataRegLSW register with the PHYAD and register to be accessed. This<br />

value should be formatted as shown in Figure 4-9.<br />

2. Write to the cntlReg register with the decode address for MDIO transaction (0x3B4)<br />

and the write enable bit cleared to indicate a read operation. Use<br />

E<strong>MAC</strong>0_DCRBASEADDR to perform the transaction on the E<strong>MAC</strong>0 MDIO interface<br />

and E<strong>MAC</strong>1_DCRBASEADDR to perform the transaction on the E<strong>MAC</strong>1 MDIO<br />

interface.<br />

3. Poll the RDYstatus_e# register until the MDIO Write-Ready bit is set or wait until the<br />

DCRHOSTDONEIR interrupt is asserted.<br />

4. Read the PHY register contents from the dataRegLSW.<br />

To read PHYAD 0x1 and PHY register 0x4 through the E<strong>MAC</strong>0 MDIO interface, MDIO<br />

must be enabled by writing to the management configuration register with the clock<br />

divider for MDC, as described in “Writing to an <strong>Ethernet</strong> <strong>MAC</strong> Configuration Register.”<br />

// Write the PHY address and PHY register to be accessed to the<br />

// dataRegLSW register<br />

dcr_write(E<strong>MAC</strong>0_DCRBASEADDR + 1, (0x1


R<br />

Using the DCR Bus<br />

// E<strong>MAC</strong> Management Register 0x340 (E<strong>MAC</strong>1 Management Configuration)<br />

// Write the PHY data to the dataRegLSW<br />

dcr_write(E<strong>MAC</strong>1_DCRBASEADDR + 1, 0x00001140);<br />

// Write the address for MIIMWRDATA to the cntlReg_e1<br />

// register to load the write data to MIIMWRDATA<br />

dcr_write(E<strong>MAC</strong>1_DCRBASEADDR + 2, 0x000083B0);<br />

// Write the PHY address and PHY register to be accessed to the<br />

// dataRegLSW register<br />

dcr_write(E<strong>MAC</strong>1_DCRBASEADDR + 1, (0x2


Chapter 4: Host/DCR Bus Interfaces<br />

E<strong>MAC</strong> I/O Pin Equivalent stand-alone<br />

host bus signal<br />

host_clk<br />

HOSTMIIMRDY<br />

HOSTRDDATA[15]<br />

HOSTRDDATA[8:0]<br />

HOSTRDDATA[9]<br />

HOSTRDDATA[10]<br />

6 Clocks<br />

HOSTWRDATA[31:0] LSW<br />

Figure 4-10: <strong>FPGA</strong>-Logic Based Register Read Timing<br />

<strong>UG194</strong>_4_10_012907<br />

To read from the <strong>FPGA</strong> logic, the following operations should take place on the DCR bus.<br />

Which <strong>Ethernet</strong> <strong>MAC</strong> registers are used only affects the encoding of the I/O pin<br />

HOSTRDDATA[10], the E<strong>MAC</strong>1SEL encoding. Otherwise output signals are identical.<br />

1. Write to the cntlReg register with the address code in the range 0x000 to 0x02F or<br />

0x040 to 0x04F. This address is encoded onto the HOSTRDDATA[9:0] I/O pins. The<br />

write enable bit is cleared to indicate a read operation.<br />

2. Poll the RDYstatus_e# register until the Statistics IP Read-Ready bit is set or wait until<br />

the DCRHOSTDONEIR interrupt is asserted.<br />

3. Read the dataRegMSW and dataRegLSW registers to get the contents of the <strong>FPGA</strong><br />

logic-based registers.<br />

To read a logic-based register addressed 0x020:<br />

// <strong>FPGA</strong> Logic Register at 0x020 (User defined)<br />

// Write the decode address for <strong>FPGA</strong> logic access to the cntlReg_e0<br />

register<br />

dcr_write(E<strong>MAC</strong>0_DCRBASEADDR + 2, 0x00000020);<br />

// Poll the RDYstatus_e0 register<br />

while ( !(dcr_read(E<strong>MAC</strong>0_DCRBASEADDR + 3) & 0x00010000) );<br />

// Read the value from MSW and LSW registers<br />

fabric_msw = dcr_read(E<strong>MAC</strong>0_DCRBASEADDR + 0);<br />

fabric_lsw = dcr_read(E<strong>MAC</strong>0_DCRBASEADDR + 1);<br />

This method can be used to connect the <strong>Ethernet</strong> <strong>MAC</strong> to the statistics counters as<br />

described in Chapter 7, “Interfacing to a Statistics Block.”<br />

114 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

MSW<br />

HOSTMIIMSEL<br />

HOSTREQ<br />

HOSTADDR[8:0]<br />

HOSTADDR[9]<br />

HOSTE<strong>MAC</strong>1SEL<br />

HOSTRDDATA[31:0]<br />

R


R<br />

MDIO Interface<br />

Chapter 5<br />

This chapter describes the Management Data Input/Output (MDIO) interface that is used<br />

to access physical device registers, both external to the <strong>Ethernet</strong> <strong>MAC</strong> (for example an<br />

external PHY device) and internal to the <strong>Ethernet</strong> <strong>MAC</strong> (the physical device registers<br />

present in the PCS/PMA sublayer block).<br />

The internal physical device (i.e., the PCS/PMA sublayer block), is capable of 1000BASE-X<br />

PCS/PMA and SGMII operation (see Chapter 6, “Physical Interface”). These two modes of<br />

operation each have associated management registers.<br />

This chapter contains the following sections:<br />

“Introduction to MDIO”<br />

“MDIO Implementation in the <strong>Ethernet</strong> <strong>MAC</strong>”<br />

“1000BASE-X PCS/PMA Management Registers”<br />

“SGMII Management Registers”<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 115<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 5: MDIO Interface<br />

Introduction to MDIO<br />

MDIO Bus System<br />

The MDIO interface for 1 Gb/s operation (and slower speeds) is defined in IEEE Std 802.3,<br />

clause 22. This two-wire interface consists of a clock (MDC) and a shared serial data line<br />

(MDIO). The maximum permitted frequency of MDC is set at 2.5 MHz.<br />

Figure 5-1 illustrates an example MDIO bus system.<br />

An <strong>Ethernet</strong> <strong>MAC</strong> is shown as the MDIO bus master (the Station Management (STA)<br />

entity).<br />

Two PHY devices are shown connected to the same bus, both are MDIO slaves (MDIO<br />

Managed Device (MMD) entities).<br />

<strong>MAC</strong> (STA)<br />

Host Bus<br />

Interface<br />

MDIO<br />

Master<br />

MDIO<br />

MDC<br />

PHY1 (MMD)<br />

Configuration<br />

Registers 0 to 31<br />

(REGAD)<br />

MDIO Slave<br />

PHY2 (MMD)<br />

Configuration<br />

Registers 0 to 31<br />

(REGAD)<br />

MDIO Slave<br />

Figure 5-1: Typical MDIO-Managed System<br />

Physical<br />

Address<br />

(PHYAD)<br />

= 1<br />

Physical<br />

Address<br />

(PHYAD)<br />

= 2<br />

<strong>UG194</strong>_5_01_072306<br />

Described simply, the MDIO bus system is a standardized interface for accessing the<br />

configuration and status registers of <strong>Ethernet</strong> PHY devices. In the example illustrated, the<br />

Management Host Bus Interface of the <strong>Ethernet</strong> <strong>MAC</strong> is able to access the configuration<br />

and status registers of two PHY devices via the MDIO bus.<br />

116 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


MDC<br />

MDIO<br />

R<br />

MDIO Transactions<br />

Introduction to MDIO<br />

All transactions, read or write, are initiated by the MDIO master. All MDIO slave devices,<br />

when addressed, must respond. MDIO transactions take the form of an MDIO frame,<br />

containing fields for transaction type, address and data. This MDIO frame is transferred<br />

across the MDIO wire synchronously to MDC. The following abbreviations are used in this<br />

chapter:<br />

Table 5-1: Abbreviations Used in this Chapter<br />

Abbreviation Definition<br />

Write Transaction<br />

Figure 5-2 shows a write transaction frame across the MDIO, as defined by OP = 0b01. The<br />

addressed PHY device (with physical address PHYAD) takes the 16-bit word in the Data<br />

field and writes it to the register at REGAD.<br />

Read Transaction<br />

OP Operation code (read or write)<br />

PHYAD Physical address<br />

PRE Preamble<br />

REGAD Register address<br />

ST Start of frame<br />

TA Turnaround<br />

STA Drives MDIO<br />

Z Z 1 1 1 0 1 0 1 P4 P3 P2 P1 P0 R4 R3 R2 R1 R0 1 0 D15 D13 D11 D9 D7 D5 D3 D1 Z Z<br />

D14 D12 D10 D8 D6 D4 D2 D0<br />

IDLE 32 bits<br />

PRE<br />

ST OP PHYAD REGAD TA 16-Bit WRITE DATA<br />

IDLE<br />

Figure 5-2: MDIO Write Transaction<br />

<strong>UG194</strong>_5_02_032406<br />

Figure 5-3 shows a read transaction as defined by OP = 0b10. The addressed PHY device<br />

(with physical address PHYAD) takes control of the MDIO wire during the turnaround<br />

cycle and then returns the 16-bit word from the register at REGAD.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 117<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 5: MDIO Interface<br />

MDC<br />

MDIO<br />

Z Z 1 1 1 0 1 1 0 P4 P3 P2 P1 P0 R4 R3 R2 R1 R0 Z 0 D15 D13 D11 D9 D7 D5 D3 D1 Z Z<br />

D14 D12 D10 D8 D6 D4 D2 D0<br />

IDLE 32 bits<br />

PRE<br />

ST OP PRTAD REGAD TA 16-Bit READ DATA<br />

IDLE<br />

MDIO Addressing<br />

STA Drives MDIO MMD Drives MDIO<br />

MDIO addresses consists of two stages: physical address (PHYAD) and register address<br />

(REGAD).<br />

Physical Address (PHYAD)<br />

As shown in Figure 5-1, two PHY devices are attached to the MDIO bus. Each of these has<br />

a different physical address. To address the intended PHY, its physical address should be<br />

known by the MDIO master (in this case an <strong>Ethernet</strong> <strong>MAC</strong>) and placed into the PHYAD<br />

field of the MDIO frame (see “MDIO Transactions”).<br />

The PHYAD field for an MDIO frame is a 5-bit binary value capable of addressing 32<br />

unique addresses. However, every MDIO slave must respond to physical address 0. This<br />

requirement dictates that the physical address for any particular PHY must not be set to 0<br />

to avoid MDIO contention. Physical Addresses 1 through to 31, therefore, can be used to<br />

connect up to 31 PHY devices onto a single MDIO bus.<br />

Physical Address 0 can be used to write a single command that is obeyed by all attached<br />

PHYs, such as a reset or power-down command.<br />

Register Address (REGAD)<br />

Figure 5-3: MDIO Read Transaction<br />

<strong>UG194</strong>_5_03_032406<br />

Having targeted a particular PHY using PHYAD, the individual configuration or status<br />

register within that particular PHY must now be addressed by placing the individual<br />

register address into the REGAD field of the MDIO frame (see “MDIO Transactions”).<br />

The REGAD field for an MDIO frame is a 5-bit binary value capable of addressing 32<br />

unique addresses. The first 16 of these registers (0 to 15) are defined by the IEEE 802.3. The<br />

remaining 16 registers (16 to 31) are reserved for PHY vendors’ own register definitions.<br />

118 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

MDIO Implementation in the <strong>Ethernet</strong> <strong>MAC</strong><br />

Generic<br />

Host Bus<br />

DCR Bus<br />

Host<br />

Interface<br />

DCR Bridge<br />

MDIO Implementation in the <strong>Ethernet</strong> <strong>MAC</strong><br />

Figure 5-4 shows the functional block diagram of the <strong>Ethernet</strong> <strong>MAC</strong> with the host<br />

interface, DCR bridge, MDIO interface, PCS management, and MDIO intersection blocks<br />

highlighted.<br />

E<strong>MAC</strong>#<br />

TX<br />

RX<br />

16- or 8-Bit Client Interface<br />

Transmit Engine<br />

Flow Control<br />

Receive Engine<br />

Address Filter<br />

Registers<br />

MDIO Interface<br />

<strong>MAC</strong> Configuration<br />

Registers<br />

TX RX<br />

Statistics<br />

Figure 5-4: MDIO Implementation of the <strong>Ethernet</strong> <strong>MAC</strong><br />

Accessing MDIO through the Host Interface<br />

Clock Management<br />

MII/GMII/RGMII<br />

Interface to<br />

External PHY<br />

GTP/GTX Transceiver<br />

Interface<br />

MDIO Interface<br />

to External PHY<br />

<strong>UG194</strong>_5_04_071709<br />

The <strong>Ethernet</strong> <strong>MAC</strong> contains an MDIO interface block which is an MDIO master. This can<br />

initiate MDIO transactions when accessed through either the generic host bus or the DCR<br />

bus. See “PCS/PMA Sublayer or External Device Access via MDIO,” page 100, for<br />

reference.<br />

The MDIO interface supplies a clock, E<strong>MAC</strong>#PHYMCLKOUT, to the external devices when<br />

the host interface is enabled. This clock is derived from the HOSTCLK signal using the value<br />

in the Clock Divide[5:0] configuration register. The frequency of the MDIO clock is given<br />

by Equation 5-1:<br />

fHOSTCLK fMDC =<br />

-------------------------------------------------------------------------------------<br />

Equation 5-1<br />

( ( 1 + CLOCK_DIVIDE[5:0] ) × 2)<br />

To comply with the IEEE Std 802.3-2002 specification for this interface, the frequency of<br />

E<strong>MAC</strong>#PHYMCLKOUT should not exceed 2.5 MHz. To prevent E<strong>MAC</strong>#PHYMCLKOUT from<br />

being out of specification, the Clock Divide[5:0] value powers up at 000000. While this<br />

value is in the register, it is impossible to enable the MDIO interface. Upon reset, the MDIO<br />

port is disabled until a non-zero value has been written into the clock divide bits.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 119<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

MII/GMII/RGMII Interface<br />

TX<br />

RX<br />

TX<br />

RX<br />

PCS/PMA Sublayer<br />

PCS Management<br />

Registers<br />

MDIO Intersection


Chapter 5: MDIO Interface<br />

From the MDIO Interface block, the MDIO bus is internally connected within the <strong>Ethernet</strong><br />

<strong>MAC</strong> to the MDIO Intersection block. Here the MDIO bus is split. It is internally connected<br />

to the 1000BASE-X PCS/PMA sublayer logic and connected to the <strong>Ethernet</strong> <strong>MAC</strong> MDIO<br />

ports (see “Management Data Input/Output (MDIO) Signals,” page 37), which can<br />

provide MDIO access to and from an external PHY device. See Table 2-16, page 43. The<br />

E<strong>MAC</strong>#_MDIO_ENABLE attribute must be set (or MDIO Enable must be set in the<br />

Management Configuration Register) to allow access to the internal MDIO registers and<br />

the external MDIO bus.<br />

Accessing the Internal PCS/PMA Sublayer Management Registers<br />

The PCS/PMA sublayer logic, illustrated as a block in Figure 5-4, contains an MDIO slave,<br />

allowing access to its configuration and status registers. All connections are internal and<br />

active whenever MDIO operation is enabled.<br />

The PHYAD of the internal PCS/PMA sublayer registers can be set with the<br />

PHYE<strong>MAC</strong>#PHYAD[4:0] port. To access the PCS/PMA sublayer registers, simply initiate<br />

an MDIO transaction using the matching physical address. The PCS/PMA sublayer also<br />

responds to Physical Address 0 (see “MDIO Addressing,” page 118).<br />

The PCS/PMA Management registers have different definitions depending on the mode of<br />

operation. See as appropriate:<br />

“1000BASE-X PCS/PMA Management Registers”<br />

“SGMII Management Registers”<br />

When no external PHY is present, the PHYE<strong>MAC</strong>#MDIN port should be tied High and the<br />

PHYE<strong>MAC</strong>#MCLKIN port tied Low.<br />

Accessing the Management Registers of an External PHY using MDIO<br />

Whenever an MDIO operation is enabled (see Table 2-16, page 43), connections can be<br />

made to the <strong>Ethernet</strong> <strong>MAC</strong> MDIO ports (see “Management Data Input/Output (MDIO)<br />

Signals,” page 37), which can provide MDIO access to and from an external PHY device.<br />

PHYE<strong>MAC</strong>#MDIN, E<strong>MAC</strong>#PHYMDOUT, and E<strong>MAC</strong>#PHYMDTRI must be connected to a threestate<br />

buffer to create the bidirectional wire, MDIO. This three-state buffer can be either<br />

external to the <strong>FPGA</strong> or internally integrated using an IOBUF with an appropriate I/O<br />

standard for the external PHY. This is illustrated in Figure 5-5.<br />

In this mode of operation, the MDC clock is generated by the <strong>Ethernet</strong> <strong>MAC</strong> and obtained<br />

from the output port E<strong>MAC</strong>#PHYMCLKOUT; the input PHYE<strong>MAC</strong>#MCLKIN port is unused and<br />

should be connected to logic 0.<br />

To access the external PHY registers, simply initiate an MDIO transaction using the<br />

appropriate physical address. The PCS/PMA sublayer, even if it is not the physical<br />

interface, is still connected and responds to physical addresses 0 and the address matching<br />

the value of the PHYE<strong>MAC</strong>#PHYAD[4:0] port.<br />

120 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


Generic<br />

Host Bus<br />

DCR Bus<br />

R<br />

PHYE<strong>MAC</strong>#MCLKIN<br />

E<strong>MAC</strong>#PHYMCLKOUT<br />

PHYE<strong>MAC</strong>#MDIN<br />

E<strong>MAC</strong>#PHYMDOUT<br />

E<strong>MAC</strong>#PHYMDTRI<br />

MDIO Implementation in the <strong>Ethernet</strong> <strong>MAC</strong><br />

Figure 5-5: MDIO Access to External PHY<br />

Connect to<br />

External PHY<br />

Accessing PCS/PMA Sublayer Management Registers using MDIO<br />

Host<br />

Interface<br />

DCR Bridge<br />

Figure 5-6 shows the functional block diagram of the <strong>Ethernet</strong> <strong>MAC</strong> with the PCS<br />

management register, MDIO intersection, and MDIO master blocks highlighted. This<br />

figure shows that the PCS/PMA sublayer registers can still be accessed via MDIO when<br />

the host interface is not in use.<br />

E<strong>MAC</strong>#<br />

TX<br />

RX<br />

16- or 8-Bit Client Interface<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

Transmit Engine<br />

Flow Control<br />

Receive Engine<br />

Address Filter<br />

Registers<br />

MDIO Interface<br />

<strong>MAC</strong> Configuration<br />

Registers<br />

TX RX<br />

Statistics<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 121<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

GND<br />

I<br />

O<br />

I<br />

T<br />

OBUF<br />

O<br />

IOBUF<br />

Clock Management<br />

OPAD<br />

MDC<br />

IOPAD MDIO<br />

IO<br />

<strong>UG194</strong>_5_05_072306<br />

MII/GMII/RGMII<br />

Interface to<br />

External PHY<br />

GTP/GTX Transceiver<br />

Interface<br />

Figure 5-6: Accessing PCS/PMA Sublayer Management Registers in the <strong>Ethernet</strong> <strong>MAC</strong><br />

MII/GMII/RGMII Interface<br />

TX<br />

RX<br />

TX<br />

RX<br />

PCS/PMA Sublayer<br />

PCS Management<br />

Registers<br />

MDIO Intersection<br />

MDIO<br />

Master<br />

<strong>UG194</strong>_5_06_071709


Chapter 5: MDIO Interface<br />

To enable this functionality, the host interface should be disabled, and MDIO operation<br />

should be enabled (see Table 2-16, page 43).<br />

In this situation, an MDIO master external to the <strong>Ethernet</strong> <strong>MAC</strong> must initiate the “MDIO<br />

Transactions.” This MDIO master can exist in <strong>FPGA</strong> logic or as an external device. In this<br />

situation, the MDC clock must be provided to the <strong>Ethernet</strong> <strong>MAC</strong> through the<br />

PHYE<strong>MAC</strong>#MCKIN port. The output signal E<strong>MAC</strong>#PHYMCLKOUT should be left unconnected.<br />

The PCS/PMA Management registers have different definitions depending on the mode of<br />

operation. See as appropriate:<br />

“1000BASE-X PCS/PMA Management Registers”<br />

“SGMII Management Registers”<br />

1000BASE-X PCS/PMA Management Registers<br />

<strong>FPGA</strong><br />

PCS/PMA Sublayer<br />

<strong>MAC</strong> TX<br />

Interface<br />

<strong>MAC</strong> RX<br />

Interface<br />

MDIO<br />

Interface<br />

The PCS/PMA sublayer block, shown in Figure 5-7, is contained within the <strong>Ethernet</strong><br />

<strong>MAC</strong>. The PCS/PMA sublayer contains PCS Management registers, as listed in Table 5-2.<br />

These registers are described in further detail in Table 5-3 through to Table 5-13.<br />

PCS Transmit<br />

Engine<br />

Auto-Negotiation<br />

PCS Receive Engine<br />

and<br />

Synchronization<br />

PCS Management<br />

Registers<br />

Figure 5-7: 1000BASE-X PCS/PMA Sublayer Logic and Physical Connections<br />

<strong>UG194</strong>_5_07_090809<br />

Registers 0 through to 15, shown in Figure 5-7, are defined in IEEE Std 802.3. These contain<br />

information relating to the operation of the 1000BASE-X PCS/PMA sublayer, including the<br />

status of the physical <strong>Ethernet</strong> link (PHY link). Additionally, these registers are directly<br />

122 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

GTP/GTX Transceiver<br />

TX+<br />

TX-<br />

RX+<br />

RX-<br />

GBIC<br />

or<br />

SFP<br />

Optical<br />

Transceiver<br />

PHY<br />

Link<br />

TX<br />

Optical<br />

Fiber<br />

RX<br />

R


R<br />

1000BASE-X PCS/PMA Management Registers<br />

involved in the operation of the 1000BASE-X Auto-Negotiation function that occurs<br />

between the <strong>Ethernet</strong> <strong>MAC</strong> and its link partner, which is the <strong>Ethernet</strong> device connected at<br />

the far end of the PHY link (see “1000BASE-X Auto-Negotiation,” page 174).<br />

Registers 16 and 17 are vendor-specific registers, defined by <strong>Xilinx</strong>.<br />

Table 5-2: Configuration Registers for 1000BASE-X PCS/PMA<br />

Register Address<br />

Register Name<br />

(REGAD)<br />

0 “Control Register (Register 0)”<br />

1 “Status Register (Register 1)”<br />

2,3 “PHY Identifier (Registers 2 and 3)”<br />

4 “Auto-Negotiation Advertisement Register (Register 4)”<br />

5 “Auto-Negotiation Link Partner Ability Base Register (Register 5)”<br />

6 “Auto-Negotiation Expansion Register (Register 6)”<br />

7 “Auto-Negotiation Next Page Transmit Register (Register 7)”<br />

8 “Auto-Negotiation Next Page Receive Register (Register 8)”<br />

15 “Extended Status Register (Register 15)”<br />

16<br />

Table 5-3: Control Register (Register 0)<br />

“Vendor-Specific Register: Auto-Negotiation Interrupt Control Register<br />

(Register 16)”<br />

17 “Vendor-Specific Register: Loopback Control Register (Register 17)”<br />

Bit(s) Name Description Type Default Value<br />

0.15 Reset 1 = PCS/PMA reset.<br />

0 = Normal operation.<br />

0.14 Loopback 1 = Enable loopback mode.<br />

0 = Disable loopback mode.<br />

0.13 Speed<br />

Selection<br />

(LSB)<br />

0.12 Auto-<br />

Negotiation<br />

Enable<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a<br />

0 for this bit. Along with bit 0.6,<br />

speed selection of 1000 Mb/s is<br />

identified.<br />

1 = Enable Auto-Negotiation<br />

process.<br />

0 = Disable Auto-Negotiation<br />

process.<br />

0.11 Power Down 1 = Power down.<br />

0 = Normal operation.<br />

When set to 1, the RocketIO serial<br />

transceiver is placed in a Low power<br />

state. This bit requires a reset (see bit<br />

0.15) to clear.<br />

Read/Write<br />

Self Clearing<br />

E<strong>MAC</strong>#_PHYRESET<br />

“Physical Interface Attributes”<br />

Read/Write E<strong>MAC</strong>#_PHYLOOPBACKMSB<br />

“Physical Interface Attributes”<br />

Returns 0 0<br />

Read/Write E<strong>MAC</strong>#_PHYINITAUTONEG_ENABLE<br />

“Physical Interface Attributes”<br />

Read/ Write E<strong>MAC</strong>#_PHYPOWERDOWN<br />

“Physical Interface Attributes”<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 123<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 5: MDIO Interface<br />

Table 5-3: Control Register (Register 0) (Cont’d)<br />

Bit(s) Name Description Type Default Value<br />

0.10 Isolate 1 = Electrically isolate the PHY from<br />

GMII.<br />

0 = Normal operation.<br />

0.9 Restart Auto-<br />

Negotiation<br />

1 = Restart Auto-Negotiation<br />

process.<br />

0 = Normal operation.<br />

0.8 Duplex <strong>Mode</strong> The <strong>Ethernet</strong> <strong>MAC</strong> always returns a<br />

1 for this bit to signal full-duplex<br />

mode.<br />

0.7 Collision Test The <strong>Ethernet</strong> <strong>MAC</strong> always returns a<br />

0 for this bit to disable COL test.<br />

0.6 Speed<br />

Selection<br />

(MSB)<br />

0.5 Unidirection<br />

al Enable<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a<br />

1 for this bit. Together with bit 0.13,<br />

speed selection of 1000 Mb/s is<br />

identified.<br />

Enable transmit regardless of<br />

whether a valid link has been<br />

established.<br />

0.4:0 Reserved Always returns zeros, writes<br />

ignored.<br />

Table 5-4: Status Register (Register 1)<br />

Read/Write E<strong>MAC</strong>#_PHYISOLATE<br />

“Physical Interface Attributes”<br />

Read/Write<br />

Self Clearing<br />

124 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

0<br />

Returns 1 1<br />

Returns 0 0<br />

Returns 1 1<br />

Read/Write E<strong>MAC</strong>#_UNIDIRECTION_ENABLE<br />

“Physical Interface Attributes”<br />

Returns 0s 00000<br />

Bit(s) Name Description Type Default Value<br />

1.15 100BASE-T4 The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because 100BASE-T4 is not supported.<br />

1.14 100BASE-X<br />

Full Duplex<br />

1.13 100BASE-X<br />

Half Duplex<br />

1.12 10 Mb/s<br />

Full Duplex<br />

1.11 10 Mb/s<br />

Half Duplex<br />

1.10 100BASE-T2<br />

Full Duplex<br />

1.9 100BASE-T2<br />

Half Duplex<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because 100BASE-X full duplex is not supported.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because 100BASE-X half duplex is not supported.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because 10 Mb/s full duplex is not supported.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because 10 Mb/s half duplex is not supported.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because 100BASE-T2 full duplex is not supported.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because 100BASE-T2 half duplex is not<br />

supported.<br />

1.8 Extended Status The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 1 for this bit,<br />

indicating the presence of the extended register<br />

(Register 15).<br />

Returns 0 0<br />

Returns 0 0<br />

Returns 0 0<br />

Returns 0 0<br />

Returns 0 0<br />

Returns 0 0<br />

Returns 0 0<br />

Returns 1 1<br />

R


R<br />

Table 5-4: Status Register (Register 1) (Cont’d)<br />

1.7 Unidirectional<br />

Ability<br />

Link Status<br />

1000BASE-X PCS/PMA Management Registers<br />

Bit(s) Name Description Type Default Value<br />

1.6 MF Preamble<br />

Suppression<br />

1.5 Auto-<br />

Negotiation<br />

Complete<br />

Always returns a 1, writes ignored. Returns 1 1<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 1 for this bit<br />

to indicate the support of management frame<br />

preamble suppression.<br />

1 = Auto-Negotiation process completed.<br />

0 = Auto-Negotiation process not completed.<br />

1.4 Remote Fault 1 = Remote fault condition detected.<br />

0 = No remote fault condition detected.<br />

1.3 Auto-<br />

Negotiation<br />

Ability<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 1 for this bit,<br />

indicating that the PHY is capable of autonegotiation.<br />

1.2 Link Status 1 = Link is up<br />

0 = Link is down (or has been down)<br />

Latches 0 if Link Status goes down.<br />

Clears to current Link Status on read.<br />

See the following Link Status section for<br />

further details.<br />

1.1 Jabber Detect The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because jabber detect is not supported.<br />

1.0 Extended<br />

Capability<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because no extended register set is supported.<br />

Returns 1 1<br />

Read Only 0<br />

Read Only<br />

Self Clearing on<br />

read<br />

Returns 1 1<br />

Read Only<br />

Self clearing on<br />

read<br />

Returns 0 0<br />

Returns 0 0<br />

When Link Status is High, the link is valid and has remained valid since this register was<br />

last read. Synchronization of the link has been obtained and Auto Negotiation (if enabled)<br />

has completed.<br />

When Low, either:<br />

A valid link has not been established. Link synchronization has failed or Auto<br />

Negotiation (if enabled) has failed to complete.<br />

Link synchronization was lost at some point because this register was previously<br />

read. However, the current link status can be valid. Read this register a second time to<br />

get confirmation of the current link status.<br />

Regardless of whether Auto Negotiation is enabled or disabled, there can be some delay to<br />

the deassertion of Link Status following the loss of synchronization of a previously<br />

successful link. This is due to the Auto Negotiation state machine, which requires that<br />

synchronization is lost for an entire link timer duration before changing state. For more<br />

information, see the IEEE Std 802.3 specification (the an_sync_status variable).<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 125<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

0<br />

0


Chapter 5: MDIO Interface<br />

Table 5-5: PHY Identifier (Registers 2 and 3)<br />

Bit(s) Name Description Type Default Value<br />

2.15:0 Organizationally<br />

Unique Identifier<br />

3.15:10 Organizationally<br />

Unique Identifier<br />

3.9:4 Manufacturer’s<br />

<strong>Mode</strong>l Number<br />

Organizationally Unique Identifier<br />

(OUI) from IEEE is 0x000A35.<br />

Organizationally Unique Identifier<br />

(OUI) from IEEE is 0x000A35.<br />

Returns OUI (3-18) 0000000000101000<br />

Returns OUI (19-24) 110101<br />

Always returns 0s. Returns 0s 000000<br />

3.3:0 Revision Number Always returns 0s. Returns 0s 0000<br />

Table 5-6: Auto-Negotiation Advertisement Register (Register 4)<br />

Bit(s) Name Description Type Default Value<br />

4.15 Next Page 1 = Next page functionality is advertised.<br />

0 = Next page functionality is not advertised.<br />

Read/Write 0<br />

4.14 Reserved Always returns 0, writes ignored. Returns 0 0<br />

4.13:12 Remote Fault 00 = No error.<br />

01 = Offline.<br />

10 = Link failure.<br />

11 = Auto-negotiation error.<br />

Read/Write<br />

Self clearing to 00 after<br />

auto-negotiation<br />

4.11:9 Reserved Always return 0, writes ignored. Returns 0 0<br />

4.8:7 Pause 00 = No PAUSE.<br />

01 = Symmetric PAUSE.<br />

10 = Asymmetric PAUSE towards link partner.<br />

11 = Both symmetric PAUSE and asymmetric<br />

PAUSE towards link partner.<br />

4.6 Half Duplex The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this<br />

bit because half-duplex mode is not supported.<br />

4.5 Full Duplex 1 = Full-duplex mode is advertised.<br />

0 = Full-duplex mode is not advertised.<br />

126 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

00<br />

Read/Write 11<br />

Returns 0 0<br />

Read/Write 1<br />

4.4:0 Reserved Always returns 0s, writes ignored. Returns 0s 00000<br />

Table 5-7: Auto-Negotiation Link Partner Ability Base Register (Register 5)<br />

Bit(s) Name Description Type Default Value<br />

5.15 Next Page 1 = Next page functionality is supported.<br />

0 = Next page functionality is not supported.<br />

5.14 Acknowledge Used by the Auto-Negotiation function to<br />

indicate reception of a link partner’s base or<br />

next page.<br />

5.13:12 Remote Fault 00 = No Error.<br />

01 = Offline.<br />

10 = Link Failure.<br />

11 = Auto-Negotiation Error.<br />

Read Only 0<br />

Read Only 0<br />

Read Only 00<br />

5.11:9 Reserved Always returns 0s. Returns 0s 000<br />

R


R<br />

1000BASE-X PCS/PMA Management Registers<br />

Table 5-7: Auto-Negotiation Link Partner Ability Base Register (Register 5) (Cont’d)<br />

Bit(s) Name Description Type Default Value<br />

5.8:7 Pause 00 = No PAUSE.<br />

01 = Symmetric PAUSE supported.<br />

10 = Asymmetric PAUSE supported.<br />

11 = Both symmetric PAUSE and asymmetric<br />

PAUSE supported.<br />

5.6 Half Duplex 1 = Half-duplex mode is supported.<br />

0 = Half-duplex mode is not supported.<br />

5.5 Full Duplex 1 = Full-duplex mode is supported.<br />

0 = Full-duplex mode is not supported.<br />

Read Only 00<br />

Read Only 0<br />

Read Only 0<br />

5.4:0 Reserved Always returns 0s. Returns 0s 00000<br />

Table 5-8: Auto-Negotiation Expansion Register (Register 6)<br />

Bit(s) Name Description Type Default Value<br />

6.15:3 Reserved Always returns 0s. Returns 0s 0000000000000<br />

6.2 Next Page Able The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 1 for this<br />

bit because the device is Next Page Able.<br />

6.1 Page Received 1 = A new page is received.<br />

0 = A new page is not received.<br />

Returns 1 1<br />

Read only. Self<br />

clearing on read.<br />

6.0 Reserved Always returns 0s. Returns 0s 0000000<br />

Table 5-9: Auto-Negotiation Next Page Transmit Register (Register 7)<br />

Bit(s) Name Description Type Default Value<br />

7.15 Next Page 1 = Additional next page(s) will follow.<br />

0 = Last page.<br />

Read/Write 0<br />

7.14 Reserved Always returns 0. Returns 0 0<br />

7.13 Message Page 1 = Message Page.<br />

0 = Unformatted Page.<br />

7.12 Acknowledge 2 1 = Complies with message.<br />

0 = Cannot comply with message.<br />

Read/Write 1<br />

Read/Write 0<br />

7.11 Toggle Value toggles between subsequent pages. Read Only 0<br />

7.10:0 Message or<br />

Unformatted<br />

Code Field<br />

Message code field or unformatted page<br />

encoding as dictated by 7.13.<br />

Table 5-10: Auto-Negotiation Next Page Receive Register (Register 8)<br />

Read/Write 00000000001<br />

(Null Message<br />

Code)<br />

Bit(s) Name Description Type Default Value<br />

8.15 Next Page 1 = Additional Next Page(s) will follow.<br />

0 = Last page.<br />

8.14 Acknowledge Used by Auto-Negotiation function to indicate<br />

reception of a link partner’s base or next page.<br />

Read Only 0<br />

Read Only 0<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 127<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

0


Chapter 5: MDIO Interface<br />

Table 5-10: Auto-Negotiation Next Page Receive Register (Register 8) (Cont’d)<br />

Bit(s) Name Description Type Default Value<br />

8.13 Message Page 1 = Message Page.<br />

0 = Unformatted Page.<br />

8.12 Acknowledge 2 1 = Complies with message.<br />

0 = Cannot comply with message.<br />

Read Only 0<br />

Read Only 0<br />

8.11 Toggle Value toggles between subsequent next pages. Read Only 0<br />

8.10:0 Message /<br />

Unformatted<br />

Code Field<br />

Message code field or unformatted page<br />

encoding as dictated by 8.13.<br />

Table 5-11: Extended Status Register (Register 15)<br />

Read Only 00000000000<br />

Bit(s) Name Description Type Default Value<br />

15.15 1000BASE-X<br />

Full Duplex<br />

15.14 1000BASE-X<br />

Half Duplex<br />

15.13 1000BASE-T<br />

Full Duplex<br />

15.12 1000BASE-T<br />

Half Duplex<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 1 for this bit<br />

because 1000BASE-X full duplex is supported.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because 1000BASE-X half duplex is not<br />

supported.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because 1000BASE-T full duplex is not<br />

supported.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because 1000BASE-T half duplex is not<br />

supported.<br />

Returns 1 1<br />

Returns 0 0<br />

Returns 0 0<br />

Returns 0 0<br />

15.11:0 Reserved Always returns 0s. Returns 0s 000000000000<br />

Table 5-12: Vendor-Specific Register: Auto-Negotiation Interrupt Control Register (Register 16)<br />

Bit(s) Name Description Type Default Value<br />

16.15:2 Reserved Always returns 0s. Returns 0s 00000000000000<br />

16.1 Interrupt Status 1 = Interrupt is asserted.<br />

0 = Interrupt is not asserted.<br />

If the interrupt is enabled, this bit is set upon<br />

the completion of an auto-negotiation cycle; it<br />

is cleared only by writing 0 to this bit.<br />

If the interrupt is disabled, this bit is reset to 0.<br />

The E<strong>MAC</strong>#CLIENTANINTERRUPT port is<br />

wired to this bit.<br />

16.0 Interrupt Enable 1 = Interrupt is enabled.<br />

0 = Interrupt is disabled.<br />

Read/Write 0<br />

Read/Write 1<br />

128 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Table 5-13: Vendor-Specific Register: Loopback Control Register (Register 17)<br />

1000BASE-X PCS/PMA Management Registers<br />

Bit(s) Name Description Type Default Value<br />

17.15:1 Reserved Always returns 0s. Returns 0s 000000000000000<br />

17.0 Loopback<br />

Position<br />

0 = Loopback (when enabled) occurs in<br />

the <strong>Ethernet</strong> <strong>MAC</strong> directly before the<br />

interface to the RocketIO serial<br />

transceiver.<br />

1 = Loopback (when enabled) occurs in<br />

the RocketIO serial transceiver.<br />

Note: Loopback is enabled or disabled<br />

using 0.14 (see “Control Register<br />

(Register 0)”).<br />

Read/Write E<strong>MAC</strong>#_GTLOOPBACK<br />

“Physical Interface Attributes”<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 129<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 5: MDIO Interface<br />

SGMII Management Registers<br />

<strong>FPGA</strong><br />

PCS/PMA Sublayer<br />

<strong>MAC</strong> TX<br />

Interface<br />

<strong>MAC</strong> RX<br />

Interface<br />

MDIO<br />

Interface<br />

Figure 5-8 shows the PCS/PMA sublayer block in an SGMII implementation. The<br />

PCS/PMA sublayer of the <strong>Ethernet</strong> <strong>MAC</strong>, when performing the SGMII standard, contains<br />

PCS Management registers as listed in Table 5-14. These registers are described in further<br />

detail in Table 5-15 through Table 5-25.<br />

PCS Transmit<br />

Engine<br />

Auto-Negotiation<br />

PCS Receive Engine<br />

and<br />

Synchronization<br />

PCS Management<br />

Registers<br />

Figure 5-8: SGMII Logic and Physical Connections<br />

10BASE-T<br />

100BASE-T<br />

1000BASE-T<br />

<strong>UG194</strong>_5_08_072809<br />

These registers contain information relating to the operation of the system, including the<br />

status of both the SGMII link and the physical <strong>Ethernet</strong> link (PHY link). Refer to Figure 5-8.<br />

Additionally, these registers are directly involved in the operation of the SGMII Auto-<br />

Negotiation function which occurs between the <strong>Ethernet</strong> <strong>MAC</strong> and the external PHY<br />

device, illustrated as a <strong>Tri</strong>-speed BASE-T PHY in Figure 5-8. (see “SGMII Auto-<br />

Negotiation,” page 196).<br />

130 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

GTP/GTX Transceiver<br />

TX+<br />

TX-<br />

RX+<br />

RX-<br />

SGMII<br />

Link<br />

PHY<br />

Table 5-14: SGMII Configuration Registers for 1000BASE-X PCS/PMA<br />

Register<br />

Address<br />

(REGAD)<br />

0 “SGMII Control Register (Register 0)”<br />

1 “SGMII Status Register (Register 1)”<br />

Register Name<br />

PHY<br />

Link<br />

TX<br />

Twisted<br />

Copper<br />

Pair<br />

RX<br />

R


R<br />

2, 3 “PHY Identifier (Registers 2 and 3)”<br />

SGMII Management Registers<br />

Table 5-14: SGMII Configuration Registers for 1000BASE-X PCS/PMA (Cont’d)<br />

Register<br />

Address<br />

(REGAD)<br />

Table 5-15: SGMII Control Register (Register 0)<br />

4 “SGMII Auto-Negotiation Advertisement Register (Register 4)”<br />

5 “SGMII Auto-Negotiation Link Partner Ability Base Register (Register 5)”<br />

6 “SGMII Auto-Negotiation Expansion Register (Register 6)”<br />

7 “SGMII Auto-Negotiation Next Page Transmit Register (Register 7)”<br />

8 “SGMII Auto-Negotiation Next Page Receive Register (Register 8)”<br />

15 “SGMII Extended Status Register (Register 15)”<br />

16<br />

Register Name<br />

“SGMII Vendor-Specific Register: Auto-Negotiation Interrupt Control<br />

Register (Register 16)”<br />

17 “SGMII Vendor Specific Register: Loopback Control Register (Register 17)”<br />

Bit(s) Name Description Type Default Value<br />

0.15 Reset 1 = PCS/PMA reset.<br />

0 = Normal operation.<br />

0.14 Loopback 1 = Enable loopback mode.<br />

0 = Disable loopback mode.<br />

0.13 Speed Selection<br />

(LSB)<br />

0.12 Auto-Negotiation<br />

Enable<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0<br />

for this bit. Along with bit 0.6, speed<br />

selection of 1000 Mb/s is identified.<br />

1 = Enable SGMII Auto-Negotiation<br />

process.<br />

0 = Disable SGMII Auto-Negotiation<br />

process.<br />

0.11 Power Down 1 = Power down.<br />

0 = Normal operation.<br />

When set to 1, the RocketIO serial<br />

transceiver is placed in a Low power<br />

state. This bit requires a reset (see bit<br />

0.15) to clear.<br />

0.10 Isolate 1 = Isolate the SGMII logic<br />

from GMII.<br />

0 = Normal operation.<br />

0.9 Restart<br />

Auto-Negotiation<br />

1 = Restart Auto-Negotiation process<br />

across the SGMII link.<br />

0 = Normal operation.<br />

0.8 Duplex <strong>Mode</strong> The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 1<br />

for this bit to signal full-duplex mode.<br />

0.7 Collision Test The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0<br />

for this bit to disable COL test.<br />

Read/Write<br />

Self Clearing<br />

E<strong>MAC</strong>#_PHYRESET<br />

“Physical Interface Attributes”<br />

Read/Write E<strong>MAC</strong>#_PHYLOOPBACKMSB<br />

“Physical Interface Attributes”<br />

Returns 0 0<br />

Read/Write E<strong>MAC</strong>#_PHYINITAUTONEG_<br />

ENABLE<br />

“Physical Interface Attributes”<br />

Read/ Write E<strong>MAC</strong>#_PHYPOWERDOWN<br />

“Physical Interface Attributes”<br />

Read/Write E<strong>MAC</strong>#_PHYISOLATE<br />

“Physical Interface Attributes”<br />

Read/Write<br />

Self Clearing<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 131<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

0<br />

Returns 1 1<br />

Returns 0 0


Chapter 5: MDIO Interface<br />

Table 5-15: SGMII Control Register (Register 0) (Cont’d)<br />

Bit(s) Name Description Type Default Value<br />

0.6 Speed Selection<br />

(MSB)<br />

0.5 Unidirectional<br />

Enable<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 1<br />

for this bit. Together with bit 0.13,<br />

speed selection of 1000 Mb/s is<br />

identified.<br />

Enable transmit regardless of whether<br />

a valid link has been established<br />

Returns 1 1<br />

0.4:0 Reserved Always returns zeros, writes ignored. Returns 0s 00000<br />

Table 5-16: SGMII Status Register (Register 1)<br />

Read/Write E<strong>MAC</strong>#_UNIDIRECTION_ENABLE<br />

“Physical Interface Attributes”<br />

Bit(s) Name Description Type Default Value<br />

1.15 100BASE-T4 The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because 100BASE-T4 is not supported.<br />

1.14 100BASE-X<br />

Full Duplex<br />

1.13 100BASE-X<br />

Half Duplex<br />

1.12 10 Mb/s<br />

Full Duplex<br />

1.11 10 Mb/s<br />

Half Duplex<br />

1.10 100BASE-T2<br />

Full Duplex<br />

1.9 100BASE-T2<br />

Half Duplex<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because 100BASE-X full duplex is not supported.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because 100BASE-X half duplex is not supported.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because 10 Mb/s full duplex is not supported.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because 10 Mb/s half duplex is not supported.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because 100BASE-T2 full duplex is not supported.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because 100BASE-T2 half duplex is not<br />

supported.<br />

1.8 Extended Status The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 1 for this bit,<br />

indicating the presence of the extended register<br />

(Register 15).<br />

1.7 Unidirectional<br />

Ability<br />

1.6 MF Preamble<br />

Suppression<br />

1.5 Auto-<br />

Negotiation<br />

Complete<br />

Returns 0 0<br />

Returns 0 0<br />

Returns 0 0<br />

Returns 0 0<br />

Returns 0 0<br />

Returns 0 0<br />

Returns 0 0<br />

Returns 1 1<br />

Always returns a 1, writes ignored. Returns 1 1<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 1 for this bit<br />

to indicate the support of management frame<br />

preamble suppression.<br />

1 = Auto-Negotiation process completed.<br />

0 = Auto-Negotiation process not completed.<br />

1.4 Remote Fault 1 = Remote fault condition detected.<br />

0 = No remote fault condition detected.<br />

1.3 Auto-<br />

Negotiation<br />

Ability<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 1 for this bit,<br />

indicating that the PHY is capable of autonegotiation.<br />

Returns 1 1<br />

Read Only 0<br />

Read Only<br />

Self clearing on<br />

read<br />

132 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

0<br />

Returns 1 1<br />

R


1.2 SGMII Link<br />

Status<br />

R<br />

Table 5-16: SGMII Status Register (Register 1) (Cont’d)<br />

The link status of the <strong>Ethernet</strong> <strong>MAC</strong> with its<br />

external PHY across the SGMII link (see<br />

Figure 5-8).<br />

1 = SGMII link is up.<br />

0 = SGMII link is down.<br />

1.1 Jabber Detect The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because jabber detect is not supported.<br />

SGMII Management Registers<br />

Bit(s) Name Description Type Default Value<br />

1.0 Extended<br />

Capability<br />

Table 5-17: PHY Identifier (Registers 2 and 3)<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this bit<br />

because no extended register set is supported.<br />

Read Only<br />

Self clearing on<br />

read<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 133<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

0<br />

Returns 0 0<br />

Returns 0 0<br />

Bit(s) Name Description Type Default Value<br />

2.15:0 Organizationally<br />

Unique Identifier<br />

3.15:10 Organizationally<br />

Unique Identifier<br />

3.9:4 Manufacturer’s<br />

<strong>Mode</strong>l Number<br />

Organizationally Unique Identifier<br />

(OUI) from IEEE is 0x000A35.<br />

Organizationally Unique Identifier<br />

(OUI) from IEEE is 0x000A35.<br />

Returns OUI(3-18) 0000000000101000<br />

Returns OUI(19-24) 110101<br />

Always returns 0s. Returns 0s 000000<br />

3.3:0 Revision Number Always returns 0s. Returns 0s 0000<br />

Table 5-18: SGMII Auto-Negotiation Advertisement Register (Register 4)<br />

Bit(s) Name Description Type Default Value<br />

4.15:0 All bits SGMII defined value sent from the <strong>MAC</strong><br />

to the PHY.<br />

Table 5-19: SGMII Auto-Negotiation Link Partner Ability Base Register (Register 5)<br />

Read Only 000000000000001<br />

Bit(s) Name Description Type Default Value<br />

5.15 PHY Link Status This refers to the link status of the external<br />

PHY device with its link partner across the<br />

PHY link (see Figure 5-8).<br />

1 = Link up.<br />

0 = Link down.<br />

5.14 Acknowledge Used by the Auto-Negotiation function to<br />

indicate reception of a link partner’s base or<br />

next page.<br />

Read only 1<br />

Read only 0<br />

5.13 Reserved Always return 0. Returns 0 0<br />

5.12 Duplex mode The resolved duplex mode that the external<br />

PHY device has auto-negotiated with its link<br />

partner across the PHY link (see Figure 5-8).<br />

1 = Full Duplex.<br />

0 = Half Duplex.<br />

Read only 00


Chapter 5: MDIO Interface<br />

Table 5-19: SGMII Auto-Negotiation Link Partner Ability Base Register (Register 5) (Cont’d)<br />

Bit(s) Name Description Type Default Value<br />

5.11:10 Speed The resolved operating speed that the external<br />

PHY device has auto-negotiated with its link<br />

partner across the PHY link (see Figure 5-8).<br />

00 = 10 Mb/s.<br />

01 = 100 Mb/s.<br />

10 = 1000 Mb/s.<br />

11 = Reserved.<br />

Read only 00<br />

5.9:1 Reserved Always returns 0s. Returns 0s 000000000<br />

5.0 Reserved Always returns 1. Returns 1 1<br />

Table 5-20: SGMII Auto-Negotiation Expansion Register (Register 6)<br />

Bit(s) Name Description Type Default Value<br />

6.15:3 Reserved Always returns 0s. Returns 0s 0000000000000<br />

6.2 Next Page Able The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 1 for this<br />

bit because the device is Next Page Able.<br />

6.1 Page Received 1 = A new page is received.<br />

0 = A new page is not received.<br />

Returns 1 1<br />

Read only. Self<br />

clearing on read.<br />

6.0 Reserved Always returns 0s. Returns 0s 0000000<br />

Table 5-21: SGMII Auto-Negotiation Next Page Transmit Register (Register 7)<br />

Bit(s) Name Description Type Default Value<br />

7.15 Next Page 1 = Additional next page(s) will follow<br />

0 = Last page.<br />

Read/Write 0<br />

7.14 Reserved Always returns 0. Returns 0 0<br />

7.13 Message Page 1 = Message Page.<br />

0 = Unformatted Page.<br />

7.12 Acknowledge 2 1 = Complies with message.<br />

0 = Cannot comply with message.<br />

Read/Write 1<br />

Read/Write 0<br />

7.11 Toggle Value toggles between subsequent pages. Read Only 0<br />

7.10:0 Message or<br />

Unformatted<br />

Code Field<br />

Message code field or unformatted page<br />

encoding as dictated by 7.13.<br />

Table 5-22: SGMII Auto-Negotiation Next Page Receive Register (Register 8)<br />

Read/Write 00000000001<br />

(Null Message<br />

Code)<br />

Bit(s) Name Description Type Default Value<br />

8.15 Next Page 1 = Additional Next Page(s) will follow.<br />

0 = Last page.<br />

8.14 Acknowledge Used by Auto-Negotiation function to indicate<br />

reception of a link partner’s base or next page.<br />

8.13 Message Page 1 = Message Page.<br />

0 = Unformatted Page.<br />

Read Only 0<br />

Read Only 0<br />

Read Only 0<br />

134 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

0<br />

R


R<br />

Table 5-22: SGMII Auto-Negotiation Next Page Receive Register (Register 8) (Cont’d)<br />

8.12 Acknowledge 2 1 = Complies with message.<br />

0 = Cannot comply with message.<br />

SGMII Management Registers<br />

Bit(s) Name Description Type Default Value<br />

Read Only 0<br />

8.11 Toggle Value toggles between subsequent next pages. Read Only 0<br />

8.10:0 Message /<br />

Unformatted<br />

Code Field<br />

Message code field or unformatted page<br />

encoding as dictated by 8.13.<br />

Table 5-23: SGMII Extended Status Register (Register 15)<br />

Read Only 00000000000<br />

Bit(s) Name Description Type Default Value<br />

15.15 1000BASE-X<br />

Full Duplex<br />

15.14 1000BASE-X<br />

Half Duplex<br />

15.13 1000BASE-T<br />

Full Duplex<br />

15.12 1000BASE-T<br />

Half Duplex<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 1 for this<br />

bit because 1000BASE-X full duplex is<br />

supported.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this<br />

bit because 1000BASE-X half duplex is not<br />

supported.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this<br />

bit because 1000BASE-T full duplex is not<br />

supported.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> always returns a 0 for this<br />

bit because 1000BASE-T half duplex is not<br />

supported.<br />

Returns 1 1<br />

Returns 0 0<br />

Returns 0 0<br />

Returns 0 0<br />

15.11:0 Reserved Always returns 0s. Returns 0s 000000000000<br />

Table 5-24: SGMII Vendor-Specific Register: Auto-Negotiation Interrupt Control Register (Register 16)<br />

Bit(s) Name Description Type Default Value<br />

16.15:2 Reserved Always returns 0s. Returns 0s 00000000000000<br />

16.1 Interrupt Status 1 = Interrupt is asserted.<br />

0 = Interrupt is not asserted.<br />

If the interrupt is enabled, this bit is set upon<br />

the completion of an auto-negotiation cycle.<br />

Writing 0 to this bit is the only way to clear it.<br />

If the interrupt is disabled, this bit is cleared to<br />

0.<br />

The E<strong>MAC</strong>#CLIENTANINTERRUPT port is<br />

wired to this bit.<br />

16.0 Interrupt Enable 1 = Interrupt is enabled.<br />

0 = Interrupt is disabled.<br />

Read/Write 0<br />

Read/Write 1<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 135<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 5: MDIO Interface<br />

Table 5-25: SGMII Vendor Specific Register: Loopback Control Register (Register 17)<br />

Bit(s) Name Description Type Default Value<br />

17.15:1 Reserved Always returns 0s. Returns 0s 000000000000000<br />

17.0 Loopback<br />

Position<br />

0 = Loopback (when enabled) occurs in<br />

the <strong>Ethernet</strong> <strong>MAC</strong> directly before the<br />

interface to the RocketIO serial<br />

transceiver.<br />

1 = Loopback (when enabled) occurs in<br />

the RocketIO serial transceiver.<br />

Note: Loopback is enabled or disabled<br />

using 0.14 (see “Control Register<br />

(Register 0)”).<br />

Read/Write E<strong>MAC</strong>#_GTLOOPBACK<br />

“Physical Interface Attributes”<br />

136 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Physical Interface<br />

Chapter 6<br />

This chapter describes the physical interface options provided by the <strong>Ethernet</strong> <strong>MAC</strong>. This<br />

chapter contains the following sections:<br />

“Introduction to the Physical Interfaces”<br />

“Media Independent Interface (MII)”<br />

“Gigabit Media Independent Interface (GMII)”<br />

“Reduced Gigabit Media Independent Interface (RGMII)”<br />

“1000BASE-X PCS/PMA”<br />

“Serial Gigabit Media Independent Interface (SGMII)”<br />

For each physical interface, there can be more than one possible clocking scheme. The<br />

following sections describe the different optimized clocking schemes for the individual<br />

<strong>Ethernet</strong> <strong>MAC</strong> configurations.<br />

<strong>Ethernet</strong> <strong>MAC</strong> wrappers and example designs are provided for each of the different<br />

physical interfaces via the CORE Generator tool. The generated designs exactly match<br />

the descriptions in this chapter and are available in both VHDL and Verilog. By using the<br />

CORE Generator tool, the time required to instantiate the <strong>Ethernet</strong> <strong>MAC</strong> into a usable<br />

design is greatly reduced. See “Accessing the <strong>Ethernet</strong> <strong>MAC</strong> from the CORE Generator<br />

Tool,” page 25.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 137<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 6: Physical Interface<br />

Introduction to the Physical Interfaces<br />

OSI<br />

Reference<br />

<strong>Mode</strong>l<br />

Layers<br />

Application<br />

Presentation<br />

Session<br />

Transport<br />

Network<br />

Data Link<br />

PHY - Physical<br />

PCS - Physical Coding Sublayer<br />

PMA - Physical Medium Attachment<br />

PMD - Physical Medium Dependent<br />

Figure 6-1 illustrates the position of the <strong>Ethernet</strong> <strong>MAC</strong> sublayers and physical interface<br />

options within the OSI model.<br />

PCS<br />

PMA<br />

PMD<br />

MEDIUM<br />

1000BASE-X<br />

(eg optical fiber medium)<br />

LAN<br />

CSMA/CD<br />

Layers<br />

Higher Layers<br />

LLC - Logical Link Control<br />

<strong>MAC</strong> Control (Optional)<br />

<strong>MAC</strong> - Media Access Control<br />

Reconciliation<br />

MII - Media Independent Interface<br />

Figure 6-1: <strong>MAC</strong> Sublayer Partitioning, Relationship to the ISO/IEC OSI Reference <strong>Mode</strong>l<br />

The <strong>Ethernet</strong> <strong>MAC</strong> sublayer itself is independent of, and can connect to, any type of<br />

physical layer device. In Figure 6-1, two alternative physical sublayer standards are<br />

shown:<br />

BASE-T PHYs provide a link between the <strong>MAC</strong> and copper mediums. This<br />

functionality is not offered within the <strong>Ethernet</strong> <strong>MAC</strong>. However, external BASE-T PHY<br />

devices are readily available on the market. These can connect to the <strong>Ethernet</strong> <strong>MAC</strong><br />

using GMII/MII, RGMII, or SGMII interfaces.<br />

BASE-X PHYs provide a link between the <strong>MAC</strong> and (usually) fiber optic mediums.<br />

The <strong>Ethernet</strong> <strong>MAC</strong> itself can support the 1 Gb/s BASE-X standard. 1000BASE-X can<br />

be offered by connecting the <strong>Ethernet</strong> <strong>MAC</strong> to a RocketIO serial transceiver.<br />

The interface type and 1000BASE-X sublayer functionalities are summarized in the<br />

following subsections.<br />

138 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

PCS<br />

PMA<br />

PMD<br />

MEDIUM<br />

1000BASE-T<br />

100BASE-T<br />

10BASE-T<br />

(eg copper medium)<br />

GMII - Gigabit Media Independent Interface<br />

RGMII - Reduced Gigabit Media Independent Interface<br />

SGMII - Serial Gigabit Media Independent Interface<br />

Note:<br />

The functions shown<br />

in gray are performed<br />

by the <strong>Ethernet</strong> <strong>MAC</strong> block<br />

GMII/MII<br />

RGMII<br />

SGMII<br />

<strong>UG194</strong>_6_01_072606<br />

R


R<br />

GMII / MII<br />

RGMII<br />

SGMII<br />

Introduction to the Physical Interfaces<br />

The Media Independent Interface (MII), defined in IEEE 802.3, clause 22 is a parallel<br />

interface that connects a 10-Mb/s and/or 100-Mb/s capable <strong>MAC</strong> to the physical<br />

sublayers.<br />

The Gigabit Media Independent Interface (GMII), defined in IEEE 802.3, clause 35 is an<br />

extension of the MII used to connect a 1-Gb/s capable <strong>MAC</strong> to the physical sublayers.<br />

MII can be considered a subset of GMII, and as a result, GMII/MII together can carry<br />

<strong>Ethernet</strong> traffic at 10 Mb/s, 100 Mb/s, and 1 Gb/s.<br />

The Reduced Gigabit Media Independent Interface (RGMII) is an alternative to the<br />

GMII/MII. RGMII achieves a 50% reduction in the pin count compared with GMII, and<br />

therefore, is favored over GMII/MII by PCB designers. This configuration is achieved with<br />

the use of double-data-rate (DDR) flip-flops.<br />

RGMII can carry <strong>Ethernet</strong> traffic at 10 Mb/s, 100 Mb/s, and 1 Gb/s.<br />

The Serial-GMII (SGMII) is an alternative interface to the GMII/MII that converts the<br />

parallel interface of the GMII into a serial format. It radically reduces the I/O count and is,<br />

therefore, often favored by PCB designers. This configuration is achieved by connecting<br />

the <strong>Ethernet</strong> <strong>MAC</strong> to a RocketIO serial transceiver.<br />

SGMII can carry <strong>Ethernet</strong> traffic at 10 Mb/s, 100 Mb/s, and 1 Gb/s.<br />

1000BASE-X Sublayers<br />

PCS/PMA<br />

The Physical Coding Sublayer (PCS) for 1000BASE-X operation is defined in IEEE 802.3,<br />

clauses 36 and 37, and performs the following:<br />

Encoding (and decoding) of GMII data octets to form a sequence of ordered sets<br />

8B/10B encoding (and decoding) of the sequence ordered sets<br />

1000BASE-X auto-negotiation for information exchange with the link partner<br />

The Physical Medium Attachment (PMA) for 1000BASE-X operation is defined in<br />

IEEE 802.3, clause 36 and performs the following:<br />

Serialization (and deserialization) of code-groups for transmission (and reception) on<br />

the underlying serial PMD<br />

Recovery of clock from the 8B/10B-coded data supplied by the PMD<br />

1000BASE-X PCS/PMA functionality is provided by connecting the <strong>Ethernet</strong> <strong>MAC</strong> to a<br />

RocketIO serial transceiver.<br />

PMD<br />

The Physical Medium Dependent (PMD) sublayer is defined in IEEE 802.3, clause 38 for<br />

1000BASE-LX and 1000BASE-SX (long and short wavelength laser). This type of PMD is<br />

provided by the external GBIC or SFP optical transceiver, which should be connected<br />

directly to the ports of the RocketIO serial transceiver.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 139<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 6: Physical Interface<br />

Media Independent Interface (MII)<br />

The Media Independent Interface (MII), defined in IEEE 802.3, clause 22, is a parallel<br />

interface that connects a 10-Mb/s and/or 100-Mb/s capable <strong>MAC</strong> to the physical<br />

sublayers.<br />

Figure 6-2 shows the <strong>Ethernet</strong> <strong>MAC</strong> configured for MII. The physical signals of the<br />

<strong>Ethernet</strong> <strong>MAC</strong> are connected through IOBs to the external interface. The “logic cloud”<br />

indicates that alternative implementations are possible.<br />

<strong>Ethernet</strong><br />

<strong>MAC</strong><br />

Figure 6-2: <strong>Ethernet</strong> <strong>MAC</strong> Configured in MII <strong>Mode</strong><br />

There are two alternative implementations available that use different clocking schemes:<br />

the standard clocking scheme without clock enables or an alternative clock enable scheme<br />

that saves on global clock resources. “<strong>Ethernet</strong> <strong>MAC</strong> Clocks,” page 205 introduces these<br />

two clocking models, which are described in detail in the following sections:<br />

“MII Standard Clock Management”<br />

<strong>Virtex</strong>-5 Device<br />

IOBs<br />

and<br />

Clock Logic<br />

MII_RX_CLK<br />

MII_RXD[3:0]<br />

MII_RX_DV<br />

MII_RX_ER<br />

MII_TX_CLK<br />

MII_TXD[3:0]<br />

MII_TX_EN<br />

MII_TX_ER<br />

MII_COL<br />

MII_CRS<br />

“MII Clock Management using Clock Enables”<br />

If the CORE Generator tool is used, the wrapper files for the <strong>Ethernet</strong> <strong>MAC</strong> that are created<br />

will contain the logic described in these sections. By using the CORE Generator tool, the<br />

time required to instantiate the <strong>Ethernet</strong> <strong>MAC</strong> into a usable design is greatly reduced. See<br />

“Accessing the <strong>Ethernet</strong> <strong>MAC</strong> from the CORE Generator Tool,” page 25.<br />

140 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

MII Physical Interface<br />

<strong>UG194</strong>_6_02_072106<br />

R


TX CLIENT<br />

LOGIC<br />

RX CLIENT<br />

LOGIC<br />

R<br />

MII Standard Clock Management<br />

Media Independent Interface (MII)<br />

Figure 6-3 shows the standard clock management scheme when the MII interface is<br />

selected. Both the MII_TX_CLK and MII_RX_CLK, generated from the PHY, have a<br />

frequency of either 2.5 MHz or 25 MHz, depending on the operating speed of the <strong>Ethernet</strong><br />

<strong>MAC</strong>s. E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT connects to E<strong>MAC</strong>#CLIENTTXCLIENTCLKIN<br />

through a BUFG. Its frequency is either 12.5 MHz or 1.25 MHz, depending on the<br />

operating speed of the <strong>Ethernet</strong> <strong>MAC</strong>. MII_TX_CLK_# connects to<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN and the MII_TXD registers through a BUFG. Its frequency is<br />

either 12.5 MHz or 1.25 MHz, depending on the operating speed of the <strong>Ethernet</strong> <strong>MAC</strong>. The<br />

RX client clocking is similar.<br />

BUFG<br />

BUFG<br />

E<strong>MAC</strong>#<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

E<strong>MAC</strong>#PHYTXD[3:0]<br />

E<strong>MAC</strong>#PHYTXD[7:4]<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#RXCLK<br />

PHYE<strong>MAC</strong>#RXD[3:0]<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

PHYE<strong>MAC</strong>#RXD[7:4]<br />

Notes:<br />

1) A regional buffer (BUFR) can replace this BUFG.<br />

In addition, the clock input of IFD can be driven by a BUFIO.<br />

Refer to UG190, <strong>Virtex</strong>-5 <strong>FPGA</strong> User Guide for BUFR usage guidelines.<br />

Figure 6-3: MII Clock Management<br />

The CLIENTE<strong>MAC</strong>#DCMLOCKED port must be tied High.<br />

<strong>UG194</strong>_6_03_081409<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 141<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

X<br />

X<br />

IFD<br />

Q<br />

D<br />

BUFG (1)<br />

OFD<br />

D Q<br />

BUFG (1)<br />

IBUFG<br />

OBUF<br />

IBUFG<br />

IBUF<br />

MII_TX_CLK<br />

MII_TXD[3:0]<br />

MII_RX_CLK<br />

MII_RXD[3:0]


Chapter 6: Physical Interface<br />

MII Clock Management using Clock Enables<br />

TX CLIENT<br />

LOGIC<br />

CE<br />

ACK<br />

RX CLIENT<br />

LOGIC<br />

CE<br />

FDE<br />

Q D<br />

It is possible to use only two BUFGs by setting the E<strong>MAC</strong>#_USECLKEN attribute;<br />

however, the client and MII logic must be constrained to run at 125 MHz. Figure 6-4 shows<br />

the MII clock management scheme when operating in this mode.<br />

CE<br />

E<strong>MAC</strong>#<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

E<strong>MAC</strong>#PHYTXD[3:0]<br />

E<strong>MAC</strong>#PHYTXD[7:4]<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

PHYE<strong>MAC</strong>#RXCLK<br />

PHYE<strong>MAC</strong>#RXD[3:0]<br />

PHYE<strong>MAC</strong>#RXD[7:4]<br />

Notes:<br />

1) A regional buffer (BUFR) can replace this BUFG.<br />

In addition, the clock input of IFD can be driven by a BUFIO.<br />

Refer to UG190, <strong>Virtex</strong>-5 <strong>FPGA</strong> User Guide for BUFR usage guidelines.<br />

Figure 6-4: MII Clock Management with Clock Enable<br />

BUFG (1)<br />

<strong>UG194</strong>_6_04_091409<br />

Using the example in Figure 6-4, all logic is clocked on the MII interface clocks. The<br />

frequencies of these clocks are 25 MHz at 100 Mb/s and 2.5 MHz at 10 Mb/s, or twice as<br />

fast as the client clock requires. To produce the correct clock frequency at the client, the<br />

client logic must be clock enabled to achieve the correct data rate. The clock enables for the<br />

client logic are provided by the E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT and<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT outputs.<br />

142 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

X<br />

X<br />

IFD<br />

Q<br />

D<br />

BUFG<br />

OFD<br />

D Q<br />

IBUFG<br />

OBUF<br />

IBUFG<br />

IBUF<br />

MII_TX_CLK<br />

MII_TXD[3:0]<br />

MII_RX_CLK<br />

MII_RXD[3:0]<br />

R


R<br />

Gigabit Media Independent Interface (GMII)<br />

Due to the timing relationship between the MII transmit clock and the internal client clock<br />

signals, the TX_ACK signal (CLIENTE<strong>MAC</strong>#TXACK) is registered at the output of the<br />

<strong>Ethernet</strong> <strong>MAC</strong>.<br />

Gigabit Media Independent Interface (GMII)<br />

The Media Independent Interface (MII), defined in IEEE 802.3, clause 22, is a parallel<br />

interface that connects a 10-Mb/s and/or 100-Mb/s capable <strong>MAC</strong> to the physical<br />

sublayers. The Gigabit Media Independent Interface (GMII), defined in IEEE 802.3, clause<br />

35, is an extension of the MII used to connect a 1-Gb/s capable <strong>MAC</strong> to the physical<br />

sublayers. MII can be considered a subset of GMII, and as a result, GMII/MII can carry<br />

<strong>Ethernet</strong> traffic at 10 Mb/s, 100 Mb/s, and 1 Gb/s.<br />

Figure 6-5 shows the <strong>Ethernet</strong> <strong>MAC</strong> configured for GMII. The physical signals of the<br />

<strong>Ethernet</strong> <strong>MAC</strong> are connected through IOBs to the external interface. The “logic cloud”<br />

indicates that alternative implementations are possible.<br />

<strong>Ethernet</strong><br />

<strong>MAC</strong><br />

IOBs<br />

and<br />

Clock Logic<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong><br />

GMII_RX_CLK<br />

GMII_RXD[7:0]<br />

GMII_RX_DV<br />

GMII_RX_ER<br />

GMII_COL<br />

GMII_CRS<br />

MII_TX_CLK<br />

GMII_TX_CLK<br />

GTX_CLK<br />

GMII_TXD[7:0]<br />

GMII_TX_EN<br />

GMII_TX_ER<br />

Figure 6-5: <strong>Ethernet</strong> <strong>MAC</strong> Configured in GMII <strong>Mode</strong><br />

There are several implementations available using different clocking schemes. “<strong>Ethernet</strong><br />

<strong>MAC</strong> Clocks,” page 205 introduces these clocking models. They are described in detail in<br />

the following sections:<br />

“GMII Clock Management for 1 Gb/s Only”<br />

At 1 Gb/s speeds only, client interface and physical interface clocks always run at the<br />

same frequency (125 MHz). This enables efficient clock logic implementations.<br />

“GMII Standard Clock Management for <strong>Tri</strong>-Speed Operation”<br />

The standard clocking scheme for tri-speed operation.<br />

“GMII Clock Management for <strong>Tri</strong>-Speed Operation Using Byte PHY”<br />

An advanced clocking scheme for tri-speed operation, which saves on global clock<br />

resources.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 143<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

GMII Physical Interface<br />

<strong>UG194</strong>_6_05_073009


Chapter 6: Physical Interface<br />

“GMII Clock Management for <strong>Tri</strong>-Speed Operation Using Clock Enables”<br />

An alternative advanced clocking scheme for tri-speed operation, which saves on<br />

global clock resources.<br />

The advanced clocking schemes, Byte PHY and Clock Enables, both provide the same<br />

saving on global clocking resources and can be used interchangeably for GMII, based on<br />

user preference.<br />

If the CORE Generator tool is used, the wrapper files for the <strong>Ethernet</strong> <strong>MAC</strong> that are created<br />

will contain the logic described in these sections. By using the CORE Generator tool, the<br />

time required to instantiate the <strong>Ethernet</strong> <strong>MAC</strong> into a usable design is greatly reduced. See<br />

“Accessing the <strong>Ethernet</strong> <strong>MAC</strong> from the CORE Generator Tool,” page 25.<br />

GMII Clock Management for 1 Gb/s Only<br />

Figure 6-6 shows GMII clock management when using a single <strong>Ethernet</strong> <strong>MAC</strong>.<br />

144 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


GTX_CLK<br />

R<br />

IBUFG<br />

TX CLIENT<br />

LOGIC<br />

RX CLIENT<br />

LOGIC<br />

BUFG<br />

x<br />

x<br />

E<strong>MAC</strong>#<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

E<strong>MAC</strong>#PHYTXD[7:0]<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#RXCLK<br />

PHYE<strong>MAC</strong>#RXD[7:0]<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

Notes:<br />

1) A regional buffer (BUFR) can replace this BUFG.<br />

In addition, the clock input of IFD can be driven by a BUFIO.<br />

Refer to UG190, <strong>Virtex</strong>-5 <strong>FPGA</strong> User Guide for BUFR usage guidelines.<br />

Figure 6-6: 1 Gb/s GMII Clock Management<br />

Gigabit Media Independent Interface (GMII)<br />

GTX_CLK must be provided to the <strong>Ethernet</strong> <strong>MAC</strong>. This high-quality, 125 MHz clock<br />

satisfies the IEEE Std 802.3-2002 requirements.<br />

The GTX_CLK input is routed onto the global clock network via an IBUFG and BUFG. The<br />

output of the BUFG connects to:<br />

GMII_TXD registers in the <strong>FPGA</strong> logic<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN input port<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

TX client logic<br />

GMII_TX_CLK is forwarded along with the GMII data signals from the <strong>FPGA</strong> to the PHY.<br />

An IOB DDR output register is used; this is a predictable way to produce the clock because<br />

the clock-to-pad delay is the same as that for the GMII_TXD signals. This forwarded clock<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 145<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

x<br />

0<br />

1<br />

BUFG (1)<br />

IFD<br />

Q D<br />

D<br />

OFD<br />

Q<br />

ODDR<br />

D1<br />

D2<br />

IDELAY<br />

IDELAY<br />

OBUF<br />

OBUF<br />

IBUFG<br />

IBUF<br />

GMII_TXD[7:0]<br />

GMII_TX_CLK<br />

GMII_RX_CLK<br />

GMII_RXD[7:0]<br />

<strong>UG194</strong>_6_06_091409


Chapter 6: Physical Interface<br />

is inverted with respect to PHYE<strong>MAC</strong>#TXGMIIMIICLKIN so that its rising edge occurs in<br />

the centre of the GMII_TXD data valid window. This produces the best possible setup and<br />

hold times for driving the external interface.<br />

PHYE<strong>MAC</strong>#MIITXCLK is unused and must be tied to ground. The GMII_RX_CLK is<br />

generated from the PHY and connected to PHYE<strong>MAC</strong>#RXCLK through an IBUFG and<br />

BUFG. This is also used to clock all <strong>FPGA</strong> receiver logic, including the receiver client.<br />

Fixed-mode IDELAYs are used on the GMII_RX_CLK and GMII_RXD inputs to align the<br />

clock and data. These are set to sample a 2 ns setup, 0 ns hold window at the device pads<br />

The CLIENTE<strong>MAC</strong>#DCMLOCKED port must be tied High.<br />

Figure 6-7 shows the GMII clocking scheme with two <strong>Ethernet</strong> <strong>MAC</strong>s enabled. It is similar<br />

to the single <strong>Ethernet</strong> <strong>MAC</strong> clocking scheme; however, the same GTX_CLK input signal is<br />

used for all (both <strong>Ethernet</strong> <strong>MAC</strong>s) transmitter logic.<br />

146 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


GTX_CLK<br />

R<br />

IBUFG<br />

BUFG<br />

TX Client<br />

Logic<br />

RX Client<br />

Logic<br />

TX Client<br />

Logic<br />

RX Client<br />

Logic<br />

X<br />

E<strong>MAC</strong>0<br />

PHYE<strong>MAC</strong>0GTXCLK<br />

PHYE<strong>MAC</strong>0TXGMIIMIICLKIN<br />

E<strong>MAC</strong>0PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>0TXCLIENTCLKIN<br />

E<strong>MAC</strong>0CLIENTTXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>0RXCLIENTCLKIN<br />

E<strong>MAC</strong>0CLIENTRXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>0RXCLK<br />

CLIENTE<strong>MAC</strong>0DCMLOCKED<br />

PHYE<strong>MAC</strong>0RXD[7:0]<br />

E<strong>MAC</strong>1<br />

PHYE<strong>MAC</strong>1GTXCLK<br />

E<strong>MAC</strong>0PHYTXD[7:0]<br />

PHYE<strong>MAC</strong>0MIITXCLK<br />

PHYE<strong>MAC</strong>1TXGMIIMIICLKIN<br />

E<strong>MAC</strong>1PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>1TXCLIENTCLKIN<br />

E<strong>MAC</strong>1CLIENTTXCLIENTCLKOUT<br />

E<strong>MAC</strong>1PHYTXD[7:0]<br />

PHYE<strong>MAC</strong>0MIITXCLK<br />

CLIENTE<strong>MAC</strong>1RXCLIENTCLKIN<br />

E<strong>MAC</strong>1CLIENTRXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>1RXCLK<br />

CLIENTE<strong>MAC</strong>1DCMLOCKED<br />

PHYE<strong>MAC</strong>1RXD[7:0]<br />

Notes:<br />

1) A regional buffer (BUFR) can replace this BUFG.<br />

In addition, the clock input of IFD can be driven by a BUFIO.<br />

Refer to UG190, <strong>Virtex</strong>-5 <strong>FPGA</strong> User Guide for BUFR usage guidelines.<br />

X<br />

X<br />

X<br />

Gigabit Media Independent Interface (GMII)<br />

BUFG (1)<br />

Figure 6-7: 1 Gb/s GMII Clock Management with Two <strong>Ethernet</strong> <strong>MAC</strong>s Enabled<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 147<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

X<br />

X<br />

0<br />

1<br />

BUFG (1)<br />

IFD<br />

Q D<br />

0<br />

1<br />

IFD<br />

Q D<br />

ODDR<br />

D1<br />

D2<br />

Q<br />

OFD<br />

D Q<br />

IDELAY<br />

IDELAY<br />

ODDR<br />

D1<br />

D2<br />

Q<br />

OFD<br />

D Q<br />

IDELAY<br />

IDELAY<br />

OBUF<br />

OBUF<br />

OBUF<br />

OBUF<br />

IBUFG<br />

IBUF<br />

IBUFG<br />

IBUF<br />

GMII_TX_CLK_0<br />

GMII_TXD_0[7:0]<br />

GMII_RX_CLK_0<br />

GMII_RXD_0[7:0]<br />

GMII_TX_CLK_1<br />

GMII_TXD_1[7:0]<br />

GMII_RX_CLK_1<br />

GMII_RXD_1[7:0]<br />

<strong>UG194</strong>_6_07_080409


Chapter 6: Physical Interface<br />

TX CLIENT<br />

LOGIC<br />

RX CLIENT<br />

LOGIC<br />

GMII Standard Clock Management for <strong>Tri</strong>-Speed Operation<br />

BUFG<br />

BUFG<br />

Figure 6-8 shows the clock management used with the tri-speed GMII interface. GTX_CLK<br />

must be provided to the <strong>Ethernet</strong> <strong>MAC</strong> with a high-quality, 125 MHz clock that satisfies<br />

the IEEE Std 802.3-2002 requirements.<br />

E<strong>MAC</strong>#<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

E<strong>MAC</strong>#PHYTXD[7:0]<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

E<strong>MAC</strong>#SPEEEDIS10100<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#RXCLK<br />

PHYE<strong>MAC</strong>#RXD[7:0]<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

Notes:<br />

1) A regional buffer (BUFR) can replace this BUFG.<br />

In addition, the clock input of IFD can be driven by a BUFIO.<br />

Refer to UG190, <strong>Virtex</strong>-5 <strong>FPGA</strong> User Guide for BUFR usage guidelines.<br />

BUFG (1)<br />

BUFG (1)<br />

Figure 6-8: GMII <strong>Tri</strong>-<strong>Mode</strong> Operation Clock Management<br />

The E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT output port connects to the GMII logic in the <strong>FPGA</strong><br />

logic and the PHYE<strong>MAC</strong>#TXGMIIMIICLKIN input port through a BUFG.<br />

The E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT output port connects to the<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN input port and transmit client logic in the <strong>FPGA</strong> logic<br />

through a BUFG. The receive client clocking is similar.<br />

The MII_TX_CLK signal generated from the PHY has a frequency of either 2.5 MHz or<br />

25 MHz, depending on the operating speed of the <strong>Ethernet</strong> <strong>MAC</strong>. MII_TX_CLK connects<br />

148 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

IFD<br />

Q<br />

D<br />

0<br />

1<br />

OFD<br />

D Q<br />

ODDR<br />

D1<br />

D2<br />

1<br />

0<br />

BUFGMUX<br />

OBUF<br />

OBUF<br />

IDELAY<br />

IDELAY<br />

IBUF<br />

IBUF<br />

BUFG<br />

IBUF<br />

GMII_TXD[7:0]<br />

GMII_TX_CLK<br />

GTX_CLK<br />

MII_TX_CLK<br />

GMII_RX_CLK<br />

GMII_RXD[7:0]<br />

<strong>UG194</strong>_6_08_080309<br />

R


R<br />

Gigabit Media Independent Interface (GMII)<br />

to PHYE<strong>MAC</strong>#MIITXCLK through an IBUF. The frequency of GMII_RX_CLK, generated<br />

from the PHY, is 2.5 MHz, 25 MHz, or 125 MHz, depending on the operating speed of the<br />

<strong>Ethernet</strong> <strong>MAC</strong>. Fixed-mode IDELAYs are used on the GMII_RX_CLK and GMII_RXD<br />

inputs to align the clock and data. These are set to sample a 2 ns setup, 0 ns hold window<br />

at the device pads.The CLIENTE<strong>MAC</strong>#DCMLOCKED port must be tied High.<br />

The GMII_TX_CLK is derived from the <strong>Ethernet</strong> <strong>MAC</strong>, routed through an OBUF, and then<br />

connected to the PHY. Because GMII_TX_CLK is derived from<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT, its frequency automatically changes between 125 MHz,<br />

25 MHz, or 2.5 MHz, depending on the speed setting of the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

GMII Clock Management for <strong>Tri</strong>-Speed Operation Using Byte PHY<br />

Figure 6-9 shows an alternative clock management scheme for the tri-speed GMII<br />

interface. This clock management scheme is used when the E<strong>MAC</strong>#_BYTEPHY attribute is<br />

set to TRUE. In this scheme, the E<strong>MAC</strong> datapath is 8 bits wide at both the client and the<br />

physical interfaces at all speeds. At 1 Gb/s, all external logic is clocked at 125 MHz. At<br />

100 Mb/s and 10 Mb/s, the logic is clocked at 12.5 MHz and 1.25 MHz, respectively. DDR<br />

input and output registers are used to achieve the 25 MHz and 2.5 MHz 4-bit data rate at<br />

speeds below 1 Gb/s, resulting in a scheme that utilizes two clock buffers less than<br />

Figure 6-8. Alignment logic must be provided on the receiver side to align the start of<br />

frame delimiter in the 8-bit data input to the E<strong>MAC</strong>.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 149<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 6: Physical Interface<br />

TX Client<br />

Logic<br />

GTX_CLK<br />

RX Client<br />

Logic<br />

X<br />

IBUFG<br />

X<br />

E<strong>MAC</strong>#<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

E<strong>MAC</strong>#PHYTXD[3:0]<br />

E<strong>MAC</strong>#PHYTXD[7:4]<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

E<strong>MAC</strong>#SPEEEDIS10100<br />

PHYE<strong>MAC</strong>#RXD[3:0]<br />

PHYE<strong>MAC</strong>#RXD[7:4]<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

PHYE<strong>MAC</strong>#RXCLK<br />

BUFGMUX<br />

BUFGMUX<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

Figure 6-9: <strong>Tri</strong>-<strong>Mode</strong> GMII Clock Management with Byte PHY Enabled<br />

GMII_TX_CLK<br />

MII_TX_CLK<br />

GMII_RXD[3:0]<br />

IBUFG<br />

IDELAY GMII_RX_CLK<br />

<strong>UG194</strong>_6_09_080309<br />

GTX_CLK must be provided to the <strong>Ethernet</strong> <strong>MAC</strong> with a high-quality, 125 MHz clock that<br />

satisfies the IEEE Std 802.3-2002 requirements.<br />

The PHYE<strong>MAC</strong>#TXGMIIMIICLKIN and CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN ports are<br />

supplied by the output of a BUFGMUX. At 1 Gb/s, the BUFGMUX routes through the<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT signal. At 100 Mb/s and 10 Mb/s, the BUFGMUX is<br />

switched to supply tx_clk_div2 to the E<strong>MAC</strong>. This signal is the MII_TX_CLK input<br />

150 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

I1<br />

I0<br />

I1<br />

I0<br />

tx_clk_div2<br />

I0<br />

I1<br />

MUX<br />

4-Bit to 8-Bit<br />

Realignment<br />

Logic<br />

rx_clk_div2<br />

0<br />

1<br />

ODDR<br />

D1 Q<br />

D2<br />

IDDR<br />

Q1 D<br />

Q2<br />

D1 Q<br />

D2<br />

ODDR<br />

D1 Q<br />

D2<br />

IDDR<br />

Q1 D<br />

Q2<br />

D<br />

D<br />

FD<br />

FD<br />

Q<br />

Q<br />

OBUF<br />

IBUFG<br />

ODDR OBUF<br />

OBUF<br />

IDELAY<br />

IDELAY<br />

GMII_TXD[3:0]<br />

GMII_TXD[7:4]<br />

IBUF<br />

IBUF<br />

GMII_RXD[7:4]<br />

R


R<br />

Gigabit Media Independent Interface (GMII)<br />

divided by two in frequency. The output of the BUFGMUX also clocks all the transmit<br />

client and GMII logic.<br />

The receiver side clocking is similar. At 1 Gb/s, a BUFGMUX supplies the GMII_RX_CLK<br />

signal to the PHYE<strong>MAC</strong>#RXCLK and CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN ports. At 100 Mb/s<br />

and 10 Mb/s, the BUFGMUX is switched to provide rx_clk_div2 to the E<strong>MAC</strong>. This clock<br />

is the GMII_RX_CLK input divided by two in frequency. The output of the BUFGMUX also<br />

clocks all the receiver client and GMII logic. Fixed-mode IDELAYs are used on the<br />

GMII_RX_CLK and GMII_RXD inputs to align the clock and data. These are set to sample<br />

a 2 ns setup, 0 ns hold window at the device pads.<br />

The GMII_TX_CLK is derived from the <strong>Ethernet</strong> <strong>MAC</strong>, routed through an OBUF and then<br />

connected to the PHY. Because GMII_TX_CLK is derived from<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT, its frequency automatically changes between 125 MHz,<br />

25 MHz, or 2.5 MHz, depending on the speed setting of the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

GMII Clock Management for <strong>Tri</strong>-Speed Operation Using Clock Enables<br />

Figure 6-10 shows the clock management scheme for tri-speed operation when the<br />

E<strong>MAC</strong>#_USECLKEN attribute is set. In this mode of operation, the transmitter signals are<br />

synchronous to PHYE<strong>MAC</strong>#TXGMIIMIICLKIN and the receiver signals are synchronous to<br />

PHYE<strong>MAC</strong>#RXCLK.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 151<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 6: Physical Interface<br />

IBUFG BUFGMUX<br />

MII_TX_CLK<br />

I1<br />

GTX_CLK<br />

TX Client<br />

Logic<br />

RX Client<br />

Logic<br />

CE<br />

ACK<br />

CE<br />

IBUFG<br />

I0<br />

I1<br />

I0<br />

FDE<br />

Q D<br />

E<strong>MAC</strong>#<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

E<strong>MAC</strong>#PHYTXD[7:0]<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

E<strong>MAC</strong>#SPEEEDIS10100<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

PHYE<strong>MAC</strong>#RXCLK<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

E<strong>MAC</strong>#PHYRXD[7:0]<br />

Notes:<br />

1) A regional buffer (BUFR) can replace this BUFG.<br />

In addition, the clock input of IFD can be driven by a BUFIO.<br />

Refer to UG190, <strong>Virtex</strong>-5 <strong>FPGA</strong> User Guide for BUFR usage guidelines.<br />

Figure 6-10: <strong>Tri</strong>-<strong>Mode</strong> GMII Clock Management with Clock Enable<br />

GMII_TX_CLK<br />

GMII_RX_CLK<br />

<strong>UG194</strong>_6_10_080409<br />

At 1 Gb/s, all external logic is clocked at 125 MHz. At 100 Mb/s and 10 Mb/s, the logic is<br />

clocked at 25 MHz and 2.5 MHz, respectively. To maintain the correct data rate at the<br />

client, interface clock enable signals are output on E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT for<br />

the transmitter logic and on E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT for the receiver logic. These<br />

signals are High during 1 Gb/s operation and toggle on each clock edge at slower speeds.<br />

These are used to enable the client interface logic.<br />

Due to the timing relationship between the GMII transmit clock and the internal client<br />

clock signals, the TX_ACK signal (CLIENTE<strong>MAC</strong>#TXACK) is registered at the output of the<br />

<strong>Ethernet</strong> <strong>MAC</strong> when operating at speeds below 1 Gb/s. At 1 G b/s, the register is<br />

bypassed.<br />

The GMII_TX_CLK is derived from the GTX_CLK input when the <strong>MAC</strong> is operating at<br />

1 Gb/s and from the MII_TX_CLK input when the <strong>MAC</strong> is operating at a lower speed. It is<br />

152 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

X<br />

0<br />

1<br />

ODDR<br />

D1 Q<br />

D2<br />

OFD<br />

BUFG (1)<br />

IFD<br />

OBUF<br />

OBUF<br />

D Q<br />

GMII_TXD[7:0]<br />

IDELAY<br />

Q D IDELAY<br />

IBUFG<br />

IBUF<br />

GMII_RXD[7:0]<br />

R


R<br />

Reduced Gigabit Media Independent Interface (RGMII)<br />

routed through an OBUF and then connected to the PHY. Its frequency changes between<br />

125 MHz, 25 MHz, or 2.5 MHz depending on the speed setting of the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

This clocking scheme requires two fewer BUFGs than the default scheme detailed in<br />

Figure 6-8.<br />

Reduced Gigabit Media Independent Interface (RGMII)<br />

Reduced GMII (RGMII), defined by Hewlett-Packard, is an alternative to GMII. It reduces<br />

the number of pins required to connect the <strong>Ethernet</strong> <strong>MAC</strong> to the PHY from 24 to 12, when<br />

compared with GMII. RGMII achieves this 50% pin count reduction in the interface by<br />

using DDR flip-flops. For this reason, RGMII is preferred over GMII by PCB designers.<br />

RGMII can carry <strong>Ethernet</strong> traffic at 10 Mb/s, 100 Mb/s, and 1 Gb/s. For more information<br />

on RGMII, refer to the Hewlett-Packard RGMII Specification, version 1.3 and 2.0.<br />

Figure 6-11 shows the <strong>Ethernet</strong> <strong>MAC</strong> configured for RGMII. The physical signals of the<br />

<strong>Ethernet</strong> <strong>MAC</strong> are connected through IOBs to the external interface. The “logic cloud”<br />

indicates that alternative implementations are possible.<br />

<strong>Ethernet</strong><br />

<strong>MAC</strong><br />

IOBs<br />

and<br />

Clock Logic<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong><br />

RGMII_RXC<br />

RGMII_RXD[3:0]<br />

RGMII_RX_CTL<br />

RGMII_TXC<br />

RGMII_TXD[3:0]<br />

RGMII_TX_CTL<br />

GTX_CLK<br />

Figure 6-11: <strong>Ethernet</strong> <strong>MAC</strong> Configured in RGMII <strong>Mode</strong><br />

There are several implementations for both RGMII v1.3 and v2.0, which use alternative<br />

clocking schemes. “<strong>Ethernet</strong> <strong>MAC</strong> Clocks,” page 205 introduces these clocking models.<br />

They are described in detail in the following sections:<br />

“RGMII Clock Management for 1 Gb/s Only”<br />

At 1 Gb/s speeds only, client interface and physical interface clocks always run at the<br />

same frequency (125 MHz). This enables efficient clock logic implementations.<br />

“RGMII Standard Clock Management for <strong>Tri</strong>-Speed Operation”<br />

The standard clocking scheme for tri-speed operation.<br />

“RGMII Clock Management for <strong>Tri</strong>-Speed Operation Using Clock Enables”<br />

An advanced clocking scheme for tri-speed operation that saves global clock<br />

resources.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 153<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

RGMII Physical Interface<br />

<strong>UG194</strong>_6_11_0080409


Chapter 6: Physical Interface<br />

GTX_CLK<br />

If the CORE Generator tool is used, then the wrapper files for the <strong>Ethernet</strong> <strong>MAC</strong> that are<br />

created contain the logic described in these sections. By using the CORE Generator tool,<br />

the time required to instantiate the <strong>Ethernet</strong> <strong>MAC</strong> into a usable design is greatly reduced.<br />

See “Accessing the <strong>Ethernet</strong> <strong>MAC</strong> from the CORE Generator Tool,” page 25.<br />

RGMII Clock Management for 1 Gb/s Only<br />

IBUFG<br />

TX Client<br />

Logic<br />

RX Client<br />

Logic<br />

RGMII Version 1.3<br />

BUFG<br />

Figure 6-12 shows the clock management used with the RGMII interface when using the<br />

Hewlett Packard RGMII Specification v1.3. GTX_CLK must be provided to the <strong>Ethernet</strong> <strong>MAC</strong><br />

with a high-quality, 125 MHz clock that satisfies the IEEE Std 802.3-2002 requirements. The<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT output port drives all transmitter logic through a BUFG.<br />

X<br />

X<br />

E<strong>MAC</strong>#<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

E<strong>MAC</strong>#PHYTXD[3:0]<br />

E<strong>MAC</strong>#PHYTXD[7:4]<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#RXCLK<br />

PHYE<strong>MAC</strong>#RXD[3:0]<br />

PHYE<strong>MAC</strong>#RXD[7:4]<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

Notes:<br />

1) A regional buffer (BUFR) can replace this BUFG.<br />

In addition, the clock input of IDDR can be driven by a BUFIO.<br />

Refer to UG190, <strong>Virtex</strong>-5 <strong>FPGA</strong> User Guide for BUFR usage guidelines.<br />

Figure 6-12: 1 Gb/s RGMII Hewlett Packard v1.3 Clock Management<br />

154 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

X<br />

1<br />

0<br />

ODDR<br />

D1<br />

Q<br />

IDELAY<br />

OBUF<br />

IBUFG<br />

RGMII_RXC<br />

IDDR<br />

Q1 D IDELAY<br />

RGMII_RXD[3:0]<br />

Q2<br />

ODDR<br />

D1<br />

D2<br />

D2<br />

BUFG (1)<br />

Q<br />

OBUF<br />

IBUF<br />

RGMII_TXC<br />

RGMII_TXD[3:0]<br />

<strong>UG194</strong>_6_12_080409<br />

R


R<br />

Reduced Gigabit Media Independent Interface (RGMII)<br />

RGMII_TXC is derived from GTX_CLK by routing to an IOB DDR output register followed<br />

by an OBUF (which is then connected to the PHY). The use of the DDR register ensures that<br />

the forwarded clock is exactly in line with the RGMII transmitter data, as specified in the<br />

Hewlett Packard RGMII Specification, v1.3.<br />

RGMII_RXC is generated by the PHY and connected to PHYE<strong>MAC</strong>#RXCLK via an IBUFG<br />

and a BUFG. Fixed-mode IDELAYs are instantiated on the RGMII clock and data lines.<br />

These are set to sample a 1 ns setup, 1 ns hold window at the device pads. RGMII_RXC is<br />

used to derive the clocks for all receive logic.<br />

The CLIENTE<strong>MAC</strong>#DCMLOCKED port must be tied High.<br />

RGMII Version 2.0<br />

Figure 6-13 shows the clock management used with the RGMII interface when following<br />

the Hewlett Packard RGMII specification v2.0. GTX_CLK must be provided to the<br />

<strong>Ethernet</strong> <strong>MAC</strong> with a high-quality, 125 MHz clock that satisfies the IEEE Std 802.3-2002<br />

requirements. The E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT output port connects to a BUFG, which<br />

in turn drives the RGMII transmitter logic in the <strong>FPGA</strong> logic and the<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN input port.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 155<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 6: Physical Interface<br />

GTX_CLK<br />

IBUFG<br />

TX Client<br />

Logic<br />

RX Client<br />

Logic<br />

BUFG<br />

X<br />

X<br />

E<strong>MAC</strong>#<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

E<strong>MAC</strong>#PHYTXD[3:0]<br />

E<strong>MAC</strong>#PHYTXD[7:4]<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#RXCLK<br />

PHYE<strong>MAC</strong>#RXD[3:0]<br />

PHYE<strong>MAC</strong>#RXD[7:4]<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

Notes:<br />

1) A regional buffer (BUFR) can replace this BUFG.<br />

In addition, the clock input of IDDR can be driven by a BUFIO.<br />

Refer to UG190, <strong>Virtex</strong>-5 <strong>FPGA</strong> User Guide for BUFR usage guidelines.<br />

Figure 6-13: 1 Gb/s RGMII Hewlett Packard v2.0 Clock Management<br />

RGMII_TXC is derived from the <strong>Ethernet</strong> <strong>MAC</strong> by routing GTX_CLK to an IOB DDR<br />

output register, followed by an ODELAY element and an OBUF (which is then connected<br />

to the PHY). The ODELAY element is used to generate 2 ns of skew required between<br />

RGMII_TXC and RGMII_TXD at the <strong>FPGA</strong> device pads. This delay is specified in the<br />

Hewlett Packard RGMII Specification, v2.0 to provide setup and hold times on the external<br />

interface.<br />

RGMII_RXC is generated by the PHY and connected to PHYE<strong>MAC</strong>#RXCLK via an IBUFG<br />

and a BUFG. Fixed-mode IDELAYs are instantiated on the RGMII clock and data lines.<br />

These are set to sample a 1 ns setup, 1 ns hold window at the device pads. RGMII_RXC<br />

drives all receive logic.<br />

The CLIENTE<strong>MAC</strong>#DCMLOCKED port must be tied High.<br />

156 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

X<br />

1<br />

0<br />

ODDR<br />

D1<br />

D2<br />

Q<br />

OBUF<br />

BUFG (1) IBUFG<br />

IDELAY<br />

RGMII_TXC<br />

RGMII_TXD[3:0]<br />

RGMII_RXC<br />

IDDR<br />

Q1 D IDELAY<br />

RGMII_RXD[3:0]<br />

Q2<br />

ODDR<br />

D1<br />

D2<br />

Q<br />

ODELAY<br />

IBUF<br />

OBUF<br />

<strong>UG194</strong>_6_13_080409<br />

R


GTX_CLK<br />

TX Client<br />

Logic<br />

RX Client<br />

Logic<br />

R<br />

Reduced Gigabit Media Independent Interface (RGMII)<br />

RGMII Standard Clock Management for <strong>Tri</strong>-Speed Operation<br />

IBUF<br />

RGMII Version 1.3<br />

BUFG<br />

BUFG<br />

Figure 6-14 shows the tri-speed clock management following the Hewlett Packard RGMII<br />

specification v1.3. GTX_CLK must be provided to the <strong>Ethernet</strong> <strong>MAC</strong> with a high-quality,<br />

125 MHz clock that satisfies the IEEE Std 802.3-2002 requirements. The<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT port generates the appropriate frequency derived from<br />

GTX_CLK and depending on the operating frequency of the link. It clocks directly the<br />

RGMII_TXD ODDR registers.<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

E<strong>MAC</strong>#<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

E<strong>MAC</strong>#PHYTXD[3:0]<br />

E<strong>MAC</strong>#PHYTXD[7:4]<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

PHYE<strong>MAC</strong>#RXCLK<br />

PHYE<strong>MAC</strong>#RXD[3:0]<br />

PHYE<strong>MAC</strong>#RXD[7:4]<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

Notes:<br />

1) A regional buffer (BUFR) can replace this BUFG.<br />

In addition, the clock input of IFD can be driven by a BUFIO.<br />

Refer to UG190, <strong>Virtex</strong>-5 <strong>FPGA</strong> User Guide for BUFR usage guidelines.<br />

Figure 6-14: <strong>Tri</strong>-<strong>Mode</strong> RGMII v1.3 Clock Management<br />

The E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT output port connects to the<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN input port and transmitter client logic in the <strong>FPGA</strong> logic<br />

through a BUFG. The receiver client clocking is similar.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 157<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

'1'<br />

'0'<br />

BUFG (1)<br />

D1<br />

D2<br />

D1<br />

D2<br />

ODDR<br />

Q<br />

ODDR<br />

Q<br />

OBUF<br />

OBUF<br />

IBUFG<br />

RGMII_TXC<br />

RGMII_TXD[3:0]<br />

RGMII_RXC<br />

IDDR<br />

Q1 D IDELAY<br />

RGMII_RXD[3:0]<br />

Q2<br />

BUFG (1)<br />

IDELAY<br />

IBUF<br />

<strong>UG194</strong>_6_14_080409


Chapter 6: Physical Interface<br />

RGMII_TXC is derived from the <strong>Ethernet</strong> <strong>MAC</strong> by routing to an IOB DDR output register<br />

followed by an OBUF (which is then connected to the PHY). The use of the DDR register<br />

ensures that the forwarded clock is exactly in line with the RGMII transmitter data, as<br />

specified in the Hewlett Packard RGMII Specification, v1.3.<br />

RGMII_RXC is generated by the PHY and connected to PHYE<strong>MAC</strong>#RXCLK via an IBUFG<br />

and a BUFG. Fixed-mode IDELAYs are instantiated on the RGMII clock and data lines.<br />

These are set to sample a 1 ns setup, 1 ns hold window at the device pads. The<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED port must be tied High.<br />

RGMII Version 2.0<br />

Figure 6-15 shows the tri-speed clock management following the Hewlett Packard RGMII<br />

specification v2.0. GTX_CLK must be provided to the <strong>Ethernet</strong> <strong>MAC</strong> with a high-quality,<br />

125 MHz clock that satisfies the IEEE Std 802.3-2002 requirements. The<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT port generates the appropriate frequency deriving from<br />

GTX_CLK and the operating frequency of the link. It clocks directly to the RGMII_TXD<br />

ODDR registers.<br />

158 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


GTX_CLK<br />

TX Client<br />

Logic<br />

RX Client<br />

Logic<br />

R<br />

IBUF<br />

BUFG<br />

BUFG<br />

E<strong>MAC</strong>#<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

E<strong>MAC</strong>#PHYTXD[3:0]<br />

E<strong>MAC</strong>#PHYTXD[7:4]<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#RXCLK<br />

PHYE<strong>MAC</strong>#RXD[3:0]<br />

PHYE<strong>MAC</strong>#RXD[7:4]<br />

Notes:<br />

1) A regional buffer (BUFR) can replace this BUFG.<br />

In addition, the clock input of IDDR can be driven by a BUFIO.<br />

Refer to UG190, <strong>Virtex</strong>-5 <strong>FPGA</strong> User Guide for BUFR usage guidelines.<br />

Reduced Gigabit Media Independent Interface (RGMII)<br />

BUFG (1)<br />

Figure 6-15: <strong>Tri</strong>-<strong>Mode</strong> RGMII v2.0 Clock Management<br />

RGMII_TXC is derived from the <strong>Ethernet</strong> <strong>MAC</strong> by routing the<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT port to an IOB DDR output register, followed by an<br />

ODELAY element and an OBUF (which is then connected to the PHY). The ODELAY<br />

element is used to generate 2 ns of skew required between RGMII_TXC and RGMII_TXD at<br />

the <strong>FPGA</strong> device pads. This delay is specified in the Hewlett Packard RGMII Specification,<br />

v2.0 to provide setup and hold times on the external interface.<br />

The E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT output port connects to the<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN input port and transmitter client logic in the <strong>FPGA</strong> logic<br />

through a BUFG. The receiver client clocking is similar.<br />

RGMII_RXC is generated by the PHY and connected to PHYE<strong>MAC</strong>#RXCLK via an IBUFG<br />

and a BUFG. Fixed-mode IDELAYs are instantiated on the RGMII clock and data lines.<br />

These are set to sample a 1 ns setup, 1 ns hold window at the device pads. The<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED port must be tied High.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 159<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

1<br />

0<br />

ODDR<br />

D1<br />

D2<br />

Q<br />

OBUF<br />

RGMII_TXD[3:0]<br />

(1)<br />

BUFG IBUFG<br />

IDELAY<br />

RGMII_RXC<br />

IDDR<br />

Q1 D IDELAY<br />

RGMII_RXD[3:0]<br />

Q2<br />

ODDR<br />

D1<br />

D2<br />

Q<br />

ODELAY<br />

IBUF<br />

OBUF<br />

RGMII_TXC<br />

<strong>UG194</strong>_6_15_080409


Chapter 6: Physical Interface<br />

TX Client<br />

Logic<br />

CE<br />

ACK<br />

RX Client<br />

Logic<br />

CE<br />

RGMII Clock Management for <strong>Tri</strong>-Speed Operation Using Clock Enables<br />

RGMII Version 1.3<br />

IBUF<br />

GTX_CLK<br />

I0<br />

I1<br />

Figure 6-16 shows the clock management scheme for tri-speed RGMII v1.3 operation when<br />

the E<strong>MAC</strong>#_USECLKEN attribute is set.<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

E<strong>MAC</strong>#<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

Q D<br />

E<strong>MAC</strong>#PHYTXD[3:0]<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

E<strong>MAC</strong>#PHYTXD[7:4]<br />

E<strong>MAC</strong>#SPEEDIS10100<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

PHYE<strong>MAC</strong>#RXCLK<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

PHYE<strong>MAC</strong>#RXD[3:0]<br />

PHYE<strong>MAC</strong>#RXD[7:4]<br />

Notes:<br />

1) A regional buffer (BUFR) can replace this BUFG.<br />

In addition, the clock input of IDDR can be driven by a BUFIO.<br />

Refer to UG190, <strong>Virtex</strong>-5 <strong>FPGA</strong> User Guide for BUFR usage guidelines.<br />

Figure 6-16: <strong>Tri</strong>-<strong>Mode</strong> RGMII with Clock Enables<br />

In this mode of operation, the transmitter signals are synchronous to<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN, and the receiver signals are synchronous to<br />

PHYE<strong>MAC</strong>#RXCLK.<br />

At 1 Gb/s, all external logic is clocked at 125 MHz. At 100 Mb/s and 10 Mb/s, the logic is<br />

clocked at 25 MHz and 2.5 MHz, respectively. To maintain the correct data rate at the client<br />

interface, clock enable signals are output on E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT for the<br />

transmitter logic, and E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT for the receiver logic. These<br />

160 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

'1'<br />

'0'<br />

BUFG<br />

D1<br />

D2<br />

D1<br />

D2<br />

ODDR<br />

Q<br />

ODDR<br />

Q<br />

OBUF<br />

OBUF<br />

BUFG (1) IBUFG<br />

RGMII_TXC<br />

RGMII_TXD[3:0]<br />

RGMII_RXC<br />

IDDR<br />

Q1 D IDELAY<br />

RGMII_RXD[3:0]<br />

Q2<br />

IDELAY<br />

IBUF<br />

<strong>UG194</strong>_6_16_080409<br />

R


R<br />

Reduced Gigabit Media Independent Interface (RGMII)<br />

signals are High during 1 Gb/s operation and toggle on each clock edge at slower speeds.<br />

These are used to enable the client interface logic.<br />

Due to the timing relationship between the RGMII transmit clock and the internal client<br />

clock signals, the TX_ACK signal (CLIENTE<strong>MAC</strong>#TXACK) is registered at the output of the<br />

<strong>Ethernet</strong> <strong>MAC</strong> when operating at speeds below 1 Gb/s. At 1 Gb/s, the register is<br />

bypassed.<br />

RGMII_TXC is derived from the <strong>Ethernet</strong> <strong>MAC</strong> by routing to an IOB DDR output register<br />

followed by an OBUF (which is then connected to the PHY). The use of the DDR register<br />

ensures that the forwarded clock is exactly in line with the RGMII transmitter data, as<br />

specified in the Hewlett Packard RGMII Specification, v1.3.<br />

RGMII_RXC is generated by the PHY and connected and connected to PHYE<strong>MAC</strong>#RXCLK<br />

via an IBUFG and a BUFG. Fixed-mode IDELAYs are instantiated on the RGMII clock and<br />

data lines. These are set to sample a 1 ns setup, 1 ns hold window at the device pads.<br />

RGMII_RXC drives all receive logic. The CLIENTE<strong>MAC</strong>#DCMLOCKED port must be tied<br />

High.<br />

This clocking scheme requires two fewer BUFGs than the default scheme detailed in<br />

Figure 6-14.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 161<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 6: Physical Interface<br />

TX Client<br />

Logic<br />

CE<br />

ACK<br />

RX Client<br />

Logic<br />

CE<br />

RGMII Version 2.0<br />

GTX_CLK<br />

I0<br />

I1<br />

Figure 6-17 shows the clock management scheme for tri-speed RGMII v2.0 operation when<br />

the E<strong>MAC</strong>#_USECLKEN attribute is set.<br />

Q D<br />

CE<br />

IBUF<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

E<strong>MAC</strong>#<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

E<strong>MAC</strong>#PHYTXD[3:0]<br />

E<strong>MAC</strong>#CLIENTTXACK<br />

E<strong>MAC</strong>#PHYTXD[7:4]<br />

E<strong>MAC</strong>#SPEEDIS10100<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

PHYE<strong>MAC</strong>#RXCLK<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

Notes:<br />

1) A regional buffer (BUFR) can replace this BUFG.<br />

In addition, the clock input of IDDR can be driven by a BUFIO.<br />

Refer to UG190, <strong>Virtex</strong>-5 <strong>FPGA</strong> User Guide for BUFR usage guidelines.<br />

PHYE<strong>MAC</strong>#RXD[3:0]<br />

PHYE<strong>MAC</strong>#RXD[7:4]<br />

Figure 6-17: <strong>Tri</strong>-<strong>Mode</strong> RGMII with Clock Enables<br />

In this mode of operation, the transmitter signals are synchronous to<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN, and the receiver signals are synchronous to<br />

PHYE<strong>MAC</strong>#RXCLK.<br />

162 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

1<br />

0<br />

BUFG<br />

D1<br />

D2<br />

ODDR<br />

Q<br />

OBUF<br />

BUFG (1) IBUFG<br />

IDELAY<br />

RGMII_TXD[3:0]<br />

RGMII_RXC<br />

IDDR<br />

Q1 D IDELAY RGMII_RXD[3:0]<br />

Q2<br />

ODDR<br />

D1<br />

D2<br />

Q<br />

ODELAY<br />

IBUF<br />

OBUF<br />

RGMII_TXC<br />

<strong>UG194</strong>_6_17_080409<br />

R


R<br />

Reduced Gigabit Media Independent Interface (RGMII)<br />

At 1 Gb/s, all external logic is clocked at 125 MHz. At 100 Mb/s and 10 Mb/s, the logic is<br />

clocked at 25 MHz and 2.5 MHz, respectively. To maintain the correct data rate at the client<br />

interface, clock enable signals are output on E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT for the<br />

transmitter logic, and E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT for the receiver logic. These<br />

signals are High during 1 Gb/s operation and toggle on each clock edge at slower speeds.<br />

These are used to enable the client interface logic.<br />

Due to the timing relationship between the RGMII transmit clock and the internal client<br />

clock signals, the TX_ACK signal (CLIENTE<strong>MAC</strong>#TXACK) is registered at the output of the<br />

<strong>Ethernet</strong> <strong>MAC</strong> when operating at speeds below 1 Gb/s. At 1 Gb/s, the register is<br />

bypassed.<br />

RGMII_TXC is derived from the <strong>Ethernet</strong> <strong>MAC</strong> by routing the<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT port to an IOB DDR output register, followed by an<br />

ODELAY element and an OBUF (which is then connected to the PHY). The ODELAY<br />

element is used to generate 2 ns of skew required between RGMII_TXC and RGMII_TXD at<br />

the <strong>FPGA</strong> device pads. This delay is specified in the<br />

Hewlett Packard RGMII Specification, v2.0 to provide setup and hold times on the external<br />

interface.<br />

RGMII_RXC is generated by the PHY and connected to PHYE<strong>MAC</strong>#RXCLK via an IBUFG<br />

and a BUFG. Fixed-mode IDELAYs are instantiated on the RGMII clock and data lines.<br />

These are set to sample a 1 ns setup, 1 ns hold window at the device pads. RGMII_RXC<br />

drives all receive logic. The CLIENTE<strong>MAC</strong>#DCMLOCKED port must be tied High.<br />

This clocking scheme requires two fewer BUFGs than the default scheme detailed in<br />

Figure 6-15.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 163<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 6: Physical Interface<br />

1000BASE-X PCS/PMA<br />

Generic<br />

Host Bus<br />

DCR Bus<br />

<strong>Ethernet</strong> <strong>MAC</strong> PCS/PMA Sublayer<br />

Flow Control<br />

Interface<br />

Host<br />

Interface<br />

DCR Bridge<br />

Figure 6-18 shows the functional block diagram of the <strong>Ethernet</strong> <strong>MAC</strong> with the PCS/PMA<br />

sublayer block highlighted.<br />

E<strong>MAC</strong>#<br />

TX<br />

RX<br />

16- or 8-Bit Client Interface<br />

Transmit Engine<br />

Flow Control<br />

Receive Engine<br />

Address Filter<br />

Registers<br />

MDIO Interface<br />

<strong>MAC</strong> Configuration<br />

Registers<br />

Figure 6-18: Functional Block Diagram of the <strong>Ethernet</strong> <strong>MAC</strong><br />

The PCS/PMA sublayer extends the functionality of the <strong>Ethernet</strong> <strong>MAC</strong>, replacing the<br />

GMII/MII or RGMII parallel interfaces with an interface to a RocketIO serial transceiver.<br />

The connected RocketIO serial transceiver then provides the remaining functionality to<br />

accommodate the following two standards, both of which require the high-speed serial<br />

interface provided by the RocketIO serial transceiver:<br />

“Serial Gigabit Media Independent Interface (SGMII)”<br />

“1000BASE-X PCS/PMA”<br />

TX RX<br />

Statistics<br />

Clock Management<br />

Introduction to the 1000BASE-X PCS/PMA Implementation<br />

MII/GMII/RGMII<br />

Interface to<br />

External PHY<br />

GTP/GTX Transceiver<br />

Interface<br />

MDIO Interface<br />

to External PHY<br />

<strong>UG194</strong>_6_18_071709<br />

The 1000BASE-X physical standard, described in IEEE 802.3, clauses 36 and 37, defines a<br />

physical sublayer that is usually connected to an optical fibre medium. Two common<br />

implementations currently exist: 1000BASE-LX and 1000BASE-SX (long and short<br />

wavelength laser), which can both be obtained by connecting the RocketIO serial<br />

transceiver to a suitable GBIC or SFP optical transceiver.<br />

164 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

MII/GMII/RGMII Interface<br />

TX<br />

RX<br />

TX<br />

RX<br />

PCS/PMA Sublayer<br />

PCS Management<br />

Registers<br />

MDIO Intersection<br />

R


<strong>FPGA</strong><br />

R<br />

PCS/PMA Sublayer<br />

<strong>MAC</strong> TX<br />

Interface<br />

<strong>MAC</strong> RX<br />

Interface<br />

MDIO<br />

Interface<br />

1000BASE-X PCS/PMA<br />

Figure 6-19 shows an expanded diagram of the PCS/PMA sublayer block. The PCS/PMA<br />

sublayer contains its own functional blocks, which are illustrated and summarized in the<br />

following subsections. The RocketIO serial transceiver is shown connected to an external<br />

optical transceiver to complete the 1000BASE-X optical link.<br />

Figure 6-19: <strong>Ethernet</strong> PCS/PMA Sublayer Extension<br />

PCS Transmit Engine<br />

PCS Transmit<br />

Engine<br />

Auto-Negotiation<br />

PCS Receive<br />

Engine and<br />

Synchronization<br />

PCS<br />

Management<br />

Registers<br />

The PCS Transmit Engine encodes the datastream received from the <strong>MAC</strong> into a sequence<br />

of ordered sets as defined by the standard. The data is transmitted to the RocketIO serial<br />

transceiver using an 8-bit datapath that then provides 8B/10B encoding of this data and<br />

parallel to serial conversion. The output from the RocketIO serial transceiver is a<br />

differential pair operating at a rate of 1.25 Gb/s.<br />

For more information on the PCS Transmit Engine, refer to the state diagrams of IEEE 802.3<br />

(Figures 36-5 and 36-6).<br />

PCS Receive Engine and Synchronization<br />

The RocketIO serial transceiver receives a serial differential pair operating at a rate of<br />

1.25 Gb/s from the optical transceiver. The RocketIO serial transceiver, using CDR,<br />

performs word alignment on this serial datastream and then converts this to a parallel<br />

interface. This data is then 8B/10B decoded by the RocketIO serial transceiver before<br />

presenting this to the PCS/PMA sublayer using an 8-bit datapath.<br />

Within the PCS/PMA sublayer, the synchronization process performs analysis of<br />

valid/invalid received sequence ordered sets to determine if the link is in good order. The<br />

PCS receive engine then decodes these sequence ordered sets into a format that can then be<br />

presented to the standard receiver datapath within the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 165<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

GTP/GTX Serial Transceiver<br />

TX+<br />

TX-<br />

RX+<br />

RX-<br />

GBIC<br />

or<br />

SFP<br />

Optical<br />

Transceiver<br />

PHY<br />

Link<br />

TX<br />

Optical<br />

Fiber<br />

RX<br />

<strong>UG194</strong>_6_19_00084089


Chapter 6: Physical Interface<br />

For more information on the synchronization process, refer to IEEE 802.3 (Figure 36-9). For<br />

the PCS Receive Engine, refer to IEEE 802.3 (Figures 36-7a and 36-7b).<br />

Auto-Negotiation<br />

The 1000BASE-X Auto-Negotiation function allows a device to advertise the supported<br />

modes of operation to a device at the remote end of the optical fibre (the link partner) and<br />

to detect corresponding operational modes that the link partner can be advertising. Autonegotiation<br />

is controlled and monitored using a software function through the PCS<br />

Management Registers. See “1000BASE-X Auto-Negotiation,” page 174.<br />

PCS Management Registers<br />

Configuration and status of the PCS/PMA sublayer, including access to and from the<br />

Auto-Negotiation function, is via the PCS Management Registers. These registers are<br />

accessed through the serial Management Data Input/Output Interface (MDIO), as shown<br />

in Chapter 5, “MDIO Interface.”<br />

For the 1000BASE-X standard, the configuration and status registers available are listed in<br />

“1000BASE-X PCS/PMA Management Registers,” page 122.<br />

166 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

<strong>Ethernet</strong> <strong>MAC</strong> to RocketIO Serial Transceiver Connections<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

(PCS/PMA Sublayer)<br />

E<strong>MAC</strong>#PHYSYNCACQSTATUS<br />

E<strong>MAC</strong>#PHYTXD[7:0]<br />

E<strong>MAC</strong>#PHYLOOPBACKMSB<br />

E<strong>MAC</strong>#PHYMGTTXRESET<br />

E<strong>MAC</strong>#PHYPOWERDOWN<br />

E<strong>MAC</strong>#PHYTXCHARDISPMODE<br />

E<strong>MAC</strong>#PHYTXCHARDISPVAL<br />

E<strong>MAC</strong>#PHYTXCHARISK<br />

PHYE<strong>MAC</strong>#TXBUFERR<br />

PHYE<strong>MAC</strong>#COL<br />

PHYE<strong>MAC</strong>#RXCHARISCOMMA<br />

PHYE<strong>MAC</strong>#RXBUFSTATUS[1]<br />

PHYE<strong>MAC</strong>#DISPERR<br />

PHYE<strong>MAC</strong>#RXNOTINTABLE<br />

PHYE<strong>MAC</strong>#RXCLKCORCNT[2:0]<br />

E<strong>MAC</strong>#PHYMGTRXRESET<br />

PHYE<strong>MAC</strong>#RXCHECKINGCRC<br />

PHYE<strong>MAC</strong>#RXLOSSOFSYNC[1:0]<br />

PHYE<strong>MAC</strong>#RXCOMMADET<br />

PHYE<strong>MAC</strong>#RXBUFSTATUS[0]<br />

PHYE<strong>MAC</strong>#RXBUFFERR<br />

1000BASE-X PCS/PMA<br />

Figure 6-20 shows the <strong>Ethernet</strong> <strong>MAC</strong> configured with 1000BASE-X PCS/PMA as the<br />

physical interface. Connections to the <strong>Virtex</strong>®-5 <strong>FPGA</strong> RocketIO serial transceiver are<br />

illustrated.<br />

PHYE<strong>MAC</strong>#RXD[7:0]<br />

PHYE<strong>MAC</strong>#RXRUNDISP<br />

PHYE<strong>MAC</strong>#RXCHARISK<br />

GND<br />

Status<br />

Only<br />

Shim<br />

RocketIO<br />

Serial Transceiver<br />

TXDATA#[7:0]<br />

LOOPBACK#[0]<br />

TXRESET#<br />

TXPOWERDOWN#<br />

TXCHARDISPMODE#[0]<br />

TXCHARDISPVAL#[0]<br />

TXCHARISK#[0]<br />

TXBUFSTATUS#[1]<br />

TXRUNDISP#[0]<br />

RXDATA#[7:0]<br />

RXRUNDISP#[0]<br />

RXCHARISK#[0]<br />

RXCHARISCOMMA#[0]<br />

RXBUFERR<br />

RXDISPERR#[0]<br />

RXNOTINABLE#[0]<br />

RXCLKCORCNT#[2:0]<br />

RXBUFRESET#<br />

RXRESET#<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED PLLLKDET<br />

Figure 6-20: <strong>Ethernet</strong> <strong>MAC</strong> Configured in 1000BASE-X PCS/PMA <strong>Mode</strong><br />

MGTCLK_P<br />

MGTCLK_N<br />

TXN_#<br />

TXP_#<br />

RXN_#<br />

RXP_#<br />

<strong>UG194</strong>_6_20_031908<br />

These connections and the shim are created by the CORE Generator tool when the physical<br />

interface is selected to be either SGMII or 1000BASE-X PCS/PMA. By using the<br />

CORE Generator tool, the time required to instantiate the <strong>Ethernet</strong> <strong>MAC</strong> into a usable<br />

design is greatly reduced. See “Accessing the <strong>Ethernet</strong> <strong>MAC</strong> from the CORE Generator<br />

Tool,” page 25.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 167<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 6: Physical Interface<br />

Shim<br />

Because of differences in the way the <strong>Virtex</strong>-II Pro <strong>FPGA</strong> MGTs, <strong>Virtex</strong>-4 <strong>FPGA</strong> MGTs, and<br />

the <strong>Virtex</strong>-5 <strong>FPGA</strong> RocketIO serial transceivers output the undecoded 8B/10B code group<br />

when RXNOTINTABLE is asserted, a shim is needed. The shim modifies the received data<br />

from the <strong>Virtex</strong>-5 <strong>FPGA</strong> RocketIO serial transceiver to the format that the <strong>Ethernet</strong> <strong>MAC</strong> is<br />

expecting. Table 6-1 describes the functionality of this shim.<br />

The shim created by the CORE Generator tool is combinatorial. If this logic is pipelined, all<br />

of the signals originating from the RocketIO serial transceiver highlighted with gray<br />

shading in Figure 6-20 must be pipelined with an equal latency.<br />

Table 6-1: Shim Functionality<br />

Connection to RocketIO Serial Transceiver Port Name<br />

<strong>Ethernet</strong> <strong>MAC</strong> Port Name<br />

When RXNOTINTABLE#[0] = 0 When RXNOTINTABLE#[0] = 1<br />

PHYE<strong>MAC</strong>#RXD[7]<br />

PHYE<strong>MAC</strong>#RXD[6]<br />

PHYE<strong>MAC</strong>#RXD[5]<br />

PHYE<strong>MAC</strong>#RXD[4]<br />

PHYE<strong>MAC</strong>#RXD[3]<br />

PHYE<strong>MAC</strong>#RXD[2]<br />

PHYE<strong>MAC</strong>#RXD[1]<br />

PHYE<strong>MAC</strong>#RXD[0]<br />

RXDATA#[7]<br />

RXDATA#[6]<br />

RXDATA#[5]<br />

RXDATA#[4]<br />

RXDATA#[3]<br />

RXDATA#[2]<br />

RXDATA#[1]<br />

RXDATA#[0]<br />

RXDATA#[2]<br />

RXDATA#[3]<br />

RXDATA#[4]<br />

RXDATA#[5]<br />

RXDATA#[6]<br />

RXDATA#[7]<br />

RXCHARISK#[0]<br />

RXDISPERR#[0]<br />

PHYE<strong>MAC</strong>#RXRUNDISP RXRUNDISP#[0] RXDATA#[1]<br />

PHYE<strong>MAC</strong>#RXCHARISK RXCHARISK#[0] RXDATA#[0]<br />

168 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


TX<br />

and<br />

RX<br />

Client<br />

Logic<br />

R<br />

1000BASE-X PCS/PMA<br />

1000BASE-X PCS/PMA Clock Management (LXT and SXT Devices)<br />

X<br />

X<br />

8-Bit Data Client<br />

Figure 6-21 shows the clock management used with the 1000BASE-X PCS/PMA interface<br />

when the <strong>Ethernet</strong> <strong>MAC</strong> client is used with a 8-bit data client in LXT and SXT devices.<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

PHYE<strong>MAC</strong>#RXCLK<br />

125 MHz<br />

GTP Transceiver<br />

TXUSRCLK<br />

TXUSRCLK2<br />

RXUSRCLK<br />

RXUSRCLK2<br />

Figure 6-21: 1000BASE-X PCS/PMA (8-Bit Data Client) Clock Management in an LXT or SXT Device<br />

The CLKIN inputs to the RocketIO serial transceiver must be connected to an external,<br />

high-quality differential reference clock of frequency of 125 MHz. A 125 MHz clock source<br />

is then provided to the <strong>FPGA</strong> logic from the REFCLKOUT output port of the RocketIO serial<br />

transceiver. This is connected to global clock routing using a BUFG as illustrated. This<br />

clock should then be routed to the PHYE<strong>MAC</strong>#GTXCLK of the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

Additionally, this global clock can be used for both receiver and transmitter client logic as<br />

illustrated, and it, therefore, must be routed back to the <strong>Ethernet</strong> <strong>MAC</strong> through the<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN and CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN input ports.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 169<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

X<br />

BUFG<br />

IBUFDS<br />

CLKIN<br />

REFCLKOUT<br />

PLLLKDET<br />

<strong>UG194</strong>_6_21_008099


Chapter 6: Physical Interface<br />

DCM<br />

CLKFB CLK0<br />

CLKIN CLKFX<br />

Locked<br />

CLKFX_MULTIPLY = 2<br />

CLKFX_DIVIDE = 1<br />

Tx<br />

Client<br />

Logic<br />

The PLLLKDET signal from the RocketIO serial transceiver (indicating that its internal<br />

PLLs have locked) is routed to the CLIENTE<strong>MAC</strong>#DCMLOCKED input port of the <strong>Ethernet</strong><br />

<strong>MAC</strong>. This ensures that the state machines of the <strong>Ethernet</strong> <strong>MAC</strong> are held in reset until the<br />

RocketIO serial transceiver has locked and its clocks are running cleanly.<br />

As described in “<strong>Ethernet</strong> <strong>MAC</strong> Clocks,” page 205, the following clock signals are unused:<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

PHYE<strong>MAC</strong>#RXCLK<br />

The outputs can be left unconnected, and inputs should be tied to Low.<br />

16-Bit Data Client<br />

BUFG<br />

BUFG<br />

Figure 6-22 shows the clock management used with the 1000BASE-X PCS/PMA interface<br />

and a 16-bit data client in an LXT or SXT device. This mode supports 2.5 Gb/s line rates.<br />

AND<br />

X<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

PHYE<strong>MAC</strong>#GTXCLK<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#RXCLK<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

125 MHz<br />

IBUFDS<br />

GTP Transceiver<br />

TXUSRCLK<br />

TXUSRCLK2<br />

RXUSRCLK<br />

RXUSRCLK2<br />

Figure 6-22: 1000BASE-X PCS/PMA (16-Bit Data Client) Clock Management in an LXT or SXT Device<br />

The CLKIN inputs to the RocketIO serial transceiver must be connected to an external,<br />

high-quality differential reference clock with a frequency of 125 MHz. A clock source<br />

matching the reference clock frequency is then provided to the <strong>FPGA</strong> logic from the<br />

170 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

X<br />

BUFG<br />

CLKIN<br />

REFCLKOUT<br />

PLLLKDET<br />

<strong>UG194</strong>_6_22_080409<br />

R


R<br />

1000BASE-X PCS/PMA<br />

REFCLKOUT output port of the RocketIO serial transceiver. This clock is then routed to<br />

the CLKIN input of a DCM. CLK0 of the DCM is connected to global clock routing using a<br />

BUFG, as illustrated in Figure 6-22. The 125 MHz output of the BUFG is connected to the<br />

PHYE<strong>MAC</strong>#MIITXCLK and PHYE<strong>MAC</strong>#RXCLK ports of the <strong>Ethernet</strong> <strong>MAC</strong>. It is also<br />

used to clock both receiver and transmitter logic for the 16-bit <strong>Ethernet</strong> <strong>MAC</strong> client<br />

interface.<br />

The global clock sourced from DCM CLKFX, running at 250 MHz, must be routed back to<br />

the <strong>Ethernet</strong> <strong>MAC</strong> through the input ports CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN and<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN. This clock is also connected to the<br />

PHYE<strong>MAC</strong>#GTXCLK input of the <strong>Ethernet</strong> <strong>MAC</strong> and the USRCLK inputs of the<br />

transceiver.<br />

The PLLLKDET signal from the RocketIO serial transceiver (indicating that its internal<br />

PLLs have locked) is ANDed with the locked signal from the DCM and routed to the<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED input port of the <strong>Ethernet</strong> <strong>MAC</strong>. This ensures that the state<br />

machines of the <strong>Ethernet</strong> <strong>MAC</strong> are held in reset until the RocketIO serial transceiver has<br />

locked and all clocks are running cleanly.<br />

As described in “<strong>Ethernet</strong> <strong>MAC</strong> Clock Generation,” page 206, the following clock signals<br />

are unused and can be left unconnected:<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

1000BASE-X PCS/PMA Clock Management (TXT and FXT Devices)<br />

8-Bit Data Client<br />

Figure 6-23 shows the clock management used with the 1000BASE-X PCS/PMA interface<br />

when the <strong>Ethernet</strong> <strong>MAC</strong> client is used with a 8-bit data client in a TXT and FXT device.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 171<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 6: Physical Interface<br />

CLKFB<br />

CLKIN<br />

DCM<br />

Tx<br />

and<br />

Rx<br />

Client<br />

Logic<br />

CLK0<br />

CLKDV<br />

CLKDV_DIVIDE = 2.0<br />

BUFG<br />

BUFG<br />

X<br />

X<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

PHYE<strong>MAC</strong>#GTXCLK<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#RXCLK<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

125 MHz<br />

IBUFDS<br />

GTX Transceiver<br />

TXUSRCLK<br />

TXUSRCLK2<br />

RXUSRCLK<br />

RXUSRCLK2<br />

<strong>UG194</strong>_6_23_031109<br />

Figure 6-23: 1000BASE-X PCS/PMA (8-Bit Data Client) Clock Management in a TXT and FXT Device<br />

The CLKIN inputs to the RocketIO serial transceiver must be connected to an external,<br />

high-quality differential reference clock of frequency of 125 MHz. A 125 MHz clock source<br />

is then provided to the <strong>FPGA</strong> logic from the REFCLKOUT output port of the<br />

RocketIO serial transceiver. This is connected to the CLKIN input of a DCM, as illustrated<br />

in Figure 6-23. The CLK0 output of the DCM should then be routed to the<br />

PHYE<strong>MAC</strong>#GTXCLK of the <strong>Ethernet</strong> <strong>MAC</strong> via a BUFG. The clock is also routed to the<br />

TXUSRCLK2 and RXUSRCLK2 inputs of the GTX transceiver.<br />

Additionally, this global clock can be used for both receiver and transmitter client logic,<br />

and it, therefore, must be routed back to the <strong>Ethernet</strong> <strong>MAC</strong> through the<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN and CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN input ports. A<br />

second 62.5 MHz clock is output from the DCM on the CLKDV port. This should be used<br />

to clock the TXUSRCLK and RXUSRCLK inputs of the GTX transceiver.<br />

The PLLLKDET signal from the RocketIO serial transceiver (indicating that its internal<br />

PLLs have locked) is routed to the CLIENTE<strong>MAC</strong>#DCMLOCKED input port of the<br />

<strong>Ethernet</strong> <strong>MAC</strong>. This ensures that the state machines of the <strong>Ethernet</strong> <strong>MAC</strong> are held in reset<br />

until the RocketIO serial transceiver has locked, and its clocks are running cleanly.<br />

172 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

X<br />

BUFG<br />

CLKIN<br />

REFCLKOUT<br />

PLLLKDET<br />

R


R<br />

DCM BUFG<br />

CLKFB CLK0<br />

CLKIN CLKFX<br />

BUFG<br />

Locked<br />

= 2XCLKFX_MULTIPLY<br />

CLKFX_DIVIDE = 1<br />

Tx<br />

and<br />

Rx<br />

Client<br />

Logic<br />

1000BASE-X PCS/PMA<br />

As described in Appendix B, “<strong>Ethernet</strong> <strong>MAC</strong> Clocks,” the following clock signals are<br />

unused:<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

PHYE<strong>MAC</strong>#RXCLK<br />

The outputs can be left unconnected, and inputs should be tied to Low.<br />

16-Bit Data Client<br />

Figure 6-24 shows the clock management used with the 1000BASE-X PCS/PMA interface<br />

and a 16-bit data client in a TXT and FXT device. This mode supports 2.5 Gb/s line rates.<br />

AND<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

PHYE<strong>MAC</strong>#GTXCLK<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#RXCLK<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

125 MHz<br />

IBUFDS<br />

REFCLKOUT<br />

PLLLOCK<br />

TXUSRCLK<br />

TXUSRCLK2<br />

RXUSRCLK<br />

RXUSRCLK2<br />

Figure 6-24: 1000BASE-X PCS/PMA (16-Bit Data Client) Clock Management in a TXT and FXT Device<br />

The CLKIN inputs to the RocketIO serial transceiver must be connected to an external,<br />

high-quality, differential reference clock with a frequency of 125 MHz. A clock source<br />

matching the reference clock frequency is then provided to the <strong>FPGA</strong> logic from the<br />

REFCLKOUT output port of the RocketIO serial transceiver. This clock is then routed to<br />

the CLKIN input of a DCM. CLK0 of the DCM is connected to global clock routing using a<br />

BUFG, as illustrated in Figure 6-24. The 125 MHz output of the BUFG is connected to the<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 173<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

X<br />

BUFG<br />

GTX Transceiver<br />

CLKIN<br />

<strong>UG194</strong>_6_24_080409


Chapter 6: Physical Interface<br />

PHYE<strong>MAC</strong>#MIITXCLK and PHYE<strong>MAC</strong>#RXCLK ports of the <strong>Ethernet</strong> <strong>MAC</strong>. It is also<br />

used to clock both receiver and transmitter logic for the 16-bit <strong>Ethernet</strong> <strong>MAC</strong> client<br />

interface and the RXUSRCLK and TXUSRCLK inputs of the GTX transceiver.<br />

The global clock sourced from DCM CLKFX, running at 250 MHz, must be routed back to<br />

the <strong>Ethernet</strong> <strong>MAC</strong> through the input ports CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN and<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN. This clock is also connected to the<br />

PHYE<strong>MAC</strong>#GTXCLK input of the <strong>Ethernet</strong> <strong>MAC</strong> and the RXUSRCLK2 and TXUSRCLK2<br />

inputs of the transceiver.<br />

The PLLLKDET signal from the RocketIO serial transceiver (indicating that its internal<br />

PLLs have locked) is ANDed with the locked signal from the DCM and routed to the<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED input port of the <strong>Ethernet</strong> <strong>MAC</strong>. This ensures that the state<br />

machines of the <strong>Ethernet</strong> <strong>MAC</strong> are held in reset until the RocketIO serial transceiver has<br />

locked and all clocks are running cleanly.<br />

As described in “<strong>Ethernet</strong> <strong>MAC</strong> Clock Generation,” page 206, the following clock signals<br />

are unused and can be left unconnected:<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

1000BASE-X Auto-Negotiation<br />

Overview of Operation<br />

Figure 6-25 illustrates a simplified diagram of the <strong>Ethernet</strong> <strong>MAC</strong> instantiated within a<br />

<strong>Virtex</strong>-5 device. The only components shown are two of the PCS Management Registers<br />

that are directly involved in the Auto-Negotiation process (see “1000BASE-X PCS/PMA<br />

Management Registers,” page 122). The corresponding registers of the connected device is<br />

also shown.<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong><br />

<strong>Ethernet</strong><br />

<strong>MAC</strong><br />

Processor<br />

Host Interface<br />

PCS/PMA Management<br />

Registers<br />

Auto-Neg Adv<br />

(Reg 4)<br />

Link Partner Ability<br />

Base (Reg 5)<br />

E<strong>MAC</strong>#CLIENTANINTERRUPT<br />

Figure 6-25: 1000BASE-X Auto-Negotiation Overview<br />

174 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

Optical<br />

Fibre<br />

Link Partner<br />

Auto-Neg Adv<br />

(Reg 4)<br />

Link Partner Ability<br />

Base (Reg 5)<br />

<strong>UG194</strong>_6_25_032508<br />

R


R<br />

1000BASE-X PCS/PMA<br />

IEEE Std 802.3, clause 37 describes the 1000BASE-X Auto-Negotiation function. This<br />

function allows a device to advertise the supported modes of operation to a device at the<br />

remote end of a link segment (the link partner) and to detect corresponding operational<br />

modes advertised by the link partner. The operation of the 1000BASE-X auto-negotiation is<br />

summarized below:<br />

To enable auto-negotiation, both auto-negotiation (see “Control Register (Register 0),”<br />

page 123) and MDIO (see “Management Configuration Register,” page 94) must be<br />

enabled. If enabled, auto-negotiation starts automatically:<br />

After power-up/reset<br />

Upon loss of synchronization<br />

Whenever the link partner initiates auto-negotiation<br />

Whenever an auto-negotiation restart is requested (see “Control Register<br />

(Register 0)”)<br />

When the PHY Reset bit is set in the PCS control register (see “Control Register<br />

(Register 0)”)<br />

During auto-negotiation, the contents of the “Auto-Negotiation Advertisement<br />

Register (Register 4)” are transferred to the link partner. This register can be written to<br />

through the management interface, and enables software control of the systems<br />

advertised abilities. Information provided in this register includes:<br />

Fault condition signalling<br />

Duplex mode<br />

Flow control capabilities for the <strong>Ethernet</strong> <strong>MAC</strong><br />

At the same time, the advertised abilities of the link partner are transferred into the<br />

“Auto-Negotiation Link Partner Ability Base Register (Register 5).” This includes the<br />

same information fields as in the “Auto-Negotiation Advertisement Register (Register<br />

4).”<br />

Under normal conditions, this completes the Auto-Negotiation information exchange.<br />

The results can be read from the “Auto-Negotiation Link Partner Ability Base Register<br />

(Register 5).” The mode of the <strong>Ethernet</strong> <strong>MAC</strong> should then be configured by a software<br />

routine to match; this does not happen automatically within the <strong>Ethernet</strong> <strong>MAC</strong>. The<br />

two methods by which a host processor can learn of the completion of an Auto-<br />

Negotiation cycle are:<br />

By polling the Auto-Negotiation completion bit 1.5 in “Status Register (Register<br />

1).”<br />

By using the Auto-Negotiation interrupt port (see “Auto-Negotiation Interrupt”).<br />

Auto-Negotiation Link Timer<br />

The Auto-Negotiation Link Timer is used to time three phases of the Auto-Negotiation<br />

procedure. For the 1000BASE-X standard, this link timer is defined as having a duration of<br />

between 10 and 20 ms. Both link partners wait until their own link timer and the partner’s<br />

link timer expire before moving on to the next phase of the auto negotiation process. The<br />

complete process takes a minimum of three times the values of the biggest link timer value.<br />

The duration of the link timer used by the <strong>Ethernet</strong> <strong>MAC</strong> can be configured with the<br />

E<strong>MAC</strong>#_LINKTIMERVAL[8:0] attribute (see “Physical Interface Attributes,” page 48). The<br />

duration of the timer is approximately equal to the binary value placed onto this attribute<br />

multiplied by 32.768 µs (4096 clock periods of the 125 MHz clock provided to the <strong>Ethernet</strong><br />

<strong>MAC</strong> on PHYE<strong>MAC</strong>#GTXCLK). The accuracy of this link timer is within the range:<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 175<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 6: Physical Interface<br />

+0 to -32.768 µs<br />

Therefore, for the 1000BASE-X standard, the attribute E<strong>MAC</strong>#_LINKTIMERVAL[8:0] is set<br />

to:<br />

100111101 = 317 decimal<br />

This setting corresponds to a timer duration of between 10.354 and 10.387 ms. This value<br />

can be reduced for simulation.<br />

Auto-Negotiation Interrupt<br />

The Auto-Negotiation function has an E<strong>MAC</strong>#CLIENTANINTERRUPT port. This port is<br />

designed to be used with common microprocessor bus architectures.<br />

The operation of this port is enabled or disabled and cleared via the “Vendor-Specific<br />

Register: Auto-Negotiation Interrupt Control Register (Register 16).”<br />

When disabled, this port is permanently driven Low.<br />

When enabled, this port is set to logic 1 following the completion of an Auto-<br />

Negotiation cycle. It remains High until cleared after a zero is written to bit 16.1<br />

(Interrupt Status bit) of the “Vendor-Specific Register: Auto-Negotiation Interrupt<br />

Control Register (Register 16).”<br />

Use of Clock Correction Sequences<br />

The RocketIO serial transceiver is configured by the appropriate Transceiver Wizard to<br />

perform clock correction. The output of the Transceiver Wizard is provided as part of the<br />

<strong>Ethernet</strong> <strong>MAC</strong> wrapper generated using the CORE Generator tool. Two different clock<br />

correction sequences can be employed:<br />

The mandatory clock correction sequence is the /I2/ ordered set; this is a two-byte<br />

code-group sequence formed from /K28.5/ and /D16.2/ characters. The /I2/<br />

ordered set is present in the interframe gap. These sequences can therefore be<br />

removed or inserted by the transceiver’s receiver elastic buffer without causing frame<br />

corruption.<br />

The default Transceiver Wizard configuration enables the CLK_COR_SEQ_2_USE<br />

attribute. In this case, the transceiver is also configured to perform clock correction on<br />

the /K28.5/D21.5/ sequence; these are the first two code-groups from the /C1/<br />

ordered set (the /C1/ ordered set is four code-groups in length). Because there are no<br />

/I2/ ordered sets present during much of the auto-negotiation cycle, this provides a<br />

method of allowing clock correction to be performed during auto-negotiation.<br />

Because this form of clock correction inserts or removes two code groups into or from<br />

a four code-group sequence, this causes ordered-set fragments to be seen by the<br />

<strong>Ethernet</strong> <strong>MAC</strong>’s auto-negotiation state machine. It is therefore important that the<br />

transceiver’s RXCLKCORCNT[2:0] port be correctly connected to the <strong>Ethernet</strong> <strong>MAC</strong>;<br />

this indicates a clock correction event (and type) to the <strong>Ethernet</strong> <strong>MAC</strong>. Using this<br />

signal, the <strong>Ethernet</strong> <strong>MAC</strong>’s state machine can interpret the clock-correction fragments,<br />

and the auto-negotiation function can complete cleanly.<br />

When the transceiver’s CLK_COR_SEQ_2_USE attribute is not enabled, no clock<br />

correction can be performed during much of the auto-negotiation cycle. When this is<br />

the case, it is possible that the transceiver’s receiver elastic buffer could underflow or<br />

overflow as asynchronous clock tolerances accumulate. This results in an elastic buffer<br />

error. It is therefore important that the transceiver’s RXBUFSTATUS[2:0]port is<br />

correctly connected to the <strong>Ethernet</strong> <strong>MAC</strong>; this indicates a buffer error event to the<br />

176 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

1000BASE-X PCS/PMA<br />

<strong>Ethernet</strong> <strong>MAC</strong>. Using this signal, the <strong>Ethernet</strong> <strong>MAC</strong>’s state machine can interpret the<br />

buffer error and the auto-negotiation function can complete cleanly.<br />

The RocketIO serial transceiver is by default configured to perform clock correction during<br />

the auto-negotiation cycle. If correctly connected as per the example design, the <strong>Ethernet</strong><br />

<strong>MAC</strong>’s state machine can correctly determine the transceiver’s elastic buffer behavior, and<br />

auto-negotiation can complete cleanly.<br />

Loopback When Using the PCS/PMA Sublayer<br />

Figure 6-26 illustrates the loopback options when using the PCS/PMA sublayer. Two<br />

possible loopback positions are shown:<br />

Loopback in the <strong>Ethernet</strong> <strong>MAC</strong>. When placed into loopback, data is routed from the<br />

transmitter to the receiver path at the last possible point in the PCS/PMA sublayer.<br />

This is immediately before the RocketIO serial transceiver interface. When placed into<br />

loopback, a constant stream of Idle code groups are transmitted through the RocketIO<br />

serial transceiver.<br />

Loopback in this position allows test frames to be looped back within the <strong>Ethernet</strong><br />

<strong>MAC</strong> without allowing them to be received by the link partner (the device connected<br />

at the other end of the optical link). The transmitting of idles allows the link partner to<br />

remain in synchronization so that no fault is reported.<br />

Loopback in the RocketIO serial transceiver. The RocketIO serial transceiver can<br />

alternatively be switched into loopback by connecting the E<strong>MAC</strong>#PHYLOOPBACKMSB<br />

port of the <strong>Ethernet</strong> <strong>MAC</strong> to the loopback port of the RocketIO serial transceiver as<br />

illustrated. The RocketIO serial transceiver loopback routes data from the transmitter<br />

path to the receiver path within the RocketIO serial transceiver. However, this data is<br />

also transmitted out of the RocketIO serial transceiver and so any test frames used for<br />

a loopback test are received by the link partner.<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong><br />

<strong>Ethernet</strong><br />

PCS/PMA Sublayer<br />

PCS Transmit<br />

Engine<br />

PCS Receive<br />

Engine<br />

Loopback Control<br />

Idle Stream 1<br />

RocketIO Serial<br />

Transceiver<br />

Figure 6-26: Loopback When Using the PCS/PMA Sublayer<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 177<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

1<br />

0<br />

E<strong>MAC</strong>#PHYLOOPBACKMSB<br />

0<br />

LOOPBACK#[0]<br />

Loopback in <strong>Ethernet</strong> <strong>MAC</strong> Loopback in RocketIO Serial Transceiver<br />

TX<br />

RX<br />

<strong>UG194</strong>_6_26_032508


Chapter 6: Physical Interface<br />

Loopback itself can be enabled or disabled by writing to the PCS/PMA Sublayer Control<br />

Register (Register 0). The loopback position can be controlled through the Loopback<br />

Control Register (Register 17). See “1000BASE-X PCS/PMA Management Registers,” page<br />

122 for details. Alternatively, loopback can be controlled by setting the<br />

E<strong>MAC</strong>#_PHYLOOPBACKMSB and E<strong>MAC</strong>#_GTLOOPBACK attributes. See Chapter 2 for<br />

details.<br />

Serial Gigabit Media Independent Interface (SGMII)<br />

Generic<br />

Host Bus<br />

DCR Bus<br />

<strong>Ethernet</strong> <strong>MAC</strong> PCS/PMA Sublayer<br />

Flow Control<br />

Interface<br />

Host<br />

Interface<br />

DCR Bridge<br />

Figure 6-27 shows the functional block diagram of the <strong>Ethernet</strong> <strong>MAC</strong> with the PCS/PMA<br />

sublayer block highlighted.<br />

E<strong>MAC</strong>#<br />

TX<br />

RX<br />

16- or 8-Bit Client Interface<br />

Transmit Engine<br />

Flow Control<br />

Receive Engine<br />

Address Filter<br />

Registers<br />

MDIO Interface<br />

<strong>MAC</strong> Configuration<br />

Registers<br />

Figure 6-27: PCS/PMA Sublayer Block Diagram in the <strong>Ethernet</strong> <strong>MAC</strong><br />

The PCS/PMA sublayer extends the functionality of the <strong>Ethernet</strong> <strong>MAC</strong>, replacing the<br />

GMII/MII or RGMII parallel interfaces with an interface to a RocketIO serial transceiver.<br />

The connected RocketIO serial transceiver then provides the remaining functionality to<br />

accommodate the following two standards, both of which require the high-speed serial<br />

interface provided by the RocketIO serial transceiver:<br />

“Serial Gigabit Media Independent Interface (SGMII)”<br />

“1000BASE-X PCS/PMA”<br />

TX RX<br />

Statistics<br />

Clock Management<br />

MII/GMII/RGMII<br />

Interface to<br />

External PHY<br />

GTP/GTX Transceiver<br />

Interface<br />

MDIO Interface<br />

to External PHY<br />

<strong>UG194</strong>_6_27_071709<br />

178 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

MII/GMII/RGMII Interface<br />

TX<br />

RX<br />

TX<br />

RX<br />

PCS/PMA Sublayer<br />

PCS Management<br />

Registers<br />

MDIO Intersection<br />

R


<strong>FPGA</strong><br />

R<br />

Introduction to the SGMII Implementation<br />

PCS/PMA Sublayer<br />

Serial Gigabit Media Independent Interface (SGMII)<br />

The Serial GMII (SGMII) is an alternative interface to the GMII/MII that converts the<br />

parallel interface of the GMII/MII into a serial format that is capable of carrying traffic at<br />

speeds of 10 Mb/s, 100 Mb/s, and 1 Gb/s. It radically reduces the I/O count and is,<br />

therefore, often favored by PCB designers.<br />

The SGMII physical interface was defined by Cisco Systems. The data signals operate at a<br />

rate of 1.25 Gb/s. Due to the speed of these signals, differential pairs are used to provide<br />

signal integrity and minimize noise.<br />

The sideband clock signals defined in the specification are not implemented in the<br />

<strong>Ethernet</strong> <strong>MAC</strong>. Instead, the RocketIO serial transceiver is used to transmit and receive the<br />

differential data at the required rate using clock data recovery (CDR). For more<br />

information on SGMII, refer to the Serial GMII specification v1.7.<br />

Figure 6-28 shows an expanded diagram of the PCS/PMA sublayer block. The<br />

<strong>Ethernet</strong> <strong>MAC</strong> is connected to a RocketIO serial transceiver, which in turn connects to a<br />

<strong>Tri</strong>-Speed <strong>Ethernet</strong> BASE-T PHY device via SGMII.<br />

<strong>MAC</strong> TX<br />

Interface<br />

<strong>MAC</strong> RX<br />

Interface<br />

MDIO<br />

Interface<br />

PCS Transmit<br />

Engine<br />

Auto-Negotiation<br />

PCS Receive<br />

Engine and<br />

Synchronization<br />

PCS<br />

Management<br />

Registers<br />

Figure 6-28: <strong>Ethernet</strong> PCS/PMA Sublayer Extension<br />

<strong>UG194</strong>_6_28_080409<br />

The PCS/PMA sublayer contains its own functional blocks, which are illustrated and<br />

summarized in the following subsections.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 179<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

GTP/GTX Transceiver<br />

TX+<br />

TX-<br />

RX+<br />

RX-<br />

SGMII<br />

Link<br />

10BASE-T<br />

100BASE-T<br />

1000BASE-T<br />

PHY<br />

PHY<br />

Link<br />

TX<br />

Copper<br />

Medium<br />

RX


Chapter 6: Physical Interface<br />

PCS Transmit Engine<br />

The PCS Transmit Engine encodes the datastream received from the <strong>Ethernet</strong> <strong>MAC</strong> into a<br />

sequence of ordered sets. The data is then transmitted to the RocketIO serial transceiver,<br />

using an 8-bit datapath, which then provides 8B/10B encoding of this data and parallel to<br />

serial conversion. The output from the RocketIO serial transceiver is a differential pair<br />

operating at a rate of 1.25 Gb/s.<br />

PCS Receive Engine and Synchronization<br />

The RocketIO serial transceiver receives a serial differential pair operating at a rate of<br />

1.25 Gb/s from the SGMII PHY. The RocketIO serial transceiver, using CDR, performs<br />

word alignment on this serial datastream and then converts this to a parallel interface. This<br />

data is then 8B/10B decoded by the RocketIO serial transceiver before presenting this to<br />

the PCS/PMA sublayer using an 8-bit datapath.<br />

Within the PCS/PMA sublayer, the synchronization process performs analysis of<br />

valid/invalid received sequence ordered sets to determine if the link is in good order. The<br />

PCS receive engine then decodes these sequence ordered sets into a format that can then be<br />

presented to the standard receiver datapath within the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

Auto-Negotiation<br />

The SGMII Auto-Negotiation function allows the <strong>Ethernet</strong> <strong>MAC</strong> to communicate with the<br />

attached PHY device. Auto-negotiation is controlled and monitored using a software<br />

function through the PCS Management Registers. See “SGMII Auto-Negotiation,” page<br />

196.<br />

PCS Management Registers<br />

Configuration and status of the PCS/PMA sublayer, including access to and from the<br />

Auto-Negotiation function, is via the PCS Management Registers. These registers are<br />

accessed through the serial MDIO, see Chapter 5, “MDIO Interface.”<br />

For the SGMII standard, the configuration and status registers available are listed in<br />

“SGMII Management Registers,” page 130.<br />

SGMII RX Elastic Buffer<br />

The RX elastic buffer can be implemented in one of two ways:<br />

Using the buffer present in the RocketIO serial transceivers<br />

Using a larger buffer that is implemented in the <strong>FPGA</strong> logic<br />

This section describes the selection and implementation of two options in the following<br />

subsections:<br />

“RocketIO Serial Transceiver Logic Using the RX Elastic Buffer”<br />

“RocketIO Serial Transceiver Logic Using the RX Elastic Buffer in <strong>FPGA</strong> Logic”<br />

180 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

RX Elastic Buffer Implementations<br />

Selecting the Buffer Implementation from the GUI<br />

Serial Gigabit Media Independent Interface (SGMII)<br />

The GUI for the <strong>Ethernet</strong> <strong>MAC</strong> provides two options under the heading of SGMII<br />

Capabilities. These options are:<br />

Option 1: 10/100/1000 Mb/s clock tolerance compliant with <strong>Ethernet</strong> specification<br />

For this option, if the <strong>FPGA</strong> and PHY clocks are independent and each has<br />

100 ppm tolerance, an additional elastic buffer is required (100 slices and<br />

1 block RAM per <strong>Ethernet</strong> <strong>MAC</strong>).<br />

Option 2: 10/100/1000 Mb/s (restricted tolerance for clocks) OR 100/1000 Mb/s<br />

For this option, if 10 Mb/s is not required OR it is required but the <strong>FPGA</strong> and<br />

PHY clocks are closely related (see UG196, <strong>Virtex</strong>-5 RocketIO GTP Transceiver User<br />

Guide or UG198, <strong>Virtex</strong>-5 RocketIO GTX Transceiver User Guide), the RX buffer can<br />

be used (saves 100 slices and 1 block RAM per <strong>Ethernet</strong> <strong>MAC</strong>).<br />

Option 1, the default mode, provides the implementation using the RX elastic buffer in the<br />

<strong>FPGA</strong> logic. This alternative RX elastic buffer utilizes a single block RAM to create a buffer<br />

that is twice as large as the one present in the RocketIO serial transceiver, therefore<br />

consuming extra logic resources. However, this default mode provides reliable SGMII<br />

operation.<br />

Option 2 uses the RX elastic buffer in the RocketIO serial transceivers. This buffer, which is<br />

half the size of the buffer in Option 1, can potentially underflow or overflow during SGMII<br />

frame reception at 10 Mb/s operation (see “The <strong>FPGA</strong> RX Elastic Buffer Requirement”).<br />

However, in logical implementations where this case is proven reliable, this option is<br />

preferred because of its lower logic utilization.<br />

The <strong>FPGA</strong> RX Elastic Buffer Requirement<br />

Figure 6-29 illustrates a simplified diagram of a common situation where the<br />

<strong>Ethernet</strong> <strong>MAC</strong> in SGMII mode is interfaced to an external PHY device. Separate oscillator<br />

sources are used for the <strong>FPGA</strong> and the external PHY. The <strong>Ethernet</strong> specification uses clock<br />

sources with a 100 ppm tolerance. In Figure 6-29, the clock source for the PHY is slightly<br />

faster than the clock source to the <strong>FPGA</strong>. Therefore, during frame reception, the RX elastic<br />

buffer (implemented in the RocketIO serial transceiver in this example) starts to fill up.<br />

Following frame reception in the interframe gap period, idles are removed from the<br />

received datastream to return the RX elastic buffer to half-full occupancy. This task is<br />

performed by the clock correction circuitry (see UG196, <strong>Virtex</strong>-5 RocketIO GTP Transceiver<br />

User Guide or UG198, <strong>Virtex</strong>-5 RocketIO GTX Transceiver User Guide).<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 181<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 6: Physical Interface<br />

<strong>FPGA</strong><br />

<strong>Ethernet</strong> <strong>MAC</strong> GTP/GTX Transceiver<br />

RX<br />

Elastic<br />

Buffer<br />

125 MHz - 100 ppm<br />

Figure 6-29: SGMII Implementation Using Separate Clock Sources<br />

Assuming separate clock sources, each with 100 ppm tolerance, the maximum frequency<br />

difference between the two devices can be 200 ppm, which translates into a full clock<br />

period difference every 5000 clock periods.<br />

Relating this information to an <strong>Ethernet</strong> frame, there is a single byte of difference every<br />

5000 bytes of received frame data, causing the RX elastic buffer to either fill or empty by an<br />

occupancy of one.<br />

The maximum <strong>Ethernet</strong> frame (non-jumbo) has a 1522-byte size for a VLAN frame:<br />

At 1 Gb/s operation, this size translates into 1522 clock cycles<br />

At 100 Mb/s operation, this size translates into 15220 clock cycles (because each byte<br />

is repeated 10 times<br />

At 10 Mb/s operation, this size translates into 152200 clock cycles (because each byte<br />

is repeated 100 times)<br />

Considering the 10 Mb/s case, 152200/5000 = 31 FIFO entries are needed in the elastic<br />

buffer above and below the halfway point to ensure that the buffer does not underflow or<br />

overflow during frame reception. This assumes that frame reception begins when the<br />

buffer is exactly half full.<br />

RocketIO Serial Transceiver Elastic Buffer<br />

TXP/TXN<br />

RXP/RXN<br />

125 MHz + 100 ppm<br />

SGMII Link<br />

10BASE-T<br />

100BASE-T<br />

1000BASE-T<br />

Twisted<br />

Copper<br />

Pair<br />

The RX elastic buffer in the RocketIO serial transceivers has 64 entries. However, the buffer<br />

cannot be assumed to be exactly half full at the start of frame reception. Additionally, the<br />

underflow and overflow thresholds are not exact.<br />

Figure 6-30 illustrates the elastic buffer depths and thresholds of RocketIO serial<br />

transceivers in <strong>Virtex</strong>-5 devices. Each FIFO word corresponds to a single character of data<br />

(equivalent to a single byte of data following 8B/10B decoding).<br />

182 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

PHY<br />

<strong>UG194</strong>_6_29_080409<br />

R


R<br />

Serial Gigabit Media Independent Interface (SGMII)<br />

The shaded area represents the usable buffer for the duration of frame reception.<br />

If the buffer is filling during frame reception, then 52 – 34 = 18 FIFO locations are<br />

available before the buffer hits the overflow mark.<br />

If the buffer is emptying during reception, then 30 – 12 = 18 FIFO locations are<br />

available before the buffer hits the underflow mark.<br />

This analysis assumes that the buffer is approximately at the half-full level at the start of<br />

the frame reception. There are, as illustrated, two locations of uncertainty above and below<br />

the exact half-full mark of 32. The uncertainty is a result of the clock correction decision,<br />

which is performed in a different clock domain.<br />

Since there is a worst case scenario of one clock edge difference every 5000 clock periods,<br />

the maximum number of clock cycles (bytes) that can exist in a single frame passing<br />

through the buffer before an error occurs is 5000 x 18 = 90000 bytes.<br />

Table 6-2 translates this into maximum frame lengths at different <strong>Ethernet</strong> <strong>MAC</strong> speeds.<br />

The situation is worse at SGMII speeds lower than 1 Gb/s because bytes are repeated<br />

multiple times.<br />

<strong>FPGA</strong> Logic Elastic Buffer<br />

RocketIO Serial Transceiver RX Elastic Buffer<br />

64<br />

52 - Overflow Mark<br />

Figure 6-30: Elastic Buffer Size for RocketIO Serial Transceivers<br />

Table 6-2: Maximum Frame Sizes for RocketIO Serial Transceiver RX Elastic<br />

Buffers (100 ppm Clock Tolerance)<br />

Standard Speed Maximum Frame Size<br />

SGMII 1 Gb/s 90000<br />

SGMII 100 Mb/s 9000<br />

SGMII 10 Mb/s 900<br />

For reliable SGMII operation at 10 Mb/s (non-jumbo frames), the RocketIO serial<br />

transceiver RX elastic buffer must be bypassed and a larger buffer implemented in the<br />

<strong>FPGA</strong> logic. The RX elastic buffer in <strong>FPGA</strong> logic, provided by the example design, is twice<br />

the size and nominally provides 64 entries above and below the half-full threshold. This<br />

configuration can manage standard (non-jumbo) <strong>Ethernet</strong> frames at all three SGMII<br />

speeds.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 183<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

34<br />

30<br />

12 - Underflow Mark<br />

ug194_c6_30_032508


Chapter 6: Physical Interface<br />

Figure 6-31 illustrates alternative <strong>FPGA</strong> logic RX elastic buffer depth and thresholds. Each<br />

FIFO word corresponds to a single character of data (equivalent to a single byte of data<br />

following 8B/10B decoding). This buffer can optionally be used to replace the RX elastic<br />

buffers of the RocketIO serial transceiver. See “RocketIO Serial Transceiver Logic Using the<br />

RX Elastic Buffer in <strong>FPGA</strong> Logic,” page 188.<br />

128<br />

SGMII <strong>FPGA</strong><br />

RX Elastic Buffer<br />

122 - Overflow Mark<br />

Figure 6-31: Elastic Buffer Size for <strong>FPGA</strong> Logic Buffer<br />

The shaded area in Figure 6-31 represents the usable buffer availability for the duration of<br />

frame reception.<br />

If the buffer is filling during frame reception, then 122 – 66 = 56 FIFO locations are<br />

available before the buffer hits the overflow mark.<br />

If the buffer is emptying during reception, then 62–6=56 FIFO locations are<br />

available before the buffer hits the underflow mark.<br />

This analysis assumes that the buffer is approximately at the half-full level at the start of<br />

the frame reception. As illustrated in Figure 6-31, there are two locations of uncertainty<br />

above and below the exact half-full mark of 64 as a result of the clock correction decision,<br />

which is based across an asynchronous boundary.<br />

Since there is a worst-case scenario of one clock edge difference every 5000 clock periods,<br />

the maximum number of clock cycles (bytes) that can exist in a single frame passing<br />

through the buffer before an error occurs is 5000 x 56 = 280000 bytes.<br />

Table 6-3 translates this into maximum frame lengths at different <strong>Ethernet</strong> <strong>MAC</strong> speeds.<br />

The situation is worse at SGMII speeds lower than 1 Gb/s because bytes are repeated<br />

multiple times.<br />

Table 6-3: Maximum Frame Sizes for RocketIO Serial Transceiver RX Elastic<br />

Buffers (100 ppm Clock Tolerance)<br />

Standard Speed Maximum Frame Size<br />

SGMII 1 Gb/s 280000<br />

SGMII 100 Mb/s 28000<br />

SGMII 10 Mb/s 2800<br />

184 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

66<br />

62<br />

6 - Underflow Mark<br />

ug194_c6_31_032508<br />

R


R<br />

Serial Gigabit Media Independent Interface (SGMII)<br />

Using the RocketIO Serial Transceiver RX Elastic Buffer<br />

The RX elastic buffer implemented in the RocketIO serial transceiver can be used reliably<br />

when:<br />

10 Mb/s operation is not required. Both 1 Gb/s and 100 Mb/s operate on standard<br />

<strong>Ethernet</strong> <strong>MAC</strong> frame sizes only.<br />

When the clocks are closely related (see “Closely Related Clock Sources”).<br />

Designers are recommended to select the <strong>FPGA</strong> Logic RX elastic buffer implementation if<br />

they have any doubts to reliable operation.<br />

Closely Related Clock Sources<br />

Two cases are described with closely related clocks in SGMII mode:<br />

Case 1<br />

Figure 6-32 illustrates a simplified diagram of a common situation where the<br />

<strong>Ethernet</strong> <strong>MAC</strong> in SGMII mode is interfaced to an external PHY device. A common<br />

oscillator source is used for both the <strong>FPGA</strong> and the external PHY.<br />

<strong>FPGA</strong><br />

<strong>Ethernet</strong> <strong>MAC</strong> RocketIO Serial<br />

Transceiver<br />

RX<br />

Elastic<br />

Buffer<br />

125 MHz - 100 ppm<br />

TXP/TXN<br />

RXP/RXN<br />

SGMII Link<br />

10BASE-T<br />

100BASE-T<br />

1000BASE-T<br />

Figure 6-32: SGMII Implementation Using Shared Clock Sources<br />

Twisted<br />

Copper<br />

Pair<br />

If the PHY device sources the receiver SGMII stream synchronously from the shared<br />

oscillator (refer to the PHY data sheet), the RocketIO serial transceiver receives data at<br />

exactly the same rate as that used by the core. That is, the RX elastic buffer neither<br />

empties nor fills because the same frequency clock is on either side.<br />

In this situation, the RX elastic buffer does not underflow or overflow, and the RX<br />

elastic buffer implementation in the RocketIO serial transceiver is recommended to<br />

save logic resources.<br />

Case 2<br />

Using the case illustrated by Figure 6-29, assume that both clock sources used are<br />

50 ppm. The maximum frequency difference between the two devices is 100 ppm,<br />

translating into a full clock period difference every 10000 clock periods and resulting<br />

in a requirement for 16 FIFO entries above and below the half-full point. This case<br />

provides reliable operation with the RocketIO serial transceiver RX elastic buffers.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 185<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

PHY<br />

<strong>UG194</strong>_6_32_080409


Chapter 6: Physical Interface<br />

<strong>FPGA</strong><br />

However, the designer must check the PHY data sheet to ensure that the PHY device<br />

sources the receiver SGMII stream synchronously to its reference oscillator.<br />

Using the <strong>FPGA</strong> Logic Elastic Buffer<br />

Figure 6-33 illustrates a simplified diagram of a situation where the <strong>Ethernet</strong> <strong>MAC</strong> in<br />

SGMII mode is interfaced to an external PHY device with an independent clock. The<br />

RocketIO serial transceiver’s elastic buffer has been bypassed and the <strong>FPGA</strong> elastic buffer<br />

is used.<br />

<strong>Ethernet</strong> <strong>MAC</strong> GTP/GTX<br />

Transceiver<br />

125 MHz –100 ppm<br />

RX<br />

Elastic<br />

Buffer<br />

GTP/GTX<br />

Elastic<br />

Buffer<br />

TXP/TXN<br />

RXP/RXN<br />

Figure 6-33: SGMII Implementation Using a Logic Buffer<br />

SGMII Link<br />

10 BASE-T<br />

100 BASE-T<br />

1000 BASE-T<br />

Twisted<br />

Copper<br />

Pair<br />

Using the SGMII in this configuration eliminates the possibility of buffer error if the clocks<br />

are not tightly controlled enough to use the RocketIO serial transceiver elastic buffer.<br />

186 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

PHY<br />

125 MHz +100 ppm<br />

ug194_6_33_080409<br />

R


R<br />

Serial Gigabit Media Independent Interface (SGMII)<br />

RocketIO Serial Transceiver Logic Using the RX Elastic Buffer<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

(PCS/PMA Sublayer)<br />

E<strong>MAC</strong>#PHYSYNCACQSTATUS<br />

E<strong>MAC</strong>#PHYTXD[7:0]<br />

E<strong>MAC</strong>#PHYLOOPBACKMSB<br />

E<strong>MAC</strong>#PHYMGTTXRESET<br />

E<strong>MAC</strong>#PHYPOWERDOWN<br />

E<strong>MAC</strong>#PHYTXCHARDISPMODE<br />

E<strong>MAC</strong>#PHYTXCHARDISPVAL<br />

E<strong>MAC</strong>#PHYTXCHARISK<br />

PHYE<strong>MAC</strong>#TXBUFERR<br />

PHYE<strong>MAC</strong>#COL<br />

PHYE<strong>MAC</strong>#RXCHARISCOMMA<br />

PHYE<strong>MAC</strong>#RXBUFSTATUS[1]<br />

PHYE<strong>MAC</strong>#DISPERR<br />

PHYE<strong>MAC</strong>#RXNOTINTABLE<br />

PHYE<strong>MAC</strong>#RXCLKCORCNT[2:0]<br />

E<strong>MAC</strong>#PHYMGTRXRESET<br />

PHYE<strong>MAC</strong>#RXCHECKINGCRC<br />

PHYE<strong>MAC</strong>#RXLOSSOFSYNC[1:0]<br />

PHYE<strong>MAC</strong>#RXCOMMADET<br />

PHYE<strong>MAC</strong>#RXBUFSTATUS[0]<br />

PHYE<strong>MAC</strong>#RXBUFFERR<br />

Figure 6-34 shows the <strong>Ethernet</strong> <strong>MAC</strong> configured with SGMII as the physical interface.<br />

Connections to the <strong>Virtex</strong>-5 <strong>FPGA</strong> RocketIO serial transceiver are illustrated.<br />

PHYE<strong>MAC</strong>#RXD[7:0]<br />

PHYE<strong>MAC</strong>#RXRUNDISP<br />

PHYE<strong>MAC</strong>#RXCHARISK<br />

GND<br />

Status<br />

Only<br />

Shim<br />

RocketIO Serial<br />

Transceiver<br />

TXDATA#[7:0]<br />

LOOPBACK#[0]<br />

TXRESET#<br />

TXPOWERDOWN#<br />

TXCHARDISPMODE#[0]<br />

TXCHARDISPVAL#[0]<br />

TXCHARISK#[0]<br />

TXBUFSTATUS#[1]<br />

TXRUNDISP#[0]<br />

RXDATA#[7:0]<br />

RXRUNDISP#[0]<br />

RXCHARISK#[0]<br />

RXCHARISCOMMA#[0]<br />

RXBUFERR<br />

RXDISPERR#[0]<br />

RXNOTINABLE#[0]<br />

RXCLKCORCNT#[2:0]<br />

RXBUFRESET#<br />

RXRESET#<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED PLLLKDET<br />

Figure 6-34: <strong>Ethernet</strong> <strong>MAC</strong> Configured in SGMII <strong>Mode</strong><br />

MGTCLK_P<br />

MGTCLK_N<br />

TXN_#<br />

TXP_#<br />

RXN_#<br />

RXP_#<br />

<strong>UG194</strong>_6_34_032508<br />

These connections and the shim are created by the CORE Generator tool when the physical<br />

interface is selected to be either SGMII or 1000BASE-X PCS/PMA. By using the<br />

CORE Generator tool, the time required to instantiate the <strong>Ethernet</strong> <strong>MAC</strong> into a usable<br />

design is greatly reduced. See “Accessing the <strong>Ethernet</strong> <strong>MAC</strong> from the CORE Generator<br />

Tool,” page 25.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 187<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 6: Physical Interface<br />

RocketIO Serial Transceiver Logic Using the RX Elastic Buffer in <strong>FPGA</strong> Logic<br />

The example design, delivered with the core in the CORE Generator tool, is split between<br />

two different hierarchical layers. The block level is designed so that it can be instantiated<br />

directly into customer designs. It provides the following functionality:<br />

Instantiates the core from HDL<br />

Connects the physical-side interface of the core to a <strong>Virtex</strong>-5 <strong>FPGA</strong> RocketIO serial<br />

transceiver via the RX elastic buffer in <strong>FPGA</strong> logic<br />

The <strong>Ethernet</strong> <strong>MAC</strong> is designed to integrate with the <strong>Virtex</strong>-5 <strong>FPGA</strong> RocketIO serial<br />

transceiver. The connections and logic required between the <strong>Ethernet</strong> <strong>MAC</strong> and RocketIO<br />

serial transceiver are illustrated in Figure 6-35. The signal names and logic shown in<br />

Figure 6-35 exactly match those delivered with the example design when the RocketIO<br />

serial transceiver is used.<br />

A RocketIO tile consists of a pair of transceivers. For this reason, the RocketIO serial<br />

transceiver wrapper delivered with the core always contains two transceiver<br />

instantiations, even if only a single transceiver is in use. Figure 6-35 illustrates a single<br />

transceiver for clarity.<br />

188 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

(PCS/PMA Sublayer)<br />

E<strong>MAC</strong>#PHYSYNCACQSTATUS<br />

E<strong>MAC</strong>#PHYTXD[7:0]<br />

E<strong>MAC</strong>#PHYLOOPBACKMSB<br />

E<strong>MAC</strong>#PHYMGTTXRESET<br />

E<strong>MAC</strong>#PHYPOWERDOWN<br />

E<strong>MAC</strong>#PHYTXCHARDISPMODE<br />

E<strong>MAC</strong>#PHYTXCHARDISPVAL<br />

E<strong>MAC</strong>#PHYTXCHARISK<br />

PHYE<strong>MAC</strong>#TXBUFERR<br />

PHYE<strong>MAC</strong>#COL<br />

PHYE<strong>MAC</strong>#RXD[7:0]<br />

PHYE<strong>MAC</strong>#RXRUNDISP<br />

PHYE<strong>MAC</strong>#RXCHARISK<br />

PHYE<strong>MAC</strong>#RXCHARISCOMMA<br />

PHYE<strong>MAC</strong>#RXBUFSTATUS[1]<br />

PHYE<strong>MAC</strong>#DISPERR<br />

PHYE<strong>MAC</strong>#RXNOTINTABLE<br />

PHYE<strong>MAC</strong>#RXCLKCORCNT[2:0]<br />

E<strong>MAC</strong>#PHYMGTRXRESET<br />

PHYE<strong>MAC</strong>#RXCHECKINGCRC<br />

PHYE<strong>MAC</strong>#RXLOSSOFSYNC[1:0]<br />

PHYE<strong>MAC</strong>#RXCOMMADET<br />

PHYE<strong>MAC</strong>#RXBUFSTATUS[0]<br />

PHYE<strong>MAC</strong>#RXBUFFERR<br />

.<br />

GND<br />

Status<br />

Only<br />

Shim<br />

Serial Gigabit Media Independent Interface (SGMII)<br />

RX<br />

Elastic<br />

Buffer<br />

(<strong>FPGA</strong><br />

Logic)<br />

RocketIO Serial<br />

Transceiver<br />

TXDATA#[7:0]<br />

LOOPBACK#[0]<br />

TXRESET#<br />

TXPOWERDOWN#<br />

TXCHARDISPMODE#[0]<br />

TXCHARDISPVAL#[0]<br />

TXCHARISK#[0]<br />

TXBUFSTATUS#[1]<br />

TXRUNDISP#[0]<br />

RXDATA#[7:0]<br />

RXRUNDISP#[0]<br />

RXCHARISK#[0]<br />

RXBUFRESET#<br />

RXRESET#<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED PLLLKDET<br />

RXCHARISCOMMA#[0]<br />

RXBUFERR<br />

RXDISPERR#[0]<br />

RXNOTINABLE#[0]<br />

RXCLKCORCNT#[2:0]<br />

Figure 6-35: SGMII Connection to a <strong>Virtex</strong>-5 <strong>FPGA</strong> RocketIO Serial Transceiver<br />

MGTCLK_P<br />

MGTCLK_N<br />

TXN_#<br />

TXP_#<br />

RXN_#<br />

RXP_#<br />

<strong>UG194</strong>_6_35_032508<br />

Figure 6-35 shows that the RX elastic buffer is implemented in the <strong>FPGA</strong> logic between the<br />

RocketIO serial transceiver and the <strong>Ethernet</strong> <strong>MAC</strong> instead of in the RocketIO serial<br />

transceiver. This alternative RX elastic buffer utilizes a single block RAM to create a buffer<br />

that is twice as large as the one present in the RocketIO serial transceiver. This<br />

configuration, therefore, can handle larger frame sizes before clock tolerances accumulate<br />

and result in emptying or filling of the buffer. This is necessary for SGMII operation at<br />

10 Mb/s, where each frame size is effectively 100 times larger than the same frame is at<br />

1 Gb/s due to each byte being repeated 100 times.<br />

In bypassing the RocketIO serial transceiver RX elastic buffer, data is clocked out of the<br />

RocketIO serial transceiver synchronously to RXRECCLK. This clock, placed on a BUFR<br />

component, is used to synchronize the transfer of data between the RocketIO serial<br />

transceiver and the RX elastic buffer as illustrated in Figure 6-37.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 189<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 6: Physical Interface<br />

Shim<br />

Because of differences in the way the <strong>Virtex</strong>-II Pro and <strong>Virtex</strong>-4 <strong>FPGA</strong> RocketIO<br />

transceivers and the <strong>Virtex</strong>-5 <strong>FPGA</strong> RocketIO serial transceivers output the undecoded<br />

8B/10B code group when RXNOTINTABLE is asserted, a shim is needed. This shim<br />

modifies the received data from the <strong>Virtex</strong>-5 <strong>FPGA</strong> RocketIO serial transceiver to the<br />

format that the <strong>Ethernet</strong> <strong>MAC</strong> is expecting. Table 6-4 describes the functionality of this<br />

shim.<br />

The shim created by the CORE Generator tool is combinatorial. If this logic is pipelined, all<br />

of the signals originating from the RocketIO serial transceiver highlighted with gray<br />

shading in Figure 6-34 must be pipelined with an equal latency.<br />

Table 6-4: Shim Functionality<br />

Connection to RocketIO Serial Transceiver Port Name<br />

<strong>Ethernet</strong> <strong>MAC</strong> Port Name<br />

When RXNOTINTABLE#[0] = 0 When RXNOTINTABLE#[0] = 1<br />

PHYE<strong>MAC</strong>#RXD[7]<br />

PHYE<strong>MAC</strong>#RXD[6]<br />

PHYE<strong>MAC</strong>#RXD[5]<br />

PHYE<strong>MAC</strong>#RXD[4]<br />

PHYE<strong>MAC</strong>#RXD[3]<br />

PHYE<strong>MAC</strong>#RXD[2]<br />

PHYE<strong>MAC</strong>#RXD[1]<br />

PHYE<strong>MAC</strong>#RXD[0]<br />

RXDATA#[7]<br />

RXDATA#[6]<br />

RXDATA#[5]<br />

RXDATA#[4]<br />

RXDATA#[3]<br />

RXDATA#[2]<br />

RXDATA#[1]<br />

RXDATA#[0]<br />

RXDATA#[2]<br />

RXDATA#[3]<br />

RXDATA#[4]<br />

RXDATA#[5]<br />

RXDATA#[6]<br />

RXDATA#[7]<br />

RXCHARISK#[0]<br />

RXDISPERR#[0]<br />

PHYE<strong>MAC</strong>#RXRUNDISP RXRUNDISP#[0] RXDATA#[1]<br />

PHYE<strong>MAC</strong>#RXCHARISK RXCHARISK#[0] RXDATA#[0]<br />

190 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


TX and<br />

RX<br />

Client<br />

Logic<br />

R<br />

SGMII Clock Management (LXT and SXT Devices)<br />

BUFG<br />

X<br />

<strong>Tri</strong>-Speed Operation<br />

Serial Gigabit Media Independent Interface (SGMII)<br />

Figure 6-36 shows the clock management used with the SGMII interface without the <strong>FPGA</strong><br />

logic elastic buffer. The CLKIN inputs to the RocketIO serial transceiver must be connected<br />

to an external, high-quality differential reference clock of frequency of 125 MHz. A<br />

125 MHz clock source is then provided to the <strong>FPGA</strong> logic from the REFCLKOUT output<br />

port of the RocketIO serial transceiver. This is connected to global clock routing using a<br />

BUFG as illustrated (Figure 6-36). This clock should then be routed to the<br />

PHYE<strong>MAC</strong>#GTXCLK of the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

PHYE<strong>MAC</strong>#RXCLK<br />

125 MHz<br />

RocketIO<br />

GTP Transceiver<br />

PLLLKDET<br />

TXUSRCLK<br />

TXUSRCLK2<br />

RXUSRCLK<br />

RXUSRCLK2<br />

Figure 6-36: SGMII Clock Management - RocketIO Serial Transceiver RX Elastic Buffer<br />

In bypassing the RocketIO serial transceiver RX elastic buffer, data is clocked out of the<br />

RocketIO serial transceiver synchronously to RXRECCLK. This clock, placed on a BUFR<br />

component, drives RXUSRCLK and RXUSRCLK2 and some of the logic in the RX elastic<br />

buffer as illustrated in Figure 6-37.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 191<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

X<br />

BUFG<br />

IBUFDS<br />

CLKIN<br />

REFCLKOUT<br />

<strong>UG194</strong>_6_36_080409


Chapter 6: Physical Interface<br />

TX and<br />

RX<br />

Client<br />

Logic<br />

BUFG<br />

X<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

PHYE<strong>MAC</strong>#RXCLK<br />

Figure 6-37: SGMII Clock Management - <strong>FPGA</strong> Logic RX Elastic Buffer<br />

In both configurations, the PLLLKDET signal from the RocketIO serial transceiver<br />

(indicating that its internal PLLs have locked) is routed to the CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

input port of the <strong>Ethernet</strong> <strong>MAC</strong>, which ensures that the state machines of the <strong>Ethernet</strong><br />

<strong>MAC</strong> are held in reset until the RocketIO serial transceiver has locked and its clocks are<br />

running cleanly.<br />

Either of the E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT or E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

output ports can be used to obtain the clock used for the <strong>Ethernet</strong> <strong>MAC</strong> client logic (both<br />

receiver and transmitter logic can share the same clock) with the unused clock being left<br />

unconnected. E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT is used in the example and is connected to<br />

a BUFG, which then provides the client clock to <strong>FPGA</strong> logic. It must also be routed back to<br />

the <strong>Ethernet</strong> <strong>MAC</strong> through the CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN and<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN input ports.<br />

As described in “<strong>Ethernet</strong> <strong>MAC</strong> Clocks,” page 205, the following clock signals are unused:<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

RocketIO<br />

GTP Transceiver<br />

REFCLKOUT<br />

PLLLKDET<br />

TXUSRCLK<br />

TXUSRCLK2<br />

192 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

X<br />

125 MHz<br />

BUFG<br />

IBUFDS<br />

RX<br />

Elastic<br />

Buffer<br />

CLKIN<br />

RXUSRCLK<br />

RXUSRCLK2<br />

RXRECCLK<br />

BUFR<br />

<strong>UG194</strong>_6_37_080409<br />

R


R<br />

Serial Gigabit Media Independent Interface (SGMII)<br />

PHYE<strong>MAC</strong>#RXCLK<br />

The outputs can be left unconnected, and the inputs should be tied Low.<br />

1 Gb/s Only Operation<br />

When the SGMII is used only for 1 Gb/s speeds, further clocking optimization can be<br />

performed. The clock logic is then identical to that described in “1000BASE-X PCS/PMA<br />

Clock Management (LXT and SXT Devices),” page 169.<br />

SGMII Clock Management (TXT and FXT Devices)<br />

<strong>Tri</strong>-Speed Operation<br />

Figure 6-38 shows the clock management used with the SGMII interface without the <strong>FPGA</strong><br />

logic elastic buffer in a TXT and FXT device. The CLKIN inputs to the RocketIO serial<br />

transceiver must be connected to an external, high-quality, differential reference clock with<br />

a frequency of 125 MHz. A 125 MHz clock source is then provided to the <strong>FPGA</strong> logic from<br />

the REFCLKOUT output port of the RocketIO serial transceiver. This is connected to the<br />

CLK0 input of a DCM. The CLK0 output of the DCM is connected to global clock routing<br />

using a BUFG, as illustrated in Figure 6-38. This clock should then be routed to the<br />

PHYE<strong>MAC</strong>#GTXCLK of the <strong>Ethernet</strong> <strong>MAC</strong> and the USRCLK2 inputs of the GTX<br />

transceiver. A second, 62.5 MHz, clock is output from the DCM on the CLKDV port. This<br />

should be used to clock the TXUSRCLK and RXUSRCLK inputs of the GTX transceiver.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 193<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 6: Physical Interface<br />

CLKFB<br />

DCM<br />

Tx<br />

and<br />

Rx<br />

Client<br />

Logic<br />

CLK0<br />

CLKIN CLKDV<br />

CLKDV_DIVIDE = 2.0<br />

BUFG<br />

BUFG<br />

BUFG<br />

X<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

PHYE<strong>MAC</strong>#GTXCLK<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

PHYE<strong>MAC</strong>#RXCLK<br />

125 MHz<br />

IBUFDS<br />

GTX Transceiver<br />

TXUSRCLK<br />

TXUSRCLK2<br />

RXUSRCLK<br />

RXUSRCLK2<br />

Figure 6-38: SGMII Clock Management - RocketIO Serial Transceiver RX Elastic Buffer in a TXT and FXT<br />

Device<br />

In bypassing the RocketIO serial transceiver RX elastic buffer, data is clocked out of the<br />

RocketIO serial transceiver synchronously to RXRECCLK. This clock, placed on a BUFR<br />

component, drives RXUSRCLK, RXUSRCLK2, and some of the logic in the RX elastic<br />

buffer, as illustrated in Figure 6-39.<br />

194 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

X<br />

BUFG<br />

CLKIN<br />

REFCLKOUT<br />

PLLLKDET<br />

<strong>UG194</strong>_6_38_031109<br />

R


DCM<br />

CLKFB CLK0<br />

CLKIN CLKDV<br />

CLKDV_DIVIDE = 2.0<br />

R<br />

Tx<br />

and<br />

Rx<br />

Client<br />

Logic<br />

BUFG<br />

BUFG<br />

BUFG<br />

X<br />

<strong>Ethernet</strong> <strong>MAC</strong><br />

PHYE<strong>MAC</strong>#GTXCLK<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#RXCLK<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED<br />

Serial Gigabit Media Independent Interface (SGMII)<br />

125 MHz IBUFDS<br />

Figure 6-39: Bypassing the RocketIO Serial Transceiver RX Elastic Buffer<br />

GTX Transceiver<br />

TXUSRCLK<br />

TXUSRCLK2<br />

In both configurations, the PLLLKDET signal from the RocketIO serial transceiver<br />

(indicating that its internal PLLs have locked) is routed to the<br />

CLIENTE<strong>MAC</strong>#DCMLOCKED input port of the <strong>Ethernet</strong> <strong>MAC</strong>, which ensures that the<br />

state machines of the <strong>Ethernet</strong> <strong>MAC</strong> are held in reset until the RocketIO serial transceiver<br />

has locked and its clocks are running cleanly. Either of the<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT or E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT output<br />

ports can be used to obtain the clock used for the <strong>Ethernet</strong> <strong>MAC</strong> client logic (both receiver<br />

and transmitter logic can share the same clock) with the unused clock being left<br />

unconnected. E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT is used in our example and is<br />

connected to a BUFG, which then provides the client clock to <strong>FPGA</strong> logic. It must also be<br />

routed back to the <strong>Ethernet</strong> <strong>MAC</strong> through the CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN and<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN input ports.<br />

As described in Appendix B, “<strong>Ethernet</strong> <strong>MAC</strong> Clocks,” the following clock signals are<br />

unused:<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

PHYE<strong>MAC</strong>#RXCLK<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 195<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

X<br />

BUFG<br />

CLKIN<br />

REFCLKOUT<br />

PLLLKDET<br />

RXRECCLK<br />

RXUSRCLK<br />

RXUSRCLK2<br />

RX<br />

Elastic<br />

Buffer<br />

BUFR<br />

<strong>UG194</strong>_6_39_080409


Chapter 6: Physical Interface<br />

SGMII Auto-Negotiation<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong><br />

<strong>Ethernet</strong><br />

<strong>MAC</strong><br />

Processor<br />

Overview of Operation<br />

Host Interface<br />

Figure 6-40 illustrates a simplified diagram of the <strong>Ethernet</strong> <strong>MAC</strong> instantiated within a<br />

<strong>Virtex</strong>-5 device. The only components shown are two of the PCS Management Registers,<br />

which are directly involved in the Auto-Negotiation process (see “SGMII Management<br />

Registers,” page 130). The corresponding registers of the connected devices are also<br />

shown.<br />

PCS/PMA Management<br />

Registers<br />

Auto-Neg Adv<br />

(Reg 4)<br />

Link Partner Ability<br />

Base (Reg 5)<br />

E<strong>MAC</strong>#CLIENTANINTERRUPT<br />

SGMII<br />

SGMII<br />

Link<br />

SGMII Capable<br />

BASE-T PHY<br />

SGMII Side BASE-T Side<br />

Auto-Neg Adv<br />

(Reg 4)<br />

Link Partner Ability<br />

Base (Reg 5)<br />

Auto-Neg Adv<br />

(Reg 4)<br />

Link Partner Ability<br />

Base (Reg 5)<br />

Figure 6-40: SGMII Auto-Negotiation Overview<br />

Copper<br />

Medium<br />

Link Partner<br />

Auto-Neg Adv<br />

(Reg 4)<br />

Link Partner Ability<br />

Base (Reg 5)<br />

PHY<br />

Link <strong>UG194</strong>_6_40_080409<br />

The SGMII capable PHY has two distinctive sides to auto-negotiation as illustrated:<br />

The PHY initially performs auto-negotiation with its link partner across the PHY link<br />

using the relevant Auto-Negotiation standard for the chosen medium (BASE-T autonegotiation,<br />

illustrated in Figure 6-40, uses a copper medium). This resolves the<br />

operational speed and duplex mode with the link partner.<br />

The PHY then initiates a secondary Auto-Negotiation process with the <strong>Ethernet</strong> <strong>MAC</strong><br />

across the SGMII link. This leverages the 1000BASE-X Auto-Negotiation specification<br />

described in “1000BASE-X Auto-Negotiation” with only minor differences. This<br />

transfers the results of the initial PHY with link partner auto-negotiation across the<br />

SGMII, and this is the only Auto-Negotiation process observed by the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

The SGMII Auto-Negotiation function leverages the “1000BASE-X Auto-Negotiation”<br />

function with the exception of:<br />

The duration of the link timer of the SGMII auto-negotiation decreases from 10 ms to<br />

1.6 ms making the entire Auto-Negotiation cycle faster (see “Auto-Negotiation Link<br />

Timer”).<br />

The information exchanged now contains speed resolution in addition to duplex<br />

mode.<br />

196 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Serial Gigabit Media Independent Interface (SGMII)<br />

Under normal conditions, this completes the Auto-Negotiation information exchange. The<br />

results can be read from the “SGMII Auto-Negotiation Link Partner Ability Base Register<br />

(Register 5).” The duplex mode and speed of the <strong>Ethernet</strong> <strong>MAC</strong> should then be configured<br />

by a software routine to match. This does not happen automatically within the <strong>Ethernet</strong><br />

<strong>MAC</strong>. There are two methods by which a host processor can learn of the completion of an<br />

Auto-Negotiation cycle:<br />

By polling the Auto-Negotiation completion bit 1.5 in “SGMII Status Register<br />

(Register 1),” page 132.<br />

By using the Auto-Negotiation interrupt port (see “Auto-Negotiation Interrupt,”<br />

page 197).<br />

Auto-Negotiation Link Timer<br />

The Auto-Negotiation Link Timer is used to time three phases of the Auto-Negotiation<br />

procedure. For the SGMII standard, this link timer is defined as having a duration of<br />

1.6 ms.<br />

The duration of the link timer used by the <strong>Ethernet</strong> <strong>MAC</strong> can be configured with the<br />

E<strong>MAC</strong>#_LINKTIMERVAL[8:0] attribute (see “Physical Interface Attributes,” page 48). The<br />

duration of the timer is approximately equal to the binary value placed onto this attribute<br />

multiplied by 32.768 µs (4096 clock periods of the 125 MHz clock provided to the <strong>Ethernet</strong><br />

<strong>MAC</strong> on PHYE<strong>MAC</strong>#GTXCLK). The accuracy of this link timer is within the range:<br />

+0 to -32.768 µs<br />

Therefore, for the SGMII standard, set the E<strong>MAC</strong>#_LINKTIMERVAL[8:0] attribute to:<br />

000110010 = 50 decimal<br />

This corresponds to a timer duration of between 1.606 and 1.638 ms. This value can be<br />

reduced for simulation.<br />

Auto-Negotiation Interrupt<br />

The Auto-Negotiation function has an E<strong>MAC</strong>#CLIENTANINTERRUPT port. This port is<br />

designed to be used with common microprocessor bus architectures.<br />

The operation of this port is enabled or disabled and cleared via the “SGMII Vendor-<br />

Specific Register: Auto-Negotiation Interrupt Control Register (Register 16),” page 135.<br />

When disabled, this port is permanently driven Low.<br />

When enabled, this port is set to logic 1 following the completion of an Auto-<br />

Negotiation cycle. It remains High until cleared after a zero is written to bit 16.1<br />

(Interrupt Status bit) of the “SGMII Vendor-Specific Register: Auto-Negotiation<br />

Interrupt Control Register (Register 16).”<br />

Loopback When Using the PCS/PMA Sublayer<br />

Figure 6-41 illustrates the loopback options when using the PCS/PMA sublayer. Two<br />

possible loopback positions are illustrated:<br />

Loopback in the <strong>Ethernet</strong> <strong>MAC</strong>. When placed into loopback, data is routed from the<br />

transmitter to the receiver path at the last possible point in the PCS/PMA sublayer,<br />

immediately before the RocketIO serial transceiver interface. When placed into<br />

loopback, a constant stream of Idle code groups are transmitted through the RocketIO<br />

serial transceiver.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 197<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 6: Physical Interface<br />

Loopback in this position allows test frames to be looped back within the <strong>Ethernet</strong><br />

<strong>MAC</strong> without allowing them to be received by the link partner. The transmission of<br />

idles allows the link partner to remain in synchronization so that no fault is reported.<br />

Loopback in the RocketIO serial transceiver. The RocketIO serial transceiver can<br />

alternatively be switched into loopback by connecting the E<strong>MAC</strong>#PHYLOOPBACKMSB<br />

port of the <strong>Ethernet</strong> <strong>MAC</strong> to the loopback port of the RocketIO serial transceiver as<br />

illustrated. The RocketIO serial loopback routes data from the transmitter path to the<br />

receiver path within the RocketIO serial transceiver. However, this data is also<br />

transmitted out of the RocketIO serial transceiver, so any test frames used for a<br />

loopback test are received by the link partner.<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong><br />

<strong>Ethernet</strong><br />

PCS/PMA Sublayer<br />

PCS Transmit<br />

Engine<br />

PCS Receive<br />

Engine<br />

Loopback Control<br />

Idle Stream 1<br />

GTP/GTX<br />

Transceiver<br />

Figure 6-41: Loopback When Using the PCS/PMA Sublayer<br />

Loopback itself can be enabled or disabled by writing to the PCS/PMA Sublayer Control<br />

Register (Register 0). The loopback position can be controlled through the Loopback<br />

Control Register (Register 17). See “SGMII Management Registers,” page 130 for details.<br />

Alternatively, loopback can be controlled by setting the E<strong>MAC</strong>#_PHYLOOPBACKMSB<br />

and E<strong>MAC</strong>#_GTLOOPBACK attributes. See Chapter 2 for details.<br />

198 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

1<br />

0<br />

E<strong>MAC</strong>#PHYLOOPBACKMSB<br />

0<br />

LOOPBACK#[0]<br />

Loopback in <strong>Ethernet</strong> <strong>MAC</strong> Loopback in GTP/GTX Transceiver<br />

TX<br />

RX<br />

<strong>UG194</strong>_6_41_031109<br />

R


R<br />

Interfacing to a Statistics Block<br />

Chapter 7<br />

To collect statistics information from an individual <strong>Ethernet</strong> <strong>MAC</strong>, a custom statistics<br />

counter can be implemented in the <strong>FPGA</strong> logic. A parameterizable <strong>Ethernet</strong> Statistics<br />

LogiCORE solution that fulfills all the requirements for statistics information collection<br />

is available through the CORE Generator tool (DS323, LogiCORE <strong>Ethernet</strong> Statistics Data<br />

Sheet, which provides a full description of the <strong>Ethernet</strong> Statistics LogiCORE block). Each<br />

<strong>Ethernet</strong> <strong>MAC</strong> that is used requires its own instance of this Statistics IP, as shown in<br />

Figure 2-1, page 27.<br />

This chapter describes how to connect the <strong>Ethernet</strong> <strong>MAC</strong> block to a Statistics block to allow<br />

the statistics registers of each <strong>Ethernet</strong> <strong>MAC</strong> to be accessed by either the host or DCR bus<br />

interface. A description of the address space that can be used for the statistics registers is<br />

provided to avoid register access contentions.<br />

“Statistics Vectors,” page 78 provides details on the statistics interface of the <strong>Ethernet</strong> <strong>MAC</strong><br />

and how the output signals encode the statistics vector information.<br />

Using the Host Bus to Access Statistics Registers<br />

When the <strong>Ethernet</strong> <strong>MAC</strong> is used with the host bus, interfacing to an <strong>FPGA</strong> logic-based<br />

statistics block is straight-forward. The statistics values can be read via a host interface that<br />

is shared between the statistics counters and the <strong>Ethernet</strong> <strong>MAC</strong> block.<br />

To share the host bus without contention, statistics counters need to use a different address<br />

space than the <strong>Ethernet</strong> <strong>MAC</strong> configuration registers. Conflicts with MDIO register<br />

accesses are avoided by only accessing statistics counters when the HOSTMIIMSEL signal is<br />

at logic 0. Implementation of the addressing scheme shown in Table 7-1 ensures that the<br />

host bus can be shared without contention. This scheme provides space to address 512<br />

statistics counters per <strong>Ethernet</strong> <strong>MAC</strong>, using addresses 0x000 to 0x1FF.<br />

Table 7-1: Addressing Scheme<br />

Transaction Host_miim_sel Host_addr[9]<br />

Configuration 0 1<br />

MIIM Access 1 X<br />

Statistics Access 0 0<br />

Figure 7-1 shows how to integrate the <strong>Ethernet</strong> <strong>MAC</strong> with the LogiCORE <strong>Ethernet</strong><br />

Statistics block, where the <strong>Ethernet</strong> statistics counters are accessed via the host bus.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 199<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 7: Interfacing to a Statistics Block<br />

<strong>Virtex</strong>-5 <strong>Embedded</strong><br />

<strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong><br />

CLIENTE<strong>MAC</strong>0TXCLIENTCLKIN<br />

E<strong>MAC</strong>0CLIENTTXSTATS<br />

E<strong>MAC</strong>0CLIENTTXSTATSVLD<br />

E<strong>MAC</strong>0CLIENTTXSTATSBYTEVLD<br />

CLIENTE<strong>MAC</strong>0RXCLIENTCLKIN<br />

E<strong>MAC</strong>0CLIENTRXSTATS[6:0]<br />

E<strong>MAC</strong>0CLIENTRXSTATSVLD<br />

E<strong>MAC</strong>0CLIENTRXSTATSBYTEVLD<br />

E<strong>MAC</strong>0CLIENTRXDVLD<br />

CLIENTE<strong>MAC</strong>1TXCLIENTCLKIN<br />

E<strong>MAC</strong>1CLIENTTXSTATS<br />

E<strong>MAC</strong>1CLIENTTXSTATSVLD<br />

E<strong>MAC</strong>1CLIENTTXSTATSBYTEVLD<br />

CLIENTE<strong>MAC</strong>1RXCLIENTCLKIN<br />

E<strong>MAC</strong>1CLIENTRXSTATS[6:0]<br />

E<strong>MAC</strong>1CLIENTRXSTATSVLD<br />

E<strong>MAC</strong>1CLIENTRXSTATSBYTEVLD<br />

E<strong>MAC</strong>1CLIENTRXDVLD<br />

HOSTCLK<br />

HOSTMIIMSEL<br />

HOSTREQ<br />

HOSTADDR[8:0]<br />

HOSTADDR[9]<br />

HOSTRDDATA[31:0]<br />

HOSTE<strong>MAC</strong>1SEL<br />

HOSTWRDATA[31:0]<br />

HOSTMIIMRDY<br />

HOSTOPCODE<br />

LogiCORE <strong>Ethernet</strong> Statistics<br />

txclientclkin<br />

Example Design<br />

clienttxstats<br />

host_clk<br />

clienttxstatsvld<br />

host_miim_sel<br />

clienttxstatsbytevalid<br />

rxclientclkin<br />

clienttxstatsvld[6:0]<br />

clientrxstatsvld<br />

clientrxstatsbytevalid<br />

clientrxdvld<br />

host_req<br />

host_addr[8:0]<br />

host_addr[9]<br />

host_rd_data[31:0]<br />

LogiCORE <strong>Ethernet</strong> Statistics<br />

txclientclkin<br />

Example Design<br />

clienttxstats<br />

host_clk<br />

clienttxstatsvld<br />

host_miim_sel<br />

clienttxstatsbytevalid<br />

rxclientclkin<br />

clienttxstatsvld[6:0]<br />

clientrxstatsvld<br />

clientrxstatsbytevalid<br />

clientrxdvld<br />

host_stats_lsw_rdy<br />

host_stats_msw_rdy<br />

host_req<br />

host_addr[8:0]<br />

host_addr[9]<br />

host_rd_data[31:0]<br />

host_stats_lsw_rdy<br />

host_stats_msw_rdy<br />

Figure 7-1: Host Bus to <strong>Ethernet</strong> Statistics Connection<br />

The LogiCORE <strong>Ethernet</strong> Statistics block is used with the addressing scheme shown in<br />

Table 7-1. Figure 7-1 illustrates how to connect <strong>Ethernet</strong> Statistics blocks to both <strong>Ethernet</strong><br />

<strong>MAC</strong>s within the <strong>Ethernet</strong> <strong>MAC</strong> block. If statistics are required for only one <strong>Ethernet</strong><br />

<strong>MAC</strong>, then the multiplexing between the statistics cores is simply replaced with a straightthrough<br />

connection.<br />

200 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

OR<br />

1<br />

0<br />

1<br />

0<br />

<strong>UG194</strong>_7_01_100708<br />

R


R<br />

Using the DCR Bus to Access Statistics Registers<br />

Using the DCR Bus to Access Statistics Registers<br />

When the DCR bus interface of the <strong>Ethernet</strong> <strong>MAC</strong> is controlled by an embedded processor,<br />

the host interface and DCR bridge of the <strong>Ethernet</strong> <strong>MAC</strong> allow DCR bus accesses to control<br />

the unused host bus pins. The <strong>Ethernet</strong> <strong>MAC</strong> host bus interface can then access the<br />

statistics counters in the <strong>FPGA</strong> logic, controlled by register accesses on the DCR bus.<br />

The host bus I/O signals of the <strong>Ethernet</strong> <strong>MAC</strong> are enabled for statistics counter access<br />

when a DCR read operation is made to address codes 0x000 to 0x02F and 0x040 to<br />

0x04F inclusive (Table 4-15, page 103 describes the DCR address code space). This use of<br />

the host bus I/O signals provides a means of accessing the <strong>FPGA</strong> logic from the processor<br />

with space for 64 addresses.<br />

When the DCR bus is instructed to access registers in this address code region, the DCR<br />

bridge translates the DCR commands into generic host read signals on the host bus I/O<br />

signals. The DCR transaction is encoded on the host bus signals HOSTRDDATA[31:0] and<br />

HOSTMIIMRDY as described in Table 4-23 and Figure 4-10. These signals can access<br />

statistics counters in the same way as if a stand-alone host bus is used. The statistics values<br />

read from statistics counters are captured from the host bus signals HOSTWRDATA[31:0]<br />

as shown in Figure 4-10. The data read from the host bus can then be accessed by reading<br />

the DCR data registers.<br />

Figure 7-2 shows how to integrate the <strong>Ethernet</strong> <strong>MAC</strong> with the LogiCORE <strong>Ethernet</strong><br />

Statistics block, where the LogiCORE <strong>Ethernet</strong> statistics counters are accessed via the DCR<br />

bus. DS323, LogiCORE <strong>Ethernet</strong> Statistics Data Sheet, provides a full description of the<br />

<strong>Ethernet</strong> Statistics LogiCORE block. Figure 7-2 illustrates how to connect LogiCORE<br />

<strong>Ethernet</strong> Statistics blocks to both <strong>Ethernet</strong> <strong>MAC</strong>s within the <strong>Ethernet</strong> <strong>MAC</strong> block. If<br />

statistics are required for only one <strong>Ethernet</strong> <strong>MAC</strong>, then the multiplexing between the<br />

statistics cores is simply replaced with a straight-through connection.<br />

An example of how to read from the statistics counters through the DCR bus is provided in<br />

the example in “Accessing <strong>FPGA</strong> Logic via Unused Host Bus Pins,” page 113.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 201<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Chapter 7: Interfacing to a Statistics Block<br />

DCRABUS<br />

DCRWRITE<br />

DCRREAD<br />

DCRDINBUS<br />

DCRACK<br />

DCRRDBUS<br />

DCRCLK<br />

<strong>Virtex</strong>-5 <strong>Embedded</strong><br />

<strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong><br />

CLIENTE<strong>MAC</strong>0TXCLIENTCLKIN<br />

E<strong>MAC</strong>0CLIENTTXSTATS<br />

E<strong>MAC</strong>0CLIENTTXSTATSVLD<br />

E<strong>MAC</strong>0CLIENTTXSTATSBYTEVLD<br />

CLIENTE<strong>MAC</strong>0RXCLIENTCLKIN<br />

E<strong>MAC</strong>0CLIENTRXSTATS[6:0]<br />

E<strong>MAC</strong>0CLIENTRXSTATSVLD<br />

E<strong>MAC</strong>0CLIENTRXSTATSBYTEVLD<br />

E<strong>MAC</strong>0CLIENTRXDVLD<br />

CLIENTE<strong>MAC</strong>1TXCLIENTCLKIN<br />

E<strong>MAC</strong>1CLIENTTXSTATS<br />

E<strong>MAC</strong>1CLIENTTXSTATSVLD<br />

E<strong>MAC</strong>1CLIENTTXSTATSBYTEVLD<br />

CLIENTE<strong>MAC</strong>1RXCLIENTCLKIN<br />

E<strong>MAC</strong>1CLIENTRXSTATS[6:0]<br />

E<strong>MAC</strong>1CLIENTRXSTATSVLD<br />

E<strong>MAC</strong>1CLIENTRXSTATSBYTEVLD<br />

E<strong>MAC</strong>1CLIENTRXDVLD<br />

HOSTMIIMSEL<br />

HOSTMIIMRDY<br />

HOSTRDDATA[15]<br />

HOSTRDDATA[8:0]<br />

HOSTRDDATA[9]<br />

HOSTRDDATA[10]<br />

HOSTWRDATA[31:0]<br />

HOSTCLK<br />

OR<br />

LogiCORE <strong>Ethernet</strong> Statistics<br />

txclientclkin Example Design<br />

clienttxstats<br />

host_clk<br />

clienttxstatsvld<br />

host_miim_sel<br />

clienttxstatsbytevalid<br />

rxclientclkin<br />

clienttxstatsvld[6:0]<br />

clientrxstatsvld<br />

clientrxstatsbytevalid<br />

clientrxdvld<br />

host_req<br />

host_addr[8:0]<br />

host_addr[9]<br />

host_rd_data[31:0]<br />

LogiCORE <strong>Ethernet</strong> Statistics<br />

txclientclkin Example Design<br />

clienttxstats<br />

host_clk<br />

clienttxstatsvld<br />

host_miim_sel<br />

clienttxstatsbytevalid<br />

rxclientclkin<br />

clienttxstatsvld[6:0]<br />

clientrxstatsvld<br />

clientrxstatsbytevalid<br />

clientrxdvld<br />

host_stats_msw_rdy<br />

host_stats_lsw_rdy<br />

host_req<br />

host_addr[8:0]<br />

host_addr[9]<br />

host_rd_data[31:0]<br />

host_stats_msw_rdy<br />

host_stats_lsw_rdy<br />

Figure 7-2: DCR Bus to <strong>Ethernet</strong> Statistics Connection<br />

202 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

NOR<br />

D Q<br />

EN<br />

HOSTCLK<br />

1<br />

0<br />

OR<br />

OR<br />

<strong>UG194</strong>_7_02_072606<br />

R


R<br />

Pinout Guidelines<br />

Appendix A<br />

<strong>Xilinx</strong> recommends the following guidelines to improve design timing using the<br />

<strong>Virtex</strong>®-5 <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong>:<br />

If available, use dedicated global clock pins for the <strong>Ethernet</strong> <strong>MAC</strong> input clocks.<br />

Use the column of IOBs located closest to the <strong>Ethernet</strong> <strong>MAC</strong> block.<br />

Use the RocketIO serial transceivers located closest to the <strong>Ethernet</strong> <strong>MAC</strong> block.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 203<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Appendix A: Pinout Guidelines<br />

204 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

<strong>Ethernet</strong> <strong>MAC</strong> Clocks<br />

Appendix B<br />

This appendix provides an overview of the <strong>Ethernet</strong> <strong>MAC</strong> clocking schemes. The clocking<br />

schemes that are internal to the <strong>Ethernet</strong> <strong>MAC</strong> block are introduced, followed by the clock<br />

connections to and from the <strong>FPGA</strong> logic. Finally, all clock input and output frequencies<br />

and definitions are listed for reference, dependent on the mode of operation.<br />

<strong>Ethernet</strong> <strong>MAC</strong> Internal Clock Logic Overview<br />

<strong>Ethernet</strong> <strong>MAC</strong> Block<br />

The large number of clock signals can give an overwhelming first impression. Figure B-1 is<br />

a simplified diagram to illustrate all <strong>Ethernet</strong> <strong>MAC</strong> input and output clock signals.<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

Clock Generator<br />

Output Clock Products<br />

Input Clock Sources<br />

TX<br />

Client<br />

Datapath<br />

RX<br />

Client<br />

Datapath<br />

TX<br />

PHY<br />

Datapath<br />

RX<br />

PHY<br />

Datapath<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

E<strong>MAC</strong>#PHYTXCLK<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

PHYE<strong>MAC</strong>#RXCLK<br />

Figure B-1: Overview of <strong>Ethernet</strong> <strong>MAC</strong> Clock Circuitry<br />

<strong>UG194</strong>_B_01_072606<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 205<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Appendix B: <strong>Ethernet</strong> <strong>MAC</strong> Clocks<br />

<strong>Ethernet</strong> <strong>MAC</strong> Clock Generation<br />

As shown in Figure B-1, included in the <strong>Ethernet</strong> <strong>MAC</strong> is a Clock Generator module. This<br />

module is provided with input clock sources, from which the following output clock<br />

products are generated:<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

E<strong>MAC</strong>#PHYTXCLK<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

For these generated output clocks (refer to “Clock Definitions and Frequencies”):<br />

the output clocks are always at the correct frequency for their associated interfaces for<br />

any mode of operation and switch frequencies cleanly during speed changes<br />

the output clocks are NOT used internally by any <strong>Ethernet</strong> <strong>MAC</strong> logic<br />

the output clocks are provided only for the convenience of the user; they do not have<br />

to be used by the <strong>FPGA</strong> logic<br />

<strong>Ethernet</strong> <strong>MAC</strong> Input Clocks<br />

As shown in Figure B-1, the following clock signals are input into the <strong>Ethernet</strong> <strong>MAC</strong> clock<br />

generator:<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

PHYE<strong>MAC</strong>#RXCLK<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

Not all clock input sources are required in all modes. Required clock input signals must<br />

always be driven by the <strong>FPGA</strong> logic at the correct frequency for the required mode of<br />

operation (see “Clock Definitions and Frequencies”).<br />

Only the input clocks are collectively responsible for the correct operation of the <strong>Ethernet</strong><br />

<strong>MAC</strong>. It is possible to ignore all clock generator output clocks for correct <strong>Ethernet</strong> <strong>MAC</strong><br />

operation, providing the input clocks are alternatively derived. However, the clock<br />

generator output clocks are provided precisely for this purpose.<br />

Clock Connections to and from <strong>FPGA</strong> Logic<br />

The clock logic described here is not optimized for specific user modes. There are cases<br />

where two or more clock generator input clocks can be shared from a common source. This<br />

can be a common client clock, shared between transmitter and receiver; in other cases, this<br />

can be a common transmitter clock shared between both client and physical domains. It is<br />

also possible to share common clocks between two of more <strong>Ethernet</strong> <strong>MAC</strong>s. Chapter 6,<br />

“Physical Interface,” provides clock management information for optimal clock logic<br />

efficiency based on the chosen physical interfaces.<br />

This section provides general-purpose clock logic descriptions to aid in the understanding<br />

of the <strong>Ethernet</strong> <strong>MAC</strong>, and clock sharing is not considered. Three main clocking modes are<br />

to be discussed:<br />

206 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


TX<br />

Client<br />

Logic<br />

RX<br />

Client<br />

Logic<br />

R<br />

“Standard Clocking Scheme”<br />

Advanced Clocking Scheme: “Clock Enables”<br />

Advanced Clocking Scheme: “Byte PHY”<br />

Standard Clocking Scheme<br />

BUFG<br />

BUFG<br />

Clock Connections to and from <strong>FPGA</strong> Logic<br />

The <strong>Virtex</strong>®-5 <strong>FPGA</strong> <strong>Ethernet</strong> <strong>MAC</strong> standard clocking scheme, as shown in Figure B-2, is<br />

identical to the standard clocking scheme used by the <strong>Virtex</strong>-4 <strong>FPGA</strong> <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong><br />

<strong>Ethernet</strong> <strong>MAC</strong>.<br />

.<br />

<strong>Ethernet</strong> <strong>MAC</strong> Block<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

Figure B-2: Overview of <strong>Ethernet</strong> <strong>MAC</strong> Clock Connections to and from the <strong>FPGA</strong> Logic<br />

Figure B-2 shows clock logic instantiated in the <strong>FPGA</strong> logic using the standard method and<br />

shows the general case (non-optimized) clocking scheme.<br />

Figure B-2 and the text that follows describes how the clock signals required by the<br />

<strong>Ethernet</strong> <strong>MAC</strong> can be derived from the output clocks from the clock generator.<br />

Transmitter Client Clock<br />

Clock Generator<br />

Output Clock Products<br />

Input Clock Sources<br />

TX<br />

Client<br />

Datapath<br />

RX<br />

Client<br />

Datapath<br />

TX<br />

PHY<br />

Datapath<br />

RX<br />

PHY<br />

Datapath<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

E<strong>MAC</strong>#PHYTXCLK<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

PHYE<strong>MAC</strong>#RXCLK<br />

<strong>UG194</strong>_B_02_072606<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT can be placed onto global clock routing and used to<br />

clock all of the transmitter client logic. This resultant clock is then fed back into the<br />

<strong>Ethernet</strong> <strong>MAC</strong> on the CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN, where it is used to derive the<br />

internal clock used for the transmitter client datapath. This configuration has the effect of<br />

eliminating clock skew between the <strong>Ethernet</strong> <strong>MAC</strong> and the <strong>FPGA</strong> logic (caused by the<br />

global clock routing), enabling data to be reliably transferred between the two.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 207<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

BUFG<br />

NC<br />

BUFG<br />

TX<br />

PHY<br />

Logic<br />

TX Clock to PHY<br />

RX<br />

PHY<br />

Logic<br />

RX Clock from PHY


Appendix B: <strong>Ethernet</strong> <strong>MAC</strong> Clocks<br />

Receiver Client Clock<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT can be placed onto global clock routing and used to<br />

clock all of the receiver client logic. This resultant clock is then fed back into the <strong>Ethernet</strong><br />

<strong>MAC</strong> on the CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN, where it is used to derive the internal clock<br />

used for the receiver client datapath. This configuration has the effect of eliminating clock<br />

skew between the <strong>Ethernet</strong> <strong>MAC</strong> and the <strong>FPGA</strong> logic (caused by the global clock routing),<br />

enabling data to be reliably transferred between the two.<br />

Transmitter Physical Clock<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT can be placed onto global clock routing and used to clock<br />

all of the transmitter physical logic. This resultant clock is then fed back into the <strong>Ethernet</strong><br />

<strong>MAC</strong> on the PHYE<strong>MAC</strong>#TXGMIIMIICLKIN, where it is used to derive the internal clock<br />

used for the transmitter physical datapath. This configuration has the effect of eliminating<br />

clock skew between the <strong>Ethernet</strong> <strong>MAC</strong> and the <strong>FPGA</strong> logic (caused by the global clock<br />

routing), enabling data to be reliably transferred between the two.<br />

Receiver Physical Clock<br />

The physical clock for the receiver interface is sourced by the connected PHY. When placed<br />

onto global clock routing, this resultant clock is also fed into the <strong>Ethernet</strong> <strong>MAC</strong> on the<br />

PHYE<strong>MAC</strong>#RXCLK port and is used to derive the internal clock used for the receiver<br />

physical datapath. This enables data to be reliably transferred from the <strong>FPGA</strong> logic into the<br />

<strong>Ethernet</strong> <strong>MAC</strong>.<br />

Advanced Clocking Schemes<br />

Two advanced clocking schemes are developed for the <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Ethernet</strong> <strong>MAC</strong>. Both<br />

of these clocking schemes reduce the global clock usage in the <strong>FPGA</strong> logic.<br />

“Clock Enables” evolved from an <strong>FPGA</strong> logic enhancement for the <strong>Virtex</strong>-4 <strong>FPGA</strong><br />

<strong>Ethernet</strong> <strong>MAC</strong>. The <strong>Virtex</strong>-4 <strong>FPGA</strong> clock enable signals were created in the <strong>FPGA</strong><br />

logic, resulting in a clocking scheme that halved the global clock usage when using<br />

the MII physical interface for 10 Mb/s or 100 Mb/s.<br />

The <strong>Virtex</strong>-5 <strong>FPGA</strong> clock enables are provided by the <strong>Ethernet</strong> <strong>MAC</strong> to the <strong>FPGA</strong> logic,<br />

and their use extends to cover MII, GMII, and RGMII interfaces at all three <strong>Ethernet</strong><br />

speeds.<br />

“Byte PHY” also evolved from an <strong>FPGA</strong> logic enhancement for the <strong>Virtex</strong>-4 <strong>FPGA</strong><br />

<strong>Ethernet</strong> <strong>MAC</strong> and provided a solution that halved the global clock usage when using<br />

the GMII/MII physical interface at all three speeds. However, it supported only fullduplex<br />

mode.<br />

In <strong>Virtex</strong>-5 devices, the Byte PHY functionality extends to cover the GMII/MII, at all<br />

three speeds, supporting both full- and half-duplex modes.<br />

Clock Enables and Byte PHY advanced clocking modes are offered by the<br />

CORE Generator tool for both the <strong>Virtex</strong>-4 and <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Ethernet</strong> <strong>MAC</strong>s.<br />

However, as previously described, these options are available for the <strong>Virtex</strong>-5 <strong>FPGA</strong><br />

<strong>Ethernet</strong> <strong>MAC</strong> over a wider range of configurations.<br />

208 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Clock Enables<br />

Clock Connections to and from <strong>FPGA</strong> Logic<br />

For GMII transmitter operation at 1 Gb/s, both client and physical interfaces have an 8-bit<br />

datapath operating at 125 MHz. If 1 Gb/s is the only speed of interest, a single clock<br />

domain can be used for both client and physical interfaces.<br />

For MII transmitter operation at 100 Mb/s, the client interface still has an 8-bit datapath<br />

that operates at 12.5 MHz. However, the physical interface width dropped to 4 bits and is,<br />

therefore, clocked at twice the frequency of the client (25 MHz).<br />

The Clock Enable approach always clocks the client interface with the physical interface<br />

clock, while also providing the client with a clock enable. At 1 Gb/s, the physical interface<br />

clock is 125 MHz, which is also required by the client; the clock enable is constantly held<br />

High. At 100 Mb/s, the physical interface clock is 25 MHz, which is twice that required by<br />

the client. The clock enable toggles on alternative 25 MHz clock cycles to enable the client<br />

logic at the resultant rate of 12.5 MHz.<br />

This methodology is applied similarly to the receiver path. GMII/MII and RGMII physical<br />

interfaces can all use this clocking scheme at all three <strong>Ethernet</strong> speeds.<br />

Figure B-3 shows clock logic instantiated in the <strong>FPGA</strong> logic when using the clock enables.<br />

Refer to “Clock Definitions and Frequencies,” page 211 for relationships between clocks<br />

and clock enables). Figure B-3 and the text that follows describe how the clock signals<br />

required to use the <strong>Ethernet</strong> <strong>MAC</strong> can be derived from the output clocks (and clock<br />

enables) from the <strong>Ethernet</strong> <strong>MAC</strong>s clock generator.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 209<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Appendix B: <strong>Ethernet</strong> <strong>MAC</strong> Clocks<br />

TX<br />

Client<br />

Logic CE<br />

RX CE<br />

Client<br />

Logic<br />

GND<br />

GND<br />

<strong>Ethernet</strong> <strong>MAC</strong> Block<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

Figure B-3: Overview of <strong>Ethernet</strong> <strong>MAC</strong> Clock Connections to and from the <strong>FPGA</strong> Logic using Clock<br />

Enables<br />

Note: There are some complications in the use of the E<strong>MAC</strong>#CLIENTTXACK signal when using this<br />

Clock Enable scheme. Refer to the specific physical interface section in Chapter 6 for details.<br />

Transmitter Clock<br />

Clock Generator<br />

Output Clock Products<br />

Input Clock Sources<br />

TX<br />

Client<br />

Datapath<br />

RX<br />

Client<br />

Datapath<br />

TX<br />

PHY<br />

Datapath<br />

RX<br />

PHY<br />

Datapath<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

E<strong>MAC</strong>#PHYTXCLK<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

PHYE<strong>MAC</strong>#RXCLK<br />

<strong>UG194</strong>_B_03_072206<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT can be placed onto global clock routing and used to clock<br />

all of the transmitter physical logic. This resultant clock is then fed back into the <strong>Ethernet</strong><br />

<strong>MAC</strong> on the PHYE<strong>MAC</strong>#TXGMIIMIICLKIN, where it is used to derive the internal clock<br />

used for the entire transmitter datapath (both physical and client). This has the effect of<br />

eliminating clock skew between the <strong>Ethernet</strong> <strong>MAC</strong> and the <strong>FPGA</strong> logic (caused by the<br />

global clock routing), enabling data to be reliably transferred between the two.<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT is no longer used as a clock but instead as a clock<br />

enable. Every flip-flop of the transmitter client logic can be clocked with the clock<br />

connected to PHYE<strong>MAC</strong>#TXGMIIMIICLKIN, providing it has its clock enable connected as<br />

illustrated. This configuration saves global clock resources when compared with the non<br />

clock enable approach.<br />

210 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

BUFG<br />

NC<br />

TX<br />

PHY<br />

Logic<br />

TX Clock to PHY<br />

RX<br />

PHY<br />

Logic<br />

BUFG RX Clock from PHY<br />

R


R<br />

Receiver Clock<br />

Clock Definitions and Frequencies<br />

The Physical clock for the receiver interface is sourced by the connected PHY. When placed<br />

onto global clock routing, this resultant clock is also fed into the <strong>Ethernet</strong> <strong>MAC</strong> on the<br />

PHYE<strong>MAC</strong>#RXCLK port. This is used to derive the internal clock used for the receiver<br />

datapath (both physical and client). This enables data to be reliably transferred from the<br />

<strong>FPGA</strong> logic into the <strong>Ethernet</strong> <strong>MAC</strong>.<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT is no longer used as a clock but instead as a clock<br />

enable. Every flip-flop of the receiver client logic can be clocked with the clock connected<br />

to PHYE<strong>MAC</strong>#RXCLK, providing it has its clock enable connected as illustrated. This<br />

configuration saves global clock resources when compared with the non-clock enable<br />

approach.<br />

Byte PHY<br />

For GMII transmitter operation at 1 Gb/s, both client and physical interfaces have an 8-bit<br />

datapath operating at 125 MHz. If 1 Gb/s is the only speed of interest, a single clock<br />

domain can be used for both client and physical interfaces.<br />

For MII transmitter operation at 100 Mb/s, the client interface still has an 8-bit datapath,<br />

that now operates at 12.5 MHz. However, in the standard operating mode, the physical<br />

interface width drops to 4 bits, requiring a clock at twice the frequency (25 MHz).<br />

In Byte PHY mode, the <strong>Ethernet</strong> <strong>MAC</strong> always outputs the physical interface as an 8-bit<br />

datapath, regardless of operating speed. Therefore, at 100 Mb/s, the data is output as an<br />

8-bit datapath at a frequency of 12.5 MHz. This enables the client and physical interface to<br />

share the same clock domain. The same situation occurs also for 10 Mb/s with a shared<br />

clock of frequency 1.25 MHz.<br />

When performing GMII at 1 Gb/s, the physical interface datapath is the correct width at<br />

8 bits. When performing MII at 10/100 Mb/s, the physical interface datapath is of an<br />

incorrect width. The datapath has to be converted from eight bits to the correct width of<br />

four bits using the DDR output registers in the IOBs.<br />

This methodology is applied similarly to the receiver path to provide a GMII/MII<br />

compatible physical interface.<br />

Please refer to “GMII Clock Management for <strong>Tri</strong>-Speed Operation Using Byte PHY,” page<br />

149 for further information and for the specific clocking diagram.<br />

Clock Definitions and Frequencies<br />

The following sections provide definitions for all of the <strong>Ethernet</strong> <strong>MAC</strong> input and output<br />

clocks, which are often mode dependent. Specific clocking schemes, which are optimized<br />

for the chosen physical interface, are provided in Chapter 6, “Physical Interface.”<br />

Chapter 6 provides useful reference material when studying the following sections.<br />

PHYE<strong>MAC</strong>#GTXCLK<br />

MII Only <strong>Mode</strong> (10/100 Mb/s Operation)<br />

This clock signal is unused and can be connected to logic 0.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 211<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Appendix B: <strong>Ethernet</strong> <strong>MAC</strong> Clocks<br />

All Other <strong>Mode</strong>s<br />

All transmitter clocks, both client and physical, are derived from this clock source with one<br />

exception: it is not used for 10/100 Mb/s operation when using the MII. For all other<br />

modes, PHYE<strong>MAC</strong>#GTXCLK is required and should be connected to a 125 MHz reference<br />

clock source, which is within the IEEE Std 802.3 specification (100 ppm).<br />

Table B-1: PHYE<strong>MAC</strong>#GTXCLK Clock Frequencies<br />

PHYE<strong>MAC</strong>#MIITXCLK<br />

MII or <strong>Tri</strong>-Speed GMII <strong>Mode</strong>s<br />

PHYE<strong>MAC</strong>#MIITXCLK is used as the transmitter reference clock source when using the MII,<br />

where this clock is provided by the attached external PHY device.<br />

Table B-2: PHYE<strong>MAC</strong>#MIITXCLK Clock Frequencies<br />

1000BASE-X PCS/PMA (16-Bit Data Client) <strong>Mode</strong><br />

When operating in 1000BASE-X PCS/PMA (see “16-Bit Data Client”), this clock input<br />

should be connected to a clock source that is half the frequency of the clock input into the<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN port.<br />

All Other <strong>Mode</strong>s<br />

This clock signal is unused and can be connected to logic 0.<br />

PHYE<strong>MAC</strong>#RXCLK<br />

Clock Signal Direction<br />

GMII (non-Byte PHY), MII, and RGMII <strong>Mode</strong>s<br />

Operating Speed<br />

1000 Mb/s 100 Mb/s 10 Mb/s<br />

PHYE<strong>MAC</strong>#GTXCLK Input 125 MHz 125 MHz 125 MHz<br />

Clock Signal Direction<br />

Operating Speed<br />

1000 Mb/s 100 Mb/s 10 Mb/s<br />

PHYE<strong>MAC</strong>#MIITXCLK Input n/a 25 MHz 2.5 MHz<br />

The clock signal input into PHYE<strong>MAC</strong>#RXCLK is sourced by the external PHY device and<br />

should be used by the <strong>FPGA</strong> logic to clock the receiver physical interface logic. Internally<br />

in the <strong>Ethernet</strong> <strong>MAC</strong>, this clock is used to derive all physical and client receiver clocks.<br />

Table B-3: PHYE<strong>MAC</strong>#RXCLK Clock Frequencies<br />

Clock Signal Direction<br />

Operating Speed<br />

1000 Mb/s 100 Mb/s 10 Mb/s<br />

PHYE<strong>MAC</strong>#RXCLK Input 125 MHz 25 MHz 2.5 MHz<br />

212 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

GMII (Byte PHY) <strong>Mode</strong><br />

Clock Definitions and Frequencies<br />

The clock signal input into PHYE<strong>MAC</strong>#RXCLK is sourced by the external PHY device at<br />

1 Gb/s. At 10/100 Mb/s speeds, this clock should also originate from the external PHY<br />

device but its frequency is divided by two in the <strong>FPGA</strong> logic (see “GMII Clock<br />

Management for <strong>Tri</strong>-Speed Operation Using Byte PHY”). The resultant clock should be<br />

used by the <strong>FPGA</strong> logic to clock the receiver client and physical interface logic. Internally<br />

in the <strong>Ethernet</strong> <strong>MAC</strong>, this clock is used to derive all physical and client receiver clocks.<br />

Table B-4: PHYE<strong>MAC</strong>#RXCLK Clock Frequencies<br />

Clock Signal Direction<br />

SGMII and 1000BASE-X PCS/PMA (8-Bit Data Client) <strong>Mode</strong>s<br />

This clock signal is unused and can be connected to logic 0.<br />

1000BASE-X PCS/PMA (16-Bit Data Client) <strong>Mode</strong><br />

When operating in 1000BASE-X PCS/PMA (see “16-Bit Data Client”), this clock input<br />

should be connected to a clock source that is half the frequency of the clock input into the<br />

PHYE<strong>MAC</strong>#GTXCLK port.<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT, PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

MII, GMII (non-Byte PHY), and RGMII <strong>Mode</strong>s<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT is created by the clock generator to provide the frequencies<br />

defined in Table B-5.<br />

The clock signal input into the PHYE<strong>MAC</strong>#TXGMIIMIICLKIN port should be used to clock<br />

the transmitter physical interface logic. This can be derived from<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT as illustrated in Figure B-2 and Figure B-3.<br />

GMII (Byte PHY) <strong>Mode</strong><br />

Operating Speed<br />

1000 Mb/s 100 Mb/s 10 Mb/s<br />

PHYE<strong>MAC</strong>#RXCLK Input 125 MHz 12.5 MHz 1.25 MHz<br />

Table B-5: E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT, PHYE<strong>MAC</strong>#TXGMIIMIICLKIN Clock<br />

Frequencies<br />

Clock Signal Direction<br />

Operating Speed<br />

1000 Mb/s 100 Mb/s 10 Mb/s<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT Output 125 MHz 25 MHz 2.5 MHz<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN Input 125 MHz 25 MHz 2.5 MHz<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT is created by the clock generator to provide the frequencies<br />

defined in Table B-6. In Byte PHY mode, this should only be used at 1 Gb/s.<br />

The clock signal input into PHYE<strong>MAC</strong>#TXGMIIMIICLKIN should be derived from<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT at 1 Gb/s. At 10/100 Mb/s speeds, this clock should<br />

originate from the external PHY device but its frequency is divided by two in the <strong>FPGA</strong><br />

logic (see “GMII Clock Management for <strong>Tri</strong>-Speed Operation Using Byte PHY”). The<br />

resultant clock should be used by the <strong>FPGA</strong> logic to clock the transmitter client and<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 213<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Appendix B: <strong>Ethernet</strong> <strong>MAC</strong> Clocks<br />

physical interface logic. Internally in the <strong>Ethernet</strong> <strong>MAC</strong>, this clock is used to derive all<br />

physical and client transmitter clocks.<br />

Table B-6: E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT, PHYE<strong>MAC</strong>#TXGMIIMIICLKIN Clock<br />

Frequencies<br />

SGMII and 1000BASE-X PCS/PMA <strong>Mode</strong>s<br />

These clock signals are unused. E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT should be left<br />

unconnected, and PHYE<strong>MAC</strong>#TXGMIIMIICLKIN should be connected to logic 0.<br />

E<strong>MAC</strong>#PHYTXCLK<br />

This clock signal is not used in normal operation and should be left unconnected.<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT, CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

Clock Enables Not in Use<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT is created by the clock generator to provide the<br />

frequencies defined in Table B-7.<br />

The clock signal input into the CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN port should be used to<br />

clock the transmitter client interface logic. This can be derived from<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT as illustrated in Figure B-2.<br />

Table B-7: E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT, CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

Clock Frequencies<br />

Clock Enables in Use<br />

Clock Signal Direction<br />

Operating Speed<br />

1000 Mb/s 100 Mb/s 10 Mb/s<br />

E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT Output 125 MHz n/a n/a<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN Input 125 MHz 12.5 MHz 1.25 MHz<br />

Clock Signal Direction<br />

Operating Speed<br />

1000 Mb/s 100 Mb/s 10 Mb/s<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT Output 125 MHz 12.5 MHz 1.25 MHz<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN Input 125 MHz 12.5 MHz 1.25 MHz<br />

CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN is unused and can be connected to logic 0.<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT is a clock enable rather than a clock. This clock enable is<br />

synchronous to the clock input into the PHYE<strong>MAC</strong>#TXGMIIMIICLKIN port as illustrated in<br />

Figure B-3. All transmitter client logic should be clocked from<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN and should use E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT as a clock<br />

enable as illustrated in Figure B-3.<br />

214 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Clock Definitions and Frequencies<br />

Table B-8 shows the relationship between the PHYE<strong>MAC</strong>#TXGMIIMIICLKIN clock and the<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT clock enable.<br />

Table B-8: E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT, CLIENTE<strong>MAC</strong>#TXCLIENTCLKIN<br />

Clock Frequencies<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT, CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

Clock Enables Not in Use<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT is created by the clock generator to provide the<br />

frequencies defined in Table B-9.<br />

The clock signal input into the CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN port should be used to<br />

clock the receiver client interface logic. This can be derived from<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT as illustrated in Figure B-2.<br />

Table B-9: E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT, CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN<br />

Clock Frequencies<br />

Clock Enables in Use<br />

Clock Signal Direction<br />

Operating Speed<br />

1000 Mb/s 100 Mb/s 10 Mb/s<br />

PHYE<strong>MAC</strong>#TXGMIIMIICLKIN Input 125 MHz 25 MHz 2.5 MHz<br />

E<strong>MAC</strong>#CLIENTTXCLIENTCLKOUT<br />

Output<br />

Clock Signal Direction<br />

Held at<br />

logic 1<br />

Alternates between<br />

logic 0 and 1 to produce<br />

half clock rate<br />

Operating Speed<br />

1000 Mb/s 100 Mb/s 10 Mb/s<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT Output 125 MHz 12.5 MHz 1.25 MHz<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN Input 125 MHz 12.5 MHz 1.25 MHz<br />

CLIENTE<strong>MAC</strong>#RXCLIENTCLKIN is unused and can be connected to logic 0.<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT is a clock enable rather than a clock. This clock enable is<br />

synchronous to the clock input into the port PHYE<strong>MAC</strong>#RXCLK as illustrated in Figure B-3.<br />

All receiver client logic should be clocked from the clock input PHYE<strong>MAC</strong>#RXCLK and<br />

should use E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT as a clock enable as illustrated in Figure B-3.<br />

Table B-10 shows the relationship between the PHYE<strong>MAC</strong>#RXCLK clock and the<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT clock enable.<br />

Table B-10: E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT, PHYE<strong>MAC</strong>#MIITXCLK Clock<br />

Frequencies<br />

Clock Signal Direction<br />

Operating Speed<br />

1000 Mb/s 100 Mb/s 10 Mb/s<br />

PHYE<strong>MAC</strong>#RXCLK Input 125 MHz 25 MHz 2.5 MHz<br />

E<strong>MAC</strong>#CLIENTRXCLIENTCLKOUT<br />

Output<br />

Held at<br />

logic 1<br />

Alternates between<br />

logic 0 and 1 to produce<br />

half clock rate<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 215<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Appendix B: <strong>Ethernet</strong> <strong>MAC</strong> Clocks<br />

216 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

<strong>Virtex</strong>-4 to <strong>Virtex</strong>-5 <strong>FPGA</strong><br />

Enhancements<br />

New Features<br />

Appendix C<br />

The <strong>Virtex</strong>®-5 <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> is derived from the <strong>Virtex</strong>-4 <strong>FPGA</strong><br />

<strong>Embedded</strong> <strong>Tri</strong>-mode <strong>Ethernet</strong> <strong>MAC</strong> with some key enhancements and a few minor<br />

modifications, as documented in this appendix.<br />

The <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> is a stand-alone block located in<br />

the block RAM columns. It is no longer resides inside in the processor block, as is the case<br />

for <strong>Virtex</strong>-4 <strong>FPGA</strong> <strong>Ethernet</strong> <strong>MAC</strong>s.<br />

Unidirectional Enable<br />

Unidirectional enable is a new mode that allows <strong>Ethernet</strong> <strong>MAC</strong> to transmit even while<br />

there is a loss of synchronization at the receiver (1000BASE-X PCS/PMA or SGMII modes).<br />

This mode can be turned on/off via an MDIO write and its value can be read from bit 0.5<br />

in the PCS Configuration Register 0. This bit is also new in the IEEE 802.3 specification and<br />

was previously reserved. The default value of this register bit is set by the<br />

E<strong>MAC</strong>#_UNIDIRECTION_ENABLE attribute, as described in “Additional Attributes,”<br />

page 221.<br />

Programmable Auto-Negotiation Link Timer<br />

GT Loopback<br />

A programmable link timer interrupt value for auto-negotiation is available in the <strong>Virtex</strong>-5<br />

<strong>FPGA</strong> <strong>Ethernet</strong> <strong>MAC</strong> for 1000BASE-X PCS/PMA or SGMII modes. This value is set using<br />

the E<strong>MAC</strong>#_LINKTIMERVAL[8:0] attribute, as described in “Additional Attributes,” page<br />

221.<br />

This mode allows the position of the loopback to be selected between loopback in the<br />

RocketIO serial transceiver or a loopback internal to the <strong>Ethernet</strong> <strong>MAC</strong>. This is<br />

applicable for 1000BASE-X PCS/PMA or SGMII modes only. When the loopback is<br />

internal to the <strong>Ethernet</strong> <strong>MAC</strong>, a constant stream of Idle code groups are transmitted<br />

through the RocketIO serial transceiver. The E<strong>MAC</strong>#_GTLOOPBACK attribute, as<br />

described in “Additional Attributes,” page 221, can be used to select the default position of<br />

the loopback.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 217<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Appendix C: <strong>Virtex</strong>-4 to <strong>Virtex</strong>-5 <strong>FPGA</strong> Enhancements<br />

DCR Bus Modifications<br />

In <strong>Virtex</strong>-5 devices, the DCR bus signals can be directly accessed in the <strong>FPGA</strong> logic;<br />

whereas in <strong>Virtex</strong>-4 devices, these signals are inaccessible because they are directly<br />

connected to the PowerPC processor.<br />

The PowerPC 405 processor is the current standard in <strong>Virtex</strong>-4 <strong>FPGA</strong>s. Changing<br />

processors requires some changes to the DCR acknowledge operation. These changes<br />

are backward-compatible. In the XPS_LL_TE<strong>MAC</strong> soft core that is delivered through<br />

the XPS tool, the DCR bus is not exposed. The core contains a bridge to enable the<br />

control of the <strong>Ethernet</strong> <strong>MAC</strong> via the PLB v4.6 interface. For more information on the<br />

PLB v4.6 interface, see DS531, Processor Local Bus (PLB) v4.6 (v1.00a).<br />

The DCR register definitions have been modified. In <strong>Virtex</strong>-4 <strong>FPGA</strong> designs, the DCR<br />

registers holds information about E<strong>MAC</strong>0 and E<strong>MAC</strong>1 in the same register. In<br />

<strong>Virtex</strong>-5 <strong>FPGA</strong> designs, information on each E<strong>MAC</strong> is be accessed specifically<br />

through the E<strong>MAC</strong>0_DCRBASEADDR and E<strong>MAC</strong>1_DCRBASEADDR registers.<br />

There have also been changes to the DCR register addressing. This change requires<br />

<strong>Virtex</strong>-4 <strong>FPGA</strong> designs to update the address schemes. In <strong>Virtex</strong>-4 <strong>FPGA</strong> designs, the<br />

DCR bus is responsible for decoding the user-defined DCR_BASEADDR to enable the<br />

E<strong>MAC</strong> host interface access. In <strong>Virtex</strong>-5 <strong>FPGA</strong> designs, the interface only responds to<br />

accesses made to addresses matching the E<strong>MAC</strong>#_DCRBASEADDR attributes.<br />

Table C-1 shows the modifications to the DCR register addressing.<br />

Clocking Scheme Enhancements<br />

Host Clock<br />

Table C-1: DCR Register Address Modifications<br />

DCR Register <strong>Virtex</strong>-4 <strong>FPGA</strong> Address <strong>Virtex</strong>-5 <strong>FPGA</strong> Address<br />

dataRegMSW DCR_BASEADDR_00 E<strong>MAC</strong>#_DCRBASEADDR_00<br />

dataRegLSW DCR_BASEADDR_01 E<strong>MAC</strong>#_DCRBASEADDR_01<br />

cntlReg DCR_BASEADDR_10 E<strong>MAC</strong>#_DCRBASEADDR_10<br />

RdyStatus DCR_BASEADDR_11 E<strong>MAC</strong>#_DCRBASEADDR_11<br />

The <strong>Virtex</strong>-4 HOSTCLK input clock has to be supplied at all times even if the host interface<br />

is not used. In <strong>Virtex</strong>-5 designs, when neither the generic host bus nor the DCR bus are<br />

enabled, this clock input can be connected to logic 0.<br />

Advanced Clocking Schemes<br />

In the <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong>, two advanced clocking schemes<br />

are available, named “Clock Enables” and “Byte PHY.” In <strong>Virtex</strong>-4 <strong>FPGA</strong> designs, these<br />

clocking schemes can be implemented in the <strong>FPGA</strong> logic but for a smaller subset of<br />

physical interface configurations. “Advanced Clocking Schemes,” page 208 provides<br />

further details on theses clocking schemes.<br />

218 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Clock Enables<br />

Modifications Related to the Physical Interface<br />

<strong>Virtex</strong>-4 <strong>FPGA</strong> clock enable signals are created in the <strong>FPGA</strong> logic, resulting in a clocking<br />

scheme that halves the global clock usage when using the MII physical interface for<br />

10 Mb/s or 100 Mb/s.<br />

The <strong>Virtex</strong>-5 <strong>FPGA</strong> clock enables are provided by the <strong>Ethernet</strong> <strong>MAC</strong> to the <strong>FPGA</strong> logic,<br />

and their use has extended to cover MII, GMII, and RGMII interfaces at all three <strong>Ethernet</strong><br />

speeds.<br />

Byte PHY<br />

For <strong>Virtex</strong>-4 <strong>FPGA</strong> designs, a solution is possible in the <strong>FPGA</strong> logic that halves the global<br />

clock usage when using the GMII/MII physical interface at all three speeds. But, it only<br />

supports full-duplex mode.<br />

In <strong>Virtex</strong>-5 <strong>FPGA</strong> designs, the Byte PHY functionality is extended to cover the GMII/MII,<br />

again at all three speeds but supports both full- and half-duplex modes.<br />

Modifications Related to the Physical Interface<br />

Collision Handling<br />

In <strong>Virtex</strong>-4 <strong>FPGA</strong> designs, the GMII_COL/MII_COL signal (half-duplex mode collision<br />

indicator from GMII/MII interface) had to be lengthened in the <strong>FPGA</strong> logic. In <strong>Virtex</strong>-5<br />

<strong>FPGA</strong> designs, the signal can be input directly to the PHYE<strong>MAC</strong>#COL port of the <strong>Ethernet</strong><br />

<strong>MAC</strong>.<br />

RGMII Version 2.0 Clock Management<br />

Port Map Changes<br />

In <strong>Virtex</strong>-5 <strong>FPGA</strong> designs, an ODELAY design element can be used to simplify the<br />

generation of 2 ns skew between the transmit clock and data at the <strong>FPGA</strong> device pads. This<br />

is part of the IOB and clock logic that can be used with the <strong>Ethernet</strong> <strong>MAC</strong> to meet the<br />

RGMII v2.0 physical interface specification.<br />

The following name changes occurred to clarify functionality:<br />

E<strong>MAC</strong>#CLIENTTXGMIIMIICLKOUT changed to E<strong>MAC</strong>#PHYTXGMIIMIICLKOUT<br />

CLIENTE<strong>MAC</strong>#TXGMIIMIICLKIN changed to PHYE<strong>MAC</strong>#TXGMIIMIICLKIN<br />

The following ports were removed:<br />

E<strong>MAC</strong>#CLIENTRXDVREG6: In <strong>Virtex</strong>-4 devices, this signal is reserved and not used.<br />

TIEE<strong>MAC</strong>#CONFIGVEC[79:0]: This port has been replaced by attributes<br />

TIEE<strong>MAC</strong>#UNICASTADDR[47:0]: This port has been replaced by an attribute.<br />

The following port was added to enable advanced clocking schemes to be used:<br />

E<strong>MAC</strong>#SPEEDIS10100<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 219<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Appendix C: <strong>Virtex</strong>-4 to <strong>Virtex</strong>-5 <strong>FPGA</strong> Enhancements<br />

Tie-Off Pins Changed to Attributes<br />

The <strong>Virtex</strong>-4 <strong>FPGA</strong> <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> has 80 tie-off pins<br />

(TIEE<strong>MAC</strong>#CONFIGVEC[79:0]) that can be used to configure the <strong>Ethernet</strong> <strong>MAC</strong> at<br />

power-up or when the <strong>Ethernet</strong> <strong>MAC</strong> is reset.<br />

In the <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong>, these 80 tie-off pins have been<br />

replaced with attributes. Table C-2 shows how the <strong>Virtex</strong>-5 <strong>FPGA</strong> attributes relate to the<br />

<strong>Virtex</strong>-4 <strong>FPGA</strong> tie-off pins.<br />

Table C-2: Mapping Tie-Off Pin Names to Attribute Names<br />

<strong>Virtex</strong>-4 <strong>FPGA</strong> Tie-off Pin Name <strong>Virtex</strong>-5 <strong>FPGA</strong> Attribute Name<br />

TIEE<strong>MAC</strong>#CONFIGVEC[79] E<strong>MAC</strong>#_CONFIGVEC_79<br />

TIEE<strong>MAC</strong>#CONFIGVEC[78] E<strong>MAC</strong>#_PHYRESET<br />

TIEE<strong>MAC</strong>#CONFIGVEC[77] E<strong>MAC</strong>#_PHYINITAUTONEG_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[76] E<strong>MAC</strong>#_PHYISOLATE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[75] E<strong>MAC</strong>#_PHYPOWERDOWN<br />

TIEE<strong>MAC</strong>#CONFIGVEC[74] E<strong>MAC</strong>#_PHYLOOPBACKMSB<br />

TIEE<strong>MAC</strong>#CONFIGVEC[73] E<strong>MAC</strong>#_MDIO_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[72] E<strong>MAC</strong>#_SPEED_MSB<br />

TIEE<strong>MAC</strong>#CONFIGVEC[71] E<strong>MAC</strong>#_SPEED_LSB<br />

TIEE<strong>MAC</strong>#CONFIGVEC[70] E<strong>MAC</strong>#_RGMII_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[69] E<strong>MAC</strong>#_SGMII_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[68] E<strong>MAC</strong>#_1000BASEX_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[67] E<strong>MAC</strong>#_HOST_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[66] E<strong>MAC</strong>#_TX16BITCLIENT_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[65] E<strong>MAC</strong>#_RX16BITCLIENT_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[64] E<strong>MAC</strong>#_ADDRFILTER_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[63] E<strong>MAC</strong>#_LTCHECK_DISABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[62] E<strong>MAC</strong>#_RXFLOWCTRL_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[61] E<strong>MAC</strong>#_TXFLOWCTRL_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[60] E<strong>MAC</strong>#_TXRESET<br />

TIEE<strong>MAC</strong>#CONFIGVEC[59] E<strong>MAC</strong>#_TXJUMBOFRAME_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[58] E<strong>MAC</strong>#_TXINBANDFCS_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[57] E<strong>MAC</strong>#_TX_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[56] E<strong>MAC</strong>#_TXVLAN_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[55] E<strong>MAC</strong>#_TXHALFDUPLEX<br />

TIEE<strong>MAC</strong>#CONFIGVEC[54] E<strong>MAC</strong>#_TXIFGADJUST_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[53] E<strong>MAC</strong>#_RXRESET<br />

220 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Additional Attributes<br />

Table C-2: Mapping Tie-Off Pin Names to Attribute Names (Cont’d)<br />

Additional Attributes<br />

<strong>Virtex</strong>-4 <strong>FPGA</strong> Tie-off Pin Name <strong>Virtex</strong>-5 <strong>FPGA</strong> Attribute Name<br />

TIEE<strong>MAC</strong>#CONFIGVEC[52] E<strong>MAC</strong>#_RXJUMBOFRAME_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[51] E<strong>MAC</strong>#_RXINBANDFCS_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[50] E<strong>MAC</strong>#_RX_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[49] E<strong>MAC</strong>#_RXVLAN_ENABLE<br />

TIEE<strong>MAC</strong>#CONFIGVEC[48] E<strong>MAC</strong>#_RXHALFDUPLEX<br />

TIEE<strong>MAC</strong>#CONFIGVEC[47:0] E<strong>MAC</strong>#_PAUSEADDR[47:0]<br />

In addition to the tie-off pins being converted to attributes, six new parameters have been<br />

added to the <strong>Virtex</strong>-5 <strong>FPGA</strong> <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> that are also controlled by<br />

attributes. The following list provides a brief summary:<br />

E<strong>MAC</strong>#_DCRBASEADDR[0:7]: Separate DCR base addresses are specified for each<br />

<strong>Ethernet</strong> <strong>MAC</strong>.<br />

E<strong>MAC</strong>#_UNIDIRECTION_ENABLE: Allows the <strong>Ethernet</strong> <strong>MAC</strong> to transmit even<br />

while loss of synchronization at the receiver (1000BASE-X PCS/PMA or SGMII<br />

mode).<br />

E<strong>MAC</strong>#_LINKTIMERVAL[8:0]: Programmable link timer interrupt value for autonegotiation<br />

(1000BASE-X PCS/PMA or SGMII mode).<br />

E<strong>MAC</strong>#_BYTEPHY: Optional advanced clocking scheme to reduce use of global clock<br />

resources.<br />

E<strong>MAC</strong>#_USECLKEN: Optional advanced clocking scheme to reduce use of global<br />

clock resources. This mode switches the client interface clock output to become a clock<br />

enable.<br />

E<strong>MAC</strong>#_GTLOOPBACK: Enables loopback in the RocketIO serial transceiver,<br />

otherwise an internal loopback is used (1000BASE-X PCS/PMA or SGMII mode).<br />

More detailed information can be found in Chapter 2.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 221<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Appendix C: <strong>Virtex</strong>-4 to <strong>Virtex</strong>-5 <strong>FPGA</strong> Enhancements<br />

222 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R


R<br />

Appendix D<br />

Differences between Soft IP Cores and<br />

the <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong><br />

This appendix describes the differences between the <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong><br />

block and the soft IP core solutions provided by the CORE Generator software. The<br />

functionality provided by the <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> can also be provided by<br />

linking together the <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> soft IP core and the <strong>Ethernet</strong> 1000BASE-X<br />

PCS/PMA or SGMII core. More details are available at:<br />

http://www.xilinx.com/products/design_resources/conn_central/protocols/gigabit_et<br />

hernet.htm<br />

There are, however, some differences in the operation of the soft IP cores and the <strong>Tri</strong>-<strong>Mode</strong><br />

<strong>Ethernet</strong> <strong>MAC</strong>. These differences are detailed below.<br />

Features Exclusive to the <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong><br />

The <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> tile features two <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong>s, each with<br />

optional PCS/PMA functionality. In addition, each <strong>Embedded</strong> <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong>:<br />

Supports 2 Gb/s operation with a 16-bit client interface.<br />

Includes an RGMII/SGMII status register. See “RGMII/SGMII Configuration<br />

Register,” page 93.<br />

Can be configured using the DCR bus.<br />

Features Exclusive to Soft IP Cores<br />

These features are exclusive to soft IP cores:<br />

The soft <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> core:<br />

Supports 1 GB half duplex mode for parallel physical interfaces.<br />

Supports control frames larger than 64 bytes.<br />

Includes a statistics bit to indicate an address match.<br />

Has parallel statistics outputs.<br />

TE<strong>MAC</strong> User Guide www.xilinx.com 223<br />

<strong>UG194</strong> (v1.10) February 14, 2011


Appendix D: Differences between Soft IP Cores and the <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong><br />

The soft PCS/PMA core:<br />

Supports the ten bit interface (TBI).<br />

Supports dynamic switching between 1000BASE-X PCS/PMA and SGMII.<br />

Outputs a status vector with bits that indicate:<br />

- The status of the link.<br />

- The status of the link synchronization state machine.<br />

- When the core is receiving /C/ ordered sets.<br />

- When the core is receiving /I/ ordered sets.<br />

- When the core is receiving invalid data.<br />

Soft PCS/PMA and <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong> cores:<br />

Can be connected together to provide a single <strong>Ethernet</strong> interface.<br />

Can be configured by a vector when the management interface is not required.<br />

The vector signals equate to attributes in the hard <strong>Tri</strong>-<strong>Mode</strong> <strong>Ethernet</strong> <strong>MAC</strong>.<br />

Can be targeted to a wide variety of <strong>Xilinx</strong>® devices.<br />

224 www.xilinx.com TE<strong>MAC</strong> User Guide<br />

<strong>UG194</strong> (v1.10) February 14, 2011<br />

R

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!