Arria® 10 Avalon® Streaming with SR-IOV IP for PCIe* User Guide

ID 683686
Date 9/12/2024
Public
Document Table of Contents

5.8. SR-IOV Interrupt Interface

The SR-IOV Bridge supports MSI and MSI-X interrupts for both Physical and Virtual Functions. The Application Layer can use this interface to generate MSI or MSI-X interrupts from both PFs and VFs. The SR-IOV Bridge also supports legacy Interrupts for Physical Functions if you configure the core to support only PFs. To support only PFs, turn on Enable SR-IOV support on the SR-IOV System Settings tab of the component GUI. The Application Layer should select one of the three types of interrupts, depending on the support provided by the platform and the software drivers. Ground the input pins for the unused interrupt types.

This interface also includes signals to set and clear the individual bits in the MSI Pending Bit Register.

Table 29.  MSI Interrupts

Signal

Direction

Description

app_msi_req

Input

When asserted, the Application Layer is requesting that an MSI interrupt be sent. Assertion causes an MSI posted write TLP to be generated based on the MSI configuration register values of the specified Function, and the setting of the app_msi_tc and app_msi_num inputs.

app_msi_req_fn[1:0]

Input

Specifies the PF generating the MSI interrupt. It must be set to the interrupting PF number when asserting app_msi_req.

app_msi_ack

Output

Ack for MSI interrupts. When asserted, indicates that Hard IP has sent an MSI posted write TLP in response app_msi_req . The Application Layer must wait for app_msi_ack after asserting app_msi_req. The Application Layer must de-assert app_msi_req for at least 1 cycle before signaling a new MSI interrupt.

app_msi_addr_pf[64*<n>-1:0]

Output

Driven by the MSI address registers of the PFs. <n> is the number of PFs.
app_msi_data_pf[16<n>-1:0]

Output

Driven by the MSI Data Registers of the PFs, . <n>= the number of PFs.

app_msi_enable_pf[<n>-1:0]

Output

Driven by the MSI Enable bit of the MSI Control Registers of the PFs.

app_msi_mask_pf[32<n>-1:0]

Output

The MSI Mask Bits of the MSI Capability Structure drive app_msi_mask_pf. This mask allows software to disable or defer message sending on a per-vector basis. app_msi_mask_pf[31:0] mask vectors for PF0.app_msi_mask_pf[63:32] mask vectors for PF1.

app_msi_multi_msg_enable_pf[3*<n>-1:0]

Output

Defines the number of interrupt vectors enabled for each PF. The following encodings are defined:

  • 3'b000: 1 vector
  • 3'b001: 2 vectors
  • 3'b010: 4 vectors
  • 3'b100: 16 vectors
  • 3'b101: 32 vectors

The MSI Multiple Message Enable field of the MSI Control Register of PF0 drives app_msi_multi_msg_enable_pf[2:0]. The MSI Multiple Message Enable field of the MSI Control Register of PF1 drives app_msi_multi_msg_enable_pf[5:3], and so on.

app_msi_num[4:0]

Input

Identifies the MSI interrupt type to be generated. Provides the low-order message data bits to be sent in the message data field of MSI messages. Only bits that are enabled by the apply.

app_msi_pending_bit_write_data

Input

Writes the MSI Pending Bit Register of the specified PF when app_msi_pending_bit_write_en is asserted. app_msi_num[4:0] specifies the bit to be written. For more information about the MSI Pending Bit Array (PBA), refer to Section 6.8.1.7 Mask Bits for MSI (Optional) in the PCI Local Bus Specification, Revision 3.0. Refer to Timing Diagram for MSI Pending Bit Write Operation below.

app_msi_pending_bit_write_en

Input

Writes a 0 or 1 into selected bit position in the MSI Pending Bit Register. app_msi_num[4:0] specifies the bit to be written. msi_pending_bit_write_data specifies the data to be written (0 or 1). app_msi_req_fn specifies the function number. This input must be asserted for one cycle to perform the write operation.

msi_pending_bit_write_en cannot be asserted when app_msi_req is high. Refer to Timing Diagram for MSI Pending Bit Write Operation below.

app_msi_pending_pf[32*<n>-1:0]

Output

The MSI Data Registers of the PFs drive msi_pending_pf. <n> is the number of PFs.

app_msi_tc[2:0]

Input

Specifies the traffic class to be used to send the MSI or MSI-X posted write TLP. Must be valid when app_msi_req is asserted.

app_msi_status[1:0] Output

