Dma_set_msi procedure, Find_mem_bar procedure – Altera IP Compiler for PCI Express User Manual

Page 286

Advertising
background image

15–54

Chapter 15: Testbench and Design Example

BFM Procedures and Functions

IP Compiler for PCI Express User Guide

August 2014

Altera Corporation

dma_set_msi Procedure

The dma_set_msi procedure sets PCI Express native MSI for the DMA read or the
DMA write.

find_mem_bar Procedure

The find_mem_bar procedure locates a BAR which satisfies a given memory space
requirement.

Arguments

max_number_of_msi

Specifies the number of MSI interrupts to wait for.

msi_address

The shared memory location to which the MSI messages will be written.

msi_expected_dmawr

When dma_write is set, this specifies the expected MSI data value for the
write DMA interrupts which is set by the dma_set_msi procedure.

msi_expected_dmard

When the dma_read is set, this specifies the expected MSI data value for the
read DMA interrupts which is set by the dma_set_msi procedure.

Dma_write

When set, poll for MSI from the DMA write module.

Dma_read

When set, poll for MSI from the DMA read module.

Table 15–67.

msi_poll

Procedure

Table 15–68.

dma_set_msi

Procedure

Location

altpcietb_bfm_driver_chaining.v or altpcietb_bfm_driver_chaining.vhd

Syntax

dma_set_msi(bar_table, bar_num, bus_num, dev_num, fun_num, direction, msi_address,

msi_data, msi_number, msi_traffic_class, multi_message_enable, msi_expected)

Arguments

bar_table

Address of the endpoint bar_table structure in BFM shared memory.

bar_num

BAR number to analyze.

Bus_num

Set configuration bus number.

dev_num

Set configuration device number.

Fun_num

Set configuration function number.

Direction

When 0 the direction is read.

When 1 the direction is write.

msi_address

Specifies the location in shared memory where the MSI message data
will be stored.

msi_data

The 16-bit message data that will be stored when an MSI message is
sent. The lower bits of the message data will be modified with the
message number as per the PCI specifications.

Msi_number

Returns the MSI number to be used for these interrupts.

Msi_traffic_class

Returns the MSI traffic class value.

Multi_message_enable

Returns the MSI multi message enable status.

msi_expected

Returns the expected MSI data value, which is msi_data modified by the
msi_number

chosen.

Table 15–69.

find_mem_bar

Procedure

Location

altpcietb_bfm_driver_chaining.v

Syntax

Find_mem_bar(bar_table,allowed_bars,min_log2_size, sel_bar)

Advertising