Chapter 16: Testbench and Design Example
16–45
BFM Procedures and Functions
November 2012
Altera Corporation
Arria V GZ Hard IP for PCI Express
dma_rd_test Procedure
Use the
dma_rd_test
procedure for DMA reads from the Endpoint memory to the
BFM shared memory.
dma_wr_test Procedure
Use the
dma_wr_test
procedure for DMA writes from the BFM shared memory to the
Endpoint memory.
dma_set_rd_desc_data Procedure
Use the
dma_set_rd_desc_data
procedure to configure the BFM shared memory for
the DMA read.
dma_set_wr_desc_data Procedure
Use the
dma_set_wr_desc_data
procedure to configure the BFM shared memory for
the DMA write.
Table 16–56.
dma_rd_test Procedure
Location
altpcietb_bfm_driver_rp.v
Syntax
dma_rd_test (bar_table, bar_num, use_msi, use_eplast)
Arguments
bar_table
Address of the Endpoint
bar_table
structure in BFM shared memory.
bar_num
BAR number to analyze.
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.
Table 16–57.
dma_wr_test Procedure
Location
altpcietb_bfm_driver_rp.v
Syntax
dma_wr_test (bar_table, bar_num, use_msi, use_eplast)
Arguments
bar_table
Address of the Endpoint
bar_table
structure in BFM shared memory.
bar_num
BAR number to analyze.
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.
Table 16–58.
dma_set_rd_desc_data Procedure
Location
altpcietb_bfm_driver_rp.v
Syntax
dma_set_rd_desc_data (bar_table, bar_num)
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
Location
altpcietb_bfm_driver_rp.v
Syntax
dma_set_wr_desc_data_header (bar_table, bar_num)