Chapter 16: Testbench and Design Example
16–27
Root Port BFM
November 2012
Altera Corporation
Arria V GZ Hard IP for PCI Express
shows the I/O address space.
Issuing Read and Write Transactions to the Application Layer
Read and write transactions are issued to the Endpoint Application Layer by calling
one of the
ebfm_bar
procedures in
altpcietb_bfm_driver_rp.v
. The procedures and
functions listed below are available in the Verilog HDL include file
altpcietb_bfm_driver_rp.v
. The complete list of available procedures and functions is
as follows:
■
ebfm_barwr
—writes data from BFM shared memory to an offset from a specific
Endpoint BAR. This procedure returns as soon as the request has been passed to
the VC interface module for transmission.
■
ebfm_barwr_imm
—writes a maximum of four bytes of immediate data (passed in a
procedure call) to an offset from a specific Endpoint BAR. This procedure returns
as soon as the request has been passed to the VC interface module for
transmission.
■
ebfm_barrd_wait
—reads data from an offset of a specific Endpoint BAR and stores
it in BFM shared memory. This procedure blocks waiting for the completion data
to be returned before returning control to the caller.
Figure 16–7. I/O Address Space
Root Complex Shared
Memory
0x0000 0000
Configuration Scratch
Used by BFM routines
not writable by user calls
or endpoint
0x001F FF80
BAR Table
Used by BFM routines
not writable by user calls
or endpoint
0x001F FFC0
/
O Space
BARs
Assigned Smallest to
Largest
0x0020 0000
0xFFFF FFFF
Unused
BAR size dependent
Endpoint
Space
Addr