Testbench and design example, Chapter 15, Comp – Altera IP Compiler for PCI Express User Manual

Page 233: Chapter 15, testbench and design example

Advertising
background image

August 2014

Altera Corporation

IP Compiler for PCI Express User Guide

15. Testbench and Design Example

This chapter introduces the root port or endpoint design example including a
testbench, BFM, and a test driver module. When you create an IP Compiler for PCI
Express variation using the IP Catalog and parameter editor, as described in

Chapter 2, Getting Started

, the IP Compiler for PCI Express generates a design

example and testbench customized to your variation. This design example is not
generated when using the Qsys design flow.

When configured as an endpoint variation, the testbench instantiates a design
example and a root port BFM, which provides the following functions:

A configuration routine that sets up all the basic configuration registers in the
endpoint. This configuration allows the endpoint application to be the target and
initiator of PCI Express transactions.

A VHDL/Verilog HDL procedure interface to initiate PCI Express transactions to
the endpoint.

The testbench uses a test driver module, altpcietb_bfm_driver_chaining, to exercise
the chaining DMA of the design example. The test driver module displays
information from the endpoint configuration space registers, so that you can correlate
to the parameters you specified using the parameter editor.

When configured as a root port, the testbench instantiates a root port design example
and an endpoint model, which provides the following functions:

A configuration routine that sets up all the basic configuration registers in the root
port and the endpoint BFM. This configuration allows the endpoint application to
be the target and initiator of PCI Express transactions.

A Verilog HDL procedure interface to initiate PCI Express transactions to the
endpoint BFM.

The testbench uses a test driver module, altpcietb_bfm_driver_rp, to exercise the
target memory and DMA channel in the endpoint BFM. The test driver module
displays information from the root port configuration space registers, so that you can
correlate to the parameters you specified using the parameter editor. The endpoint
model consists of an endpoint variation combined with the chaining DMA
application described above.

PCI Express link monitoring and error injection capabilities are limited to those
provided by the IP core’s test_in and test_out signals. The following sections
describe the testbench, the design example, root port and endpoint BFMs in detail.

1

The Altera testbench and root port or endpoint BFM provide a simple method to do
basic testing of the application layer logic that interfaces to the variation. However,
the testbench and root port BFM are not intended to be a substitute for a full
verification environment. To thoroughly test your application, Altera suggests that
you obtain commercially available PCI Express verification IP and tools, or do your
own extensive hardware testing or both.

August 2014
<edit Part Number variable in chapter>

Advertising