beautypg.com

Altera IP Compiler for PCI Express User Manual

Page 265

background image

Chapter 15: Testbench and Design Example

15–33

Root Port BFM

August 2014

Altera Corporation

IP Compiler for PCI Express User Guide

Figure 15–9

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_rdwr. The procedures and
functions listed below are available in the VHDL package file
altpcietb_bfm_rdwr.vhd

or in the Verilog HDL include file altpcietb_bfm_rdwr.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 15–9. 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