November 2012
Altera Corporation
Arria V GZ Hard IP for PCI Express
16. Testbench and Design Example
This chapter introduces the Root Port or Endpoint design example including a
testbench, BFM, and a test driver module. You can create this design example for
using design flows described in
Chapter 2, Getting Started with the Arria V GZ Hard
Chapter 3, Getting Started with the Avalon-MM Arria V GZ
.
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 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.
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.
The Gen3 simulation model has the following limitations:
■
Only serial simulation is available. PIPE simulation is not supported.
■
The Gen3 simulation bypasses Phase 2 and Phase 3 Equalization. You must set
your third-party BFM to terminate the equalization process after Phase 0 and
Phase 1 complete.
November 2012
UG-01097-1.4