Msi_poll procedure, Dma_set_msi procedure, Msi_poll procedure –47 dma_set_msi procedure –47 – Altera Arria V Hard IP for PCI Express User Manual

Page 269

Advertising
background image

Chapter 17: Testbench and Design Example

17–47

BFM Procedures and Functions

December 2013

Altera Corporation

Arria V Hard IP for PCI Express

User Guide

msi_poll Procedure

The

msi_poll

procedure tracks MSI completion from the Endpoint.

dma_set_msi Procedure

The

dma_set_msi

procedure sets PCI Express native MSI for the DMA read or the

DMA write.

Table 17–62.

msi_poll

Procedure

Location

altpcietb_bfm_driver_rp.v

Syntax

msi_poll(max_number_of_msi,msi_address,msi_expected_dmawr,msi_expected_dmard,dma_wri

te,dma_read)

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 17–63.

dma_set_msi

Procedure

Location

altpcietb_bfm_driver_rp.v

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.

Advertising