Arria V Hard IP for PCI ExpressDecember 2013 Altera Corporation
User Guide
December 2013
UG-01110-1.5
1. Datasheet
This document describes the Altera® Arria® V Hard IP for PCI Express®. PCI Express
is a high-performance interconnect protocol for use in a variety of applications
including network adapters, storage area networks, embedded controllers, graphic
accelerator boards, and audio-video products. The PCI Express protocol is software
backwards-compatible with the earlier PCI and PCI-X protocols, but is significantly
different from its predecessors. It is a packet-based, serial, point-to-point interconnect
between two devices. The performance is scalable based on the number of lanes and
the generation that is implemented. Altera offers a configurable hard IP block in Arria
V devices for both Endpoints and Root Ports that complies with the PCI Express Base
Specification 2.1. Using a configurable hard IP block, rather than programmable logic,
saves significant FPGA resources. The hard IP block is available in ×1, ×2, ×4, and ×8
configurations. Table 1–1 shows the aggregate bandwidth of a PCI Express link for the
available configurations. The protocol specifies 2.5 giga-transfers per second for Gen1
and 5 giga-transfers per second for Gen2. Table 1–1 provides bandwidths for a single
transmit (TX) or receive (RX) channel, so that the numbers double for duplex
operation. Because the PCI Express protocol uses 8B/10B encoding, there is a 20%
overhead which is included in the figures in Table 1–1.
Table 1–1. PCI Express Throughput
Link Width
×1×2×4×8
PCI Express Gen1 Gbps (2.5 Gbps)2.551020
PCI Express Gen2 Gbps (5.0 Gbps)51020—
f Refer to the PCI Express High Performance Reference Design for more information about
calculating bandwidth for the hard IP implementation of PCI Express in many Altera
FPGAs.
Features
The Arria V Hard IP for PCI Express IP supports the following key features:
■ Complete protocol stack including the Transaction, Data Link, and Physical Layers
is hardened in the device.
■ Multi-function support for up to eight Endpoint functions.
■ Support for ×1, ×2, ×4, and ×8 Gen1 and Gen2 configurations for Root Ports and
Endpoints.
■ Dedicated 6 KByte receive buffer
■ Dedicated hard reset controller
■ MegaWizard Plug-In Manager and Qsys support using the Avalon
®
Streaming
(Avalon-ST) with a 64- or 128-bit interface to the Application Layer.
December 2013 Altera CorporationArria V Hard IP for PCI Express
User Guide
1–2Chapter 1: Datasheet
■ Qsys support using the Avalon Memory-Mapped (Avalon-MM) with a 64- or
Features
128-bit interface to the Application Layer
■ Extended credit allocation settings to better optimize the RX buffer space based on
application type.
■ Qsys example designs demonstrating parameterization, design modules and
connectivity.
■ Optional end-to-end cyclic redundancy code (ECRC) generation and checking and
advanced error reporting (AER) for high reliability applications.
■ Easy to use:
■Easy parameterization.
■Substantial on-chip resource savings and guaranteed timing closure.
■Easy adoption with no license requirement.
■ New features in the 13.1 release
■Added support for Gen2 Configuration via Protocol (CvP) using an .ini file.
Contact your sales representative for more information.
.The Arria V Hard IP for PCI Express offers different features for the variants that use
the Avalon-ST interface to the Application Layer and the variants that use an
Avalon-MM interface to the Application Layer. Variants using the Avalon-ST interface
are available in both the MegaWizard Plug-In Manager and the Qsys design flows.
Variants using the Avalon-MM interface are only available in the Qsys design flow.
Variants using the Avalon-ST interfaces offer a richer feature set; however, if you are
not familiar with the PCI Express protocol, variants using the Avalon-MM interface
may be easier to understand. A PCI Express to Avalon-MM bridge translates the PCI
Express read, write and completion TLPs into standard Avalon-MM read and write
commands typically used by master and slave interfaces. Tab le 1– 1 outlines these
differences in features between variants with Avalon-ST and Avalon-MM interfaces to
the Application Layer.
Table 1–2. Differences in Features Available Using the Avalon-MM and Avalon-ST Interfaces (Part 1 of 2)
Arria V Hard IP for PCI ExpressDecember 2013 Altera Corporation
User Guide
Chapter 1: Datasheet1–3
Features
Table 1–2. Differences in Features Available Using the Avalon-MM and Avalon-ST Interfaces (Part 2 of 2)
FeatureAvalon-ST InterfaceAvalon-MM Interface
Transaction Layer Packet Types (TLP) (3)
■ Memory Read Request
■ Memory Read Request-Locked
■ Memory Write Request
■ I/O Read Request
■ I/O Write Request
■ Configuration Read Request
(Root Port)
■ Configuration Write Request
(Root Port)
■ Message Request
■ Message Request with Data
Payload
■ Completion without Data
■ Completion with data
■ Completion for Locked Read
■ Memory Read Request
■ Memory Write Request
■ Configuration Read Request
(Root Port)
■ Configuration Write Request
(Root Port)
■ Message Request
■ Message Request with Data
Payload
■ Completion without Data
■ Completion with Data
■ Memory Read Request (single
dword)
■ Memory Write Request (single
dword)
without Data
Maximum payload size128–512 bytes128–256 bytes
Number of tags supported for non-posted
requests
32 or 648
62.5 MHz clockSupportedSupported
Multi-function
Supports up to 8 functionsSupports single function only
Polarity inversion of PIPE interface signalsSupportedSupported
ECRC forwarding on RX and TXSupportedNot supported
Expansion ROMSupportedNot supported
Number of MSI requests161, 2, 4, 8, or 16
MSI-XSupportedSupported
Multiple MSI, MSI-X, and INTx Not SupportedSupported
Legacy interruptsSupportedSupported
Notes to Table 1–1:
(1) Not recommended for new designs.
(2) ×2 is supported by down training from ×4 or ×8 lanes.
(3) Refer to Appendix A, Transaction Layer Packet (TLP) Header Formats for the layout of TLP headers.
f The purpose of the Arria V Hard IP for PCI Express User Guide is to explain how to use
the Arria V Hard IP for PCI Express and not to explain the PCI Express protocol.
Although there is inevitable overlap between these two purposes, this document
should be used in conjunction with an understanding of the following PCI Express
specifications: PHY Interface for the PCI Express Architecture PCI Express 2.0 and PCI
Express Base Specification 2.1.
December 2013 Altera CorporationArria V Hard IP for PCI Express
User Guide
1–4Chapter 1: Datasheet
Release Information
Release Information
Tab le 1 –2 provides information about this release of the PCI Express Compiler.
Table 1–3. PCI Express Compiler Release Information
ItemDescription
Version13.1
Release DateDecember 2013
Ordering CodesNo ordering code is required
Product IDs There are no encrypted files for the Arria V Hard IP for PCI
Vendor ID
Express. The Product ID and Vendor ID are not required
because this IP core does not require a license.
Device Family Support
Tab le 1 –3 shows the level of support offered by the Arria V Hard IP for PCI Express.
Table 1–4. Device Family Support
Configurations
Device FamilySupport
Final. The IP core is verified with final timing models. The
Arria V
IP core meets all functional and timing requirements for
the device family and can be used in production designs.
Refer to the following user guides for other device families:
■ IP Compiler for PCI Express User Guide
Other device families
■ Arria V GZ Hard IP for PCI Express User Guide’
■ Cyclone V Hard IP for PCI Express User Guide
■ Stratix V Hard IP for PCI Express User Guide
■ Arria 10 Hard IP for PCI Express User Guide
The Arria V Hard IP for PCI Express includes a full hard IP implementation of the
PCI Express stack including the following layers:
■ Physical (PHY)
■ Physical Media Attachment (PMA)
■ Physical Coding Sublayer (PCS)
■ Media Access Control (MAC)
■ Data Link Layer (DL)
■ Transaction Layer (TL)
Optimized for Altera devices, the Arria V Hard IP for PCI Express supports all
memory, I/O, configuration, and message transactions. It has a highly optimized
Application Layer interface to achieve maximum effective throughput. You can
customize the Hard IP to meet your design requirements using either the
MegaWizard
Arria V Hard IP for PCI ExpressDecember 2013 Altera Corporation
User Guide
Plug-In Manager or the Qsys design flow.
Chapter 1: Datasheet1–5
Altera FPGA
User Application
Logic
PCIe
Hard IP
RP
PCIe
Hard IP
EP
User Application
Logic
PCI Express Link
Altera FPGA
Arria V or Cyclone V FPGA
PCIe Hard
IP Multi-
Function
EP
CAN GbE ATA PCI
Altera FPGA
PCIe
Hard IP
RP
Host
CPU
Memory
Controller
Peripheral
Controller
Peripheral
Controller
USB
SPI GPIO
I2C
PCI Express Link
Debug Features
Figure 1–1 shows a PCI Express link between two Arria V FPGAs. One is configured
as a Root Port and the other as an Endpoint.
Figure 1–1. PCI Express Application with a Single Root Port and Endpoint
Figure 1–2 shows a PCI Express link between two Altera FPGAs. One is configured as
a Root Port and the other as a multi-function Endpoint. The FPGA serves as a custom
I/O hub for the host CPU. In the Arria V FPGA, each peripheral is treated as a
function with its own set of Configuration Space registers. Eight multiplexed
functions operate using a single PCI Express link.
Figure 1–2. PCI Express Application with an Endpoint Using the Multi-Function Capability
Debug Features
The Arria V Hard IP for PCI Express includes debug features that allow observation
and control of the Hard IP for faster debugging of system-level problems. For more
information about debugging refer to Chapter 19, C**Debugging.
December 2013 Altera CorporationArria V Hard IP for PCI Express
User Guide
1–6Chapter 1: Datasheet
IP Core Verification
IP Core Verification
To ensure compliance with the PCI Express specification, Altera performs extensive
validation of the Arria V Hard IP Core for PCI Express. The Gen1 ×8 and Gen2 ×4
Endpoints were certified PCI Express compliant at PCI-SIG Compliance Workshop
#79 in February 2012.
The simulation environment uses multiple testbenches that consist of
industry-standard BFMs driving the PCI Express link interface. A custom BFM
connects to the application-side interface.
Altera performs the following tests in the simulation environment:
■ Directed and pseudo random stimuli areArria V applied to test the Application
Layer interface, Configuration Space, and all types and sizes of TLPs.
■ Error injection tests that inject errors in the link, TLPs, and Data Link Layer
Packets (DLLPs), and check for the proper responses
■ PCI-SIG
■ Random tests that test a wide range of traffic patterns
®
Compliance Checklist tests that specifically test the items in the checklist
Performance and Resource Utilization
Because the Arria V Hard IP for PCI Express IP core is implemented in hardened
logic, it uses less than 1% of Arria V resources. The Avalon-MM Arria V Hard IP for
PCI Express includes a bridge implemented in soft logic. Tab le 1 –4 shows the typical
expected device resource utilization for selected configurations of the Avalon-MM
Arria V Hard IP for PCI Express using the current version of the Quartus II software
targeting a Arria V (5AGXFB3H6F35C6ES) device. With the exception of M10K
memory blocks, the numbers of ALMs and logic registers in Table 1–4 are rounded up
to the nearest 100. Resource utilization numbers reflect changes to the resource
utilization reporting starting in the Quartus II software v12.1 release 28 nm device
families and upcoming device families.
f For information about Quartus II resource utilization reporting, refer to Fitter
Resources Reports in the Quartus II Help.
Table 1–5. Performance and Resource Utilization (Part 1 of 2)
Arria V Hard IP for PCI ExpressDecember 2013 Altera Corporation
User Guide
Chapter 1: Datasheet1–7
Recommended Speed Grades
Table 1–5. Performance and Resource Utilization (Part 2 of 2)
ALMsMemory M10K Logic Registers
Avalon-MM Interface–Completer Only
641600230
Soft calibration of the transceiver module requires additional logic. The amount of
logic required depends upon the configuration.
Recommended Speed Grades
Tab le 1 –5 lists the recommended speed grades for the supported link widths and
Application Layer clock frequencies. The speed grades listed are the only speed
grades that close timing. Altera recommends setting the Quartus II Analysis &
Synthesis Settings Optimization Technique to Speed.
h For information about optimizing synthesis, refer to “Setting Up and Running Analysis
and Synthesis in Quartus II Help.
For more information about how to effect the Optimization Technique settings, refer
to Area and Timing Optimization in volume 2 of the Quartus II Handbook.
Table 1–6. Device Family Link Width Application Frequency Recommended Speed Grades
Link SpeedLink Width
×162.5
Application
Clock
Frequency (MHz)
(1)
–4, –5, –6
Recommended
Speed Grades
(2)
×1125–4, –5, –6
Gen1–2.5 Gbps
×2125–4, –5, –6
×4125–4, –5, –6
×8125–4, –5, –6
(1)
–4, –5,
Gen2–5.0 Gbps
×162.5
×1 125–4, –5,,
×2125–4, –5,
×4125–4, –5,
Notes to Table 1–5:
(1) This is a power-saving mode of operation.
(2) Final results pending characterization by Altera. Refer to the fit.rpt file generated by the Quartus II software.
(2)
(2)
(2)
(2)
(2)
f For details on installation, refer to the Altera Software Installation and Licensing Manual.
December 2013 Altera CorporationArria V Hard IP for PCI Express
User Guide
1–8Chapter 1: Datasheet
Recommended Speed Grades
Arria V Hard IP for PCI ExpressDecember 2013 Altera Corporation
User Guide
2. Getting Started with the Arria Hard IP
APPS
altpcied_sv_hwtcl.v
Stratix V Hard IP for PCI Express Testbench for Endpoints
Avalon-ST TX
Avalon-ST RX
reset
status
Avalon-ST TX
Avalon-ST RX
reset
status
DUT
altpcie_sv_hip_ast_hwtcl.v
Root Port Model
altpcie_tbed_sv_hwtcl.v
PIPE or
Serial
Interface
Root Port BFM
altpcietb_bfm_rpvar_64b_x8_pipen1b
Root Port Driver and Monitor
altpcietb_bfm_vc_intf
December 2013
UG-01110-1.5
Getting Started with the Arria Hard IP for PCI Express
This section provides step-by-step instructions to help you quickly customize,
simulate, and compile the Arria Hard IP for PCI Express using either the
MegaWizard Plug-In Manager or Qsys design flow. When you install the Quartus II
software you also install the IP Library. This installation includes design examples for
Hard IP for PCI Express in <install_dir>/ip/altera/altera_pcie/altera_pcie_hip_ast_ed/example_design/<device> directory.
1If you have an existing Arria 12.1 or older design, you must regenerate it in 13.1
before compiling with the 13.1 version of the Quartus II software.
After you install the Quartus II software for 13.1, you can copy the design examples
from the <install_dir>/ip/altera/altera_pcie/altera_pcie_hip_ast_ed/example_design/<device> directory. This walkthrough uses the Gen1 ×4 Endpoint.
The following figure illustrates the top-level modules of the testbench in which the
DUT, a Gen1 ×4 Endpoint, connects to a chaining DMA engine, labeled APPS in the
following figure, and a Root Port model. The Transceiver Reconfiguration Controller
dynamically reconfigures analog settings to optimize signal quality of the serial
interface. The pcie_reconfig_driver drives the Transceiver Reconfiguration Controller.
The simulation can use the parallel PHY Interface for PCI Express (PIPE) or serial
interface.
for PCI Express
Figure 2–1. Testbench for an Endpoint
For a detailed explanation of this example design, refer to Chapter 18, Testbench and
December 2013 Altera CorporationArria V Hard IP for PCI Express
Design Example. If you choose the parameters specified in this chapter, you can run
all of the tests included in Chapter 18.
L
User Guide
2–2Chapter 2: Getting Started with the Arria Hard IP for PCI Express
Select Design Flow
Customize the
Hard IP for PCIe
Qsys Flow
MegaWizard Plug-In
Manager Flow
Complete Qsys System
Run Simulation
Create Quartus II Project
Add Quartus IP File (.qip)
Create Quartus II Project
Generate the Simulation
Model for ModelSim, NC-Sim
or VCS
Generate the Simulation
Model in Qsys
Compile the Design for the
Qsys Design Flow
Modify Example Design
to Meet Your Requirements
Compile the Design for the
MegaWizard Design Flow
Add Quartus IP File (.qip)
to Quartus II Project
Customize the
Hard IP for PCIe
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
Ye s
No
Simulating?
Ye s
No
Simulating?
Getting Started with the Arria Hard IP for PCI Express
The Arria Hard IP for PCI Express offers exactly the same feature set in both the
MegaWizard and Qsys design flows. Consequently, your choice of design flow
depends on whether you want to integrate the Arria Hard IP for PCI Express using
RTL instantiation or using Qsys, which is a system integration tool available in the
Quartus II software.
f For more information about Qsys, refer to System Design with Qsys in the Quartus II
Handbook.
h For more information about the Qsys GUI, refer to About Qsys in Quartus II Help.
The following figure illustrates the steps necessary to customize the Arria Hard IP for
PCI Express and run the example design.
Figure 2–2. MegaWizard Plug-In Manager and Qsys Design Flows
Arria V Hard IP for PCI ExpressDecember 2013 Altera Corporation
User Guide
Chapter 2: Getting Started with the Arria Hard IP for PCI Express2–3
MegaWizard Plug-In Manager Design Flow
MegaWizard Plug-In Manager Design Flow
This section guides you through the steps necessary to customize the Arria Hard IP
for PCI Express and run the example testbench, starting with the creation of a
Quartus II project.
Follow these steps to copy the example design files and create a Quartus II project.
1. Choose Programs > Altera > Quartus II<version> (Windows Start menu) to run
the Quartus II software.
2. On the Quartus II File menu, click New, then New Quartus II Project, then OK.
3. Click Next in the New Project Wizard: Introduction (The introduction does not
display if you previously turned it off.)
4. On the Directory, Name, Top-Level Entity page, enter the following information:
a. The working directory for your project. This design example uses
<working_dir>/example_design
b. The name of the project. This design example uses pcie_de_gen1_x4_ast64.
1The Quartus II software specifies a top-level design entity that has the same
name as the project automatically. Do not change this name.
5. Click Next to display the Add Files page.
6. Click Yes, if prompted, to create a new directory.
7. Click Next to display the Family & Device Settings page.
8. On the Family & Device Settings page, choose the following target device family
and options:
a. In the Family list, select Arria V (/GX/GT/ST/SX)
b. In the Devices list, select Arria V GX Extended Features GX PCIe
c. In the Available devices list, select 5AGXFB3H6F35C6ES.
9. Click Next to close this page and display the EDA Tool Settings page.
10. From the Simulation list, select ModelSim
language you intend to use for simulation.
11. Click Next to display the Summary page.
12. Check the Summary page to ensure that you have entered all the information
correctly.
13. Click Finish to create the Quartus II project.
®
. From the Format list, select the HDL
Customizing the Endpoint in the MegaWizard Plug-In Manager Design
Flow
This section guides you through the process of customizing the Endpoint in the
MegaWizard Plug-In Manager design flow. It specifies the same options that are
chosen in Chapter 18, Testbench and Design Example.
Follow these steps to customize your variant in the MegaWizard Plug-In Manager:
December 2013 Altera CorporationArria V Hard IP for PCI Express
User Guide
2–4Chapter 2: Getting Started with the Arria Hard IP for PCI Express
Customizing the Endpoint in the MegaWizard Plug-In Manager Design Flow
1. On the Tools menu, click MegaWizard Plug-In Manager. The MegaWizard
Plug-In Manager appears.
2. Select Create a new custom megafunction variation and click Next.
3. In Which device family will you be using? Select the Arria device family.
4. Expand the Interfaces directory under Installed Plug-Ins by clicking the + icon
left of the directory name, expand PCI Express, then click Arria Hard IP for PCI
Express <version_number>
5. Select the output file type for your design. This walkthrough supports VHDL and
Verilog HDL. For this example, select Verilog HDL.
6. Specify a variation name for output files <working_dir>/example_design/
<variation name>. For this walkthrough, specify <working_dir>/example_design/
gen1_x4.
7. Click Next to open the parameter editor for the Arria Hard IP for PCI Express.
8. Specify the System Settings values listed in the following table.
Table 2–1. System Settings Parameters
ParameterValue
Number of Lanes x4
Lane RateGen 1 (2.5 Gbps)
Port typeNative endpoint
Application Layer interfaceAvalon-ST 64-bit
RX buffer credit allocation - performance for
received requests
Reference clock frequency100 MHz
Use 62.5 MHz Application Layer clock for ×1Leave this option off
Use deprecated RX Avalon-ST data byte enable
port (rx_st_be)
Enable configuration via the PCIe linkLeave this option off
Number of functions1
Low
Leave this option off
1Each function shares the parameter settings on the Device, Error Reporting, Link,
Slot, and Power Management tabs. Each function has separate parameter settings for
the Base Address Registers, Base and Limit Registers for Root Ports, Device
Identification Registers, and the PCI Express/PCI Capabilities parameters. When
you click on a Func<n> tab under the Port Functions heading, the tabs automatically
reflect the Func<n> tab selected.
9. Specify the Device parameters listed in Ta bl e 2– 2.
Table 2–2. Device
ParameterValue
Maximum payload size128 bytes
Number of tags supported32
Completion timeout rangeABCD
Implement completion timeout disable On
Arria V Hard IP for PCI ExpressDecember 2013 Altera Corporation
User Guide
Chapter 2: Getting Started with the Arria Hard IP for PCI Express2–5
Customizing the Endpoint in the MegaWizard Plug-In Manager Design Flow
10. On the Error Reporting tab, leave all options off.
11. Specify the Link settings listed in Tab le 2 –7 .
Table 2–3. Link Tab
ParameterValue
Link port number1
Slot clock configurationOn
12. On the Slot Capabilities tab, leave the Slot register turned off.
13. Specify the Power Management parameters listed in Ta bl e 2–4 .
Table 2–4. Power Management Parameters
ParameterValue
Endpoint L0s acceptable exit latencyMaximum of 64 ns
Endpoint L1 acceptable latencyMaximum of 1 µs
14. Specify the BAR settings for Func0 listed in Ta bl e 2– 5.
17. Under the Base and Limit Registers heading, disable both the Input/Output and
Prefetchable memory options. (These options are for Root Ports.)
18. For the Device ID Registers for Func0, specify the values listed in the center
column of Table 2–6. The right-hand column of this table lists the value assigned to
Altera devices. You must use the Altera values to run the reference design
described in AN 456 PCI Express High Performance Reference Design. Be sure to use
your company’s values for your final product.
Table 2–6. Device ID Registers for Func0
Register NameValueAltera Value
Vendor ID
Device ID
Revision ID
Class Code
0x00000000
0x00000001
0x00000001
0x00000000
0x00001172
0x0000E001
0x00000001
0x00FF0000
December 2013 Altera CorporationArria V Hard IP for PCI Express
User Guide
2–6Chapter 2: Getting Started with the Arria Hard IP for PCI Express
Table 2–6. Device ID Registers for Func0
Subsystem Vendor ID
Subsystem Device ID
Customizing the Endpoint in the MegaWizard Plug-In Manager Design Flow
0x00000000
0x00000000
0x00001172
0x0000E001
19. On the Func 0 Device tab, under PCI Express/PCI Capabilities for Func 0 turn
Function Level Reset (FLR) Off.
20. Ta bl e 2 –7 lists settings for the Func0 Link tab.
Table 2–7. Link Capabilities
ParameterValue
Data link layer active reporting Off
Surprise down reportingOff
21. On the Func0 MSI tab, for Number of MSI messages requested, select 4.
22. On the Func0 MSI-X tab, turn Implement MSI-X off.
23. On the Func0 Legacy Interrupt tab, select INTA.
24. the following tablethe following tablethe following tablethe following tablethe
following tablethe following tableClick Finish. The Generation dialog box
appears.
25. Turn on Generate Example Design to generate the Endpoint, testbench, and
supporting files.
26. Click Exit.
27. Click Yes if you are prompted to add the Quartus II IP File (.qip) to the project.
The .qip is a file generated by the parameter editor contains all of the necessary
assignments and information required to process the IP core in the Quartus II
compiler. Generally, a single .qip file is generated for each IP core.
Understanding the Files Generated
The following table provides an overview of directories and files generated.
Table 2–8. Qsys Generation Output Files
DirectoryDescription
<working_dir>/<variant_name>/Includes the files for synthesis
Includes a Qsys testbench that connects the Endpoint to a chaining
DMA engine, Transceiver Reconfiguration Controller, and driver for the
Transceiver Reconfiguration Controller.
Follow these steps to generate the chaining DMA testbench from the Qsys system
design example.
1. On the Quartus II File menu, click Open.
2. Navigate to the Qsys system in the altera_pcie_<device>_hip_ast subdirectory.
Arria V Hard IP for PCI ExpressDecember 2013 Altera Corporation
User Guide
Chapter 2: Getting Started with the Arria Hard IP for PCI Express2–7
Customizing the Endpoint in the MegaWizard Plug-In Manager Design Flow
3. Click pcie_de_gen1_x4_ast64.qsys to bring up the Qsys design. The following
figure illustrates this Qsys system.
Figure 2–3. Qsys System Connecting the Endpoint Variant and Chaining DMA Testbench
December 2013 Altera CorporationArria V Hard IP for PCI Express
User Guide
2–8Chapter 2: Getting Started with the Arria Hard IP for PCI Express
Customizing the Endpoint in the MegaWizard Plug-In Manager Design Flow
4. To display the parameters of the APPS component shown in the previous figure,
click on it and then select Edit from the right-mouse menuFigure 2–4. illustrates
this component. Note that the values for the following parameters match those set
in the DUT component:
■Targeted Device Family
■Lanes
■Lane Rate
■Application Clock Rate
■Port
■Application interface
■Tags supported
■Maximum payload size
■Number of Functions
Figure 2–4. Qsys Component Representing the Chaining DMA Design Example
1You can use this Qsys APPS component to test any Endpoint variant with
compatible values for these parameters.
5. To close the APPS component, click the X in the upper right-hand corner of the
parameter editor.
Go to “Simulating the Example Design ###avst_sim###” on page 2–11 for instructions
on system simulation.
Arria V Hard IP for PCI ExpressDecember 2013 Altera Corporation
User Guide
Chapter 2: Getting Started with the Arria Hard IP for PCI Express2–9
Qsys Design Flow
Qsys Design Flow
This section guides you through the steps necessary to customize the Arria Hard IP
for PCI Express and run the example testbench in Qsys. Reviewing the Qsys Example
Design for PCIe
For this example, copy the Gen1 x4 Endpoint example design from installation
directory: <install_dir>/ip/altera/altera_pcie/altera_pcie_hip_ast_ed/example_design/<device> directory to a working directory.
The following figure illustrates this Qsys system.
Figure 2–5. Complete Gen1 ×4 Endpoint (DUT) Connected to Example Design (APPS)
The example design includes the following four components:
■ DUT—This is Gen1 x4 Endpoint. For your own design, you can select the data
rate, number of lanes, and either Endpoint or Root Port mode.
■ APPS—This Root Port BFM configures the DUT and drives read and write TLPs to
test DUT functionality. An Endpoint BFM is available if your PCI Express design
implements a Root Port.
December 2013 Altera CorporationArria V Hard IP for PCI Express
User Guide
2–10Chapter 2: Getting Started with the Arria Hard IP for PCI Express
■ pcie_reconfig_driver_0—This Avalon-MM master drives the Transceiver
Qsys Design Flow
Reconfiguration Controller. The pcie_reconfig_driver_0 is implemented in clear
text that you can modify if your design requires different reconfiguration
functions. After you generate your Qsys system, the Verilog HDL for this
component is available as: <working_dir>/<variant_name>/testbench/<variant_name>_tb/simulation/submodules/altpcie_reconfig_driver.sv.
Controller dynamically reconfigures analog settings to improve signal quality. For
Gen1 and Gen2 data rates, the Transceiver Reconfiguration Controller must
perform offset cancellation and PLL calibration.
Generating the Testbench
Follow these steps to generate the chaining DMA testbench:
1. On the Qsys Generation tab, specify the parameters listed in the following table.
Table 2–9. Parameters to Specify on the Generation Tab in Qsys
ParameterValue
Simulation
Create simulation model
None. (This option generates a simulation model you can include in your own
custom testbench.)
Create testbench Qsys systemStandard, BFMs for standard Avalon interfaces
Create testbench simulation modelVerilog
Synthesis
Create HDL design files for synthesisTurn this option on
Create block symbol file (.bsf)Turn this option on
Output Directory
Pathpcie_qsys/gen1_x4_example_design
SimulationLeave this option blank
Testbench
Synthesis
Note to Table 2–9:
(1) Qsys automatically creates this path by appending testbench to the output directory/.
(2) Qsys automatically creates this path by appending synthesis to the output directory/.
(1)
(2)
pcie_qsys/gen1_x4_example_design/testbench
pcie_qsys/gen1_x4_example_design/synthesis
2. Click the Generate button at the bottom of the Generation tab to create the
chaining DMA testbench.
Arria V Hard IP for PCI ExpressDecember 2013 Altera Corporation
User Guide
Chapter 2: Getting Started with the Arria Hard IP for PCI Express2–11
Qsys Design Flow
Understanding the Files Generated
The following table provides an overview of the files and directories Qsys generates.
Table 2–10. Qsys Generation Output Files
DirectoryDescription
includes the top-level HDL file for the Hard I for PCI Express and the .qip file that
lists all of the necessary assignments and information required to process the IP
core in the Quartus II compiler. Generally, a single .qip file is generated for each IP
core.
Includes the HDL files necessary for Quartus II synthesis.
Includes testbench subdirectories for the Aldec, Cadence and Mentor simulation
tools with the required libraries and simulation scripts.
Includes the HDL source files and scripts for the simulation testbench.
Simulating the Example Design
Follow these steps to compile the testbench for simulation and run the chaining DMA
testbench.
1. Start your simulation tool. This example uses the ModelSim
®
software.
2. From the ModelSim transcript window, in the testbench directory
(./example_design/altera_pcie_<device>_hip_ast/<variant>/testbench/mentor)
type the following commands:
a.
do msim_setup.tcl
r
b. h r (This is the ModelSim help command.)
c. ld_debug r (This command compiles all design files and elaborates the
top-level design without any optimization.)
d. run -all r
The following example shows a partial transcript from a successful simulation. As this
transcript illustrates, the simulation includes the following stages:
■ Link training
■ Configuration
■ DMA reads and writes
December 2013 Altera CorporationArria V Hard IP for PCI Express
User Guide
2–12Chapter 2: Getting Started with the Arria Hard IP for PCI Express
■ Root Port to Endpoint memory reads and writes
Qsys Design Flow
Example 2–1. Excerpts from Transcript of Successful Simulation Run
Time: 56000 Instance: top_chaining_testbench.ep.epmap.pll_250mhz_to_500mhz.
# Time: 0 Instance:
pcie_de_gen1_x8_ast128_tb.dut_pcie_tb.genblk1.genblk1.altpcietb_bfm_top_rp.rp.rp.nl00O
0i.Arria ii_pll.pll1
# Note : Arria II PLL locked to incoming clock
# Time: 25000000 Instance:
pcie_de_gen1_x8_ast128_tb.dut_pcie_tb.genblk1.genblk1.altpcietb_bfm_top_rp.rp.rp.nl00O
0i.Arria ii_pll.pll1
# INFO: 464 ns Completed initial configuration of Root Port.
# INFO: 3661 ns RP LTSSM State: DETECT.ACTIVE
# I
NFO: 3693 ns RP LTSSM State: POLLING.ACTIVE
# INFO:
# I
# I
# I
# INFO: 7
# INFO: 7969 ns EP LTS
3905 ns EP LTSSM State: DETECT.ACTIVE
NFO: 4065 ns EP LTSSM State: POLLING.ACTIVE
NFO: 6369 ns EP LTSSM State: POLLING.CONFIG
NFO: 6461 ns RP LTSSM State: POLLING.CONFIG
741 ns RP LTSSM State: CONFIG.LINKWIDTH.START
SM State: CONFIG.LINKWIDTH.START
# INFO: 8353 ns EP LTSSM State: CONFIG.LINKWIDTH.ACCEPT
NFO: 8781 ns RP LTSSM State: CONFIG.LINKWIDTH.ACCEPT
# I
# INFO: 9537 ns EP LTSSM State: CONFIG.LANENUM.WAIT
# INFO:
# INFO:
# INFO: 10189 ns RP LTSSM State: CO
December 2013 Altera CorporationArria V Hard IP for PCI Express
User Guide
2–14Chapter 2: Getting Started with the Arria Hard IP for PCI Express
Qsys Design Flow
Example 2-1Excerpts from Transcript of Successful Simulation Run (continued)
# INFO: 96005 ns multi_message_enable = 0x0002
# INFO: 96005 ns msi_number = 0001
# INFO: 96005 ns msi_tr
# INFO: 96005 ns ---------
# INFO: 96005 ns TASK:dma_set_header WRITE
# INFO
# INFO: 960
# INFO
# INFO: 96045 ns Shared Memory Data Display:
# INFO: 96045 ns Address Data
# INFO: 96045 ns ------- ----
# INFO: 96045 ns 00000800 10100003 00000000 00000800 CAFEFADE
#
# INFO: 96045 ns TASK:dma_set_rclast
# INFO: 96045 ns Start WRITE DMA : RC issues MWr (RCLast=0002)
# INFO: 96061 ns ---------
# INFO: 96073 ns TASK:msi_poll Po
# INFO: 96257 ns TASK:rcmem_poll Polling RC Address0000080C current data
(0000FADE) expected data (00000002)
# INFO: 101457 ns TASK:rcmem_poll Polling RC Address0000080C current data
(00000000) expected data (00000002)
# INFO: 105177 ns TASK:msi_poll Received DMA Write MSI(0000) : B0FD
# I
(00000002) expected data (00000002)
# INFO: 105257 ns TASK:rcmem_poll ---> Received Expected Data (00000002)
# INFO: 105265 ns ---------
# INFO: 105265 ns Completed DMA Write
# INFO
# INFO: 105265 ns TASK:check_dma_data
# INFO: 105265 ns Passed : 0644 identical dwords.
# INFO
# INFO: 105265 ns TASK:downstream_loop
# INFO: 107897 ns Passed: 0004 same bytes in BFM mem addr 0x00000040 and 0x00000840
# INFO: 110409 ns Passed: 0008 same bytes in BFM mem addr 0x00000040 and 0x00000840
# INFO: 113
# INFO: 115665 ns Passed: 0016 same bytes in BFM mem addr 0x00000040 and 0x00000840
# INFO: 118305 ns Passed: 0020 same bytes in BFM mem addr 0x00000040 and 0x00000840
# INFO: 120
# INFO: 123577 ns Passed: 0028 same bytes in BFM mem addr 0x00000040 and 0x00000840
# INFO: 126
# INFO: 128897 ns Passed: 0036 same bytes in BFM mem addr 0x00000040 and 0x00000840
# INFO: 131545 ns Passed: 0040 same bytes in BFM mem addr 0x00000040 and 0x00000840
# SUCCESS: Simulation stopped due to successful completion!
: 96005 ns Writing Descriptor header
45 ns data content of the DT header
: 96045 ns
INFO: 96045 ns ---------
NFO: 105257 ns TASK:rcmem_poll Polling RC Address0000080C current data
: 105265 ns ---------
: 105265 ns ---------
033 ns Passed: 0012 same bytes in BFM mem addr 0x00000040 and 0x00000840
937 ns Passed: 0024 same bytes in BFM mem addr 0x00000040 and 0x00000840
241 ns Passed: 0032 same bytes in BFM mem addr 0x00000040 and 0x00000840
affic_class = 0000
lling MSI Address:07F0---> Data:FADE......
Understanding Channel Placement Guidelines
Arria transceivers are organized in banks of three and six channels for 6-Gbps
operation and in banks of two channels for 10-Gbps operation. The transceiver bank
boundaries are important for clocking resources, bonding channels, and fitting. Refer
to “Channel Placement Using CMU PLL” on page 7–50, “Channel Placement for ×4
Variants” on page 7–48, and “Channel Placement for ×8 Variants” on page 7–49 for
information about channel placement.
f For more information about Arria transceivers refer to the “Transceiver Banks”
section in the Transceiver Architecture in Arria V Devices.
Arria V Hard IP for PCI ExpressDecember 2013 Altera Corporation
User Guide
Loading...
+ 258 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.