Stratix V Avalon-ST Interface with SR-IOV PCIe Solutions: User Guide

ID 683488
Date 5/02/2016
Public
Document Table of Contents

4.8. Interrupt Interface

The SR-IOV Bridge supports MSI and MSI-X interrupts for both Physical and Virtual Functions. It also supports legacy Interrupts for Physical Functions. The Application Layer can use this interface to generate MSI or MSI-X interrupts from both PFs and VFs. The Application Layer can generate legacy interrupts from PFs only. 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 28.  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. The MSI TLP uses app_msi_req_fn[7:0], app_msi_tc and app_msi_num to create the TLP. Refer to Timing Diagram for MSI Interrupt Generation for a timing diagram.

app_msi_req_fn[7:0]

Input

Specifies the function generating the MSI or MSI-X interrupt. Driven in the same cycle as app_msi_req or app_msix_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[127:0]

Output

Driven by the MSI address registers of PF0 and PF1. app_msi_addr_pf[63:0] specifies the PF0 address. app_msi_addr_pf[127:64] specifies the PF1 address.
app_msi_data_pf[16<n>-1:0]

Output

Driven by the MSI Data Registers of PF0 and PF1. <n>= the number of PFs.

app_msi_enable_pf[1:0]

Output

Driven by the MSI Enable bit of the MSI Control Registers of PF0 and PF1.

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[5: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].

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 MSI Message Control Register apply.

app_msi_pending_bit_write_data

Input

Writes the MSI Pending Bit Register of the specified function when 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.

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.

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[63:0]

Output

The MSI Data Registers of PF0 and PF1 drive msi_pending_pf[63:0]

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 or app_msix_req is asserted.

app_msi_status[1:0] Output

Indicates 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 9. Timing Diagram for MSI Interrupt Generation
Figure 10. Timing Diagram for MSI Pending Bit Write Operation The MSI Pending Bit Write Operation aborts the pending MSI interrupt.
Table 29.   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_fn, 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[1:0]

Output

The MSI-X Enable bit of PF0 and PF1 MSI-X Control Register drive this output.

app_msix_enable_vf[<n>-1:0]

Output

The MSI-X Enable bit of the MSI-X Control Register for VF0 drives bit[0]. The MSI-X Enable bit of the MSI-X Control Register for VF1 drives bit[1], and so on.

app_msix_err

Output

Indicates 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[1:0]

Output

The MSI-X Function Mask bit of PF0 and PF1 MSI-X Control Register drive this output.

app_msix_fn_mask_vf[<n>-1:0]

Output

The MSI-X Function Mask bit of the MSI-X Control Register for VF0 drives bit[0]. The MSI-X Function Mask bit of the MSI-X Control Register for VF1 drives bit[1], and so on. <n> equals the total number of VFs for both PF0 and PF1.

Figure 11. Timing Diagram for MSI-X Interrupt Generation
Table 30.  Legacy Interrupts

Signal

Direction

Description

app_int_sts_a

Input

The Application Layer uses this signal to generate a legacy INT<x> interrupt. <x> corresponds to a-d for functions programmed to use interrupt pins a-d. The Hard IP sends an 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. Legacy Interrupt Assertion and Legacy Interrupt Deassertion for timing diagrams.

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

app_int_sts_b

Input

app_int_sts_c

Input

app_int_sts_d

Input

app_int_ack

Output

A pulse on this output indicates that an INTx_Assert or INTX_Deassert message has been sent. Assertion is in response to a transition on aapp_int_sts_<x> input. This signal is asserted for at least 1 cycle when an INTx_Assert message TLP has been transmitted. It is asserted when either of the following occurs:
  • A low-to-high transition on one of the app_int_sts_<x> inputs
  • A INTX_Deassert message TLP has been transmitted in response to a high-to-low transition
The Application Layer must wait for app_int_ack the after making a transition on one of theapp_int_sts_<x> inputs, before signaling a new transition.
app_int_pend_status[1:0] Input The Application Layer must drive each of these inputs with the interrupt pending status of the corresponding PF. The Interrupt Pending Status bit of the PCI Status Register records the pending status .

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[1:0]

Output

This output is driven by the INT<x>Disable bit of the PCI Command Register of FP0 and PF1. app_intx_disable[0] disables PF0. app_intx_disable[1] disables PF1.

Figure 12. Legacy Interrupt Assertion
Figure 13. Legacy Interrupt Deassertion

Did you find the information on this page useful?

Characters remaining:

Feedback Message