Arria 10 Avalon-ST Interface for PCIe Datasheet...................................................................................1-1
Arria 10 Features .............................................................................................................................1-2
Release Information ....................................................................................................................................1-6
Device Family Support ...............................................................................................................................1-7
Arria 10 Avalon-ST Example Designs...................................................................................................... 1-9
Debug Features ..........................................................................................................................................1-10
IP Core Verification ..................................................................................................................................1-11
System Settings ............................................................................................................................................4-1
Base Address Register (BAR) and Expansion ROM Settings ............................................................... 4-5
Base and Limit Registers for Root Ports .................................................................................................. 4-7
Interrupts for Endpoints ..........................................................................................................................6-37
Interrupts for Root Ports ......................................................................................................................... 6-38
Completion Side Band Signals ................................................................................................................6-38
Interrupts for Endpoints.............................................................................................................................9-1
Data Link Layer Errors .............................................................................................................................10-2
Data Link Layer .......................................................................................................................................11-10
Root Port Testbench .................................................................................................................................17-3
Test Driver Module ................................................................................................................................ 17-15
Root Port Design Example .................................................................................................................... 17-20
Root Port BFM ........................................................................................................................................17-22
Procedures and Functions Specific to the Chaining DMA Design Example......................17-50
Setting Up Simulation.............................................................................................................................17-57
Changing Between Serial and PIPE Simulation ..................................................................... 17-57
Using the PIPE Interface for Gen1 and Gen2 Variants .........................................................17-57
Viewing the Important PIPE Interface Signals........................................................................17-57
Disabling the Scrambler for Gen1 and Gen2 Simulations ....................................................17-57
Disabling 8B/10B Encoding and Decoding for Gen1 and Gen2 Simulations.....................17-58
Link Training .............................................................................................................................................18-2
Debugging Link Failure in L0 Due To Deassertion of tx_st_ready .......................................18-2
Use Third-Party PCIe Analyzer ..............................................................................................................18-5
Getting Started with the Arria 10 Hard IP for PCI Express with the Avalon-ST Interface
TOC-7
Revision History for the Avalon-ST Interface.........................................................................................C-1
How to Contact Altera............................................................................................................................... C-6
Altera® Arria® 10 FPGAs include a configurable, hardened protocol stack for PCI Express
compliant with PCI Express Base Specification 3.0. The Hard IP for PCI Express using the Avalon
Streaming (Avalon-ST) interface is the most flexible variant. However, this variant requires a thorough
understanding of the PCIe
®
Protocol.
Figure 1-1: Arria 10 PCIe Variant with Avalon-ST Interface
Table 1-1: PCI Express Data Throughput
The following table shows the aggregate bandwidth of a PCI Express link for Gen1, Gen2, and Gen3 for 1, 2, 4,
and 8 lanes. This table provides bandwidths for a single transmit (TX) or receive (RX) channel. The numbers
double for duplex operation. The protocol specifies 2.5 giga-transfers per second for Gen1, 5.0 giga-transfers per
second for Gen2, and 8.0 giga-transfers per second for Gen3. Gen1 and Gen2 use 8B/10B encoding which
introduces a 20% overhead. In contrast, Gen3 uses 128b/130b encoding which reduces the data throughput lost to
encoding to less than 1%.
2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
Link Width
×1×2×4×8
24816
481632
ISO
9001:2008
Registered
1-2
Arria 10 Features
UG-01145_avst
2015.05.04
Link Width
×1×2×4×8
PCI Express Gen3
(8.0 Gbps)
Refer to the AN 456: PCI Express High Performance Reference Design for more information about
calculating bandwidth for the hard IP implementation of PCI Express in many Altera FPGAs, including
the Arria 10 Hard IP for PCI Express IP core.
Devices
Related Information
• PCI Express Base Specification 3.0
• AN 456: PCI Express High Performance Reference Design
• Creating a System with Qsys
Arria 10 Features
New features in the Quartus® II 15.0 software release:
• Added Enable Altera Debug Master Endpoint (ADME) parameter to support optional Native PHY
register programming with the Altera System Console.
The Arria 10 Hard IP for PCI Express supports the following features:
• Complete protocol stack including the Transaction, Data Link, and Physical Layers implemented as
hard IP.
• Support for ×1, ×2, ×4, and ×8 configurations with Gen1, Gen2, or Gen3 lane rates for Root Ports and
Endpoints.
• Dedicated 16 KByte receive buffer.
• Optional support for Configuration via Protocol (CvP) using the PCIe link allowing the I/O and core
bitstreams to be stored separately.
• Qsys example designs demonstrating parameterization, design modules, and connectivity.
• Extended credit allocation settings to better optimize the RX buffer space based on application type.
• Support for multiple packets per cycle with the 256-bit Avalon-ST interface.
• Optional end-to-end cyclic redundancy code (ECRC) generation and checking and advanced error
reporting (AER) for high reliability applications.
• Easy to use:
7.8715.7531.5163
Altera Corporation
• Flexible configuration.
• Substantial on-chip resource savings and guaranteed timing closure.
• No license requirement.
• Example designs to get started.
Datasheet
Send Feedback
UG-01145_avst
2015.05.04
Table 1-2: Feature Comparison for all Hard IP for PCI Express IP Cores
The table compares the features of the four Hard IP for PCI Express IP Cores.
Not supportedSupportedSupportedNot supported
handle out-oforder
completions
(transparent to
the Application
Layer)
Automatically
Not supportedSupportedSupportedNot Supported
handle requests
that cross 4
KByte address
boundary
(transparent to
the Application
Layer)
Polarity
SupportedSupportedSupportedSupported
Inversion of
PIPE interface
signals
Avalon-MM DMAAvalon-ST Interface with SR-
IOV
Number of MSI
requests
1, 2, 4, 8, 16, or 321, 2, 4, 8, 16, or 321, 2, 4, 8, 16, or 321, 2, 4, 8, 16, or 32 (for
Physical Functions)
MSI-XSupportedSupportedSupportedSupported
Legacy
SupportedSupportedSupportedSupported
interrupts
Expansion
SupportedNot supportedNot supportedNot supported
ROM
Table 1-3: TLP Support Comparison for all Hard IP for PCI Express IP Cores
The table compares the TLP types that the four Hard IP for PCI Express IP Cores can transmit. Each entry
indicates whether this TLP type is supported (for transmit) by endpoints (EP), Root Ports (RP), or both (EP/RP).
Transaction Layer
Packet type (TLP)
(transmit support)
Memory Read
Avalon-ST InterfaceAvalon-MM
Interface
Avalon-MM DMAAvalon-ST Interface with SR-
EP/RPEP/RPEPEP
IOV
Request (Mrd)
Altera Corporation
Datasheet
Send Feedback
UG-01145_avst
2015.05.04
Arria 10 Features
1-5
Transaction Layer
Packet type (TLP)
(transmit support)
Memory Read
Lock Request
(MRdLk)
Memory Write
Request (MWr)
I/O Read
Request (IORd)
I/O Write
Request (IOWr)
Config Type 0
Read Request
(CfgRd0)
Config Type 0
Write Request
(CfgWr0)
Config Type 1
Read Request
(CfgRd1)
Avalon-ST InterfaceAvalon-MM
Interface
Avalon-MM DMAAvalon-ST Interface with SR-
EP/RPEPEP
EP/RPEP/RPEPEP
EP/RPEP/RPEP
EP/RPEP/RPEP
RPRPEP
RPRPEP
RPRPEP
IOV
Config Type 1
Write Request
(CfgWr1)
Message
Request (Msg)
Message
Request with
Data (MsgD)
Completion
(Cpl)
Completion
with Data
(CplD)
CompletionLocked (CplLk)
Completion
Lock with Data
(CplDLk)
RPRPEP
EP/RPEP/RPEP
EP/RPEP/RPEP
EP/RPEP/RPEPEP
EP/RPEPEP
EP/RPEP
EP/RPEP
Datasheet
Altera Corporation
Send Feedback
1-6
Release Information
UG-01145_avst
2015.05.04
Transaction Layer
Packet type (TLP)
(transmit support)
Fetch and Add
Avalon-ST InterfaceAvalon-MM
EP
AtomicOp
Request
(FetchAdd)
The Arria 10 Avalon-ST Interface for PCIe Solutions User Guide explains how to use this IP core and not
the PCI Express protocol. Although there is inevitable overlap between these two purposes, use this
document only in conjunction with an understanding of the PCI Express Base Specification.
Note: This release provides separate user guides for the different variants. The Related Information
provides links to all versions.
Related Information
• Arria 10 Avalon-MM Interface for PCIe Solutions User Guide
• Arria 10 Avalon-MM DMA Interface for PCIe Solutions User Guide
• Arria 10 Avalon-ST with SR-IOV PCIe Solutions User Guide
Release Information
Interface
Avalon-MM DMAAvalon-ST Interface with SR-
IOV
Table 1-4: Hard IP for PCI Express Release Information
ItemDescription
Version15.0
Release DateMay 2015
Ordering CodesNo ordering code is required
Product IDsThere are no encrypted files for the Arria 10 Hard
IP for PCI Express. The Product ID and Vendor ID
Vendor ID
are not required because this IP core does not
require a license.
Altera Corporation
Datasheet
Send Feedback
UG-01145_avst
2015.05.04
Device Family Support
Table 1-5: Device Family Support
Device FamilySupport
Device Family Support
1-7
Arria 10
Preliminary. The IP core is verified with prelimi‐
nary timing models for this device family. The IP
core meets all functional requirements, but might
still be undergoing timing analysis for the device
family. It can be used in production designs with
caution.
Other device familiesRefer to the Altera's PCI Express IP Solutions web
page for support information on other device
families.
Related Information
• Altera's PCI Express IP Solutions web page
Configurations
The Arria 10 Hard IP for PCI Express includes a full hard IP implementation of the PCI Express stack
including the following layers:
• Physical (PHY), including:
• Physical Media Attachment (PMA)
• Physical Coding Sublayer (PCS)
• Media Access Control (MAC)
• Data Link Layer (DL)
• Transaction Layer (TL)
Datasheet
The Hard IP supports all memory, I/O, configuration, and message transactions. It is optimized for Altera
devices. The Application Layer interface is also optimized to achieve maximum effective throughput. You
can customize the Hard IP to meet your design requirements.
Altera Corporation
Send Feedback
Altera FPGA
User Application
Logic
PCIe
Hard IP
RP
PCIe
Hard IP
EP
User Application
Logic
PCI Express Link
Altera FPGA
1-8
Configurations
Figure 1-2: PCI Express Application with a Single Root Port and Endpoint
The following figure shows a PCI Express link between two Arria 10 FPGAs.
Figure 1-3: PCI Express Application Using Configuration via Protocol
The Arria 10 design below includes the following components:
• A Root Port that connects directly to a second FPGA that includes an Endpoint.
• Two Endpoints that connect to a PCIe switch.
• A host CPU that implements CvP using the PCI Express link connects through the switch. For more
information about configuration over a PCI Express link, refer to Configuration via Protocol (CvP)
on page 15-1.
UG-01145_avst
2015.05.04
Altera Corporation
Datasheet
Send Feedback
PCIe Link
PCIe Hard IP
RP
Switch
PCIe
Hard IP
RP
User Application
Logic
PCIe Hard IP
EP
PCIe Link
PCIe Link
User Application
Logic
Altera FPGA Hard IP for PCI Express
Altera FPGA with Hard IP for PCI Express
Active Serial or
Active Quad
Device Configuration
Configuration via Protocol (CvP)
using the PCI Express Link
Serial or
Quad Flash
USB
Download
cable
PCIe
Hard IP
EP
User
Application
Logic
Altera FPGA with Hard IP for PCI Express
Config
Control
CVP
USB
Host CPU
PCIe
UG-01145_avst
2015.05.04
Arria 10 Avalon-ST Example Designs
1-9
Related Information
Configuration via Protocol (CvP)Implementation in Altera FPGAs User Guide
Arria 10 Avalon-ST Example Designs
Altera provides example designs to familiarize you with the available functionality. Each design connects
the device under test (DUT) to an application programming platform (APP), labeled APPs in the figure
below. Starting in the Quartus II 14.1 release, if you change these parameters Qsys updates the testbench
Datasheet
to match the parameters you've selected.
Send Feedback
Altera Corporation
1-10
Debug Features
Figure 1-4: Example Design Preset Parameters
UG-01145_avst
2015.05.04
You can download the Qsys example designs for the Arria 10 Hard IP for PCI Express from the
When you click the Example Design button in the Parameter Editor, you are prompted to specify the
example design location. After example design generation completes, this directory contains one or two
example designs. One is the example design from the <install_dir> that best matches the current parameter
settings. This example design provides a static DUT. The other example design is a customized example
design that matches your parameter settings exactly; starting in the Quartus II software v14.1, this feature
is available for most but not all IP core variations. If this feature is not available for your particular
parameter settings, the Parameter Editor displays a warning.
Debug Features
Debug features allow observation and control of the Hard IP for faster debugging of system-level
problems.
Related Information
Debugging on page 18-1
Altera Corporation
Datasheet
Send Feedback
UG-01145_avst
2015.05.04
IP Core Verification
To ensure compliance with the PCI Express specification, Altera performs extensive verification. The
simulation environment uses multiple testbenches that consist of industry-standard bus functional
models (BFMs) driving the PCI Express link interface. Altera performs the following tests in the
simulation environment:
• Directed and pseudorandom stimuli are 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® Compliance Checklist tests that specifically test the items in the checklist
• Random tests that test a wide range of traffic patterns
Altera provides example designs that you can leverage to test your PCBs and complete compliance base
board testing (CBB testing) at PCI-SIG, upon request.
Compatibility Testing Environment
Altera has performed significant hardware testing to ensure a reliable solution. In addition, Altera
internally tests every release with motherboards and PCI Express switches from a variety of manufac‐
turers. All PCI-SIG compliance tests are run with each IP core release.
IP Core Verification
1-11
Performance and Resource Utilization
Because the PCIe protocol stack is implemented in hardened logic, it uses no core device resources (no
ALMs and no embedded memory).
Related Information
Fitter Resources Reports
Recommended Speed Grades
Recommended speed grades are pending characterization of production Arria 10 devices.
Related Information
• Area and Timing Optimization
• Altera Software Installation and Licensing Manual
• Setting up and Running Analysis and Synthesis
Steps in Creating a Design for PCI Express
Datasheet
Before you begin
Select the PCIe variant that best meets your design requirements.
Altera Corporation
Send Feedback
1-12
Steps in Creating a Design for PCI Express
UG-01145_avst
2015.05.04
• Is your design an Endpoint or Root Port?
• What Generation do you intend to implement?
• What link width do you intend to implement?
• What bandwidth does your application require?
• Does your design require CvP?
1. Select parameters for that variant.
2. Simulate using an Altera-provided example design. All of Altera's static PCI Express example designs
are available under <install_dir>/ip/altera/altera_pcie/. Alternatively, generate an example design that
matches your parameter settings, or create a simulation model and use your own custom or thirdparty BFM. The Qsys Generate menu generates simulation models. Altera supports ModelSim®-Altera
for all IP. The PCIe cores support the Aldec RivieraPro, Cadence NCsim, Mentor Graphics ModelSim,
and Synopsys VCS and VCS-MX simulators.
3. Compile your design using the Quartus II software. If the versions of your design and the Quartus II
software you are running do not match, regenerate your PCIe design.
4. Download your design to an Altera development board or your own PCB. Click on the All Develop‐
ment Kits link below for a list of Altera's development boards.
5. Test the hardware. You can use Altera's SignalTap® II Logic Analyzer or a third-party protocol
analyzer to observe behavior.
6. Substitute your Application Layer logic for the Application Layer logic in Altera's testbench. Then
repeat Steps 3–6. In Altera's testbenches, the PCIe core is typically called the DUT (device under test).
The Application Layer logic is typically called APPS.
Related Information
• Parameter Settings on page 4-1
• Getting Started with the Arria 10 Hard IP for PCI Express on page 2-1
Root Port Driver and Monitor
altpcietb_bfm_vc_intf
www.altera.com
101 Innovation Drive, San Jose, CA 95134
Express
2015.05.04
UG-01145_avst
Subscribe
This section provides instructions to help you quickly customize, simulate, and compile the Arria 10 Hard
IP for PCI Express IP Core. When you install the Quartus II software you also install the IP Library. This
installation includes design examples for Hard IP for PCI Express under the <install_dir>/ip/altera/altera_
pcie/ directory.
After you install the Quartus II software, you can copy the design examples from the <install_dir>/ip/altera/
altera_pcie/altera_pcie_a10_ed/example_design/a10 directory. This walkthrough uses the Gen1 ×8 Endpoint,
ep_g1x8.qsys. The following figure illustrates the top-level modules of the testbench in which the DUT, a
Gen1 Endpoint, connects to a chaining DMA engine, labeled APPS in the following figure, and a Root
Port model. The simulation can use the parallel PHY Interface for PCI Express (PIPE) or serial interface.
Figure 2-1: Testbench for an Endpoint
Send Feedback
2
Note:
The Quartus II software automatically creates a simulation log file, altpcie_monitor_<dev>_dlhip_tlp_
file_log.log, in your simulation directory. Refer to Understanding Simulation Log File Generation for
details.
Altera provides example designs to help you get started with the Arria 10 Hard IP for PCI Express IP
Core. You can use example designs as a starting point for your own design. The example designs include
scripts to compile and simulate the Arria 10 Hard IP for PCI Express IP Core. This example design
provides a simple method to perform basic testing of the Application Layer logic that interfaces to the
Hard IP for PCI Express.
2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
ISO
9001:2008
Registered
2-2
Qsys Design Flow
For a detailed explanation of this example design, refer to the Testbench and Design Example chapter. If
you choose the parameters specified in this chapter, you can run all of the tests included in Testbench andDesign Example chapter.
For more information about Qsys, refer to System Design with Qsys in the Quartus II Handbook. For more
information about the Qsys GUI, refer to About Qsys in Quartus II Help.
Related Information
• Testbench and Design Example on page 17-1
• Understanding Simulation Log File Generation on page 2-4
• System Design with Qsys
• About Qsys
Qsys Design Flow
Copy the ep_g1x8.qsys design example from the <install_dir>/ip/altera/altera_pcie/altera_pcie/altera_pcie_
a10_ed/example_designs/a10 to your working directory.
The following figure illustrates this Qsys system.
Figure 2-2: Complete Gen1 ×8 Endpoint (DUT) Connected to Example Design (APPS)
UG-01145_avst
2015.05.04
Altera Corporation
Getting Started with the Arria 10 Hard IP for PCI Express
Send Feedback
UG-01145_avst
2015.05.04
The example design includes the following components:
• DUT—This is Gen1 ×8 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.
Generating the Testbench
1. On the Generate menu, select Generate Testbench System. Specify the parameters listed in the
following table.
Table 2-1: Parameters to Specify on the Generation Tab in Qsys
ParameterValue
Testbench System
Create testbench Qsys systemStandard, BFMs for standard Qsys interfaces
Create testbench simulation modelVerilog
Generating the Testbench
2-3
Allow mixed-language simulationTurn this option off
Output Directory
Clear output directories for selected generation
Turn this option off
targets
Testbench<working_dir>/ep_g1x8_tb/
2.
Click the Generate button at the bottom of the Generation tab to create the testbench.
Note:
This testbench assumes that you are running the DMA application that the example design
available in the installation directory creates. Otherwise, the testbench tests will probably fail unless
your own testbench has equivalent functionality.
Simulating the Example Design
1. Start your simulation tool. This example uses the ModelSim® software.
2. From the ModelSim transcript window, in the testbench directory, <working_dir>/ep_g1x8_tb/ep_g1x8_
tb/sim/mentor, type the following commands:
a. do msim_setup.tcl
b. ld_debug (This command compiles all design files and elaborates the top-level design without any
optimization.)
c. run -all
Getting Started with the Arria 10 Hard IP for PCI Express
Send Feedback
Altera Corporation
2-4
Generating Quartus II Synthesis Files
The simulation includes the following stages:
• Link training
• Configuration
• DMA reads and writes
• Root Port to Endpoint memory reads and writes
Disabling Scrambling to Interpret TLPs at the PIPE Interface
1. Go to <project_directory/ep_g1x8_tb/ep_g1x8_tb/altera_pcie_a10_tbed_140/sim/.
2. Open altpcietb_bfm_top_rp.v.
3. Locate the assignment for test_in[2:1]. Set test_in[2] = 1 and test_in[1] = 0. Changing
test_in[2] = 1 disables data scrambling on the PIPE interface.
4. Save altpcietb_bfm_top_rp.v.
Generating Quartus II Synthesis Files
1. On the Generate menu, select Generate HDL.
2. For Create HDL design files for synthesis, select Verilog.
You can leave the default settings for all other items.
3. Click Generate to generate files for Quartus II synthesis.
4. Click Finish when the generation completes.
UG-01145_avst
2015.05.04
Understanding the Files Generated
Table 2-2: Overview of Qsys Generation Output Files
DirectoryDescription
<testbench_dir>/<variant_name>/synthIncludes the top-level HDL file for the Hard IP for
PCI Express.
<testbench_dir>/<variant_name>/sim/<cad_vendor>
Includes the HDL source files and scripts for the
simulation testbench.
For a more detailed listing of the directories and files the Quartus II software generates, refer to FilesGenerated for Altera IP Cores in Compiling the Design in the Qsys Design Flow.
Understanding Simulation Log File Generation
Starting with the Quartus II 14.0 software release, simulation automatically creates a log file, altpcie_
monitor_<dev>_dlhip_tlp_file_log.log in your simulation directory.
Understanding Physical Placement of the PCIe IP Core
For more information about physical placement of the PCIe blocks, refer to the links below. Contact your
Altera sales representative for detailed information about channel and PLL usage.
Related Information
• Channel Placement and fPLL Usage for the Gen1 and Gen2 Data Rates on page 5-5
• Channel Placement and fPLL and ATX PLL Usage for the Gen3 Data Rate on page 5-7
Adding Virtual Pin Assignment to the Quartus II Settings File (.qsf)
To compile successfully you must add a virtual pin assignment statement for the PIPE interface to
your .qsf file. The PIPE interface is useful for debugging, but is not a top-level interface of the IP core.
1. Browse to the synthesis directory that includes the .qsf for your project, <project_dir>/ep_g1x8/
2. Open ep_g1x8.qsf.
3. Add the following assignment statement:
set_instance_assignment -name VIRTUAL_PIN ON -to hip_pipe_*
4. Save the .qsf file.
Compiling the Design in the Qsys Design Flow
To compile the Qsys design example in the Quartus II software, you must create a Quartus II project and
add your Qsys files to that project.
1. Before compiling, you can optionally turn on two parameters in the testbench. The first parameter
specifies pin assignments that match those for the Altera Development Kit board I/Os. The second
parameter enables the Compliance Base Board (CBB) logic on the development board. In the Gen1 x8
example design, complete the following steps if you want to enable these parameters:
a. Right-click the APPS component and select Edit.
b. Turn on Enable FPGA Dev kit board I/Os.
c. Turn on Enable FPGA Dev kit board CBB logic.
d. Click Finish.
e. On the Generate menu, select Generate Testbench System and then click Generate.
f. On the Generate menu, select Generate HDL and then click Generate. (You can use the same
parameters that are specified in Generating the Testbench earlier in this chapter).
2. In the Quartus II software, click the New Project Wizard icon.
3. Click Next in the New Project Wizard: Introduction (The introduction does not appear if you
previously turned it off.)
4. On the Directory, Name, Top-Level Entity page, enter the following information:
Getting Started with the Arria 10 Hard IP for PCI Express
Send Feedback
Altera Corporation
2-6
Compiling the Design in the Qsys Design Flow
a. The working directory shown is correct. You do not have to change it.
b. For the project name, click the browse button browse to the synthesis directory that includes your
Qsys project, <working_dir>/ep_g1x8/synth and click Choose. If the top-level design entity and Qsys
system names are identical, the Quartus II software treats the Qsys system as the top-level design
entity.
c. For What is the name of this project, select your variant name ep_g1x8. Then click Open. If the
top-level design entity and Qsys system names are identical, the Quartus II software treats the Qsys
system as the top-level design entity.
d. For Project Type select Empty project.
5. Click Next to display the Add Files page.
6. Complete the following steps to add the Quartus II IP File ( .qip )to the project:
a. Click the browse button. The Select File dialog box appears.
b. Browse up one level to <working_dir>/ep_g1x8/ button.
c. In the Files of type list, select IP Variation Files (*.qip *.sip).
d. Click ep_g1x8.qip and then click Open.
e. On the Add Files page, click Add.
7. Click Next to display the Device page.
8. On the Family & Device Settings page, choose the following target device family and options:
UG-01145_avst
2015.05.04
a. In the Family list, select Arria 10 (GX/SX/GT).
b. In the Devices list, select Arria 10 All.
c. In the Devices list, select All.
d. In the Available devices list, select the appropriate device. For Arria 10 ES2 development kits, select
10AX115S1F45I3SGE2.
9. Click Next to close this page and display the EDA Tool Settings page.
10.From the Simulation list, select ModelSim®. From the Format list, select the HDL 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.
14.Before compiling, you must assign I/O standards to the pins of the device. Refer to Making Pin
Assignments to Assign I/O Standard to Serial Data Pins for instructions.
15.You must connect the pin_perst reset signal to the correcsponding nPERST pin of the device. Refer to
the definition of pin_perst in the Reset, Status, and Link Training Signals section for more informa‐
tion.
16.Next, set the value of the test_in bus to a value that is compatible for hardware testing. In Qsys design
example provided, test_in is a top-level port.
a. Comment out the test_in port in the top-level Verilog generated file.
b. Add the following declaration, wire[31:0] test_in, to the same top-level Verilog file.
c. Assign hip_ctrl_test_in = 32'hA8.
d. Connect test_in to hip_ctrl_test_in.
17.To compile your design using the Quartus II software, on the Processing menu, click Start Compila‐
Altera Corporation
Refer to the definition of test_in in the Test Signals section for more information about the bits of the
test_in bus.
tion. The Quartus II software then performs all the steps necessary to compile your design.
Getting Started with the Arria 10 Hard IP for PCI Express
Send Feedback
<your_testbench>_tb.csv
<your_testbench>_tb.spd
<your_ip>.cmp - VHDL component declaration file
<your_ip>.ppf - XML I/O pin information file
<your_ip>.qip - Lists IP synthesis files
<your_ip>.sip - Contains assingments for IP simulation files
<your_ip>.v or .vhd
Top-level IP synthesis file
<your_ip>.v or .vhd
Top-level simulation file
<simulator_setup_scripts>
<your_ip>.qsys - System or IP integration file
<your_ip>_bb.v - Verilog HDL black box EDA synthesis file
<your_ip>_inst.v or .vhd - Sample instantiation template
<your_ip>_generation.rpt - IP generation report
<your_ip>.debuginfo - Contains post-generation information
<your_ip>.html - Connection and memory map data
<your_ip>.bsf - Block symbol schematic
<your_ip>.spd - Combines simulation scripts for multiple cores
Files Generated for Altera IP Cores
Figure 2-3: IP Core Generated Files
Modifying the Example Design
2-7
Related Information
• Making Pin Assignments to Assign I/O Standard to Serial Data Pins on page 14-1
• Test Signals on page 6-62
• Reset, Status, and Link Training Signals on page 6-31
• Generating the Testbench on page 2-3
• Simulating the Example Design on page 3-5
• Simulating the Example Design on page 3-5
Modifying the Example Design
Getting Started with the Arria 10 Hard IP for PCI Express
Send Feedback
To use this example design as the basis of your own design, replace the Chaining DMA Example shown in
the following figure with your own Application Layer design. Then modify the Root Port BFM driver to
generate the transactions needed to test your Application Layer.
Altera Corporation
Hard IP for PCI Express
Altera FPGA
PCB
Root
Port
BFM
perstn (npor)
Reset
APPSDUT
Chaining DMA
(User Application)
Transaction Layer
Data Link Layer
PHY MAC Layer
PHY IP Core for PCI Express
2-8
Using the IP Catalog To Generate Your Arria 10 Hard IP for PCI Express as a Separate
Component
Figure 2-4: Testbench for PCI Express
UG-01145_avst
2015.05.04
Using the IP Catalog To Generate Your Arria 10 Hard IP for PCI Express as a Separate
Component
Altera Corporation
You can also instantiate the Arria 10 Hard IP for PCI Express IP Core as a separate component for
integration into your project.
You can use the Quartus II IP Catalog and IP Parameter Editor to select, customize, and generate files
representing your custom IP variation. The IP Catalog (Tools > IP Catalog) automatically displays IP
cores available for your target device. Double-click any IP core name to launch the parameter editor and
generate files representing your IP variation.
For more information about the customizing and generating IP Cores refer to Specifying IP CoreParameters and Options in Introduction to Altera IP Cores. For more information about upgrading older
IP cores to the current release, refer to Upgrading Outdated IP Cores in Introduction to Altera IP Cores.
Related Information
• Qsys Design Flow on page 2-2
• Introduction to Altera IP Cores
• Managing Quartus II Projects
Getting Started with the Arria 10 Hard IP for PCI Express
Send Feedback
<your_testbench>_tb.csv
<your_testbench>_tb.spd
<your_ip>.cmp - VHDL component declaration file
<your_ip>.ppf - XML I/O pin information file
<your_ip>.qip - Lists IP synthesis files
<your_ip>.sip - Contains assingments for IP simulation files
<your_ip>.v or .vhd
Top-level IP synthesis file
<your_ip>.v or .vhd
Top-level simulation file
<simulator_setup_scripts>
<your_ip>.qsys - System or IP integration file
<your_ip>_bb.v - Verilog HDL black box EDA synthesis file
<your_ip>_inst.v or .vhd - Sample instantiation template
<your_ip>_generation.rpt - IP generation report
<your_ip>.debuginfo - Contains post-generation information
<your_ip>.html - Connection and memory map data
<your_ip>.bsf - Block symbol schematic
<your_ip>.spd - Combines simulation scripts for multiple cores
The Quartus II software generates the following IP core output file structure:
Figure 2-5: IP Core Generated Files
Files Generated for Altera IP Cores
2-9
Table 2-4: IP Core Generated Files
File NameDescription
<my_ip>.qsys
Getting Started with the Arria 10 Hard IP for PCI Express
Send Feedback
The Qsys system or top-level IP variation file. <my_ip> is the name
that you give your IP variation.
Altera Corporation
2-10
Files Generated for Altera IP Cores
File NameDescription
<system>.sopcinfoDescribes the connections and IP component parameterizations in
your Qsys system. You can parse its contents to get requirements
when you develop software drivers for IP components.
Downstream tools such as the Nios II tool chain use this file.
The .sopcinfo file and the system.h file generated for the Nios II tool
chain include address map information for each slave relative to each
master that accesses the slave. Different masters may have a different
address map to access a particular slave component.
<my_ip>.cmpThe VHDL Component Declaration (.cmp) file is a text file that
contains local generic and port definitions that you can use in VHDL
design files.
UG-01145_avst
2015.05.04
<my_ip>.html
A report that contains connection information, a memory map
showing the address of each slave with respect to each master to
which it is connected, and parameter assignments.
<my_ip>_generation.rptIP or Qsys generation log file. A summary of the messages during IP
generation.
<my_ip>.debuginfoContains post-generation information. Used to pass System Console
and Bus Analyzer Toolkit information about the Qsys interconnect.
The Bus Analysis Toolkit uses this file to identify debug components
in the Qsys interconnect.
<my_ip>.qip
Contains all the required information about the IP component to
integrate and compile the IP component in the Quartus II software.
<my_ip>.csvContains information about the upgrade status of the IP component.
<my_ip>.bsfA Block Symbol File (.bsf) representation of the IP variation for use
in Quartus II Block Diagram Files (.bdf).
<my_ip>.spd
Required input file for ip-make-simscript to generate simulation
scripts for supported simulators. The .spd file contains a list of files
generated for simulation, along with information about memories
that you can initialize.
<my_ip>.ppfThe Pin Planner File (.ppf) stores the port and node assignments for
<my_ip>_bb.vYou can use the Verilog black-box (_bb.v) file as an empty module
<my_ip>.sipContains information required for NativeLink simulation of IP
<my_ip>_inst.v or _inst.vhdHDL example instantiation template. You can copy and paste the
Altera Corporation
IP components created for use with the Pin Planner.
declaration for use as a black box.
components. You must add the .sip file to your Quartus project.
contents of this file into your HDL file to instantiate the IP variation.
Getting Started with the Arria 10 Hard IP for PCI Express
Send Feedback
UG-01145_avst
2015.05.04
<my_ip>.regmapIf the IP contains register information, the .regmap file generates.
Files Generated for Altera IP Cores
File NameDescription
The .regmap file describes the register map information of master
and slave interfaces. This file complements the .sopcinfo file by
providing more detailed register information about the system. This
enables register display views and user customizable statistics in
System Console.
2-11
<my_ip>.svd
<my_ip>.v
or
<my_ip>.vhd
mentor/
aldec/
/synopsys/vcs
/synopsys/vcsmx
Allows HPS System Debug tools to view the register maps of
peripherals connected to HPS within a Qsys system.
During synthesis, the .svd files for slave interfaces visible to System
Console masters are stored in the .sof file in the debug section.
System Console reads this section, which Qsys can query for register
map information. For system slaves, Qsys can access the registers by
name.
HDL files that instantiate each submodule or child IP core for
synthesis or simulation.
Contains a ModelSim® script msim_setup.tcl to set up and run a
simulation.
Contains a Riviera-PRO script rivierapro_setup.tcl to setup and run a
simulation.
Contains a shell script vcs_setup.sh to set up and run a VCS
®
simulation.
Contains a shell script vcsmx_setup.sh and synopsys_ sim.setup file to
set up and run a VCS MX® simulation.
/cadence
Contains a shell script ncsim_setup.sh and other setup files to set up
and run an NCSIM simulation.
/submodulesContains HDL files for the IP core submodule.
<child IP cores>/For each generated child IP core directory, Qsys generates /synth and /
sim sub-directories.
Getting Started with the Arria 10 Hard IP for PCI Express
Send Feedback
Altera Corporation
Getting Started with the Configuration Space
www.altera.com
101 Innovation Drive, San Jose, CA 95134
Bypass Mode Qsys Example Design
2014.08.18
UG-01145_avst
Subscribe
This Qsys design example demonstrates Configuration Space Bypass mode for the Arria 10 Hard IP for
PCI Express IP Core. A Root Port BFM provides stimulus to the Endpoint design. The Endpoint bypasses
the standard Configuration Space to access the custom Configuration Space and memory of two
functions. The Configuration Space Bypass Example Design performs the following functions:
• Accepts Configuration, Memory, and Message TLPs on the Arria 10 Hard IP for PCI Express RX
Avalon-ST interface
• Translates Type 0 Configuration Read and Configuration Write Requests to Avalon-MM read and
write requests that target the Configuration Space of either Function 0 or Function 1.
• Responds to invalid Type 0 Configuration Requests with an Unsupported Request (UR) status in a
Completion Message.
• Converts single dword Memory Read and Memory Write Requests to access 32-bit registers of the
target function using the Avalon-MM interface.
• Maps two contiguous MBytes of memory for the two functions with the first MByte for Function 0 and
the second MByte for Function 1.
• Sets up two registers for each function.
• Drops the following invalid Write Requests:
Send Feedback
3
• Memory Write Requests with a payload of more than one dword
• Messages with data
• Returns Completer Abort (CA) status in Completion message for invalid Memory Read Requests such
as Memory Read Requests with a payload greater than one dword.
• Returns a Completion Status of Successful Completion for valid Configuration Requests to Function 0
and Function 1.
The following figure illustrates, the components of the Configuration Space Bypass Mode Qsys Example
Design. The example design includes the following components:
• DUT: The Arria 10 Hard IP for PCI Express. The example turns on the Enable Configuration SpaceBypass parameter.
• APPS: The Configuration Space Bypass application demonstrates Configuration Space Bypass mode.
• pcie_reconfig_driver_0: The PCIe Reconfig Driver drives the Transceiver Reconfiguration Controller.
This driver is a plain text Verilog HDL file that you can modify if necessary to meet your system
requirements.
2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
ISO
9001:2008
Registered
to PCIe Root Port
and Host System
Configuration
Bypass Top
(cfbp_top)
APPS: Config Bypass Example
Root Port
(cfbp_app_example)
DUT: Hard IP for PCIe
Using Configuration Bypass
Mode Endpoint
Function 0
Function 1
2 MByte Memory
Reset
(rs_hip)
Configuration Space
Configuration Space
Local Management
Interface (LMI)
Function 0 Registers
Function 1 Registers
pcie_reconfig_driver_0
3-2
Copying the Configuration Space Bypass Mode Example Design
Figure 3-1: Configuration Bypass Mode Qsys Example Design
UG-01145_avst
2014.08.18
Copying the Configuration Space Bypass Mode Example Design
Follow these steps to copy the Configuration Space Bypass Mode Qsys Example Design to your working
directory:
1. Copy the example design, pcie_cfbp_g2x8_ast256.qsys, from the installation directory <install_dir>/ip/
altera/altera_pcie/altera_pcie_a10_ed/example_design/a10 to your working directory.
2. Copy the Qsys wrapper file for the Configuration Space Bypass application logic, altera_pcie_cfgbp_ed_
hw.tcl, from the installation directory <install_dir>/ip/altera/altera_pcie/altera_pcie_a10_ed/example_design/
a10 to your working directory.
3. Rename the pcie_cfbp_g2x8_ast256.qsys top.qys. Renaming is necessary because the testbench defines
4. Start Qsys by typing qsys-edit and open top.qsys when prompted by Qsys.
The following figure shows the complete system.
top.v as the top-level wrapper. Qsys creates top.v from top.qsys when you generate the system.
Altera Corporation
Getting Started with the Configuration Space Bypass Mode Qsys Example Design
Send Feedback
UG-01145_avst
2014.08.18
Figure 3-2: Configuration Bypass Qsys System
Generating the Qsys System
3-3
1. Note the following parameter settings for the Configuration Space Bypass Example Design:
• For the DUT, the Enable Configuration Bypass parameter is turned on under the System Settings
banner.
• The Base Address Registers specify BAR0 as 1 MByte - 20 bits of 64-bit prefetchable memory for
each function. In Configuration Space Bypass Mode, the BAR registers inside the Hard IP for PCI
Express are not used. The Application Layer implements the Configuration Space for each function.
• For testbench compatibility, the Config-Bypass App Example, labeled APPs, must retain a Device ID
of 0xE001 (5734510) and a Vendor ID of 0x1172 (446610).
Generating the Qsys System
On the Qsys Generate menu, select Generate Testbench System. Specify the parameters listed in the
following table.
Getting Started with the Configuration Space Bypass Mode Qsys Example Design
Send Feedback
Altera Corporation
3-4
Generating Quartus II Synthesis Files
Table 3-1: Parameters to Specify on the Generation Tab in Qsys
ParameterValue
Create testbench Qsys systemStandard, BFMs for standard Avalon interfaces
Create simulation modelVerilog
Allow mixed-language simulationTurn this option off
Output Directory
Path<working_dir>/top
Testbench<working_dir>/top/testbench
1. Click Generate to generate the simulation and testbench files.
2. On the File menu, click Save.
UG-01145_avst
2014.08.18
Generating Quartus II Synthesis Files
1. On the Generate menu, select Generate HDL.
2. For Create HDL design files for synthesis, select Verilog.
You can leave the default settings for all other items.
3. Click Generate to generate files for Quartus II synthesis.
4. Click Finish when the generation completes.
Understanding the Generated Files
Table 3-2: Qsys Generation Output Files
DirectoryDescription
<testbench_dir>/<variant_name>/synthesisIncludes the top-level HDL file for the Hard IP 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. These files are used for Quartus II synthesis.
Follow these steps to simulate the Qsys system using ModelSim:
1. In a terminal window, change to the <working_dir>/top/testbench/mentordirectory.
2. Start the ModelSim simulator by typing vsim.
3. To compile the simulation, type the following commands in the terminal window:
• source msim_setup.tcl (The msim_setup.tcl file defines aliases.
• ld_debug (The ld_debug command argument stops optimizations, improving visibility in the
ModelSim waveforms. )
The following figure shows the design hierarchy for the Configuration Space Bypass Example Design after
compilation.
TLP Header
Figure 3-3: Design Hierarchy for the Configuration Space Bypass Example Design for 256-Bit Avalon-ST
Interface
Getting Started with the Configuration Space Bypass Mode Qsys Example Design
Send Feedback
Altera Corporation
3-6
Timing for Configuration Read to Function 0 for the 256-Bit Avalon-ST Interface
UG-01145_avst
1. To observe the simulation, on the ModelSim View menu, select wave. Then add some key interfaces to
the wave window. The following four interfaces under the /top_tb/top_inst/apps/altpcierd_cfbp_top/
cfgbp_app_ctrl/genblk1 illustrate the TX and RX interfaces, the current state, and configuration.
• *RxSt*
• *TxSt*
• *Rxm*
• *_state*
• cfg_*
2. To run the simulation, type the following command: run -all
Note: By default, the simulation is serial, to simulate using the parallel PIPE interface, you can change the
default value of the serial_sim_hwtcl parameter from 1 to 0 in altera_pcie_cfgbp_ed/top/testbench/
top_tb/simulation/top_tb.v. After changing that value, you must recompile the simulation to pick up
the new value of the serial_sim_hwtcl parameter before running the simulation.
Timing for Configuration Read to Function 0 for the 256-Bit Avalon-ST Interface
The following timing diagram illustrates a Configuration Read to Function 0 starting at time 60568 ns in
the simulation.
2014.08.18
Altera Corporation
Getting Started with the Configuration Space Bypass Mode Qsys Example Design
Send Feedback
RxStMask_o
RxStSop_i
RxStEop_i
RxStValid_i
RxStReady_o
RxStData_i[255:0]
cfg_addr_o[31:0]
cfg_rden_o
cfg_wren_o
cfg_be_o[3:0
cfg_rddatavalid_
cfg_rddata_i[31:0]
cfg_readresponse_i[2:0]
TxStReady_i
TxStSop_o
TxStEop_o
TxStValid_o
TxStEmpty_o[1:0]
TxStData_o[255:0]
rx_state[10:0]
rxcfg_state[4:0]
tx_state[1:0]
1
’b0000000000000000000.
000003005021009000
E0011172
...E00111720000000000000044A000001
0108000001120004
05
3
1
2
3
4
UG-01145_avst
2014.08.18
Figure 3-4: Configuration Read to Function 0
Timing for Configuration Read to Function 0 for the 256-Bit Avalon-ST Interface
3-7
Getting Started with the Configuration Space Bypass Mode Qsys Example Design
Altera Corporation
Send Feedback
3-8
Timing for Configuration Write to Function 0 for the 256-Bit Avalon-ST Interface
UG-01145_avst
The preceding timing diagram illustrates the following sequence of events:
1. The Application Layer indicates it is ready to receive requests by asserting RxSTReady_o. The RX
Avalon-ST interface initiates a Configuration Read, asserting its RxStSop_i and RxStValid_i signals.
2. At the falling edge of RxStSop_i, the Avalon-MM master interface asserts cfg_rden_o and specifies
the address on cfg_addr_o[31:0].
3. The Function 0 Avalon-MM slave interface asserts cfg_rddavalid_i and drives the data on
cfg_rddata_i[31:0].
4. On the falling edge of cfg_rddavalid_i, the TX interface asserts TxStSop_o and TxStValid_o and
drives the data of TxStData_o[255:0]. This is the Completion Request to the host corresponding to
its Configuration Read Request.
Timing for Configuration Write to Function 0 for the 256-Bit Avalon-ST Interface
The following timing diagram illustrates a configuration write to Function 0 starting at time 61859 ns in
the simulation.
The timing diagram illustrates the following sequence of events:
1. The Application Layer indicates it is ready to receive requests by asserting RxSTReady_o. The RX
Avalon-ST interface initiates a Configuration Write, asserting its RxStSop_i and RxStValid_i
signals.
2. At the falling edge of RxStSop_i, the Avalon-MM master interface asserts cfg_wren_o and specifies
the data on cfg_wrdata_o[31:0]. The Master interface also assert cfg_writeresponserequest_o, to
request completion status from Function 0.
3. On the falling edge of cfg_writeresponserequest_o, Function 0 asserts cfg_writeresponse-
valid_i.
4. On the falling edge of cfg_writeresponsevalid_i, the TX interface asserts TxStSop_o and
TxStValid_o and drives the completion data on TxStData_o[255:0].
2014.08.18
Altera Corporation
Getting Started with the Configuration Space Bypass Mode Qsys Example Design
Timing for Memory Write and Read of Function 1 256-Bit Avalon-ST Interface
3-9
Timing for Memory Write and Read of Function 1 256-Bit Avalon-ST Interface
The following timing diagram illustrates memory to Function 1 which occurs in the simulation starting at
time 99102 ns.
Getting Started with the Configuration Space Bypass Mode Qsys Example Design
Altera Corporation
Send Feedback
RxStMask_o
RxStSop_i
RxStEop_i
RxStValid_i
RxStReady_o
TxStReady_i
TxStSop_o
TxStEop_o
TxStValid_ o
rx_state[10:0]
rxavl_state[3:0]
rxcfg_state[4:0]
tx_state[1:0]
RxmAddress_0_o[19:0]
RxmFunc1Sel _o
RxmWrite_0_o
RxmWriteData_0_o[31:0]
RxmWaitRequest_0
RxmRead_0_ o
RxmReadDataValid_0_
RxmReadData_0_i[31:0]
000003
9003000000
00502104100000300502104100
3905
3
BABEFACE
BABEFACE
1 3
4
5 6
2
3-10
Timing for Memory Write and Read of Function 1 256-Bit Avalon-ST Interface
Figure 3-6: Timing for Memory Write and Read of Function 1
UG-01145_avst
2014.08.18
Altera Corporation
Getting Started with the Configuration Space Bypass Mode Qsys Example Design
Send Feedback
UG-01145_avst
2014.08.18
Partial Transcript for Configuration Space Bypass Simulation
The timing diagram illustrates the following sequence of events:
1. The Application Layer indicates it is ready to receive requests by asserting RxSTReady_o. The RX
Avalon-ST interface initiates a Memory Write to Function 1, asserting its RxStSop_i and
RxStValid_i signals.
2. At the falling edge of RxStSop_i, RxmFunc1Sel_o is asserted and the write data is driven on RxmWrite-
Data_0_o[31:0]. The Memory Write to Function 1 completes when the data is written.
3. The Application Layer indicates it is ready to receive requests by asserting RxSTReady_o. The RX
Avalon-ST interface initiates a Memory Read to Function 1, asserting its RxStSop_i and RxStValid_i
signals.
4. After the falling edge of RxStSop_i, the RX Avalon-MM master interface asserts RxmRead_0_o to
Function 1.
5. At the falling edge of RxmRead_0_o, Function 1 asserts RxmReadDataValid_0 and drives the data on
RxmReadData_0_i[ 31:0].
6. The host receives the completion data when TxStValid_o, TxStSop_o, and TxStEop_o are asserted.
Partial Transcript for Configuration Space Bypass Simulation
The driver performs the following transactions with status of the transactions displayed in the ModelSim
simulation message window:
3-11
• Various configuration reads and writes to the Avalon-MM Arria 10 Hard IP for PCI Express in your
system after the link is initialized
• Register writes, reads and compares to both functions
• Burst memory writes, reads, and compares to both functions
The following example shows the transcript from a successful simulation run.
Example 3-1: Transcript from ModelSim Simulation of Gen1 x4 Endpoint
# INFO: 464 ns Completed initial configuration of Root Port.
# 495000: INFO: top_tb.top_inst_reset_bfm.reset_deassert: Reset deasserted
# INFO: 3657 ns RP LTSSM State: DETECT.ACTIVE
# INFO: 4425 ns RP LTSSM State: POLLING.ACTIVE
# INFO: 17257 ns RP LTSSM State: DETECT.QUIET
# INFO: 20473 ns RP LTSSM State: DETECT.ACTIVE
# INFO: 21193 ns RP LTSSM State: POLLING.ACTIVE
# INFO: 29909 ns EP LTSSM State: DETECT.ACTIVE
# INFO: 30949 ns EP LTSSM State: POLLING.ACTIVE
# INFO: 33957 ns EP LTSSM State: POLLING.CONFIG
# INFO: 34025 ns RP LTSSM State: DETECT.QUIET
# INFO: 37241 ns RP LTSSM State: DETECT.ACTIVE
# INFO: 37961 ns RP LTSSM State: POLLING.ACTIVE
# INFO: 39945 ns RP LTSSM State: POLLING.CONFIG
# INFO: 41033 ns RP LTSSM State: CONFIG.LINKWIDTH.START
# INFO: 41445 ns EP LTSSM State: CONFIG.LINKWIDTH.START
# INFO: 41765 ns EP LTSSM State: CONFIG.LINKWIDTH.ACCEPT
# INFO: 42057 ns RP LTSSM State: CONFIG.LINKWIDTH.ACCEPT
# INFO: 42249 ns RP LTSSM State: CONFIG.LANENUM.WAIT
# INFO: 42789 ns EP LTSSM State: CONFIG.LANENUM.WAIT
# INFO: 43033 ns RP LTSSM State: CONFIG.LANENUM.ACCEPT
# INFO: 43109 ns EP LTSSM State: CONFIG.LANENUM.ACCEPT
# INFO: 43225 ns RP LTSSM State: CONFIG.COMPLETE
# INFO: 43685 ns EP LTSSM State: CONFIG.COMPLETE
# INFO: 44953 ns RP LTSSM State:CONFIG.IDLE
# INFO: 47941 ns EP LTSSM State: CONFIG.IDLE
Getting Started with the Configuration Space Bypass Mode Qsys Example Design
Send Feedback
Altera Corporation
3-12
Partial Transcript for Configuration Space Bypass Simulation
# INFO: 48089 ns RP LTSSM State: L0
# INFO: 48133 ns EP LTSSM State: L0
# INFO: 48226 ns Configuring Bus 000, Device 000, Function 00
# INFO: 48226 ns RP Read Only Configuration Registers:
# INFO: 48226 ns Vendor ID: 1556
# INFO: 48226 ns Device ID: 5555
# INFO: 48226 ns Revision ID: 00
# INFO: 48226 ns Class Code: 040000
# INFO: 48706 ns ECRC Check Capable: Supported
# INFO: 48706 ns ECRC Generation Capable: Supported
# INFO: 48738 ns RP PCI Express Slot Capability
# INFO: 48738 ns Power Controller: Not Present
# INFO: 48738 ns MRL Sensor: Not Present
# INFO: 48738 ns Attention Indicator: Not Present
# INFO: 48738 ns Power Indicator: Not Present
# INFO: 48738 ns Hot-Plug Surprise: Not Supported
# INFO: 48738 ns Hot-Plug Capable: Not Supported
# INFO: 48738 ns Slot Power Limit Value: 0
# INFO: 48738 ns Slot Power Limit Scale: 0
# INFO: 48738 ns Physical Slot Number: 0
# INFO: 48738 ns Activity_toggle flag is set
# INFO: 48802 ns RP PCI Express Link Status Register (0081):
# INFO: 48802 ns RP PCI Express Max Link Speed (0002):
# INFO: 48802 ns RP PCI Express Current Link Speed (0001):
# INFO: 48802 ns Negotiated Link Width: x8
# INFO: 48802 ns Slot Clock Config: Local Clock Used
# INFO: 48834 ns Current Link Speed: 2.5GT/s
# INFO: 48889 ns RP LTSSM State: RECOVERY.RCVRLOCK
# INFO: 49669 ns EP LTSSM State: RECOVERY.RCVRLOCK
# INFO: 50501 ns EP LTSSM State: RECOVERY.RCVRCFG
# INFO: 51209 ns RP LTSSM State: RECOVERY.RCVRCFG
# INFO: 48889 ns RP LTSSM State: RECOVERY.RCVRLOCK
# INFO: 53669 ns EP LTSSM State: RECOVERY.SPEED
# INFO: 54721 ns RP LTSSM State: RECOVERY.RCVRLOCK
# INFO: 54746 ns Wait for Link to enter L0 after negotiated to
# the expected speed of EP Target Link Speed 0002):
# INFO: 53337 ns RP LTSSM State: RECOVERY.SPEED
# INFO: 55235 ns EP LTSSM State: RECOVERY.RCVRLOCK
# INFO: 56299 ns EP LTSSM State: RECOVERY.RCVRCFG
# INFO: 57163 ns RP LTSSM State: RECOVERY.RCVRCFG
# INFO: 57707 ns RP LTSSM State: RECOVERY.IDLE
# INFO: 57979 ns EP LTSSM State: RECOVERY.IDLE
# INFO: 58035 ns RP LTSSM State: L0
# INFO: 58075 ns EP LTSSM State: L0
# INFO: 58090 ns New Link Speed: 5.0GT/s
# INFO: 58106 ns RP PCI Express Link Control Register (0000):
# INFO: 58106 ns Common Clock Config: Local Clock
# INFO: 70602 ns Completed configuration of Endpoint BARs.
# INFO: 70602 ns TASK:my_test Setup
# INFO: 70602 ns TASK:my_test Write to 32bit register at
# addr = 0x0 with wdata=0xBABEFACE
# INFO: 70610 ns TASK:my_test Read from 32bit register at
# addr 0x00000000
# INFO: 71298 ns TASK:my_test Register compare matches!
# INFO: 71298 ns TASK:my_test Write to 32bit register at
# 0x00000004 Actual 0x12345678
# INFO: 71306 ns TASK:my_test => 1.22 Read from 32bit register
# at addr = 0x00000004
# INFO: 71994 ns TASK:my_test => 1.23 Register compare matches!
# INFO 71994 ns TASK:my_test => 2.11 Fill write memory with
# QWORD_INC pattern
# INFO: 71994 ns TASK:my_test Memory write burst at addr=0x00
# with wdata=0x10203040
# INFO: 72002 ns TASK:my_test => 2.21 Memory Read burst
# INFO: 72690 ns TASK:my_test Memory write burst at addr=0x04
# with wdata=0x10203040
# INFO: 72698 ns TASK:my_test Memory Read burst
UG-01145_avst
2014.08.18
Altera Corporation
Getting Started with the Configuration Space Bypass Mode Qsys Example Design
Send Feedback
UG-01145_avst
2014.08.18
Partial Transcript for Configuration Space Bypass Simulation
# INFO: 73354 ns TASK:my_test Memory write burst at addr=0x08
# with wdata=0x10203040
# INFO: 73362 ns TASK:my_test => 2.21 Memory Read burst
# INFO: 74178 ns TASK:my_test Memory write burst at addr=0x0C
# with wdata=0x10203040
# INFO: 88154 ns Enumerate EP function = 0x01
# INFO: 88154 ns cfgbp_enum_config_space Setup config space
# for func = 00000001
# INFO: 88154 ns Config Read # INFO: 88946 ns CfgRD at
# addr =0x00000000 returns data = 0xE0011172
# INFO: 88946 ns Set Bus_Master and Memory_Space_Enable
# bit in Command register00000001
# INFO: 88946 ns Read Modified WRite to config register
# = 0x00000004 in func = 0x00000001
# INFO: 115370 ns TASK:my_test; 2.21 Memory Read burst
# SUCCESS: Simulation stopped due to successful completion!
# Break in Function ebfm_log_stop_sim at
# /..//top_tb/simulation/submodules//altpcietb_bfm_log.v line 78
# INFO: 88946 ns Set Bus_Master and Memory_Space_Enable bit
# in Command register00000001
# INFO: 88946 ns Read Modified WRite to config register =
# 0x00000004 in func = 0x00000001
# INFO: 88946 ns Set Bus_Master and Memory_Space_Enable bit
# in Command register00000001
# INFO: 88946 ns Read config reg
# INFO: 89738 ns Original config read data = 00000000
# INFO: 89738 ns Config write with data = 00000006
# INFO: 91338 ns After cfg_rd_modified_wr, config_data
# = 0x00000006
# INFO: 92938 ns CfgRD at BAR0 (addr =0x00000010) returns
# data = 0xFFF0000C
# INFO: 94530 ns CfgRD at addr =0x00000010 returns data
# = 0x8000000C
# INFO: 97658 ns BAR Address Assignments:
# INFO: 97658 ns BAR Size Assigned Address Type
# INFO: 97658 ns BAR1:0 1 MBytes 00000001 00000000 Prefetchable
# INFO: 97658 ns BAR2 Disabled
# INFO: 97658 ns BAR3 Disabled
# INFO: 97658 ns BAR4 Disabled
# INFO: 97658 ns BAR5 Disabled
# INFO: 97658 ns ExpROM Disabled
# INFO: 98794 ns Completed configuration of Endpoint BARs.
# INFO: 98794 ns TASK:my_test Setup
# INFO: 98794 ns TASK:my_test Write to 32bit register at 0x000000
# with wdata=0xBABEFACE
# INFO: 98802 ns TASK:my_test 1.12 Read from 32bit register
# at addr = 0x00000000
# INFO: 9490 ns TASK:my_test 1.13 Register compare matches!
# INFO: 115370 ns TASK:my_test 2.21 Memory Read burst
# SUCCESS: Simulation stopped due to successful completion!
# Break in Function ebfm_log_stop_sim at
# ./..//top_tb/simulation/submodules//altpcietb_bfm_log.v
# line 78
3-13
Getting Started with the Configuration Space Bypass Mode Qsys Example Design
Send Feedback
Altera Corporation
2014.08.18
www.altera.com
101 Innovation Drive, San Jose, CA 95134
Parameter Settings
4
UG-01145_avst
Subscribe
Send Feedback
System Settings
Table 4-1: System Settings for PCI Express
ParameterValueDescription
Number of
Lanes
Lane RateGen1 (2.5 Gbps)
Port typeNative Endpoint
×1, ×2, ×4, ×8Specifies the maximum number of lanes supported.
Specifies the maximum data rate at which the link can operate.
Gen2 (2.5/5.0
Gbps)
Gen3 (2.5/5.0/8.0
Gbps)
Specifies the port type. Altera recommends Native Endpoint for all
Root Port
Legacy Endpoint
new Endpoint designs.
The Endpoint stores parameters in the Type 0 Configuration Space.
The Root Port stores parameters in the Type 1 Configuration
Space.
2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
Avalon-ST
Avalon-MM
Avalon-MM with
DMA
Avalon-ST with
SR-IOV
Minimum
Low
Balanced
Selects the interface to the Applciation Layer.
Determines the allocation of posted header credits, posted data
credits, non-posted header credits, completion header credits, and
completion data credits in the 16 KByte RX buffer. The 5 settings
ISO
9001:2008
Registered
4-2
System Settings
ParameterValueDescription
UG-01145_avst
2014.08.18
performance
for received
requests
High
Maximum
allow you to adjust the credit allocation to optimize your system.
The credit allocation for the selected setting displays in the message
pane.
Refer to the Throughput Optimization chapter for more informa‐
tion about optimizing performance. The Throughput Optimization
chapter explains how the RX credit allocation and the Maximum
payload RX Buffer credit allocation and the Maximum payload
size that you choose affect the allocation of flow control credits.
You can set the Maximum payload size parameter on the Device
tab.
The Message window dynamically updates the number of credits
for Posted, Non-Posted Headers and Data, and Completion
Headers and Data as you change this selection.
Altera Corporation
Parameter Settings
Send Feedback
UG-01145_avst
2014.08.18
ParameterValueDescription
• Minimum—configures the minimum PCIe specification
allowed for non-posted and posted request credits, leaving most
of the RX Buffer space for received completion header and data.
Select this option for variations where application logic
generates many read requests and only infrequently receives
single requests from the PCIe link.
• Low—configures a slightly larger amount of RX Buffer space for
non-posted and posted request credits, but still dedicates most
of the space for received completion header and data. Select this
option for variations where application logic generates many
read requests and infrequently receives small bursts of requests
from the PCIe link. This option is recommended for typical
endpoint applications where most of the PCIe traffic is
generated by a DMA engine that is located in the endpoint
application layer logic.
• Balanced—configures approximately half the RX Buffer space
to received requests and the other half of the RX Buffer space to
received completions. Select this option for variations where the
received requests and received completions are roughly equal.
• High—configures most of the RX Buffer space for received
requests and allocates a slightly larger than minimum amount of
space for received completions. Select this option where most of
the PCIe requests are generated by the other end of the PCIe
link and the local application layer logic only infrequently
generates a small burst of read requests. This option is
recommended for typical root port applications where most of
the PCIe traffic is generated by DMA engines located in the
endpoints.
• Maximum—configures the minimum PCIe specification
allowed amount of completion space, leaving most of the RX
Buffer space for received requests. Select this option when most
of the PCIe requests are generated by the other end of the PCIe
link and the local application layer logic never or only
infrequently generates single read requests. This option is
recommended for control and status endpoint applications that
don't generate any PCIe requests of their own and only are the
target of write and read requests from the root complex.
System Settings
4-3
Use 62.5 MHz
application
clock
Parameter Settings
Send Feedback
On/OffThis mode is only available only for Gen1 ×1.
Altera Corporation
4-4
System Settings
ParameterValueDescription
UG-01145_avst
2014.08.18
Enable byte
parity ports on
Avalon-ST
interface
Enable
multiple
packets per
cycle
Enable
configuration
via Protocol
(CvP)
On/OffWhen On, the RX and TX datapaths are parity protected. Parity is
odd.
This parameter is only available for the Avalon-ST Arria 10 Hard
IP for PCI Express.
On/OffWhen On, the 256-bit Avalon-ST interface supports the transmis‐
sion of TLPs starting at any 128-bit address boundary, allowing
support for multiple packets in a single cycle. To support multiple
packets per cycle, the Avalon-ST interface includes 2 start of packet
and end of packet signals for the 256-bit Avalon-ST interfaces. This
feature is only supported for Gen3 ×8.
For more information refer to Tradeoffs to Consider when
Enabling Multiple Packets per Cycle on page 6-15 and Multiple
Packets per Cycle on the Avalon-ST TX 256-Bit Interface on page
6-30.
On/OffWhen On, the Quartus II software places the Endpoint in the
location required for configuration via protocol (CvP). For more
information about CvP, click the Configuration via Protocol (CvP)
link below.
Enable credit
consumed
selection port
Enable
Configuration
bypass
(CfgBP)
Enable
dynamic
reconfigura‐
tion of PCIe
read-only
registers
Enable local
management
interface
(LMI)
On/OffWhen you turn on this option, the core includes the tx_cons_
cred_sel port. This parameter does not apply to the Avalon-MM
interface.
On/OffWhen On, the Arria 10 Hard IP for PCI Express bypasses the
Transaction Layer Configuration Space registers included as part of
the Hard IP, allowing you to substitute a custom Configuration
Space implemented in soft logic.
This parameter is not available for the Avalon-MM IP Cores.
On/OffWhen On, you can use the Hard IP reconfiguration bus to
dynamically reconfigure Hard IP read-only registers. For more
information refer to Hard IP Reconfiguration Interface.
On/Off
When On, your variant includes the optional LMI interface. This
interface is used to log error descriptor information in the TLP
header log registers. The LMI interface provides the same access to
Configuration Space registers as Configuration TLP requests.
Altera Corporation
Parameter Settings
Send Feedback
UG-01145_avst
2014.08.18
Base Address Register (BAR) and Expansion ROM Settings
ParameterValueDescription
4-5
Enable Altera
Debug Master
On/Off
When On, you can use the Altera System Console to read and write
the embedded Arria 10 Native PHY registers.
Endpoint
(ADME)
Table 4-2: Interface System Settings
ParameterValueDescription
Application
Interface
64-bit
Specifies the data width for the Application Layer to Transac‐
tion Layer interface.
128-bit
Refer to Application Layer Clock Frequency for All Combina‐
256-bit
tions of Link Width, Data Rate and Application Layer Interface
Widths for all legal combinations of data width, number of
lanes, Application Layer clock frequency, and data rate.
Related Information
• Throughput Optimization on page 13-1
• Configuration via Protocol (CvP) on page 15-1
• PCI Express Base Specification 3.0
• Arria 10 Transceiver PHY User Guide
Provides information about the ADME feature for Arria 10 devices.
Base Address Register (BAR) and Expansion ROM Settings
The type and size of BARs available depend on port type.
Parameter Settings
Send Feedback
Altera Corporation
4-6
Base Address Register (BAR) and Expansion ROM Settings
If you select 64-bit prefetchable memory, 2
contiguous BARs are combined to form a 64-bit
prefetchable BAR; you must set the higher numbered
BAR to Disabled. A non-prefetchable 64-bit BAR is
not supported because in a typical system, the Root
Port Type 1 Configuration Space sets the maximum
non-prefetchable memory window to 32 bits. The
BARs can also be configured as separate 32-bit
memories.
Defining memory as prefetchable allows contiguous
data to be fetched ahead. Prefetching memory is
advantageous when the requestor may require more
data from the same region than was originally
requested. If you specify that a memory is prefetch‐
able, it must have the following 2 attributes:
• Reads do not have side effects such as changing
the value of the data read
• Write merging is allowed
The 32-bit prefetchable memory and I/O address
space BARs are only available for the Legacy
Endpoint.
Size
Expansion
ROM
16 Bytes–8 EBytesSupports the following memory sizes:
• 128 bytes–2 GBytes or 8 EBytes: Endpoint and
Root Port variants
• 6 bytes–4 KBytes: Legacy Endpoint variants
Disabled–16 MBytesSpecifies the size of the optional ROM.
The expansion ROM is only available for the
Avalon-ST interface.
Altera Corporation
Parameter Settings
Send Feedback
UG-01145_avst
2014.08.18
Base and Limit Registers for Root Ports
Base and Limit Registers for Root Ports
Table 4-4: Base and Limit Registers
The following table describes the Base and Limit registers which are available in the Type 1 Configuration Space
for Root Ports. These registers are used for TLP routing and specify the address ranges assigned to components
that are downstream of the Root Port or bridge.
ParameterValueDescription
4-7
Input/
Output
Disabled
16-bit I/O addressing
Specifies the address widths for the IO base and IO
limit registers.
32-bit I/O addressing
Prefetchable
memory
16-bit memory addressing
Disabled
Specifies the address widths for the Prefetchable
Memory Base register and Prefetchable Memory
Limit register.
32-bit memory addressing
Note: The Avalon-MM Hard IP for PCI Express Root Port does not filter addresses.
Related Information
PCI to PCI Bridge Architecture Specification
Device Identification Registers
Table 4-5: Device ID Registers
The following table lists the default values of the read-only Device ID registers. You can use the parameter editor
to change the values of these registers. Refer to Type 0 Configuration Space Registers for the layout of the Device
Identification registers.
Register NameRangeDefault ValueDescription
Vendor ID16 bits0x00000000Sets the read-only value of the Vendor ID register. This
parameter cannot be set to 0xFFFF, per the PCI ExpressSpecification.
Address offset: 0x000.
Device ID16 bits0x00000000Sets the read-only value of the Device ID register. This
register is only valid in the Type 0 (Endpoint) Configu‐
ration Space.
Address offset: 0x000.
Parameter Settings
Send Feedback
Altera Corporation
4-8
PCI Express and PCI Capabilities Parameters
Register NameRangeDefault ValueDescription
Revision ID8 bits0x00000000Sets the read-only value of the Revision ID register.
Address offset: 0x008.
Class code24 bits0x00000000Sets the read-only value of the Class Code register.
Address offset: 0x008.
UG-01145_avst
2014.08.18
Subsystem
Vendor ID
16 bits0x00000000Sets the read-only value of the Subsystem Vendor ID
register in the PCI Type 0 Configuration Space. This
parameter cannot be set to 0xFFFF per the PCI ExpressBase Specification. This value is assigned by PCI-SIG to
the device manufacturer. This register is only valid in
the Type 0 (Endpoint) Configuration Space.
Address offset: 0x02C.
Subsystem
Device ID
16 bits0x00000000Sets the read-only value of the Subsystem Device ID
register in the PCI Type 0 Configuration Space.
Address offset: 0x02C
At run time, you can change the values of these registers using the optional reconfiguration block signals.
Related Information
• Hard IP Reconfiguration on page 16-1
• PCI Express Base Specification 3.0
PCI Express and PCI Capabilities Parameters
This group of parameters defines various capability properties of the IP core. Some of these parameters
are stored in the PCI Configuration Space - PCI Compatible Configuration Space. The byte offset
indicates the parameter address.
Altera Corporation
Parameter Settings
Send Feedback
UG-01145_avst
2014.08.18
Device Capabilities
Table 4-6: Capabilities Registers
ParameterPossible ValuesDefault ValueDescription
Device Capabilities
4-9
Maximum
payload size
Number of
Tags
supported
128 bytes
256 bytes
512 bytes
1024 bytes
2048 bytes
32
64
128 bytesSpecifies the maximum payload size supported. This
parameter sets the read-only value of the max payload
size supported field of the Device Capabilities register
(0x084[2:0]). Address: 0x084.
32Indicates the number of tags supported for non-posted
requests transmitted by the Application Layer. This
parameter sets the values in the Device Control register
(0x088) of the PCI Express capability structure
described in Table 9–9 on page 9–5.
The Transaction Layer tracks all outstanding
completions for non-posted requests made by the
Application Layer. This parameter configures the
Transaction Layer for the maximum number of Tagssupported to track. The Application Layer must set the
tag values in all non-posted PCI Express headers to be
less than this value. Values greater than 32 also set the
extended tag field supported bit in the Configuration
Space Device Capabilities register. The Application
Layer can only use tag numbers greater than 31 if
configuration software sets the Extended Tag Field
Enable bit of the Device Control register. This bit is
available to the Application Layer on the tl_cfg_ctl
output signal as cfg_devcsr[8].
Completion
timeout
range
Parameter Settings
Send Feedback
ABCD
BCD
ABC
AB
B
A
None
ABCDIndicates device function support for the optional
completion timeout programmability mechanism. This
mechanism allows system software to modify the
completion timeout value. This field is applicable only to
Root Ports and Endpoints that issue requests on their
own behalf. Completion timeouts are specified and
enabled in the Device Control 2 register (0x0A8) of the
PCI Express Capability Structure Version. For all other
Altera Corporation
4-10
Error Reporting
ParameterPossible ValuesDefault ValueDescription
functions this field is reserved and must be hardwired to
0x0000b. Four time value ranges are defined:
• Range A: 50 us to 10 ms
• Range B: 10 ms to 250 ms
• Range C: 250 ms to 4 s
• Range D: 4 s to 64 s
Bits are set to show timeout value ranges supported. The
function must implement a timeout value in the range
50 s to 50 ms. The following values specify the range:
• None—Completion timeout programming is not
supported
• 0001 Range A
• 0010 Range B
• 0011 Ranges A and B
• 0110 Ranges B and C
• 0111 Ranges A, B, and C
• 1110 Ranges B, C and D
• 1111 Ranges A, B, C, and D
UG-01145_avst
2014.08.18
All other values are reserved. Altera recommends that
the completion timeout mechanism expire in no less
than 10 ms.
Disable
completion
timeout
On/OffOnDisables the completion timeout mechanism. When On,
the core supports the completion timeout disable
mechanism via the PCI Express Device Control
Register 2. The Application Layer logic must
implement the actual completion timeout mechanism
for the required ranges.
Error Reporting
Table 4-7: Error Reporting
ParameterValueDefault ValueDescription
Advanced
error
reporting
(AER)
On/OffOffWhen On, enables the Advanced Error Reporting (AER)
capability.
Altera Corporation
Parameter Settings
Send Feedback
UG-01145_avst
2014.08.18
ParameterValueDefault ValueDescription
Link Capabilities
4-11
Enable
ECRC
checking
Enable
ECRC
generation
Enable
ECRC
forwarding
on the
Avalon-ST
interface
Track RX
completion
buffer
overflow on
the AvalonST interface
On/OffOffWhen On, enables ECRC checking. Sets the read-only
value of the ECRC check capable bit in the Advanced
Error Capabilities and Control Register. This
parameter requires you to enable the AER capability.
On/OffOff
When On, enables ECRC generation capability. Sets the
read-only value of the ECRC generation capable bit in
the Advanced Error Capabilities and Control
Register. This parameter requires you to enable the
AER capability.
On/OffOffWhen On, enables ECRC forwarding to the Application
Layer. On the Avalon-ST RX path, the incoming TLP
contains the ECRC dword
(1)
and the TD bit is set if an
ECRC exists. On the transmit the TLP from the Applica‐
tion Layer must contain the ECRC dword and have the
TD bit set.
On/OffOffWhen On, the core includes the rxfx_cplbuf_ovf
output status signal to track the RX posted completion
buffer overflow status.
Note:
1. Throughout this user guide, the terms word, dword and qword have the same meaning that they have
in the PCI Express Base Specification. A word is 16 bits, a dword is 32 bits, and a qword is 64 bits.
Link Capabilities
Table 4-8: Link Capabilities
ParameterValueDescription
Link port
number
0x01Sets the read-only value of the port number field in the Link
Capabilities register.
Parameter Settings
Send Feedback
Altera Corporation
4-12
MSI and MSI-X Capabilities
ParameterValueDescription
UG-01145_avst
2014.08.18
Data link layer
active reporting
Surprise down
reporting
Slot clock
configuration
On/Off
Turn On this parameter for a downstream port, if the
component supports the optional capability of reporting the
DL_Active state of the Data Link Control and Management
State Machine. For a hot-plug capable downstream port (as
indicated by the HotPlug Capable field of the Slot
Capabilities register), this parameter must be turned On.
For upstream ports and components that do not support this
optional capability, turn Off this option. This parameter is
only supported for the Arria 10 Hard IP for PCI Express in
Root Port mode.
On/Off
When this option is On, a downstream port supports the
optional capability of detecting and reporting the surprise
down error condition. This parameter is only supported for
the Arria 10 Hard IP for PCI Express in Root Port mode.
On/OffWhen On, indicates that the Endpoint or Root Port uses the
same physical reference clock that the system provides on the
connector. When Off, the IP core uses an independent clock
regardless of the presence of a reference clock on the
connector.
MSI and MSI-X Capabilities
Table 4-9: MSI and MSI-X Capabilities
ParameterValueDescription
MSI messages
requested
Implement MSIX
Table size[10:0]System software reads this field to determine the MSI-X Table
1, 2, 4, 8, 16, 32Specifies the number of messages the Application Layer can
request. Sets the value of the Multiple Message Capable
field of the Message Control register, 0x050[31:16].
MSI-X Capabilities
On/OffWhen On, enables the MSI-X functionality.
Bit Range
size <n>, which is encoded as <n–1>. For example, a returned
value of 2047 indicates a table size of 2048. This field is readonly. Legal range is 0–2047 (211).
Address offset: 0x068[26:16]
Altera Corporation
Parameter Settings
Send Feedback
3119 1 8 17 16 1 5 14
7
6 5
Physical Slot Number
No Command Completed Support
Electromechanical Interlock Present
Slot Power Limit Scale
Slot Power Limit Value
Hot-Plug Capable
Hot-Plug Surprise
Power Indicator Present
Attention Indicator Present
MRL Sensor Present
Power Controller Present
Attention Button Present
04 3 2 1
UG-01145_avst
2014.08.18
Table Offset[31:0]Points to the base of the MSI-X Table. The lower 3 bits of the
ParameterValueDescription
table BAR indicator (BIR) are set to zero by software to form a
32-bit qword-aligned offset
(1)
. This field is read-only.
Slot Capabilities
4-13
Table BAR
Indicator
[2:0]Specifies which one of a function’s BARs, located beginning at
0x10 in Configuration Space, is used to map the MSI-X table
into memory space. This field is read-only. Legal range is 0–5.
Pending Bit
Array (PBA)
Offset
[31:0]Used as an offset from the address contained in one of the
function’s Base Address registers to point to the base of the
MSI-X PBA. The lower 3 bits of the PBA BIR are set to zero by
software to form a 32-bit qword-aligned offset. This field is
read-only.
Pending BAR
Indicator
[2:0]Specifies the function Base Address registers, located
beginning at 0x10 in Configuration Space, that maps the MSIX PBA into memory space. This field is read-only. Legal range
is 0–5.
Note:
1. Throughout this user guide, the terms word, dword and qword have the same meaning that they have
in the PCI Express Base Specification. A word is 16 bits, a dword is 32 bits, and a qword is 64 bits.
Slot Capabilities
Table 4-10: Slot Capabilities
ParameterValueDescription
Use Slot registerOn/OffThe slot capability is required for Root Ports if a slot is implemented
Parameter Settings
Send Feedback
on the port. Slot status is recorded in the PCI Express Capabili-
ties register. This parameter is only supported in Root Port mode.
Defines the characteristics of the slot. You turn on this option by
selecting Enable slot capability. The various bits are defined as
follows:
Altera Corporation
4-14
Power Management
ParameterValueDescription
UG-01145_avst
2014.08.18
Slot power scale
Slot power limit
Slot number
Power Management
0–3
0–255
0-8191
Specifies the scale used for the Slot power limit. The following
coefficients are defined:
• 0 = 1.0x
• 1 = 0.1x
• 2 = 0.01x
• 3 = 0.001x
The default value prior to hardware and firmware initialization is
b’00. Writes to this register also cause the port to send the Set_
Slot_Power_Limit Message.
Refer to Section 6.9 of the PCI Express Base Specification Revision for
more information.
In combination with the Slot power scale value, specifies the upper
limit in watts on power supplied by the slot. Refer to Section 7.8.9 of
the PCI Express Base Specification for more information.
Specifies the slot number.
Table 4-11: Power Management Parameters
ParameterValueDescription
Endpoint L0s
acceptable
latency
Maximum of 64 ns
Maximum of 128 ns
Maximum of 256 ns
Maximum of 512 ns
Maximum of 1 us
Maximum of 2 us
Maximum of 4 us
No limit
This design parameter specifies the maximum acceptable
latency that the device can tolerate to exit the L0s state for any
links between the device and the root complex. It sets the
read-only value of the Endpoint L0s acceptable latency field of
the Device Capabilities Register (0x084).
This Endpoint does not support the L0s or L1 states. However,
in a switched system there may be links connected to switches
that have L0s and L1 enabled. This parameter is set to allow
system configuration software to read the acceptable latencies
for all devices in the system and the exit latencies for each link
to determine which links can enable Active State Power
Management (ASPM). This setting is disabled for Root Ports.
The default value of this parameter is 64 ns. This is the safest
setting for most designs.
Altera Corporation
Parameter Settings
Send Feedback
UG-01145_avst
2014.08.18
Vendor Specific Extended Capability (VSEC)
ParameterValueDescription
4-15
Endpoint L1
acceptable
latency
Maximum of 1 us
Maximum of 2 us
Maximum of 4 us
Maximum of 8 us
Maximum of 16 us
Maximum of 32 us
No limit
This value indicates the acceptable latency that an Endpoint
can withstand in the transition from the L1 to L0 state. It is an
indirect measure of the Endpoint’s internal buffering. It sets
the read-only value of the Endpoint L1 acceptable latency field
of the Device Capabilities Register.
This Endpoint does not support the L0s or L1 states. However,
a switched system may include links connected to switches
that have L0s and L1 enabled. This parameter is set to allow
system configuration software to read the acceptable latencies
for all devices in the system and the exit latencies for each link
to determine which links can enable Active State Power
Management (ASPM). This setting is disabled for Root Ports.
The default value of this parameter is 1 µs. This is the safest
setting for most designs.
Vendor Specific Extended Capability (VSEC)
Table 4-12: VSEC
ParameterValueDescription
User ID register
from the Vendor
Sepcific Extended
Custom value
Sets the read-only value of the 16-bit User ID register from the
Vendor Specific Extended Capability. This parameter is only
valid for Endpoints.
Capability
PHY Characteristics
Table 4-13: PHY Characteristics
ParameterValueDescription
Gen2 transmit
deemphasis
3.5dB
6dB
Specifies the transmit de-emphasis for Gen2. Altera
recommends the following settings:
• 3.5dB: Short PCB traces
• 6.0dB: Long PCB traces.
Parameter Settings
Send Feedback
Altera Corporation
2015.05.04
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
GXBL1J
Transceiver
Bank
GXBL1I
Transceiver
Bank
GXBL1H
Transceiver
Bank
GXBL1G
Transceiver
Bank
GXBL1F
Transceiver
Bank
Transceiver
Bank
GXBL1D
Transceiver
Bank
GXBL1C
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
GXBR4C
PCIe
Gen3
HIP
(with CvP)
PCIe
Gen3
HIP
PCIe
Gen3
HIP
PCIe
Gen3
HIP
GT 115 UF45
GT 090 UF45
GXBL1E
GXBL1C
GXBL1D
GXBL1E
GXBL1F
GXBL1G
GXBL1H
GXBL1I
GXBL1J
GXBR4D
GXBR4E
GXBR4F
GXBR4G
GXBR4H
GXBR4I
GXBR4J
GXBR4C
GXBR4D
GXBR4E
GXBR4F
GXBR4G
GXBR4H
GXBR4I
GXBR4J
Notes:
(1) Nomenclature of left column bottom transceiver banks always begins with “C”
(2) Nomenclature of right column bottom transceiver banks may begin with “C”, “D”, or “E”.
(1)(2)
www.altera.com
101 Innovation Drive, San Jose, CA 95134
Physical Layout of Hard IP In Arria 10 Devices
5
UG-01145_avst
Subscribe
Send Feedback
Arria 10 devices include 1–4 hard IP blocks for PCI Express. The bottom left hard IP block includes the
CvP functionality for flip chip packages. For other package types, the CvP functionality is in the bottom
right block.
Figure 5-1: Arria 10 Devices with 96 Transceiver Channels and Four PCIe Hard IP Blocks
2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
ISO
9001:2008
Registered
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
PCIe
Gen3
Hard IP
(with CvP)
PCIe
Gen3
Hard IP
PCIe
Gen3
Hard IP
GT 115 SF45
GT 090 SF45
GXBL1C
GXBL1D
GXBL1E
GXBL1F
GXBL1G
GXBL1H
GXBL1C
GXBL1E
GXBL1F
GXBL1G
GXBL1H
GXBR4DGXBR4D
GXBR4EGXBR4E
GXBR4FGXBR4F
GXBR4GGXBR4G
GXBR4HGXBR4H
GXBR4IGXBR4I
Notes:
(1) Nomenclature of left column bottom transceiver banks always begins with “C”
(2) Nomenclature of right column bottom transceiver banks may begin with “C”, “D”, or “E”.
(1)(2)
GXBL1D
5-2
Physical Layout of Hard IP In Arria 10 Devices
Figure 5-2: Arria 10 Devices with 72 Transceiver Channels and Four PCIe Hard IP Blocks
UG-01145_avst
2015.05.04
Altera Corporation
Physical Layout of Hard IP In Arria 10 Devices
Send Feedback
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
Transceiver
Bank
GT 115 NF40
GT 090 NF40
GXBL1C
GXBL1D
GXBL1E
GXBL1F
GXBL1G
GXBL1H
GXBL1I
GXBL1J
Notes:
(1) Nomenclature of left column bottom transceiver banks always begins with “C”
(2) These devices have transceivers only on left hand side of the device.
(1)
PCIe
Gen1 - Gen3
Hard IP
PCIe
Gen1 - Gen3
(with CvP)
Hard IP
Legend:
PCIe Gen1 - Gen3 Hard IP blocks with CvP capabilities
PCIe Gen1 - Gen3 Hard IP blocks without CvP capabilities
UG-01145_avst
2015.05.04
Figure 5-3: Arria 10 GT Devices with 48 Transceiver Channels and Two PCIe Hard IP Blocks
Physical Layout of Hard IP In Arria 10 Devices
5-3
Refer to the Arria 10 Transceiver Layout in the Arria 10 Transceiver PHY User Guide for comprehensive
figures for Arria 10 GT, GX, and SX devices.
Channel and Pin Placement for the Gen1, Gen2, and Gen3 Data Rates
Channel and Pin Placement for the Gen1, Gen2, and Gen3 Data Rates
The following figures illustrate the x1, x2, x4, and x8 channel and pin placements for the Arria 10 Hard IP
for PCI Express.
In these figures, channels that are not used for the PCI Express protocol are available for other protocols.
Unused channels are shown in gray.
Note: In all configurations, physical channel 4 in the PCS connects to logical channel 0 in the hard IP.
You cannot change the channel placements illustrated below.
For the possible values of <txvr_block_N> and <txvr_block_N+1>, refer to the figures that show the
physical location of the Hard IP PCIe blocks in the different types of Arria 10 devices, at the start of this
chapter. For each HIP block, the transceiver block that is adjacent and extends below the HIP block, is
<txvr_block_N>, and the transceiver block that is directly above <txvr_block_N> is <txvr_block_N+1>.
For example, in an Arria 10 device with 96 transceiver channels and four PCIe HIP blocks, if your design
uses the HIP block that supports CvP, <txvr_block_N> is GXB1C and <txvr_block_N+1> is GXB1D.
Figure 5-4: Arria 10 Gen1, Gen2, and Gen3 x1 Channel and Pin Placement
UG-01145_avst
2015.05.04
Figure 5-5: Arria 10 Gen1 Gen2, and Gen3 x2 Channel and Pin Placement
Figure 5-6: Arria 10 Gen1, Gen2, and Gen3 x4 Channel and Pin Placement
Figure 5-7: Arria 10 Gen1, Gen2, and Gen3 x8 Channel and Pin Placement
Channel Placement and fPLL Usage for the Gen1 and Gen2 Data Rates
5-5
Channel Placement and fPLL Usage for the Gen1 and Gen2 Data Rates
The following figures illustrate the x1, x2, x4, and x8 channel placement for the Arria 10 Hard IP for PCI
Express. In these figures, channels that are not used for the PCI Express protocol are available for other
protocols. Unused channels are shown in gray.
Note:
Physical Layout of Hard IP In Arria 10 Devices
Send Feedback
In all configurations, physical channel 4 in the PCS connects to logical channel 0 in the hard IP.
You cannot change the channel placements illustrated below.
Channel Placement and fPLL and ATX PLL Usage for the Gen3 Data Rate
Figure 5-11: Gen1 and Gen2 x8 Channel Placement
Channel Placement and fPLL and ATX PLL Usage for the Gen3 Data Rate
The following figures illustrate the x1, x2, x4, and x8 channel placement for the Arria 10 Hard IP for PCI
Express. Gen3 variants must initially train at the Gen1 data rate. Consequently, Gen3 variants require an
fPLL to generate the 2.5 and 5.0 Gbps clocks, and an ATX PLL to generate the 8.0 Gbps clock.
5-7
In these figures, channels that are not used for the PCI Express protocol are available for other protocols.
Unused channels are shown in gray.
Note:
In all configurations, physical channel 4 in the PCS connects to logical channel 0 in the hard IP.
You cannot change the channel placements illustrated below.
2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
Subscribe
Send Feedback
ISO
9001:2008
Registered
6-2
Avalon‑ST RX Interface
Avalon‑ST RX Interface
The following table describes the signals that comprise the Avalon-ST RX Datapath. The RX data signal
can be 64, 128, or 256 bits.
Table 6-1: 64-, 128-, or 256‑Bit Avalon-ST RX Datapath
SignalDirectionDescription
UG-01145_avst
2015.05.04
rx_st_data[<n>-1:0]
OutputReceive data bus. Refer to figures following this table for the
mapping of the Transaction Layer’s TLP information to rx_st_
data and examples of the timing of this interface. Note that the
position of the first payload dword depends on whether the TLP
address is qword aligned. The mapping of message TLPs is the
same as the mapping of TLPs with 4-dword headers. When using
a 64-bit Avalon-ST bus, the width of rx_st_data is 64. When
using a 128-bit Avalon-ST bus, the width of rx_st_data is 128.
When using a 256-bit Avalon-ST bus, the width of rx_st_data is
256 bits.
rx_st_sop[1:0]
OutputIndicates that this is the first cycle of the TLP when rx_st_valid
is asserted. When using a 256-bit Avalon-ST bus the following
correspondences apply:
When you turn on Enable multiple packets per cycle,
• bit 0 indicates that a TLP begins in rx_st_data[127:0]
• bit 1 indicates that a TLP begins in rx_st_data[255:128]
In single packet per cycle mode, this signal is a single bit which
indicates that a TLP begins in this cycle.
rx_st_eop[1:0]OutputIndicates that this is the last cycle of the TLP when rx_st_valid
is asserted.
rx_st_empty[1:0]
Altera Corporation
When using a 256-bit Avalon-ST bus the following correspond‐
ences apply:
When you turn on Enable multiple packets per cycle,
• bit 0 indicates that a TLP ends in rx_st_data[127:0]
• bit 1 indicates that a TLP ends in rx_st_data[255:128]
In single packet per cycle mode, this signal is a single bit which
indicates that a TLP ends in this cycle.
OutputIndicates the number of empty qwords in rx_st_data. Not used
when rx_st_data is 64 bits. Valid only when rx_st_eop is
asserted in 128-bit and 256-bit modes.
Interfaces and Signal Descriptions
Send Feedback
UG-01145_avst
2015.05.04
Avalon‑ST RX Interface
SignalDirectionDescription
For 128-bit data, only bit 0 applies; this bit indicates whether the
upper qword contains data. For 256-bit data single packet per
cycle mode, both bits are used to indicate whether 0-3 upper
qwords contain data, resulting in the following encodings for the
128-and 256-bit interfaces:
• 128-Bit interface:
• rx_st_empty = 0, rx_st_data[127:0]contains valid data
• rx_st_empty = 1, rx_st_data[63:0] contains valid data
• 256-bit interface: single packet per cycle mode
• rx_st_empty = 0, rx_st_data[255:0] contains valid
data
• rx_st_empty = 1, rx_st_data[191:0] contains valid data
• rx_st_empty = 2, rx_st_data[127:0] contains valid
data
• rx_st_empty = 3, rx_st_data[63:0] contains valid data
• For 256-bit data, when you turn on Enable multiple packetsper cycle, the following correspondences apply:
6-3
rx_st_ready
• bit 1 applies to the eop occurring in rx_st_data[255:128]
• bit 0 applies to the eop occurring in rx_st_data[127:0]
• When the TLP ends in the lower 128 bits, the following
equations apply:
• rx_st_eop[0]=1 & rx_st_empty[0]=0, rx_st_
data[127:0] contains valid data
• rx_st_eop[0]=1 & rx_st_empty[0]=1, rx_st_
data[63:0] contains valid data, rx_st_data[127:64] is
empty
• When TLP ends in the upper 128bits, the following equations
apply:
• rx_st_eop[1]=1 & rx_st_empty[1]=0, rx_st_
data[255:128] contains valid data
• rx_st_eop[1]=1 & rx_st_empty[1]=1, rx_st_
data[191:128] contains valid data, rx_st_
data[255:192] is empty
InputIndicates that the Application Layer is ready to accept data. The
Application Layer deasserts this signal to throttle the data stream.
If rx_st_ready is asserted by the Application Layer on cycle
<n> , then <n + > readyLatency > is a ready cycle, during which
the Transaction Layer may assert valid and transfer data.
Interfaces and Signal Descriptions
Send Feedback
The RX interface supports a readyLatency of 2 cycles.
Altera Corporation
6-4
Avalon‑ST RX Component Specific Signals
SignalDirectionDescription
rx_st_valid OutputClocks rx_st_data into the Application Layer. Deasserts within
2 clocks of rx_st_ready deassertion and reasserts within 2 clocks
of rx_st_ready assertion if more data is available to send.
For 256-bit data, when you turn on Enable multiple packets percycle, bit 0 applies to the entire bus rx_st_data[255:0]. Bit 1 is
not used.
UG-01145_avst
2015.05.04
rx_st_err[<n>-1:0]
OutputIndicates that there is an uncorrectable error correction coding
(ECC) error in the internal RX buffer. Active when ECC is
enabled. ECC is automatically enabled by the Quartus II
assembler. ECC corrects single-bit errors and detects double-bit
errors on a per byte basis.
When an uncorrectable ECC error is detected, rx_st_err is
asserted for at least 1 cycle while rx_st_valid is asserted.
For 256-bit data, when you turn on Enable multiple packets percycle, bit 0 applies to the entire bus rx_st_data[255:0]. Bit 1 is
not used.
Altera recommends resetting the Arria 10 Hard IP for PCI
Express when an uncorrectable double-bit ECC error is detected.
Attention: If you instantiate this IP core as a separate component from the Quartus II IP Catalog, the
Message pane reports the following warning messages:
pcie_a10.pcie_a10_hip_0.tx.st Interface must have an associated reset
pcie_a10.pcie_a10_hip_0.rx.st Interface must have an associated reset
You can safely ignore these warnings because the IP core has a dedicated hard reset pin that is
not part of the Avalon-ST TX or RX interface.
Related Information
Avalon Interface Specifications.
Avalon‑ST RX Component Specific Signals
Table 6-2: Avalon-ST RX Component Specific Signals
SignalDirectionDescription
rx_st_maskInput
Altera Corporation
The Application Layer asserts this signal to tell the Hard IP to
stop sending non-posted requests. This signal can be asserted at
any time. The total number of non-posted requests that can be
transferred to the Application Layer after rx_st_mask is asserted
is not more than 10.
Interfaces and Signal Descriptions
Send Feedback
UG-01145_avst
2015.05.04
rx_st_bar[7:0]OutputThe decoded BAR bits for the TLP. Valid for MRd, MWr, IOWR, and
Avalon‑ST RX Component Specific Signals
SignalDirectionDescription
IORD TLPs. Ignored for the completion or message TLPs. Valid
during the cycle in which rx_st_sop is asserted.
Refer to 64-Bit Avalon-ST rx_st_data<n> Cycle Definitions for 4-
Dword Header TLPs with Non-Qword Addresses and 128-Bit
Avalon-ST rx_st_data<n> Cycle Definition for 3-Dword Header
TLPs with Qword Aligned Addresses for the timing of this signal
for 64- and 128-bit data, respectively.
The following encodings are defined for Endpoints:
• Bit 0: BAR 0
• Bit 1: BAR 1
• Bit 2: Bar 2
• Bit 3: Bar 3
• Bit 4: Bar 4
• Bit 5: Bar 5
• Bit 6: Expansion ROM
• Bit 7: Reserved
6-5
The following encodings are defined for Root Ports:
• Bit 0: BAR 0
• Bit 1: BAR 1
• Bit 2: Primary Bus number
• Bit 3: Secondary Bus number
• Bit 4: Secondary Bus number to Subordinate Bus number
window
• Bit 5: I/O window
• Bit 6: Non-Prefetchable window
• Bit 7: Prefetchable window
For multiple packets per cycle, this signal is undefined. If you
turn on Enable multiple packets per cycle, do not use this signal
to identify the address BAR hit.
Interfaces and Signal Descriptions
Send Feedback
Altera Corporation
6-6
Data Alignment and Timing for the 64‑Bit Avalon‑ST RX Interface
SignalDirectionDescription
rx_st_be[<n>-1:0]OutputByte enables corresponding to the rx_st_data. The byte enable
signals only apply to PCI Express Memory Write and I/O Write
TLP payload fields. When using 64-bit Avalon-ST bus, the width
of rx_st_be is 8 bits. When using 128-bit Avalon-ST bus, the
width of rx_st_be is 16 bits. This signal is optional. You can
derive the same information by decoding the FBE and LBE fields
in the TLP header. The byte enable bits correspond to data bytes
as follows:
• rx_st_data[127:120] = rx_st_be[15]
• rx_st_data[119:112] = rx_st_be[14]
• rx_st_data[111:104] = rx_st_be[13]
• rx_st_data[95:88] = rx_st_be[12]
• rx_st_data[87:80] = rx_st_be[11]
• rx_st_data[79:72] = rx_st_be[10]
• rx_st_data[71:64] = rx_st_be[9]
• rx_st_data[7:0] = rx_st_be[8]
• rx_st_data[63:56] = rx_st_be[7]
• rx_st_data[55:48] = rx_st_be[6]
• rx_st_data[47:40] = rx_st_be[5]
• rx_st_data[39:32] = rx_st_be[4]
• rx_st_data[31:24] = rx_st_be[3]
• rx_st_data[23:16] = rx_st_be[2]
• rx_st_data[15:8] = rx_st_be[1]
• rx_st_data[7:0] = rx_st_be[0]
UG-01145_avst
2015.05.04
This signal is deprecated.
rx_st_parity[<n>-1:0]
Output
The IP core generates byte parity when you turn on Enable byteparity ports on Avalon-ST interface on the System Settings tab
of the parameter editor. Each bit represents odd parity of the
associated byte of the rx_st_datarx_st_data bus. For example,
bit[0] corresponds to rx_st_data[7:0] rx_st_data[7:0], bit[1]
corresponds to rx_st_data[15:8].
For more information about the Avalon-ST protocol, refer to the Avalon Interface Specifications.
Related Information
Avalon Interface Specifications.
Data Alignment and Timing for the 64‑Bit Avalon‑ST RX Interface
To facilitate the interface to 64-bit memories, the Arria 10 Hard IP for PCI Express aligns data to the
qword or 64 bits by default. Consequently, if the header presents an address that is not qword aligned, the
Hard IP block shifts the data within the qword to achieve the correct alignment.
Altera Corporation
Interfaces and Signal Descriptions
Send Feedback
.
.
.
0x0
0x8
0x10
0x18
HeaderAddr = 0x4
64 bits
PCB Memory
Valid Data
Valid Data
UG-01145_avst
2015.05.04
Figure 6-2: Qword Alignment
Data Alignment and Timing for the 64‑Bit Avalon‑ST RX Interface
6-7
Qword alignment applies to all types of request TLPs with data, including the following TLPs:
• Memory writes
• Configuration writes
• I/O writes
The alignment of the request TLP depends on bit 2 of the request address. For completion TLPs with data,
alignment depends on bit 2 of the lower address field. This bit is always 0 (aligned to qword boundary)
for completion with data TLPs that are for configuration read or I/O read requests.
The following figure shows how an address that is not qword aligned, 0x4, is stored in memory. The byte
enables only qualify data that is being written. This means that the byte enables are undefined for 0x0–
0x3. This example corresponds to 64-Bit Avalon-ST rx_st_data<n> Cycle Definition for 3-Dword HeaderTLPs with Non-Qword Aligned Address.
The following table shows the byte ordering for header and data packets.
Table 6-3: Mapping Avalon-ST Packets to PCI Express TLPs
The following figure illustrates the mapping of Avalon-ST RX packets to PCI Express TLPs for a three
dword header with non-qword aligned addresses with a 64-bit bus. In this example, the byte address is
unaligned and ends with 0x4, causing the first data to correspond to rx_st_data[63:32] .
Note: The Avalon-ST protocol, as defined in Avalon Interface Specifications, is big endian, while the Hard
IP for PCI Express packs symbols into words in little endian format. Consequently, you cannot use
the standard data format adapters available in Qsys.
Figure 6-3: 64-Bit Avalon-ST rx_st_data<n> Cycle Definition for 3-Dword Header TLPs with Non-Qword
Aligned Address
UG-01145_avst
2015.05.04
The following figure illustrates the mapping of Avalon-ST RX packets to PCI Express TLPs for a three
dword header with qword aligned addresses. Note that the byte enables indicate the first byte of data is
not valid and the last dword of data has a single valid byte.
Figure 6-4: 64-Bit Avalon-ST rx_st_data<n> Cycle Definition for 3-Dword Header TLPs with Qword
Aligned Address
Altera Corporation
Interfaces and Signal Descriptions
Send Feedback
pld_clk
rx_st_data[63:32]
rx_st_data[31:0]
rx_st_sop
rx_st_eop
header1header3data1
header0header2data0
pld_clk
rx_st_data[63:32]
rx_st_data[31:0]
rx_st_sop
rx_st_eop
rx_st_bar[7:0]
header1header3data0data2
header0header2data1
10
UG-01145_avst
2015.05.04
Figure 6-5: 64-Bit Avalon-ST rx_st_data<n> Cycle Definitions for 4-Dword Header TLPs with Qword
Aligned Addresses
Figure 6-6: 64-Bit Avalon-ST rx_st_data<n> Cycle Definitions for 4-Dword Header TLPs with NonQword Addresses
Data Alignment and Timing for the 64‑Bit Avalon‑ST RX Interface
6-9
The following figure shows the mapping of Avalon-ST RX packets to PCI Express TLPs for TLPs for a
four dword header with qword aligned addresses with a 64-bit bus.
The following figure shows the mapping of Avalon-ST RX packet to PCI Express TLPs for TLPs for a four
dword header with non-qword addresses with a 64-bit bus. Note that the address of the first dword is 0x4.
The address of the first enabled byte is 0xC.
Interfaces and Signal Descriptions
Send Feedback
Altera Corporation
pld_clk
rx_st_data[63:0]
rx_st_sop
rx_st_eop
rx_st_ready
rx_st_valid
000.010
.
CCCC0002CCCC0001CC
.
CC
.
CC
.
CC
.
CC
.
CC
.
pld_clk
rx_st_data[63:0]
rx_st_sop
rx_st_eop
rx_st_ready
rx_st_valid
C. C. C. C. CCCC0089002...C. C. C. C. C. C. C.
C.
C. C. C. C. C. C. C. C. C. C. C. C. C. C. C. C. C. C. C C
6-10
Data Alignment and Timing for the 64‑Bit Avalon‑ST RX Interface
The following figure illustrates the timing of the RX interface when the Application Layer backpressures
the Arria 10 Hard IP for PCI Express by deasserting rx_st_ready. The rx_st_valid signal deasserts
within three cycles after rx_st_ready is deasserted. In this example, rx_st_valid is deasserted in the
next cycle. rx_st_data is held until the Application Layer is able to accept it.
The following figure illustrates back-to-back transmission on the 64-bit Avalon-ST RX interface with no
idle cycles between the assertion of rx_st_eop and rx_st_sop.
Related Information
Avalon Interface Specifications
Altera Corporation
Interfaces and Signal Descriptions
Send Feedback
pld_clk
rx_st_valid
rx_st_data[127:96]
rx_st_data[95:64]
rx_st_data[63:32]
rx_st_data[31:0]
rx_st_bar[7:0]
rx_st_sop
rx_st_eop
rx_st_empty
data3
header2data2
header1data1data<n>
header0data0data<n-1>
01
UG-01145_avst
2015.05.04
Data Alignment and Timing for the 128‑Bit Avalon‑ST RX Interface
Data Alignment and Timing for the 128‑Bit Avalon‑ST RX Interface
Figure 6-9: 128-Bit Avalon-ST rx_st_data<n> Cycle Definition for 3-Dword Header TLPs with Qword
Aligned Addresses
The following figure shows the mapping of 128-bit Avalon-ST RX packets to PCI Express TLPs for TLPs
with a three dword header and qword aligned addresses. The assertion of rx_st_empty in a rx_st_eop
cycle, indicates valid data on the lower 64 bits of rx_st_data.
6-11
Interfaces and Signal Descriptions
Altera Corporation
Send Feedback
rx_st_valid
rx_st_data[127:96]
rx_st_data[95:64]
rx_st_data[63:32]
rx_st_data[31:0]
rx_st_sop
rx_st_eop
rx_st_empty
Data0
Data 4
Header 2
Data 3
Header 1Data 2Data (n)
Header 0Data 1Data (n-1)
pld_clk
pld_clk
rx_st_valid
rx_st_data[127:96]
rx_st_data[95:64]
rx_st_data[63:32]
rx_st_data[31:0]
rx_st_sop
rx_st_eop
rx_st_empty
Header 3Data 2
Header 2Data 1
Data n
Header 1Data 0
Data n-1
Header 0
Data n-2
6-12
Data Alignment and Timing for the 128‑Bit Avalon‑ST RX Interface
Figure 6-10: 128-Bit Avalon-ST rx_st_data<n> Cycle Definition for 3-Dword Header TLPs with nonQword Aligned Addresses
The following figure shows the mapping of 128-bit Avalon-ST RX packets to PCI Express TLPs for TLPs
with a 3 dword header and non-qword aligned addresses. In this case, bits[127:96] represent Data0
because address[2] in the TLP header is set. The assertion of rx_st_empty in a rx_st_eop cycle indicates
valid data on the lower 64 bits of rx_st_data.
UG-01145_avst
2015.05.04
Figure 6-11: 128-Bit Avalon-ST rx_st_data Cycle Definition for 4-Dword Header TLPs with non-Qword
Aligned Addresses
The following figure shows the mapping of 128-bit Avalon-ST RX packets to PCI Express TLPs for a four
dword header with non-qword aligned addresses. In this example, rx_st_empty is low because the data is
valid for all 128 bits in the rx_st_eop cycle.
Altera Corporation
Interfaces and Signal Descriptions
Send Feedback
pld_clk
rx_st_valid
rx_st_data[127:96]
rx_st_data[95:64]
rx_st_data[63:32]
rx_st_data[31:0]
rx_st_sop
rx_st_eop
rx_st_empty
Header3Data3Data n
Header 2Data 2 Data n-1
Header 1Data 1Data n-2
Header 0Data 0Data n-3
Figure 6-12: 128-Bit Avalon-ST rx_st_data Cycle Definition for 4-Dword Header TLPs with Qword
Aligned Addresses
Data Alignment and Timing for the 128‑Bit Avalon‑ST RX Interface
6-13
The following figure shows the mapping of 128-bit Avalon-ST RX packets to PCI Express TLPs for a four
dword header with qword aligned addresses. In this example, rx_st_empty is low because data is valid for
all 128-bits in the rx_st_eop cycle.
Figure 6-13: 128-Bit Application Layer Backpressures Hard IP Transaction Layer for RX Transactions
The following figure illustrates the timing of the RX interface when the Application Layer backpressures
the Hard IP by deasserting rx_st_ready. The rx_st_valid signal deasserts within three cycles after
rx_st_ready is deasserted. In this example, rx_st_valid is deasserted in the next cycle. rx_st_data is
held until the Application Layer is able to accept it.
The following figure illustrates back-to-back transmission on the 128-bit Avalon-ST RX interface with no
idle cycles between the assertion of rx_st_eop and rx_st_sop.
The following figure illustrates back-to-back transmission on the 128-bit Avalon-ST RX interface with no
idle cycles between the assertion of rx_st_eop and rx_st_sop.
UG-01145_avst
2015.05.04
Figure 6-15: 128-Bit Packet Examples of rx_st_empty and Single-Cycle Packet
The following figure illustrates a two-cycle packet with valid data in the lower qword
(rx_st_data[63:0]) and a one-cycle packet where the rx_st_sop and rx_st_eop occur in the same
cycle.
Altera Corporation
Interfaces and Signal Descriptions
Send Feedback
D3
255
0
255
0
255
0
255
0
4DW header,
Aligned data
D2
D1
D0
H3
H2
H1
H0
D9
D8
D7
D6
D5
D4
D2
4DW header,
Unaligned data
D1
D0
H3
H2
H1
H0
D9
D8
D7
D6
D5
D4
D3
D3
3DW header,
Aligned data
D2
D1
D0
H2
H1
H0
D9
D8
D7
D6
D5
D4
D4
3DW header,
Unaligned data
D3
D2
D0
H2
H1
H0
D9
D8
D7
D6
D5
D1
pld_clk
rx_st_data[255:0]
rx_st_sop
rx_st_eop
rx_st_empty[1:0]
rx_st_ready
rx_st_valid
XX..BE ...
102
XXXXXXXXXXXXXXXX. . . 4592001487DF08876210...
UG-01145_avst
2015.05.04
Data Alignment and Timing for 256‑Bit Avalon‑ST RX Interface
Data Alignment and Timing for 256‑Bit Avalon‑ST RX Interface
Figure 6-16: Location of Headers and Data for Avalon-ST 256-Bit Interface
The following figure shows the location of headers and data for the 256-bit Avalon-ST packets. This
layout of data applies to both the TX and RX buses.
6-15
Interfaces and Signal Descriptions
Figure 6-17: 256-Bit Avalon-ST RX Packets Use of rx_st_empty and Single-Cycle Packets
The following figure illustrates two single-cycle 256-bit packets. The first packet has two empty qword,
rx_st_data[191:0] is valid. The second packet has two empty dwords; rx_st_data[127:0] is valid.
Tradeoffs to Consider when Enabling Multiple Packets per Cycle
If you enable Multiple Packets Per Cycle under the Systems Settings heading, a TLP can start on a
128-bit boundary. This mode supports multiple start of packet and end of packet signals in a single cycle
Send Feedback
when the Avalon-ST interface is 256 bits wide. It reduces the wasted bandwidth for small packets.
A comparison of the largest and smallest packet sizes illustrates this point. Large packets using the full
The smallest PCIe packet, such as a 3-dword memory read, uses 96 bits of the 256-bits bus and achieve the
following throughput:
96/256*8 = 3 GBytes/sec
If you enable mMultiple Packets Per Cycle, when a TLP ends in the upper 128 bits of the Avalon-ST bus,
a new TLP can start in the lower 128 bits Consequently, the bandwidth of small packets doubles:
96*2/256*8 = 3 GBytes/sec
This mode adds complexity to the Application Layer user decode logic. However, it could result in higher
throughput.
Figure 6-18: 256-Bit Avalon-ST RX Interface with Multiple Packets Per Cycle
The following figure illustrates this mode for a 256-bit Avalon-ST RX interface. In this figure
rx_st_eop[0] and rx_st_sop[1] are asserted in the same cycle.
UG-01145_avst
2015.05.04
Altera Corporation
Avalon-ST TX Interface
The following table describes the signals that comprise the Avalon-ST TX Datapath. The TX data signal
can be 64, 128, or 256 bits.
Interfaces and Signal Descriptions
Send Feedback
UG-01145_avst
2015.05.04
Table 6-4: 64-, 128-, or 256‑Bit Avalon-ST TX Datapath
SignalDirectionDescription
Avalon-ST TX Interface
6-17
tx_st_data[<n>-1:0]
tx_st_sop[<n>-1:0]
InputData for transmission. Transmit data bus. Refer to the following
sections on data alignment for the 64-, 128-, and 256-bit
interfaces for the mapping of TLP packets to tx_st_data and
examples of the timing of this interface. When using a 64-bit
Avalon-ST bus, the width of tx_st_data is 64. When using a
128-bit Avalon-ST bus, the width of tx_st_data is 128 bits.
When using a 256-bit Avalon-ST bus, the width of tx_st_data is
256 bits. The Application Layer must provide a properly
formatted TLP on the TX interface. The mapping of message
TLPs is the same as the mapping of Transaction Layer TLPs with
4 dword headers. The number of data cycles must be correct for
the length and address fields in the header. Issuing a packet with
an incorrect number of data cycles results in the TX interface
hanging and becoming unable to accept further requests.
<n> = 64, 128, or 256.
InputIndicates first cycle of a TLP when asserted together with tx_st_
valid. <n> = 1 or 2.
When using a 256-bit Avalon-ST bus with Multiple packets per
cycle, bit 0 indicates that a TLP begins in tx_st_data[127:0], bit 1
indicates that a TLP begins in tx_st_data[255:128].
tx_st_eop[<n>-1:0]
InputIndicates last cycle of a TLP when asserted together with tx_st_
valid. <n> = 1 or 2.
When using a 256-bit Avalon-ST bus with Multiple packets per
cycle, bit 0 indicates that a TLP ends with tx_st_data[127:0], bit 1
indicates that a TLP ends with tx_st_data[255:128].
Interfaces and Signal Descriptions
Send Feedback
Altera Corporation
6-18
Avalon-ST TX Interface
SignalDirectionDescription
tx_st_readyOutputIndicates that the Transaction Layer is ready to accept data for
transmission. The core deasserts this signal to throttle the data
stream. tx_st_ready may be asserted during reset. The Applica‐
tion Layer should wait at least 2 clock cycles after the reset is
released before issuing packets on the Avalon-ST TX interface.
The reset_status signal can also be used to monitor when the
IP core has come out of reset.
If tx_st_ready is asserted by the Transaction Layer on cycle
<n> , then <n + readyLatency> is a ready cycle, during which
the Application Layer may assert valid and transfer data.
When tx_st_ready, tx_st_valid and tx_st_data are
registered (the typical case), Altera recommends a readyLa-
tency of 2 cycles to facilitate timing closure; however, a
readyLatency of 1 cycle is possible. If no other delays are added
to the read-valid latency, the resulting delay corresponds to a
readyLatency of 2.
UG-01145_avst
2015.05.04
tx_st_valid
tx_st_empty[1:0]
InputClocks tx_st_data to the core when tx_st_ready is also
asserted. Between tx_st_sop and tx_st_eop, tx_st_valid must
not be deasserted in the middle of a TLP except in response to
tx_st_ready deassertion. When tx_st_ready deasserts, this
signal must deassert within 1 or 2 clock cycles. When tx_st_
ready reasserts, and tx_st_data is in mid-TLP, this signal must
reassert within 2 cycles. The figure entitled64-Bit Transaction
Layer Backpressures the Application Layer illustrates the timing of
this signal.
For 256-bit data, when you turn on Enable multiple packets per
cycle, the bit 0 applies to the entire bus tx_st_data[255:0]. Bit
1 is not used.
To facilitate timing closure, Altera recommends that you register
both the tx_st_ready and tx_st_valid signals. If no other
delays are added to the ready-valid latency, the resulting delay
corresponds to a readyLatency of 2.
InputIndicates the number of qwords that are empty during cycles that
contain the end of a packet. When asserted, the empty dwords
are in the high-order bits. Valid only when tx_st_eop is asserted.
Not used when tx_st_data is 64 bits. For 128-bit data, only bit 0
applies and indicates whether the upper qword contains data. For
256-bit data, both bits are used to indicate the number of upper
Altera Corporation
Interfaces and Signal Descriptions
Send Feedback
UG-01145_avst
2015.05.04
Avalon-ST TX Interface
SignalDirectionDescription
words that contain data, resulting in the following encodings for
the 128-and 256-bit interfaces:
When TLP ends in the upper 128bits, the following equations
apply:
• tx_st_eop[1]=1 & tx_st_empty[1]=0, tx_st_
data[255:128] contains valid data
• tx_st_eop[1]=1 & tx_st_empty[1]=1, tx_st_
data[191:128] contains valid data, tx_st_data[255:192] is
empty
Interfaces and Signal Descriptions
Send Feedback
Altera Corporation
6-20
Avalon-ST TX Interface
SignalDirectionDescription
UG-01145_avst
2015.05.04
tx_st_err
tx_st_parity[<n>-1:0]
InputIndicates an error on transmitted TLP. This signal is used to
nullify a packet. It should only be applied to posted and
completion TLPs with payload. To nullify a packet, assert this
signal for 1 cycle after the SOP and before the EOP. When a
packet is nullified, the following packet should not be transmitted
until the next clock cycle. tx_st_err is not available for packets
that are 1 or 2 cycles long.
For 256-bit data, when you turn on Enable multiple packets percycle, bit 0 applies to the entire bus tx_st_data[255:0]. Bit 1 is
not used.
Refer to the figure entitled 128-Bit Avalon-ST tx_st_data Cycle
Definition for 3-Dword Header TLP with non-Qword Aligned
Address for a timing diagram that illustrates the use of the error
signal. Note that it must be asserted while the valid signal is
asserted.
OutputByte parity is generated when you turn on Enable byte parity
ports on AvalonST interface on the System Settings tab of the
parameter editor.Each bit represents odd parity of the associated
byte of the tx_st_data bus. For example, bit[0] corresponds to
tx_st_data[7:0], bit[1] corresponds to tx_st_data[15:8],
and so on.
tx_cred_data_fc[11:0]
<n> = 8, 16, or 32.
Component Specific Signals
OutputData credit limit for the received FC completions. Each credit is
16 bytes.
Altera Corporation
Interfaces and Signal Descriptions
Send Feedback
UG-01145_avst
2015.05.04
Avalon-ST TX Interface
SignalDirectionDescription
6-21
tx_cred_fc_hip_
cons[5:0]
OutputAsserted for 1 cycle each time the Hard IP consumes a credit.
These credits are from messages that the Hard IP for PCIe
generates for the following reasons:
• To respond to memory read requests
• To send error messages
This signal is not asserted when an Application Layer credit is
consumed. The Application Layer must keep track of its own
consumed credits. To calculate the total credits consumed, the
Application Layer must add its own credits consumed to those
consumed by the Hard IP for PCIe. The credit signals are valid
after the dlup (data link up) is asserted.
The 6 bits of this vector correspond to the following 6 types of
credit types:
• [5]: posted headers
• [4]: posted data
• [3]: non-posted header
• [2]: non-posted data
• [1]: completion header
• [0]: completion data
tx_cred_fc_
infinite[5:0]
tx_cred_fc_sel[1:0]
tx_cred_hdr_fc[7:0]
During a single cycle, the IP core can consume either a single
header credit or both a header and a data credit.
OutputWhen asserted, indicates that the corresponding credit type has
infinite credits available and does not need to calculate credit
limits. The 6 bits of this vector correspond to the following 6
types of credit types:
• [5]: posted headers
• [4]: posted data
• [3]: non-posted header
• [2]: non-posted data
• [1]: completion header
• [0]: completion data
InputSignal to select between the tx_cred_hdr_fc and tx_cred_
data_fc outputs. The following encoding are defined:
• 2'b00: Output Posted credits
• 2'b01: Output Non-Posted credits
• 2'b10: Output Completions
OutputHeader credit limit for the FC posted writes. Each credit is 20
bytes.
Interfaces and Signal Descriptions
Send Feedback
Altera Corporation
6-22
Avalon-ST Packets to PCI Express TLPs
SignalDirectionDescription
UG-01145_avst
2015.05.04
ko_cpl_spc_
header[7:0]
OutputThe Application Layer can use this signal to build circuitry to
prevent RX buffer overflow for completion headers. Endpoints
must advertise infinite space for completion headers; however,
RX buffer space is finite. ko_cpl_spc_header is a static signal
that indicates the total number of completion headers that can be
stored in the RX buffer.
ko_cpl_spc_data[11:0]
OutputThe Application Layer can use this signal to build circuitry to
prevent RX buffer overflow for completion data. Endpoints must
advertise infinite space for completion data; however, RX buffer
space is finite. ko_cpl_spc_data is a static signal that reflects the
total number of 16 byte completion data units that can be stored
in the completion RX buffer.
Attention: If you instantiate this IP core as a separate component from the Quartus II IP Catalog, the
Message pane reports the following warning messages:
pcie_a10.pcie_a10_hip_0.tx.st Interface must have an associated reset
pcie_a10.pcie_a10_hip_0.rx.st Interface must have an associated reset
You can safely ignore these warnings because the IP core has a dedicated hard reset pin that is
not part of the Avalon-ST TX or RX interface.
Related Information
• Data Alignment and Timing for the 64-Bit Avalon-ST TX Interface on page 6-22
• Data Alignment and Timing for the 128-Bit Avalon-ST TX Interface on page 6-25
• Data Alignment and Timing for the 256-Bit Avalon-ST TX Interface on page 6-28
Avalon-ST Packets to PCI Express TLPs
The following figures illustrate the mappings between Avalon-ST packets and PCI Express TLPs. These
mappings apply to all types of TLPs, including posted, non-posted, and completion TLPs. Message TLPs
use the mappings shown for four dword headers. TLP data is always address-aligned on the Avalon-ST
interface whether or not the lower dwords of the header contains a valid address, as may be the case with
TLP type (message request with data payload).
For additional information about TLP packet headers, refer to Section 2.2.1 Common Packet Header Fields
in the PCI Express Base Specification .
Data Alignment and Timing for the 64‑Bit Avalon-ST TX Interface
The following figure illustrates the mapping between Avalon-ST TX packets and PCI Express TLPs for
three dword header TLPs with non-qword aligned addresses on a 64-bit bus.
Altera Corporation
Interfaces and Signal Descriptions
Send Feedback
pld_clk
tx_st_data[63:32]
tx_st_data[31:0]
tx_st_sop
tx_st_eop
Header1Data0Data2
Header0Header2Data1
pld_clk
tx_st_data[63:32]
tx_st_data[31:0]
tx_st_sop
tx_st_eop
Header1Header3Data1
Header0Header2Data0
UG-01145_avst
2015.05.04
Figure 6-19: 64-Bit Avalon-ST tx_st_data Cycle Definition for 3-Dword Header TLP with Non-Qword
Aligned Address
Data Alignment and Timing for the 64‑Bit Avalon-ST TX Interface
6-23
This figure illustrates the storage of non-qword aligned data.) Non-qword aligned address occur when
address[2] is set. When address[2] is set, tx_st_data[63:32]contains Data0 and tx_st_data[31:0]
contains dword header2. In this figure, the headers are formed by the following bytes:
The following figure illustrates the mapping between Avalon-ST TX packets and PCI Express TLPs for a
four dword header with qword aligned addresses on a 64-bit bus
Figure 6-20: 64-Bit Avalon-ST tx_st_data Cycle Definition for 4-Dword TLP with Qword Aligned
Address
In this figure, the headers are formed by the following bytes.
Data Alignment and Timing for the 64‑Bit Avalon-ST TX Interface
Figure 6-21: 64-Bit Avalon-ST tx_st_data Cycle Definition for TLP 4-Dword Header with Non-Qword
Aligned Address
Figure 6-22: 64-Bit Transaction Layer Backpressures the Application Layer
The following figure illustrates the timing of the TX interface when the Arria 10 Hard IP for PCI Express
pauses transmission by the Application Layer by deasserting tx_st_ready. Because the readyLatency is
two cycles, the Application Layer deasserts tx_st_valid after two cycles and holds tx_st_data until two
cycles after tx_st_ready is asserted.
UG-01145_avst
2015.05.04
Altera Corporation
Interfaces and Signal Descriptions
Send Feedback
coreclkout
tx_st_sop
tx_st_eop
tx_st_ready
tx_st_valid
tx_st_err
tx_st_data[63:0] 01 ... 00 ... BB ... BB ... BB ... BB ... B ... ... BB ... 01 ... 00 ... CC ... CC ... CC ...CC ... CC ... CC ...
Data Alignment and Timing for the 128‑Bit Avalon‑ST TX Interface
Figure 6-23: 64-Bit Back-to-Back Transmission on the TX Interface
The following figure illustrates back-to-back transmission of 64-bit packets with no idle cycles between
the assertion of tx_st_eop and tx_st_sop.
Data Alignment and Timing for the 128‑Bit Avalon‑ST TX Interface
6-25
Figure 6-24: 128-Bit Avalon-ST tx_st_data Cycle Definition for 3-Dword Header TLP with Qword
Aligned Address
The following figure shows the mapping of 128-bit Avalon-ST TX packets to PCI Express TLPs for a three
dword header with qword aligned addresses. Assertion of tx_st_empty in an rx_st_eop cycle indicates
valid data in the lower 64 bits of tx_st_data.
Interfaces and Signal Descriptions
Send Feedback
Altera Corporation
pld_clk
tx_st_valid
tx_st_data[127:96]
tx_st_data[95:64]
tx_st_data[63:32]
tx_st_data[31:0]
tx_st_sop
tx_st_err
tx_st_eop
tx_st_empty
Data0Data 4
Header 2
Data 3
Header 1Data 2Data (n)
Header 0Data 1Data (n-1)
Data Alignment and Timing for the 128‑Bit Avalon‑ST TX Interface
Figure 6-25: 128-Bit Avalon-ST tx_st_data Cycle Definition for 3-Dword Header TLP with non-Qword
Aligned Address
The following figure shows the mapping of 128-bit Avalon-ST TX packets to PCI Express TLPs for a 3
dword header with non-qword aligned addresses. It also shows tx_st_err assertion.
Figure 6-26: 128-Bit Avalon-ST tx_st_data Cycle Definition for 4-Dword Header TLP with Qword
Aligned Address
UG-01145_avst
2015.05.04
Altera Corporation
Figure 6-27: 128-Bit Avalon-ST tx_st_data Cycle Definition for 4-Dword Header TLP with non-Qword
Aligned Address
The following figure shows the mapping of 128-bit Avalon-ST TX packets to PCI Express TLPs for a four
dword header TLP with non-qword aligned addresses. In this example, tx_st_empty is low because the
data ends in the upper 64 bits of tx_st_data.
Figure 6-28: 128-Bit Back-to-Back Transmission on the Avalon-ST TX Interface
Data Alignment and Timing for the 128‑Bit Avalon‑ST TX Interface
6-27
The following figure illustrates back-to-back transmission of 128-bit packets with idle dead cycles between
the assertion of tx_st_eop and tx_st_sop.
Interfaces and Signal Descriptions
Figure 6-29: 128-Bit Hard IP Backpressures the Application Layer for TX Transactions
The following figure illustrates the timing of the TX interface when the Arria 10 Hard IP for PCI Express
pauses the Application Layer by deasserting tx_st_ready. Because the readyLatency is two cycles, the
Application Layer deasserts tx_st_valid after two cycles and holds tx_st_data until two cycles after
Data Alignment and Timing for the 256‑Bit Avalon‑ST TX Interface
Data Alignment and Timing for the 256‑Bit Avalon‑ST TX Interface
Refer to Figure 8–16 on page 8–15 layout of headers and data for the 256-bit Avalon-ST packets with
qword aligned and qword unaligned addresses.
UG-01145_avst
2015.05.04
Single Packet Per Cycle
In single packer per cycle mode, all received TLPs start at the lower 128-bit boundary on a 256-bit
Avalon-ST interface. Turn on Enable Multiple Packets per Cycle on the System Settings tab of the
parameter editor to change multiple packets per cycle.
Single packet per cycle mode requires simpler Application Layer packet decode logic on the TX and RX
paths because packets always start in the lower 128-bits of the Avalon-ST interface. Although this mode
simplifies the Application Layer logic, failure to use the full 256-bit Avalon-ST may slightly reduce the
throughput of a design.
Altera Corporation
Interfaces and Signal Descriptions
Send Feedback
0110
clk
tx_st_data[63:0]
Aligned DataUnaligned Data
tx_st_data[127:64]
tx_st_data[191:128]
tx_st_data[255:192]
tx_st_sop
tx_st_eop
tx_st_empty[1:0]
Header 1 Header 0
XXXXXXXX Header 2
XXXXXXXX Data 0
XXXXXXXXX XXXXXXXX
Header 1 Header 0
Data 0 Header 2
XXXXXXXXX XXXXXXXX
XXXXXXXXX XXXXXXXX
UG-01145_avst
2015.05.04
Figure 6-30: 256-Bit Avalon-ST tx_st_data Cycle Definition for 3-Dword Header TLP with Qword
Addresses
Single Packet Per Cycle
6-29
The following figure illustrates the layout of header and data for a three dword header on a 256-bit bus
with aligned and unaligned data.
Single Packet Per Cycle
In single packer per cycle mode, all received TLPs start at the lower 128-bit boundary on a 256-bit
Avalon-ST interface. Turn on Enable Multiple Packets per Cycle on the System Settings tab of the
parameter editor to change multiple packets per cycle.
Single packet per cycle mode requires simpler Application Layer packet decode logic on the TX and RX
paths because packets always start in the lower 128-bits of the Avalon-ST interface. Although this mode
simplifies the Application Layer logic, failure to use the full 256-bit Avalon-ST may slightly reduce the
throughput of a design.
The following figure illustrates the layout of header and data for a three dword header on a 256-bit bus
with aligned and unaligned data.
Multiple Packets per Cycle on the Avalon-ST TX 256-Bit Interface
Figure 6-31: 256-Bit Avalon-ST tx_st_data Cycle Definition for 3-Dword Header TLP with Qword
Addresses
UG-01145_avst
2015.05.04
Multiple Packets per Cycle on the Avalon-ST TX 256-Bit Interface
If you enable Multiple Packets Per Cycle under the Systems Settings heading, a TLP can start on a
128-bit boundary. This mode supports multiple start of packet and end of packet signals in a single cycle
when the Avalon-ST interface is 256 bits wide. The following figure illustrates this mode for a 256-bit
Avalon-ST TX interface. In this figure tx_st_eop[0] and tx_st_sop[1] are asserted in the same cycle.
Using this mode increases the complexity of the Application Layer logic but results in higher throughput,
depending on the TX traffic. Refer to Tradeoffs to Consider when Enabling Multiple Packets per Cycle for
an example of the bandwidth when Multiple Packets Per Cycle is enabled and disabled.
Figure 6-32: 256-Bit Avalon-ST TX Interface with Multiple Packets Per Cycle
Altera Corporation
Interfaces and Signal Descriptions
Send Feedback
UG-01145_avst
2015.05.04
Related Information
Tradeoffs to Consider when Enabling Multiple Packets per Cycle on page 6-15
Root Port Mode Configuration Requests
If your Application Layer implements ECRC forwarding, it should not apply ECRC forwarding to
Configuration Type 0 packets that it issues on the Avalon-ST interface. There should be no ECRC
appended to the TLP, and the TD bit in the TLP header should be set to 0. These packets are processed
internally by the Hard IP block and are not transmitted on the PCI Express link.
To ensure proper operation when sending Configuration Type 0 transactions in Root Port mode, the
application should wait for the Configuration Type 0 transaction to be transferred to the Hard IP for PCI
Express Configuration Space before issuing another packet on the Avalon-ST TX port. You can do this by
waiting for the core to respond with a completion on the Avalon-ST RX port before issuing the next
Configuration Type 0 transaction.
Clock Signals
Table 6-5: Clock Signals
Root Port Mode Configuration Requests
6-31
SignalDirectionDescription
refclk
InputReference clock for the IP core. It must have the frequency
specified under the System Settings heading in the parameter
editor. This is a dedicated free running input clock to the
dedicated REFCLK pin.
pld_clk
InputClocks the Application Layer. You can drive this clock with
coreclkout_hip. If you drive pld_clk with another clock
source, it must be equal to or faster than coreclkout_hip.
coreclkout_hip
Output
This is a fixed frequency clock used by the Data Link and
Transaction Layers.
Related Information
Clocks on page 8-4
Reset, Status, and Link Training Signals
Refer to Reset and Clocks for more information about the reset sequence and a block diagram of the reset
logic.
Interfaces and Signal Descriptions
Send Feedback
Altera Corporation
6-32
Reset, Status, and Link Training Signals
Table 6-6: Reset Signals
SignalDirectionDescription
UG-01145_avst
2015.05.04
npor
reset_status
pin_perst
InputActive low reset signal. In the Altera hardware example designs,
npor is the OR of pin_perst and local_rstn coming from the
software Application Layer. If you do not drive a soft reset signal
from the Application Layer, this signal must be derived from
pin_perst. You cannot disable this signal. Resets the entire IP
Core and transceiver. Asynchronous.
This signal is edge, not level sensitive; consequently, you cannot
use a low value on this signal to hold custom logic in reset. For
more information about the reset controller, refer to Reset.
OutputActive high reset status signal. When asserted, this signal
indicates that the Hard IP clock is in reset. The reset_status
signal is synchronous to the pld_clk clock and is deasserted only
when the npor is deasserted and the Hard IP for PCI Express is
not in reset (reset_status_hip = 0). You should use reset_
status to drive the reset of your application. This reset is used
for the Hard IP for PCI Express IP Core with the Avalon-ST
interface.
InputActive low reset from the PCIe reset pin of the device. pin_perst
resets the datapath and control registers. Configuration via
Protocol (CvP) requires this signal. For more information about
CvP refer to Configuration via Protocol (CvP).
Arria 10 devices can have up to 4 instances of the Hard IP for
PCI Express. Each instance has its own pin_perst signal. You
must connect the pin_perst of each Hard IP instance to the
corresponding nPERST pin of the device. These pins have the
following locations:
• NPERSTL0: bottom left Hard IP and CvP blocks
• NPERSTL1: top left Hard IP block
• NPERSTR0: bottom right Hard IP block
• NPERSTR1: top right Hard IP block
For example, if you are using the Hard IP instance in the bottom
left corner of the device, you must connect pin_perst to
NPERSL0.
For maximum use of the Arria 10 device, Altera recommends
that you use the bottom left Hard IP first. This is the only
location that supports CvP over a PCIe link. If your design does
not require CvP, you may select other Hard IP blocks.
Altera Corporation
Interfaces and Signal Descriptions
Send Feedback
npor
IO_POF_Load
PCIe_LinkTraining_Enumeration
dl_ltssm[4:0]
detect
detect.active polling.active
L0
UG-01145_avst
2015.05.04
Figure 6-33: Reset and Link Training Timing Relationships
Reset, Status, and Link Training Signals
SignalDirectionDescription
Refer to the appropriate device pinout for correct pin assignment
for more detailed information about these pins. The PCI ExpressCard Electromechanical Specification 2.0 specifies this pin
requires 3.3 V. You can drive this 3.3V signal to the nPERST*
even if the V
VCCPGM
of the bank is not 3.3V if the following 2
conditions are met:
• The input signal meets the VIH and VIL specification for
LVTTL.
• The input signal meets the overshoot specification for 100°C
operation as defined in the device handbook.
The following figure illustrates the timing relationship between npor and the LTSSM L0 state.
6-33
Note: To meet the 100 ms system configuration time, you must use the fast passive parallel configuration
Table 6-7: Status and Link Training Signals
serdes_pll_locked
pld_core_ready
Interfaces and Signal Descriptions
Send Feedback
scheme with CvP and a 32-bit data width (FPP x32) or use the CvP in autonomous mode.
SignalDirectionDescription
OutputWhen asserted, indicates that the PLL that generates the
coreclkout_hip clock signal is locked. In pipe simulation mode
this signal is always asserted.
InputWhen asserted, indicates that the Application Layer is ready for
operation and is providing a stable clock to the pld_clk input. If
the coreclkout_hip Hard IP output clock is sourcing the pld_
clk Hard IP input, this input can be connected to the serdes_
pll_locked output.
Altera Corporation
6-34
Reset, Status, and Link Training Signals
SignalDirectionDescription
UG-01145_avst
2015.05.04
pld_clk_inuse
dlup
dlup_exit
ev128ns
ev1us
hotrst_exit
OutputWhen asserted, indicates that the Hard IP Transaction Layer is
using the pld_clk as its clock and is ready for operation with the
Application Layer. For reliable operation, hold the Application
Layer in reset until pld_clk_inuse is asserted.
OutputWhen asserted, indicates that the Hard IP block is in the Data
Link Control and Management State Machine (DLCMSM) DL_
Up state.
OutputThis signal is asserted low for one pld_clk cycle when the IP
core exits the DLCMSM DL_Up state, indicating that the Data
Link Layer has lost communication with the other end of the
PCIe link and left the Up state. When this pulse is asserted, the
Application Layer should generate an internal reset signal that is
asserted for at least 32 cycles.
OutputAsserted every 128 ns to create a time base aligned activity.
OutputAsserted every 1µs to create a time base aligned activity.
OutputHot reset exit. This signal is asserted for 1 clock cycle when the
LTSSM exits the hot reset state. This signal should cause the
Application Layer to be reset. This signal is active low. When this
pulse is asserted, the Application Layer should generate an
internal reset signal that is asserted for at least 32 cycles.
l2_exit
OutputL2 exit. This signal is active low and otherwise remains high. It is
asserted for one cycle (changing value from 1 to 0 and back to 1)
after the LTSSM transitions from l2.idle to detect. When this
pulse is asserted, the Application Layer should generate an
internal reset signal that is asserted for at least 32 cycles.
lane_act[3:0]OutputLane Active Mode: This signal indicates the number of lanes that
configured during link training. The following encodings are
defined:
• 4’b0001: 1 lane
• 4’b0010: 2 lanes
• 4’b0100: 4 lanes
• 4’b1000: 8 lanes
Altera Corporation
Interfaces and Signal Descriptions
Send Feedback
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.