Nios® V Processor Software Developer Handbook

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

9.3.2.2. Configuring CLIC Interrupt Level

The CLIC implements pre-emption based on interrupt level, where a higher interrupt level pre-empts a lower interrupt level. It is optional to configure the CLIC interrupt level, but pre-emption is rendered inactive if all platform interrupts share the same level.

Call alt_clic_set_level() to specify interrupt level:

int alt_clic_set_level(alt_u32 irq, alt_u8 level_bits)

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

    If the ALT_CPU_CLIC_NUM_LEVELS in system.h is 5, the CLIC supports 4 interrupt levels with a single application level. Thus, the available options for level_bits are 0, 1, 2, and 3.