Altera HWLIB  16.0
The Altera HW Manager API Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
Interrupt Controller Common Definitions

Description

This module contains the definitions common to the Interrupt Controller Low-Level API and Interrupt Controller Manager Interface.

Macros

#define ALT_INT_ICCIAR_CPUID_GET(icciar)   ((icciar >> 10) & 0x7)
 
#define ALT_INT_ICCIAR_ACKINTID_GET(icciar)   (icciar & 0x3FF)
 

Typedefs

typedef uint32_t alt_int_cpu_target_t
 
typedef enum ALT_INT_TRIGGER_e ALT_INT_TRIGGER_t
 
typedef enum ALT_INT_SGI_TARGET_e ALT_INT_SGI_TARGET_t
 
typedef void(* alt_int_callback_t )(uint32_t icciar, void *context)
 

ENUMS

enum  ALT_INT_TRIGGER_e {
  ALT_INT_TRIGGER_EDGE, ALT_INT_TRIGGER_LEVEL, ALT_INT_TRIGGER_SOFTWARE, ALT_INT_TRIGGER_AUTODETECT,
  ALT_INT_TRIGGER_NA
}
 
enum  ALT_INT_SGI_TARGET_e { ALT_INT_SGI_TARGET_LIST, ALT_INT_SGI_TARGET_ALL_EXCL_SENDER, ALT_INT_SGI_TARGET_SENDER_ONLY }
 

Macro Definitions

#define ALT_INT_ICCIAR_CPUID_GET (   icciar)    ((icciar >> 10) & 0x7)

Extracts the CPUID field from the ICCIAR register.

#define ALT_INT_ICCIAR_ACKINTID_GET (   icciar)    (icciar & 0x3FF)

Extracts the ACKINTID field from the ICCIAR register.

Typedef Documentation

typedef uint32_t alt_int_cpu_target_t

This is the CPU target type. It is used to specify a set of CPUs on the system. If only bit 0 is set then it specifies a set of CPUs containing only CPU 0. Multiple CPUs can be specified by setting the appropriate bit up to the number of CPUs on the system.

This type definition enumerates all the interrupt trigger types.

This type definition enumerates all the target list filter options. This is used by the trigger Software Generated Interrupt (SGI) feature to issue a SGI to the specified processor(s) in the system. Depending on the target list filter and the target list, interrupts can be routed to any combinations of CPUs.

typedef void(* alt_int_callback_t)(uint32_t icciar, void *context)

The callback to use when an interrupt needs to be serviced.

Parameters
icciarThe Interrupt Controller CPU Interrupt Acknowledgement Register value (ICCIAR) value corresponding to the current interrupt.
contextThe user provided context.

Enumeration Type Documentation

This type definition enumerates all the interrupt trigger types.

Enumerator:
ALT_INT_TRIGGER_EDGE 

Edge triggered interrupt. This applies to Private Peripheral Interrupts (PPI) and Shared Peripheral Interrupts (SPI) only, with interrupt IDs 16 - 1019.

ALT_INT_TRIGGER_LEVEL 

Level triggered interrupt. This applies to Private Peripheral Interrupts (PPI) and Shared Peripheral Interrupts (SPI) only, with interrupt IDs 16 - 1019.

ALT_INT_TRIGGER_SOFTWARE 

Software triggered interrupt. This applies to Software Generated Interrupts (SGI) only, with interrupt IDs 0 - 15.

ALT_INT_TRIGGER_AUTODETECT 

All triggering types except for those in the Shared Peripheral Interrupts (SPI) F2S FPGA family interrupts can be determined by the system automatically. In all functions which ask for the triggering type, the ALT_INT_TRIGGER_AUTODETECT can be used to select the correct trigger type for all non F2S interrupt types.

ALT_INT_TRIGGER_NA 

The interrupt triggering information is not applicable. This is possibly due to querying an invalid interrupt identifier.

This type definition enumerates all the target list filter options. This is used by the trigger Software Generated Interrupt (SGI) feature to issue a SGI to the specified processor(s) in the system. Depending on the target list filter and the target list, interrupts can be routed to any combinations of CPUs.

Enumerator:
ALT_INT_SGI_TARGET_LIST 

This filter list uses the target list parameter to specify which CPUs to send the interrupt to. If target list is 0, no interrupts are sent.

ALT_INT_SGI_TARGET_ALL_EXCL_SENDER 

This filter list sends the interrupt all CPUs except the current CPU. The target list parameter is ignored.

ALT_INT_SGI_TARGET_SENDER_ONLY 

This filter list sends the interrupt to the current CPU only. The target list parameter is ignored.