Ebfm_cfgwr_imm_wait procedure, Ebfm_cfgwr_imm_nowt procedure – Altera IP Compiler for PCI Express User Manual
Page 269

Chapter 15: Testbench and Design Example
15–37
BFM Procedures and Functions
August 2014
Altera Corporation
IP Compiler for PCI Express User Guide
ebfm_cfgwr_imm_wait Procedure
The ebfm_cfgwr_imm_wait procedure writes up to four bytes of data to the specified
configuration register. This procedure waits until the write completion has been
returned.
ebfm_cfgwr_imm_nowt Procedure
The ebfm_cfgwr_imm_nowt procedure writes up to four bytes of data to the specified
configuration register. This procedure returns as soon as the VC interface module
accepts the transaction, allowing other writes to be issued in the interim. Use this
procedure only when successful completion status is expected.
Table 15–27.
ebfm_cfgwr_imm_wait Procedure
Location
altpcietb_bfm_rdwr.v or altpcietb_bfm_rdwr.vhd
Syntax
ebfm_cfgwr_imm_wait(bus_num, dev_num, fnc_num, imm_regb_ad, regb_ln, imm_data,
compl_status
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
the regb_ad arguments cannot cross a DWORD boundary.
imm_data
Data to be written.
In VHDL, this argument is a std_logic_vector(31 downto 0).
In Verilog HDL, this argument is reg [31:0].
In both languages, the bits written depend on the length:
Length
Bits Written
4
31 downto 0
3
23 downto 0
2
5 downto 0
1
7 downto 0
compl_status
In VHDL. this argument is a std_logic_vector(2 downto 0) and is set by the
procedure on return.
In Verilog HDL, this argument is reg [2:0].
In both languages, this argument is the completion status as specified in the PCI
Express specification:
Compl_StatusDefinition
000SC— Successful completion
001UR— Unsupported Request
010CRS — Configuration Request Retry Status
100CA — Completer Abort
Table 15–28. ebfm_cfgwr_imm_nowt Procedure (Part 1 of 2)
Location
altpcietb_bfm_rdwr.v or altpcietb_bfm_rdwr.vhd
Syntax
ebfm_cfgwr_imm_nowt(bus_num, dev_num, fnc_num, imm_regb_adr, regb_len, imm_data)