Академический Документы
Профессиональный Документы
Культура Документы
Attention
The material contained in this presentation is the property of Avnet Electronics Marketing. Use of this material in its whole or in part is restricted to Avnets X-Fest program and Avnet employees. Any use by non-Avnet employees outside of the X-Fest program is prohibited. For additional information, please contact Jim Beneke at Avnet (jim.beneke@avnet.com).
Designing with the Spartan-6 Gigabit Transceivers and the PCIe Endpoint Block
Objectives
Introduce engineers to the Xilinx Spartan-6 RocketIO GTP transceiver and integrated block for PCIe Provide an overview of the GTP and PCIe Endpoint Block design and verification tools At the end of the presentation, engineers will learn Basic understanding of the serial communications The basic architecture of the Spartan-6 GTP and PCIe Endpoint Block What Xilinx tools to use to design with the Spartan-6 GTP and PCIe Endpoint Block
Agenda
Spartan-6 LXT Platform Family Introduction to Serial Communications Introduction to Spartan-6 GTP Transceivers Designing with Spartan-6 GTP Transceivers Xilinx PCIe solutions Introduction to Spartan-6 PCIe Endpoint Block Designing with Spartan-6 PCIe Endpoint Block PCIe Compliance Testing Wrap-Up
Agenda
Spartan-6 LXT Platform Family Introduction to Serial Communications Introduction to Spartan-6 GTP Transceivers Designing with Spartan-6 GTP Transceivers Xilinx PCIe solutions Introduction to Spartan-6 PCIe Endpoint Block Designing with Spartan-6 PCIe Endpoint Block PCIe Compliance Testing Wrap-Up
PCI Express endpoint block One PCI Express Endpoint Block PCI Express Gen1 at 2.5Gbps
Memory Controller Up to 4 memory controllers Support for DDR, DDR2, DDR3, and Mobile DDR memories DDR2 and DDR3 at 800Mbps DDR and Mobile DDR at 400Mbps Higher performance and lower power than a soft memory controller
MCB
Spartan-6
LX45T 44K 6,822 54K 116 2.1K 8/4 58 1 2 4 190,4 296,4 296,4
Agenda
Spartan-6 LXT Platform Family Introduction to Serial Communications Introduction to Spartan-6 GTP Transceivers Designing with Spartan-6 GTP Transceivers Xilinx PCIe solutions Introduction to Spartan-6 PCIe Endpoint Block Designing with Spartan-6 PCIe Endpoint Block PCIe Compliance Testing Wrap-Up
Serial Signaling
Serial signaling is the preferred choice in all markets such as telecom, datacom, computing, and storage Supports very high multi-gigabit data rates Avoids clock/data skew by using embedded clock Reduces EMI & power consumption It is the only IO technology that meets today's high-speed requirements It is faster than parallel signaling Parallel I/O data rates are inherently limited due to unavoidable skew between clock lines and multiple data lines
User Logic
SerDes
Multi-Gbps
SerDes
User Logic
10
D RCLK
RXDATA
RXP/N RCLK
RXDATA
Byte Alignment
Byte alignment is necessary to convert the serial data stream to parallel data Receiver looks for and aligns to a pre-defined alignment pattern
Transmit Order
11
Misalignment
If the byte alignment pattern is not unique, misalignment can happen Special encoding such as 8B/10B is often used to ensure the alignment pattern does not occur in regular data sequence
Transmit Order Intended Sequence
12
13
K 28.5
8B/10B Characteristics
General 8B/10B characteristics No more than 5 consecutive 1s or 0s in an encoded data or control character Helps CDR PLL not to drift from the center of the eye K-Character K character is independent from data character Byte alignment logic will not incorrectly align to data character Each data/K character is encoded into a Plus or Minus symbol Transmitter will send either Plus or Minus symbol to maintain a DC balanced line (this concept is referred to as Running Disparity) DC balanced is needed to avoid Inter-Symbol Interference (ISI) Plus and Minus symbols are complement of each other for easier symbol detection at the receiver
14
15
K28.5
D31.7
D30.2
D1.7
K28.5
D31.7
D30.2
16
EN DATA [15:0]
Idle
Data
Data
Data
Idle
Idle
Data
Review Questions
What hard IP cores are integrated into the Spartan-6 LXT family? GTP transceivers, PCIe Block, and Memory Controllers How is byte alignment implemented in serial data transfer? Using an alignment character Why is data encoding such as 8B/10B needed in serial signaling? 8B/10B provides sufficient number of transitions in the serial data It also provides unique alignment characters
17
Agenda
Spartan-6 LXT Platform Family Introduction to Serial Communications Introduction to Spartan-6 GTP Transceivers Designing with Spartan-6 GTP Transceivers Xilinx PCIe solutions Introduction to Spartan-6 PCIe Endpoint Block Designing with Spartan-6 PCIe Endpoint Block PCIe Compliance Testing Wrap-Up
18
19
20
21
. .
PLL0
TX Clock Divider
TX PM A TX PCS
REFCLK Distribution
GTP0 GTP1
RX Clock Divider
RX PM A RX PCS
TX Clock Divider
TX PM A TX PCS
. .
PLL1
RX Clock Divider
RX PM A RX PCS
22
Lock Indicator
PLL CLKIN
/M
Charge Pump
Loop Filter
VCO
PLL CLKOUT
/ N2
/ N1
The PLL has a nominal operating range of 1.2GHz to 1.62GHz The TX and RX clock dividers can divide the PLL clock by 1, 2, or 4 PLL Clock = PLL CLKIN * N1 * N2 / M Line Rate = PLL Clock * 2 / (TX or RX Clock Divider) TX/RX Clock Divider 1 2 4 Supported Line Rate 2.45Gbps 3.25Gbps 1.22Gbps 1.62Gbps 0.61Gbps 0.81Gbps
23
Physical Media Attachment (PMA) Differential drivers Programmable pre-emphasis Physical Coding Sub-layer (PCS) Support for multiple coding standards Channel bonding and clock correction
PMA Parallel Clock Domain
Polarity Control TX Pre-emp PLL
SATA OOB
PCIe Beacon
TX PCS
TX PMA
PISO
24
Physical Coding Sub-layer (PCS) Support for multiple coding standards Channel bonding and clock correction
PMA Parallel Clock Domain PCS Parallel Clock Domain
RX Polarity
RX CDR
SIPO
RX EQ RX OOB
8B/10B Decoder
Elastic Buffer
FPGA RX Interface
PLL
RX PMA
RX PCS
25
PRBS-31
1+ x28 + x31
231 1 bits
26
K28.5 0
D21.5 1
K28.5 1
D10.2 0
20 UI
27
Protocols Supported
PCI Express (Rev 1.0a) XAUI 802.3ae D5p0 DisplayPort EPON GPON Gigabit Ethernet SATA Gen 1 CPRI (V3.0) OBSAI RP3 (V4.0) Serial RapidIO Aurora
Data Rates
2.5 Gb/s 3.125 Gb/s 1.62 Gb/s, 2.7 Gb/s 1.25 Gb/s 622 Mb/s, 1.25 Gb/s, 2.5 Gb/s 1.25 Gb/s 1.5 Gb/s 614.4 Mb/s, 1228.8 Mb/s, 2457.6 Mb/s, 3072.0 Mb/s 768 Mb/s, 1536 Mb/s, 3072 Mb/s 1.25 Gb/s, 2.5 Gb/s, 3.125 Gb/s 614 Mb/s - 3.2 Gb/s
Lanes Supported
1, 4 4 1, 2, 4 1 1 1 1 1 1 1, 2, 4 1, 2, 4
28
REFSELDYPLL0[2:0] CLK00 GCLK00 PLLCLK00 CLKINEAST0 CLK10 GCLK10 PLLCLK10 CLKINWEST0 REFSELDYPLL1[2:0] CLK01 GCLK01 PLLCLK01 CLKINEAST1 CLK11 GCLK11 PLLCLK11 CLKINWEST1 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
PLL0
PLL1
CLK00 and CLK01 are default clock sources for PLL0 and PLL1 respectively.
29
When considering alternate clock sources, the alternate oscillators must meet or exceed the specifications of the recommended oscillators Depending on the application and its performance goals, it is possible to stray from the clock source specifications, but in that case the specified performance of the GTP is not guaranteed
0.1uF
Z0
LVDS Clock Source IBUFDS
Z0
0.1uF
30
31
32
MicroBlaze MicroBlaze
4x 3.125 Gbps
GTP features used 8B10B encoder/decoder Channel bonding Clock correction XAUI
Backplane
UL2
UTOPIA UTOPIA
GTP GTP
Agenda
Spartan-6 LXT Platform Family Introduction to Serial Communications Introduction to Spartan-6 GTP Transceivers Designing with Spartan-6 GTP Transceivers Xilinx PCIe solutions Introduction to Spartan-6 PCIe Endpoint Block Designing with Spartan-6 PCIe Endpoint Block PCIe Compliance Testing Wrap-Up
33
34
35
For each GTP in a tile, select the For each GTP in a tile, select the GTP reference clock source. GTP reference clock source.
2 Click on Customize to Click on Customize to configure the Spartan-6 configure the Spartan-6 GTP(s). GTP(s).
5 Follow the wizard to customize the Follow the wizard to customize the remainder of the GTP parameters. remainder of the GTP parameters.
Copyright 2009. Avnet, Inc. All rights reserved.
Review Questions
What are the min and max line rates of the Spartan-6 GTP transceiver? 614Mbps and 3.125Gbps For each PLL within a Spartan-6 GTP tile, how many clock sources can be used as the reference clock input and what are they? 7 clocks: 2 differential clocks from the FPGA pins, 1 clock from the East or West GTP tile, 2 from the internal PLL, and 2 from the FPGA global clock pins What Xilinx tool can you use to control and monitor the operation of the Spartan-6 GTP in real-time? Serial IO Toolkit
36
Agenda
Spartan-6 LXT Platform Family Introduction to Serial Communications Introduction to Spartan-6 GTP Transceivers Designing with Spartan-6 GTP Transceivers Xilinx PCIe solutions Introduction to Spartan-6 PCIe Endpoint Block Designing with Spartan-6 PCIe Endpoint Block PCIe Compliance Testing Wrap-Up
37
38
39
CPU
Root Complex
Memory
Upstream Port
Root Port
Switch
PCIe Endpoint
Downstream Port
PCIe Endpoint
PCIe Endpoint
At a minimum the Host Bridge, Memory Arbiter, and Root Port are required to create a Root Complex
PCIe v1.1
PCI Express v1.1 (Gen 1) 2.5Gbps per lane PCI Express specifications Obtained from PCI-SIG (PCI Special Interest Group) http://www.pcisig.com/specifications/pciexpress/specifications Base Specification for protocol Card Electromechanical Specification (CEM) for electrical characteristics PCIe 1.1 specifications defines 100 Ohms differential trace impedance
40
41
FPGA Device Spartan-6 Spartan-6 Virtex-6 Virtex-6 Virtex-5 LXT/SXT/FXT/TXT Virtex-5 FXT/TXT Virtex-4 FX Spartan-3
Gen 1 / Gen 2 Gen 1 Gen 1 Gen 1 / Gen 2 Gen 2 Gen 1 Gen 1 / Gen 2 Gen 1 Gen 1
IP Integrated Block Soft IP (Alliance Partner) Integrated Block Soft IP (Alliance Partner) Integrated Block Soft IP (Alliance Partner) Soft IP (DO-DI-PCIEXP) Soft IP (DO-DI-PCIE-PIPE)
42
End-point Wrapper x1 Gen 1 Delivered through Coregen Simulation and implementation Verilog only top level Full documentation
End-point Wrapper x1 Gen 1 All package/device combinations Delivered through Coregen Source code RTL wrapper Simulation and implementation Verilog/VHDL Full documentation
43
SATA Connector
JTAG Port
Platform Flash
RS232 Port
Clock Sources Programmable LVDS Clock Source LVTTL OSC @ 100 MHz
Power Supply 0.75V, 1.2V, 1.5V, 1.8V, 2.5V, and 3.3V Regulators
Agenda
Spartan-6 LXT Platform Family Introduction to Serial Communications Introduction to Spartan-6 GTP Transceivers Designing with Spartan-6 GTP Transceivers Xilinx PCIe solutions Introduction to Spartan-6 PCIe Endpoint Block Designing with Spartan-6 PCIe Endpoint Block PCIe Compliance Testing Wrap-Up
44
45
46
RocketIO GTP
Debug Port
47
125 or 250MHz
48
Open System Add-In Card Using 125/250MHz System Clock CLK @ 125/ 250MHz External PLL
PCIe Switch or Root Complex Device REFCLK @ 100MHz PCIe Clock OSC
PCIe Link
49
3.3V
PB Switch
ON OFF 3 2 1
The QA0/nQA0 and QB0/nQB0 outputs can be set to 125MHz or 250MHz using the F_SEL[2:0] inputs of the ICS874003-05 device.
Agenda
Spartan-6 LXT Platform Family Introduction to Serial Communications Introduction to Spartan-6 GTP Transceivers Designing with Spartan-6 GTP Transceivers Xilinx PCIe solutions Introduction to Spartan-6 PCIe Endpoint Block Designing with Spartan-6 PCIe Endpoint Block PCIe Compliance Testing Wrap-Up
50
51
The example design has been tested and verified with Mentor Graphics ModelSim, NC-Sim, and Synopsys VCS simulators Aldec simulator can also be used (see the Appendix for more information) ISIM support (possibly in 11.4)
52
User connection
Transaction Layer Interface Transaction Layer Data Link Layer Physical Layer Transceiver Interface
Optional connection
Debug Port
53
Block RAM
Block RAM
User Interface
Transaction Layer
Physical Layer
GTP Tile
Serial Interface
PCIe Block
Clock Module
Reset Module
Debug Port
Copyright 2009. Avnet, Inc. All rights reserved.
54
Review Questions
What is the minimum fabric logic needed to implement a PCIe x1 Endpoint using the Spartan-6 integrated PCIe block? 100 LUTs In addition to the PCIe hard block, what other blocks are automatically configured by the PCIe Coregen Wizard? GTP transceiver, BRAM, Clock, and Reset What is the procedure for assigning GTP pins to the PCIe lane? Use Coregen to generate a UCF
55
Agenda Spartan-6 LXT Platform Family Introduction to Serial Communications Introduction to Spartan-6 GTP Transceivers Designing with Spartan-6 GTP Transceivers Xilinx PCIe solutions Introduction to Spartan-6 PCIe Endpoint Block Designing with Spartan-6 PCIe Endpoint Block PCIe Compliance Testing Wrap-Up
56
57
Agenda Spartan-6 LXT Platform Family Introduction to Serial Communications Introduction to Spartan-6 GTP Transceivers Designing with Spartan-6 GTP Transceivers Xilinx PCIe solutions Introduction to Spartan-6 PCIe Endpoint Block Designing with Spartan-6 PCIe Endpoint Block PCIe Compliance Testing Wrap-Up
58
Key Takeaways
The Spartan-6 RocketIO GTP transceiver is a highly configurable and power-efficient transceiver Xilinx Coregen provides a RocketIO wizard to help manage the configuration process of the Spartan-6 GTP transceiver The Wizard can be used to create a design for a pre-defined (Ethernet, XAUI, etc.) or a custom protocol Spartan-6 integrated PCIe block is fully compliant with the PCI Express Base 1.1 Specification Compliant PCI-SIG Endpoint requires minimal fabric logic (< 100 LUTs) RocketIO GTP transceiver implement a fully compliant PCIe PHY Xilinx Coregen can be used to generate a PIO example design Complete implementation script and UCF delivered for PIO design Verilog HDL simulation support (VHDL is scheduled for 11.4)
59
60
Closing Comments
Please go to the following URL to download the X-Fest 2009 course presentations http://em.avnet.com/xfsupport2010 Visit the X-Fest 2009 forum for latest discussions on various courses http://community.em.avnet.com/t5/XFEST-2009/ct-p/XFEST_2009
61
Appendix
Agenda
Serial communications definitions and terminologies Spartan-6 PCIe Block overview Debugging PCIe Designs
63
Eye Diagram
An eye diagram corresponds to a superposition of a substantial number of bits of a particular stream of data after this data has propagated through the designed subsystem One of the most accepted standards for qualifying design performance Vertical thickness of the lines indicate the magnitude of the AC voltage noise Horizontal thickness of the lines indicate jitter
64
Eye Mask
65
Every serial communications standard has its own set of eye mask parameters Defined as part of the electrical specifications for each standard Usually an eye mask for signal at output of the transmitter and input to the receiver is defined Eye Mask is the size of the opening in the center of the eye diagram Eye Mask indicates the amount of voltage and timing margin available to sample the signal
66
67
Pre-emphasis
Pre-emphasis is the boosting of the magnitude of high frequency spectral components in the transmitted signal to improve the eye mask of the received signal
68
Agenda
Serial communications definitions and terminologies Spartan-6 PCIe Block overview Debugging PCIe Designs
69
70
71
72
Switch
PCIe Endpoint
73
74
75
The Transaction Layer Module (TLM) is the upper layer in the architecture This module takes Transaction Layer Packets (TLPs) presented by user logic at the Transaction Layer interface and schedules them for transmission over the link The Transaction Layer module also advises the user application when TLPs are received TLPs can both make requests and complete requests from another device
Block RAM Interface
76
32-bit 3 DWORDS Machine Header 64-bit 4 DWORDS Machine Read 0 Request Payload Write or Read Max Payload Size Completion (MPS) or less Included 1 DWORD ECRC (Digest) Trimmed 0
77
78
79
Transceiver Interface
80
A TLP is composed of a header, data payload (for most packets), and optional end-to-end CRC (ECRC) The transmission portion of the DLL accepts TLPs from the Transaction Layer and generates the appropriate TLP sequence number and Link CRC (LCRC) The Physical Layer appends the Start and End to the packet
Sequence Number
Start
Header
Data Payload
ECRC
LCRC
End
Presented to Transaction Layer Appended by Data Link Layer Appended by Physical Layer
81
82
Agenda
Serial communications definitions and terminologies Spartan-6 PCIe Block overview Debugging PCIe Designs
83
84
85
86
87
ID
ID
ID
Next Ptr
ID
Next Ptr
0x40
ID
Next Ptr
0x34
Capabilities Pointer
88
Cap ID
Device Capabilities Device Status Link Capabilities Link Status Slot Capabilities Slot Status Root Capabilities Root Status Device Capabilities 2 Device Status 2 Link Capabilities 2 Link Status 2 Slot Capabilities 2 Slot Status 2 Slot Control 2 Link Control 2 Device Control 2 Root Control Slot Control Link Control Device Control
04h 08h 0Ch 10h 14h 18h 1Ch 20h 24h 28h 2Ch 30h 34h 38h
89
Reading the Link Capability/Status Register to Verify Negotiated Link Width and Speed
Link capability register (0Ch) Where we declare our capabilities Supported link speed Max link width Etc. Link status register (12h) Whats currently happening on the link Current link speed Negotiated link width Slot clock configuration Etc.
31 15 7
90
Device Capabilities Device Status Link Capabilities Link Status Slot Capabilities Slot Status Root Capabilities Root Status Device Capabilities 2 Device Status 2 Link Capabilities 2 Link Status 2 Slot Capabilities 2 Slot Status 2 Slot Control 2 Link Control 2 Device Control 2 Root Control Slot Control Link Control Device Control
08h 0Ch 10h 14h 18h 1Ch 20h 24h 28h 2Ch 30h 34h 38h
Also check the same register in the Link Partner to verify Link Partner capabilities
Copyright 2009. Avnet, Inc. All rights reserved.
Reading the Link Status Register to Verify Negotiated Link Width and Speed
31 15 7
91
Cap ID
Device Capabilities Device Status Link Capabilities Link Status Link Control Device Control
Also check the same register in the Link Partner to verify Link Partner capabilities
Copyright 2009. Avnet, Inc. All rights reserved.
92
Device Capabilities Device Status Link Capabilities Link Status Slot Capabilities Slot Status Root Capabilities Root Status Root Control Device Capabilities 2 Device Status 2 Link Capabilities 2 Link Status 2 Slot Capabilities 2 Slot Status 2 Slot Control 2 Link Control 2 Device Control 2 Slot Control Link Control Device Control
08h 0Ch 10h 14h 18h 1Ch 20h 24h 28h 2Ch 30h 34h 38h
Device control register Where the system software sets all of the devices to a common maximum payload size
93
3 2 1 0
Example: Use for ChipScope Triggers Non-Fatal Error Detected Correctable Error Detected Imagine system is blue screening Usually, FPGA is transmitting a fatal error message Triggering on device status bit 2 gives view of situation when message transmitted cfg_dstatus<2> = fatal error detected At this trigger point, you may want to view status of MGT ports or other PCIe block ports to see if you can determine reason for failure
Copyright 2009. Avnet, Inc. All rights reserved.
Using PCItree
94
Configuration Registers
Using HWDirect
PCItree cannot read extended capability space HWDirect can read extended space Low-cost Windows shareware program (~$38) www.eprotek.com On Linux, use LSPCI with xxxx switch: e.g.: /sbin/lspci -xxxx
95
96
Knowing how to read the linked-list is helpful Especially when checking the link partner capabilities list
Configuration port outputs of the PCIe core can be used as ChipScope or link analyzer triggers
97
98
Debugging Conclusion
Standard PCIe register set is helpful in debugging problems Virtex-6 and Spartan-6 user guides contain new debug chapters Debug ports available to assist in analyzing problems
99
De-scrambling Design
All TLPs, DLLPs, and Idles are scrambled Required by the PCIe specification to reduce EMI noise De-scrambling design places a descrambler on both the TX and RX path Descrambler taps off TX and RX data path Produces data in legible format Packet decoder also included to provide trigger signals for ChipScope Allows user to view traffic at the MGTs using ChipScope Pro Also works in simulation The De-scrambling design will be available as an Answer Record
100
101
GTP/GTX Transceivers
PCIe Block
RX De-scrambler
ChipScope ILA
102
Agenda
Serial communications definitions and terminologies Spartan-6 PCIe Block overview Debugging PCIe Designs Using the Aldec Simulator
103
Table of Contents
What ALDEC Simulators Can Do? ALDEC XILINX Support Timeline ALDEC and XILINX Starting Active-HDL from ISE Xilinx Tools in Active-HDL Flow Starting Coregen from Active-HDL
104
105
106
Users who need Linux-based simulation tools or are not interested in graphical entry may want to try Riviera-PRO line of high-performance simulators.
107
Aldec and Xilinx sign Cooperation Agreement First Aldec simulators with SecureIP support
(Active-HDL 8.1sp2 and Riviera-PRO 2009.02)
Q3
Q4
Q1
Q2
Q3
Q4
Q1
Q2
2008
2009
2010
108
109
110
111
Flow Enabling
To access Coregen in Xilinx ISE 11.2 from Active-HDL, user has to enable Design Flow Manager in Preferences window accessible from the Tools menu in Active-HDL
112
113
Tool/Version Selection
When Active-HDL installation is up-to-date, the latest Xilinx tool versions should be visible in flow configuration
114
115
Flow Modifications
If quick change of tool version or default Xilinx family is needed, it is possible in Flow Configuration Settings window displayed after clicking Flow Settings button
116
Starting Coregen
To start Coregen from the Flow, user should click Tools button in the Design Flow Manager and select CoreGen & Architecture Wizard button in the popup window (see the illustration below)
117
118
119
120
121
Simulation
No matter if you are using VHDL, Verilog or both: our simulators will be able to handle your design If you need to get result quickly you have speed Expect performance matching leading competitors, but in easier to use package If you have to investigate some design issues you have extensive debugging capabilities
122
Happy Simulating!