16–46
Chapter 16: Testbench and Design Example
BFM Procedures and Functions
Arria V GZ Hard IP for PCI Express
November 2012
Altera Corporation
dma_set_header Procedure
Use the
dma_set_header
procedure to configure the DMA descriptor table for DMA
read or DMA write.
rc_mempoll Procedure
Use the
rc_mempoll
procedure to poll a given dword in a given BFM shared memory
location.
Arguments
bar_table
Address of the Endpoint
bar_table
structure in BFM shared memory.
bar_num
BAR number to analyze.
Table 16–59.
dma_set_wr_desc_data_header Procedure
Table 16–60.
dma_set_header Procedure
Location
altpcietb_bfm_driver_rp.v
Syntax
dma_set_header (bar_table, bar_num, Descriptor_size, direction, Use_msi, Use_eplast,
Bdt_msb, Bdt_lab, Msi_number, Msi_traffic_class, Multi_message_enable)
Arguments
bar_table
Address of the Endpoint
bar_table
structure in BFM shared memory.
bar_num
BAR number to analyze.
Descriptor_size
Number of descriptor.
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.
Bdt_msb
BFM shared memory upper address value.
Bdt_lsb
BFM shared memory lower address value.
Msi_number
When
use_msi
is set, specifies the number of the MSI which is set by the
dma_set_msi
procedure.
Msi_traffic_class
When
use_msi
is set, specifies the MSI traffic class which is set by the
dma_set_msi
procedure.
Multi_message_enable
When
use_msi
is set, specifies the MSI traffic class which is set by the
dma_set_msi
procedure.
Table 16–61.
rc_mempoll Procedure
Location
altpcietb_bfm_driver_rp.v
Syntax
rc_mempoll (rc_addr, rc_data, rc_mask)
Arguments
rc_addr
Address of the BFM shared memory that is being polled.
rc_data
Expected data value of the that is being polled.
r
c_mask
Mask that is logically
AND
ed with the shared memory data before it is
compared with
rc_data
.