Nios® V Processor Reference Manual

ID 683632
Date 5/25/2025
Public

Visible to Intel only — GUID: azr1740972327495

Ixiasoft

Document Table of Contents

4.3.11.1. Related Control and Status Register Fields

The Nios® V processor only supports Machine-Level Control and Status Registers (CSRs) because it operates only in Machine Mode (M-mode). It is the primary privileged level and has low-level access to the machine implementation.

When you enable CLIC, it introduces new indirect access M-mode CSRs and new M-mode CSRs into the Nios® V processor. Additionally, it changes some existing CSRs that were based on CLINT specifications to meet CLIC specifications.

Table 118.   Machine Mode CSRs related to CLIC
Number Name From CLINT to CLIC Description
0x300 mstatus MODIFIED Status register
0x304 mie INACTIVE Interrupt-enable register
0x305 mtvec MODIFIED Trap-handler base address / interrupt mode
0x307 mtvt NEW Trap-handler vector table base address
0x340 mscratch NO CHANGE Scratch register for trap handlers
0x341 mepc NO CHANGE Exception program counter
0x342 mcause MODIFIED Cause of trap
0x343 mtval NO CHANGE Bad address or instruction
0x344 mip INACTIVE Interrupt-pending register
0x345 mnxti NEW Interrupt handler address and enable modifier
0x347 mintthresh NEW Interrupt-level threshold
0x349 mscratchcswl NEW Conditional scratch swap on level change
0x350 miselect NEW Machine Indirect Select
0x351 mireg NEW Machine Indirect Alias
0x352 mireg2 NEW Machine Indirect Alias 2
0xFB1 mintstatus NEW Current interrupt levels

In the Nios® V processor, you can switch between CLINT and CLIC mode using the mtvec register. Thus, it is important to recognize which CSRs—CLINT CSRs or CLIC CSRs, are accessible after the switch is complete. Accessing CLIC CSRs in CLINT mode causes the processor to report illegal instruction exception, except for the mintstatus register. However, note that the mintstatus register is irrelevant in CLINT mode.