Machine Non-Maskable Interrupt-Vector Base-Address Register (mnivec) - 2025.2 English - UG1629

MicroBlaze V Processor Reference Guide (UG1629)

Document ID
UG1629
Release Date
2025-11-20
Version
2025.2 English

The mnivec register is a custom optional read/write register that holds non-maskable interrupt vector configuration, consisting of a vector base address (BASE) with the two least significant bit set to zero. It only exists when the "Smrnmi" Extension for Resumable Non-Maskable Interrupts is enabled (C_TRAP_ENHANCEMENT > 1).

Figure 1. Machine Non-Maskable Interrupt-Vector Base-Address Register

Table 1. Machine Non-Maskable Interrupt-Vector Base-Address Register
Bits Name Description Reset Value
31:2 BASE Vector base address (C_BASE_VECTORS + 8) / 4
1:0 MODE Read only zero 00

The trap handler code must be aligned on a 32-bit word boundary.

With compressed instructions enabled (C_USE_COMPRESSION > 0), software must use an align attribute to ensure this is the case.

With the RISC-V GCC compiler, this can be achieved with the following code:

/* Ensure alignment on a word boundary */
void non_maskable_interrupt_handler(void) __attribute__((aligned(4)));