beautypg.com

Bfm procedures and functions, Ebfm_barwr procedure – Altera Arria V GZ Avalon-ST User Manual

Page 235

background image

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.

ebfm_barrd_nowt

—reads data from an offset of a specific Endpoint BAR and stores it in the BFM

shared memory. This procedure returns as soon as the request has been passed to the VC interface

module for transmission, allowing subsequent reads to be issued in the interim.

These routines take as parameters a BAR number to access the memory space and the BFM shared

memory address of the

bar_table

data structure that was set up by the

ebfm_cfg_rp_ep

procedure.

(Refer to Configuration of Root Port and Endpoint.) Using these parameters simplifies the BFM test driver

routines that access an offset from a specific BAR and eliminates calculating the addresses assigned to the

specified BAR.
The Root Port BFM does not support accesses to Endpoint I/O space BARs.

Related Information

Configuration of Root Port and Endpoint

on page 17-25

BFM Procedures and Functions

The BFM includes procedures, functions, and tasks to drive Endpoint application testing. It also includes

procedures to run the chaining DMA design example.
The BFM read and write procedures read and write data among BFM shared memory, Endpoint BARs,

and specified configuration registers. The procedures and functions are available in the Verilog HDL.

They are in the include file altpcietb_bfm_driver.v. These procedures and functions support issuing

memory and configuration transactions on the PCI Express link.

ebfm_barwr Procedure

The

ebfm_barwr

procedure writes a block of data from BFM shared memory to an offset from the

specified Endpoint BAR. The length can be longer than the configured

MAXIMUM_PAYLOAD_SIZE

; the

procedure breaks the request up into multiple transactions as needed. This routine returns as soon as the

last transaction has been accepted by the VC interface module.

Location

altpcietb_bfm_rdwr.v

Syntax

ebfm_barwr(bar_table, bar_num, pcie_offset, lcladdr, byte_len, tclass)

UG-01127_avst

2014.12.15

BFM Procedures and Functions

17-31

Testbench and Design Example

Altera Corporation

Send Feedback

This manual is related to the following products: