16–44
Chapter 16: Testbench and Design Example
BFM Procedures and Functions
Arria V GZ Hard IP for PCI Express
November 2012
Altera Corporation
dimage7
This function creates a seven-digit decimal string representation of the input
argument that can be concatenated into a larger message string and passed to
ebfm_display
.
Procedures and Functions Specific to the Chaining DMA Design Example
This section describes procedures that are specific to the chaining DMA design
example. These procedures are located in the Verilog HDL module file
altpcietb_bfm_driver_rp.v
.
chained_dma_test Procedure
The
chained_dma_test
procedure is the top-level procedure that runs the chaining
DMA read and the chaining DMA write
Argument range
vec
Input data type
reg
with a
range
of 31:0.
Return range
string
Returns a 6-digit decimal representation of the input argument that is padded with leading
0s if necessary. Return data is type
reg
with a
range
of 48:1.
Returns the letter
U
if the value cannot be represented.
Table 16–53. dimage6
Table 16–54. dimage7
Location
altpcietb_bfm_log.v
syntax
string:= dimage(vec)
Argument range
vec
Input data type
reg
with a
range
of 31:0.
Return range
string
Returns a 7-digit decimal representation of the input argument that is padded with
leading 0s if necessary. Return data is type
reg
with a
range
of 56:1.
Returns the letter <
U>
if the value cannot be represented.
Table 16–55. chained_dma_test Procedure
Location
altpcietb_bfm_driver_rp.v
Syntax
chained_dma_test (bar_table, bar_num, direction, use_msi, use_eplast)
Arguments
bar_table
Address of the Endpoint
bar_table
structure in BFM shared memory.
bar_num
BAR number to analyze.
direction
When 0 the direction is read.
When 1 the direction is write.
Use_msi
When set, the Root Port uses native PCI Express MSI to detect the DMA completion.
Use_eplast
When set, the Root Port uses BFM shared memory polling to detect the DMA completion.