Ebfm_cfgrd_nowt procedure, Bfm configuration procedures, Ebfm_cfg_rp_ep procedure – Altera IP Compiler for PCI Express User Manual
Page 271

Chapter 15: Testbench and Design Example
15–39
BFM Procedures and Functions
August 2014
Altera Corporation
IP Compiler for PCI Express User Guide
ebfm_cfgrd_nowt Procedure
The ebfm_cfgrd_nowt procedure reads up to four bytes of data from the specified
configuration register and stores the data in the BFM shared memory. This procedure
returns as soon as the VC interface module has accepted the transaction, allowing
other reads to be issued in the interim. Use this procedure only when successful
completion status is expected and a subsequent read or write with a wait can be used
to guarantee the completion of this operation.
BFM Configuration Procedures
The following procedures are available in altpcietb_bfm_configure. These
procedures support configuration of the root port and endpoint configuration space
registers.
All VHDL arguments are subtype natural and are input-only unless specified
otherwise. All Verilog HDL arguments are type integer and are input-only unless
specified otherwise.
ebfm_cfg_rp_ep Procedure
The ebfm_cfg_rp_ep procedure configures the root port and endpoint configuration
space registers for operation. Refer to
for a description the arguments for
this procedure.
Table 15–30. ebfm_cfgrd_nowt Procedure
Location
altpcietb_bfm_rdwr.v or altpcietb_bfm_rdwr.vhd
Syntax
ebfm_cfgrd_nowt(bus_num, dev_num, fnc_num, regb_ad, regb_ln, lcladdr)
Arguments bus_num
PCI Express bus number of the target device.
dev_num
PCI Express device number of the target device.
fnc_num
Function number in the target device to be accessed.
regb_ad
Byte-specific address of the register to be written.
regb_ln
Length, in bytes, of the data written. Maximum length is four bytes. The regb_ln and
regb_ad
arguments cannot cross a DWORD boundary.
lcladdr
BFM shared memory address where the read data should be placed.
Table 15–31. ebfm_cfg_rp_ep Procedure (Part 1 of 2)
Location
altpcietb_bfm_configure.v or altpcietb_bfm_configure.vhd
Syntax
ebfm_cfg_rp_ep(bar_table, ep_bus_num, ep_dev_num, rp_max_rd_req_size,
display_ep_config, addr_map_4GB_limit)
Arguments
bar_table
Address of the endpoint bar_table structure in BFM shared memory. This
routine populates the bar_table structure. The bar_table structure stores
the size of each BAR and the address values assigned to each BAR. The address
of the bar_table structure is passed to all subsequent read and write
procedure calls that access an offset from a particular BAR.