Nios® V Processor Software Developer Handbook

ID 743810
Date 10/06/2025
Public
Document Table of Contents

9.3.2.3. Configuring CLIC Interrupt Priority

The CLIC implements priority arbitration based on interrupt priority, which determines the first interrupt to service if multiple interrupts of the same interrupt level occur at the same time.

If there are multiple interrupts with the same level and priority, the highest-numbered interrupt is taken first. For example, interrupt numbered as 2048 is taken first among all interrupts from number 0 to 2047 (assuming all interrupts have the same level and priority).

Call alt_clic_set_priority() to specify interrupt level:

int alt_clic_set_priority(alt_u32 irq, alt_u8 priority_bits)

The function has the following parameters:
  • irq is the platform interrupt number for the device, as defined in system.h
  • priority_bits is the preferred interrupt priority.

    If the ALT_CPU_CLIC_NUM_PRIORITIES in system.h is 4, the CLIC supports 4 interrupt priorities. Thus, the available options for priority_bits are 0, 1, 2, and 3.