Showing results for 
Search instead for 
Did you mean: 

Design Example - Three PCIe Rootport Examples

Design Example - Three PCIe Rootport Examples

Last Updated

April 25, 2012


These examples demonstrate various aspects of PCIe rootport environments beginning with a basic example that demonstrates the 5 configuration space transactions that must be performed to allow the rootport application and an endpoint application to communicate. Second a streaming data example that shows how to stream data from the rootport to the endpoint and vice versa after the PCIe config space is configured. And an MSI interrupt example that shows how to configure an endpoint to allow it to signal MSI interrupt events to the rootport. Lastly, an example which implements a non-MSI PCIe root port on an Altera SoC development board.

These examples were developed and deployed on two Altera Cyclone IV GX FPGA development kits connected together using a passive PCIe crossover cable. The demonstration environment is driven by system-console over JTAG cable connections into the FPGA devices which contain Qsys systems in each development board.


Each example consists of an archive of the complete source materials to build the entire hardware design and the system console TCL scripts which interact with them on the Cyclone IV GX development boards. There is also a PDF file that documents how each example is put together and how the demonstration works.

Basic Rootport Example

Streaming Rootport Example

MSI Rootport Example

PCIe Root Port on Altera SoC Development board


Archive Download and Extraction

Download the archive for this example and place it in a directory on your system that does not include spaces in the path name. The entire path name of this directory must not contain spaces, so on Windows systems you should avoid putting this in the "My Documents" folder, or on your "Desktop" since these locations are subdirectories of the "Documents and Settings" path, and that would mean that these locations inherit the spaces in that part of the path name.

In order to extract the archives after downloading them, it is recommended that you run the "tar xzf <filename>" command from a bash shell. For linux users you should have ready access to a bash shell. For windows users, you may need to install the Altera development tools to gain access to a bash shell. On Windows it is recommended that you install the complete Altera ACDS development tools which includes the Nios II EDS development tools. Once these tool chains are properly installed on your workstation, you can launch a bash shell by running:

"Start -> Programs -> Altera -> Nios II EDS X.x -> Nios II X.x Command Shell"

Once you are in the bash shell, you can "cd" into the directory containing the archives that you've downloaded, and running the following command to extract them:

tar xzf <archive_filename>

Note that if you use some other archiving software to extract these archives, like WinZip, you may lose the execution privileges on some of the shell scripts within the archives that are used to perform various activities associated with building and using the example. If this happens, you can restore execute privileges from within a bash shell with the command "chmod +x <filename>". It is recommended that you avoid this situation by using "tar" to extract the archives from within a bash shell and avoid using any Windows oriented archive utilities with these archives.

Building the example.

Once the archive is extracted, you should locate a readme.txt file in the top level of the archive directory. Read the contents of that file for additional information about building and running the example.


These examples were created and tested with the Altera ACDS 11.1sp2 development tools. Once built, the examples run on the Cyclone IV GX development board.

See Also

Modular PCIe SOPC Builder Bridge Example

Update History

20120425 - Initial posting.

Outdated Releases

© 2012 Altera Corporation.

The material in this wiki page or document is provided AS-IS and is not

supported by Altera Corporation. Use the material in this document at your own

risk; it might be, for example, objectionable, misleading or inaccurate.

Version history
Last update:
‎06-27-2019 12:02 AM
Updated by: