Professional Documents
Culture Documents
swsoo
13 January 2012
Table of Contents
1 OVERVIEW............................................................................................................................ 4
2 BACKGROUND..................................................................................................................... 4
2.1 ALTERA ETHERNET 2.5GB DESIGN EXAMPLE....................................................................4
2.1.1 2.5GMAC................................................................................................................... 5
2.2 2.5GPHY....................................................................................................................... 6
3 FEATURE DESCRIPTION..................................................................................................... 7
3.1 ALTERA ETHERNET 2.5GB DESIGN EXAMPLE SYSTEM.......................................................7
3.1.1 2.5GMAC Core.......................................................................................................... 8
3.1.2 Avalon-ST Dual Clock Fifo........................................................................................ 8
3.1.3 Avalon MM Pipeline Bridge.......................................................................................8
3.1.4 2.5GPHY................................................................................................................... 8
3.2 FAMILY SUPPORT............................................................................................................ 8
3.3 GUI................................................................................................................................ 8
3.4 SIMULATION..................................................................................................................... 9
3.5 BACKWARD COMPATABILITY.............................................................................................. 9
3.6 QUARTUS SUPPORT......................................................................................................... 9
3.6.1 Time Quest................................................................................................................ 9
3.6.2 Pin Planner................................................................................................................ 9
3.6.3 QIC compliant............................................................................................................ 9
3.6.4 Design assistant........................................................................................................ 9
3.6.5 QIS Warning.............................................................................................................. 9
3.6.6 Metastability.............................................................................................................. 9
3.6.7 QIP file...................................................................................................................... 9
3.7 OPEN CORE PLUS........................................................................................................... 9
3.8 CLOCK DOMAIN CROSSING............................................................................................ 10
3.9 DEPENDENCIES............................................................................................................. 10
4 INTERFACE......................................................................................................................... 10
4.1 ALTERA ETHERNET 2.5GB DESIGN EXAMPLE INTERFACE.................................................10
4.2 2.5GPHY INTERFACE.................................................................................................... 18
4.3 REGISTER INTERFACE.................................................................................................... 25
4.3.1 2.5GPHY Register Description................................................................................25
4.4 2.5GMAC REGISTER DESCRIPTION................................................................................28
4.4.1 Register Description.............................................................................................. 28
5 DOCUMENTATION............................................................................................................. 46
6 IMPLEMENTATION DETAILS.............................................................................................47
7 TESTING.............................................................................................................................. 47
7.1 FUNCTIONAL VERIFICATION............................................................................................. 47
7.1.1 PHY Layer............................................................................................................... 47
7.1.2 MAC+PHY Verification............................................................................................48
7.1.3 Micro Core............................................................................................................... 50
8 References.......................................................................................................................... 51
Revision History
Version Author Date Changes
1.0 Azad Affif Ishak 14th April 2011 2.5G Ethernet productisation
Shi Weei Soo
Tien Hee Goh
2.0 Shi Weei Soo 26th May 2011 Arria V and Stratix V support
Tien Hee Goh Detail on backward compatability
3.0 Shi Weei Soo 22th June 2012 Cyclone V, Cyclone V SOC and Arria V
SOC support
Detail of GUI
1 Overview
This document contains information on the productization and verification of the
2.5 Gigabit Ethernet Solutions (GbE). Two mega cores and one design example
will be created by end of this release. They are :
1) 2.5GMAC Megacore
2) 2.5GPHY Megacore
2 Background
2.1 Altera Ethernet 2.5Gb Design Example
This design example will be written in composed hardware tcl. The components
are 2.5GMAC, Altera Avalon Dual Clock Fifo, Altera Merlin Master Translator
(Pipeline Bridge) and 2.5GPHY.
2.1.1 2.5GMAC
The 2.5-Gbps Ethernet MAC IP core implements the IEEE 802.3 2005 and
802.1Q Ethernet standards. The IP core has the following interfaces: an Avalon
Streaming (Avalon-ST) interface on the client side, a 16-bit wide gigabit media
independent interface (GMII) on the network side, and an Avalon Memory-
Mapped (Avalon-MM) programming interface that provides access to 32-bit
registers and statistics counters.
2.2 2.5GPHY
The 2.5-Gbps Ethernet PHY IP core consists of a PCS function and an
embedded PMA. The design of the PCS function is based on clause 36 of the
IEEE 802.3 Ethernet standards. The IP core has the following interfaces: a 16-bit
wide GMII on the client side, a 3.125 Gbps serial interface on the network side,
and an Avalon-MM programming interface that provides access to 32-bit
registers.
2.5GPHY is derived from Triple Speed Ethernet (TSE) PCSPMA 1000 Base X
variation.
3 Feature Description
3.1 Altera Ethernet 2.5Gb Design Example System
This Megacore is a composition of four major cores which are Avalon-ST Dual
Clock Fifo, 2.5GMAC, 2.5GPHY and Avalon Merlin Master Translator(Avalon MM
Pipeline Bridge).
(2) Starting Channel number (Available for Arria II GX and Stratix IV GX/GT.
No longer needed for Transceiver PHY IP with different architecture)
Transmiter and Reiceiver DC FIFO size setting is available for MAC and PHY
configuration only with configurable depth range from minimum requirement of 16
to 131072 and default value set to 16. This core will be hidden in 12.10
(1) altera_eth_frame_decoder
(2) altera_eth_pause_controller_and_generator
We do not support any parameter option for this core and it will remain hidden in
12.10.
For details, please refer to document. Since the design example will be deployed
using Qsys, the Avalon MM Pipeline Bridge may have to be substituted with
Merlin Master Translator component.
3.1.4 2.5GPHY
(2) Arria II GX
Stratix IV GX/GT and Arria II GX in 11.1, Arria V support in 11.1sp2 and Stratix V
support in 12.0.
GUI
3.3 Simulation
2.5GbE solutions provides functional simulation in verilog. Customer flow
simulation supports NCSIM, Modelsim and VCS simulators.
(1) Remove existing file list for 2.5G MAC and PHY in duxi design example.
(4) Generated IP files has different location compare to duxi design example.
There will be no impact by using generated QIP file for compilation.
(5) Simulation uses IEEE encryption. The impact will be minimum by utilizing
generated simulation scripts for simulation. More information on generated
script available in User Guide
This core should meet timing closure. Timing checks is covered in flow test.
Strecth Goal
Clean from Critical and High design assistant warning. Device test template is
used to capture reported DA warnings.
Target is to get zero QIS warning. Device test template is used to capture
reported warning.
3.5.6 Metastability
3.8 Dependencies
2.5GbE Megacore is greatly tie with PHY IP support on GiGE mode and
simulation script generation on customer flow simulation.
4 Interface
4.1 Altera Ethernet 2.5Gb Design Example Interface
NOTE: The SERDES control signals—gxb_cal_blk_clk, gxb_pwrdn, pll_pwrdwn, reconfig_clk, and reconfig_busy—are not
present in designs targeting Arria V, and Stratix V and Cyclone V devices.For designs targeting Arria V devices, the bus
width for reconfig_fromgxb and reconfig_togxb are [91:0] and [139:0] respectively.
end of a packet.
Use the Avalon-ST status interface to obtain information and error status on
receive frames only when the option to remove CRC and/or padding is disabled
and no overflow occurs. When CRC and/or padding removal is enabled (see See
MAC Registers) or when an overflow occurs ( avalon_st_rx_ready is deasserted),
obtain the same information using the statistics counters.
asserts avalon_st_rxstatus_v
alid . The information on this
data bus is invalid when an
overflow occurs or when CRC
and/or padding removal is
enabled.
When set to 1, each bit of this
signal indicates an error type
in the receive frame.
Bit 0: Undersized frame
Bit 1: Oversized frame
Bit 2: Payload length error
Bit 3: CRC error
Bit 4: Underflow
Bit 5: Unused.
avalon_st_rxstatus_error[] Output 7
Bit 6: PHY error
The IP core presents the
error status on this bus in the
same clock cycle it
asserts avalon_st_rxstatus_v
alid . The error status is
invalid when an overflow
occurs or when CRC and/or
padding removal is enabled.
ST interface.
synchronization is successful.
Indicates
that eth_2_5g_phy_tx_clk_out P
eth_2_5g_phy_tx_pll_locked Output 1
LL is stable and in phase
with ref_clk .
NOTE: The SERDES control signals—gxb_cal_blk_clk, gxb_pwrdn, pll_powerdown, reconfig_clk, and reconfig_busy—are
not present in designs targeting Arria V, and Stratix V and Cyclone V devices.For designs targeting Arria V devices, the
bus width for reconfig_fromgxb and reconfig_togxb are [91:0] and [139:0] respectively.
Reset Signals
GMII receive data bus. The first byte of the data can
gmii_rx_d[] Output 16
reside in any byte.
gmii_rx_dv[] Output 2 When asserted, this signal indicates that the data
on gmii_rx_d[] is valid; gmii_rx_dv[0] qualifies the
lower byte of gmii_rx_d[] and gmii_rx_dv[1] qualifies
the upper byte of gmii_rx_d[] .
Signal
Direction Width Description
Name
Signal
Direction Width Description
Name
address[] Input 5 Use this bus to specify the register address you want
Byte
Register Name Access Description
Offset
0x00C
0x010 –
Reserved — —
0x03C
Extended Registers
0x048 –
Reserved — —
0x04C
0x050 Reserved — —
0x054 –
Reserved — —
0x07C
0 to 5 Reserved — —
6 and Reserved — —
13
7 Reserved — —
8 Reserved — —
9 Reserved — —
10 Reserved — —
11 Reserved — —
12 Reserved — —
14 Reserved — —
Bit
Name Description
Number
0 Reserved —
1 Reserved —
3 Reserved —
4 Reserved —
5 Reserved —
6 Reserved —
7 Reserved —
8-15 Reserved —
Byte
Register Name Access Reset Value Description
Offset
0x008
– Reserved — — Reserved for future use.
0x00F
–
0x01F
CRC checking:
0x024
– Reserved — — Reserved for future use.
0x0FF
Bits 0 to 15 of rx_frame_addr1 =
First two bytes of the address
Example:
If the primary MAC address is
00-1C-23-17-4A-CB,
rx_frame_addr set rx_frame_addr0 to
0x10C RW 0x0
1 0x23174ACB
and rx_frame_addr1 to
0x0000001C.
rx_framedecoder_spaddr0_0/1
rx_frame_spad
0x114 RW 0x0 rx_framedecoder_spaddr1_0/1
dr0_1
rx_framedecoder_spaddr2_0/1
rx_frame_spad rx_framedecoder_spaddr3_0/1
0x118 RW 0x0
dr1_0
You must map the
supplementary addresses to the
rx_frame_spad respective registers in the same
0x11C RW 0x0
dr1_1 manner as the primary MAC
address. See the description
of rx_frame_ addr0
rx_frame_spad andrx_frame_ addr1.
0x120 RW 0x0
dr2_0
The IP core uses the
supplementary addresses to filter
0x124 rx_frame_spad RW 0x0 unicast frames when the
dr2_1
rx_frame_spad
0x128 RW 0x0
dr3_0
0x130
– Reserved — — Reserved for future use.
0x17F
Backpressure enable.
Indicates if backpressure is
enabled on the Avalon-ST
tx_transfer_sta
0x204 RO 0x0 transmit interface.
tus
0—Backpressure is disabled.
1—Backpressure is enabled.
0x208
– Reserved — — Reserved for future use.
0x20C
inserted
(seetx_crcins_control ).
CRC insertion.
0x268
– Reserved — — Reserved for future use.
0x27C
Bits 0 to 15
of tx_addrins_ macaddr1 = First
two bytes of the address
Example:
If the primary MAC address is
00-1C-23-17-4A-CB,
set tx_addrins_ macaddr0 to
0x23174ACB
and tx_addrins_ macaddr1 to
0x0000001C.
0x388
– Reserved — — Reserved for future use.
0x39F
0x404
Reserved — Reserved for future use.
0x604
rx_stats_frame
0x408
sOK The number of frames that are
successfully transmitted or
RO 0x0
received, including control
tx_stats_frame frames.
0x608
sOK
rx_stats_frame
0x410
sErr(1)
The number of errored frames
RO 0x0 that are transmitted or received,
including control frames.
tx_stats_frame
0x610
sErr(1)
0x618 tx_stats_frame
sCRCErr
rx_stats_octets
0x420
OK The number of data and padding
octets that are successfully
RO 0x0
transmitted or received, including
tx_stats_octets control frames.
0x620
OK
rx_stats_pause
0x428 MACCtrl
Frames
The number of valid pause
RO 0x0
frames transmitted or received.
tx_stats_pause
0x628 MACCtrl
Frames
rx_stats_ifErro
0x430
rs
The number of errored and
RO 0x0 invalid frames transmitted or
received.
tx_stats_ifErro
0x630
rs
rx_stats_unica
0x438
st FramesOK The number of good unicast
frames that are successfully
RO 0x0
transmitted or received,
tx_stats_unica excluding control frames.
0x638
st FramesOK
0x640 tx_stats_unica
st
FramesErr(1)
rx_stats_multic
0x448
ast FramesOK The number of good multicast
frames that are successfully
RO 0x0
transmitted or received,
tx_stats_multic excluding control frames.
0x648
ast FramesOK
rx_stats_multic
0x450 ast
FramesErr(1)
The number of errored multicast
RO 0x0 frames transmitted or received,
excluding control frames.
tx_stats_multic
0x650 ast
FramesErr(1)
rx_stats_broad
0x458
cast FramesOK
The number of good broadcast
RO 0x0 frames transmitted or received,
excluding control frames.
tx_stats_broad
0x658
cast FramesOK
rx_stats_broad
0x460 cast
FramesErr(1)
The number of errored broadcast
RO 0x0 frames transmitted or received,
excluding control frames.
tx_stats_broad
0x660 cast
FramesErr(1)
Stats Octets
rx_stats_ether
0x470
StatsPkts
The total number of good,
RO 0x0 errored, and invalid frames
transmitted or received.
tx_stats_ether
0x670
StatsPkts
rx_stats_ether
0x478 Stats
UndersizePkts The number of undersized
frames (frame length less than
RO 0x0
64 bytes) transmitted or
tx_stats_ether received.
0x678 Stats
UndersizePkts
rx_stats_ether
0x480 Stats
OversizePkts The number of oversized frames
(frame length more
RO 0x0
than rx_frame_maxlength )
tx_stats_ether transmitted or received.
0x680 Stats
OversizePkts
rx_stats_ether
0x488 Stats The number of 64-byte transmit
Pkts64Octets or receive frames, including the
CRC field but excluding the
RO 0x0
preamble and SFD bytes. This
tx_stats_ether count includes good, errored,
0x688 Stats and invalid frames.
Pkts64Octets
tets
including the CRC field but
excluding the preamble and SFD
tx_stats_ether
bytes. This count includes good,
Stats
0x690 errored, and invalid frames.
Pkts65to127Oc
tets
rx_stats_ether
Stats
0x498 The number of transmit or
Pkts128to255O
receive frames between the
ctets
length of 128 and 255 bytes,
RO 0x0 including the CRC field but
excluding the preamble and SFD
tx_stats_ether
bytes. This count includes good,
Stats
0x698 errored, and invalid frames.
Pkts128to255O
ctets
rx_stats_ether
Stats
0x4A0 The number of transmit or
Pkts256to511O
receive frames between the
ctets
length of 256 and 511 bytes,
RO 0x0 including the CRC field but
excluding the preamble and SFD
tx_stats_ether
bytes. This count includes good,
Stats
0x6A0 errored, and invalid frames.
Pkts256to511O
ctets
rx_stats_ether
Stats
0x45A8 The number of transmit or
Pkts512to1023
receive frames between the
Octets
length of 512 and 1023 bytes,
RO 0x0 including the CRC field but
excluding the preamble and SFD
tx_stats_ether
bytes. This count includes good,
Stats
0x6A8 errored, and invalid frames.
Pkts512to1023
Octets
rx_stats_ether
Stat
0x4B0 The number of transmit or
Pkts1024to151
receive frames between the
8Octets
length of 1024 and 1518 bytes,
RO 0x0 including the CRC field but
excluding the preamble and SFD
tx_stats_ether
bytes. This count includes good,
Stat
0x6B0 errored, and invalid frames.
Pkts1024to151
8Octets
rx_stats_ether
The number of transmit or
Stats
0x4B8 receive frames between the
Pkts1519toXOc
length of 1519 and the value
tets
configured
RO 0x0 in rx_frame_maxlength ,
including the CRC field but
tx_stats_ether
excluding the preamble and SFD
Stats
0x6B8 bytes. This count includes good,
Pkts1519toXOc
errored, and invalid frames.
tets
rx_stats_ether
0x4C0 Stats
The total number of transmit or
Fragments
receive frames with length less
RO 0x0 than 64 bytes and CRC error.
This count includes errored and
tx_stats_ether
invalid frames.
0x6C0 Stats
Fragments
rx_stats_unica
0x4D8 stMAC
CtrlFrames
The number of valid unicast
RO 0x0 control frames transmitted or
received.
tx_stats_unica
0x6D8 stMAC
CtrlFrames
rx_stats_multic
0x4E0 astMAC
CtrlFrames
The number of valid multicast
RO 0x0 control frames transmitted or
received.
tx_stats_multic
0x6E0 astMAC
CtrlFrames
rx_stats_broad
0x4E8 castMAC
CtrlFrames
The number of valid broadcast
RO 0x0 control frames transmitted or
received.
tx_stats_broad
0x6E8 castMAC
CtrlFrames
0x67C
–
0x7FF
Reset
Bit Field Name Width Access Description
Value
7–
Reserved — — — Reserved for future use.
15
20 –
Reserved — — — Reserved for future use.
31
5 Documentation
Refer to reference section.
6 Implementation Details
Will be updated while development in progress
7 Testing
7.1 Functional verification
7.1.1 PHY Layer
SV-VMM methodology will be used to verify the 2.5Gbps Ethernet together with
the Nsys VIP SV-VMM environment verification setup. Refer to Figure 6.
Address swapper and CRC inserter module will work to swap the destination
address of the packets from BFM into the source address, and the destination
address of the transmitted packet will be hardcoded value of the address that we
set for the VIP. This module will work to discard the the FCS CRC from the BFM
and append wit h the correct value to be send back to the BFM.
Verification will be run using testcases that are provided by VIP, included
compatibility tests, error tests and basic tests.
i) Data packets.
ii) VLAN packets
iii) Stacked Vlan packets
iv) Pause Frame packets.
v) Jumbo Packets.
Verification for PHY layer will need to be pass the Random tests and also
Directed tests provided by the VIP.
A SV-VMM using Altera VIP also will be used to cover functional coverage that
may not be covered in the Nsys setup. Refer to Figure 7.
To verify the MAC+PHY solution, the VIP SV vmm verification environment will
be used. Refer to Figure 8.
A loopback mechanism will be used to verify the MAC+PHY layer. Packets that
are transmitted by the BFM needs to be received by the BFM to check for
correctness of the packets transmitted.
Verification for PHY layer will need to be pass the Random tests and also
Directed tests provided by the VIP.
i) Data packets.
ii) VLAN packets
iii) Stacked Vlan packets
iv) Pause Frame packets.
v) Jumbo Packets.
If the functional coverage using the VIP setup is not sufficient to cover all the
functional coverage of the DUT, an extra environment consists of self-developed
VMM utilities will be used to cover those areas. Figure 9 shows the environment
setup.
There are two micro cores in the 2.5Gbps Etherenet that will be verified using
SV-VMM methodology.
Lane decoder will be tested and verified using the SV-VMM verification
environment. The current setup/environment to test this module will be as in
Figure 10.
Lane Encoder inside the MAC layer will be tested using the SV-VMM
methodology as well. The setup of the environment will be as in Figure 11.
Describe the high-level test methodology and test support you’ll create, which is
also an important design consideration. This is not the test plan, which is
detailed in a separate test-plan document.
8 References
//depot/users/aishak/duxi_new_deliverable/design_example_sopc_2_5GbE/
design_example_sopc_2_5GbE_1_9/2.5GbpsEthernetIP.pdf
http://www.altera.com/literature/ug/10Gbps_MAC.pdf