Specifies the status of an MSI request. Valid when app_msi_ack is asserted. The following encodings are defined:

  • 2'b00: MSI message sent
  • 2'b01: MSI message is pending and not sent upstream because the MSI mask was set. And, the Pending bit was set for the MSI number.
  • 2'b10: Requested aborted because of invalid parameters. Or, request aborted because the MSI Enabled bit was not set in the function's MSI Capability structure.
  • 2'b11: Reserved.
Figure 25. Timing Diagram for MSI Interrupt Generation
Figure 26. Timing Diagram for MSI Pending Bit Write Operation The MSI Pending Bit Write Operation aborts the pending MSI interrupt.
Table 30.   MSI-X Interrupts

Signal

Direction

Description

app_msix_req

Input

When asserted, the Application Layer is requesting that an MSI-X interrupt be sent. Assertion causes an MSI-X posted write TLP to be generated. The MSI-X TLP uses data from app_msi_req_pf_num, app_msi_req_ vf_num, app_msi_req_vf_active, app_msix_addr, app_msix_data, and app_msi_tc inputs. Refer to Timing Diagram for MSI-X Interrupt Generation below.

app_msix_ack

Output

Ack for MSI-X interrupts. When asserted, indicates that Hard IP has sent an MSI-X posted write TLP in response app_msix_req . The Application Layer must wait for after asserting app_msix_req. The Application Layer must de-assert app_msix_req for at least 1 cycle before signaling a new MSI interrupt.

app_msix_addr[63:0]

Input

The Application Layer drives the address for the MSI-X posted write TLP on this input. Driven in the same cycle as app_msix_req.

app_msix_data[31:0]

Input

The Application Layer drives app_msix_data[31:0] for the MSI-X posted write TLP. Driven in the same cycle as app_msix_req.

app_msix_enable_pf[<n>-1:0] Output Driven by the MSIX Enable bit of the MSIX Control Register of the PFs.

app_msix_pf_num[1:0]

Output

Identifies the Physical Function generating the MSI-X interrupt. It must be set to the interrupting Function number when asserting app_msix_req.

When the targeted Function is a VF, this input specifies the PF Number to which the VF is attached.
app_msix_vf_active Input Specifies that the Function generating the MSI-X interrupt is a Virtual Function. If this input is asserted, the user must provide the VF number offset of the VF generating the interrupt on app_msix_vf_num.
app_msix_vf_num[10:0] Input When app_msix_vf_active is asserted, this input identifies the VF number offset for the VF generating the interrupt. Its value ranges from 0-<n>-1, where i<n>s the number of VFs in the set of VFs attached to the associated PF.
app_msix_tc[2:0] Input Specifies the traffic class of the MSI-X posted write TLP. It must be valid when app_msix_req is asserted.
app_msix_ack Output Acknowledgment for MSI-X interrupts. A pulse on this output indicates that an MSI-X posted write TLP has been sent in response to the assertion of the app_msix_req input. The user application must wait for the acknowledgment after asserting app_msix_req, and must de-assert app_msix_req for at least one cycle before signaling a new MSI-X interrupt.
     
app_msix_err

Output

Signals an error during the execution of an MSI-X request. Valid when app_msix_ack is asserted. The following encodings are defined:

  • 1b'0: MSI-X message sent
  • 1b'1: Error detected during execution of the MSI-X request. No message sent. The following errors may occur:
    • The function number is invalid
    • The MSI-X Enable bit for the function was not set
    • The MSI-X Function Mask was not set

app_msix_fn_mask_pf[<n>-1:0]

Output

Driven by the MSI-X Function Mask bit of the MSI-X Control Register of the PFs.

     
Figure 27. Timing Diagram for MSI-X Interrupt Generation
Table 31.  Legacy Interrupts

Signal

Direction

Description

app_int_pf_sts[<n>-1:0]

Input

The Application Layer uses this signal to generate a legacy INT<n> interrupt. PF<n> drives app_int_pf_sts[<n>-1:0] . The Hard IP sends a INTx_Assert message upstream to the Root Complex in response to a low-to- high transition. The Hard IP sends a INTX_Deassert in response to a high-to-low transition. The INTX_Deassert message is only sent if a previous INTx_Assert message was sent. When multiple Functions share the same INTx pin, only a single INTx_Assert message is sent if more than one interrupt sharing the same INTx pin are active at the same time.

This input has no effect if the INT<n>Disable bit in the PCI Command Register of the interrupting function is set to 1.

     

app_int_sts_fn

Input

Identifies the function generating the legacy interrupt. When app_int_sts_fn = 0, specifies status for PF0. When app_int_sts_fn = 1, specifies status for PF1.

app_intx_disable[<n>-1:0]

Output

This output is driven by the INT<x>Disable bit of the PCI Command Register of PF.