Nios® V Processor Reference Manual

ID 683632
Date 10/15/2025
Public
Document Table of Contents

3.3.9.5. Single-bit & Double-bit ECC Error Exception Code

The Nios® V processor supports ECC error exception codes, which extend the processor's CSR behavior during an ECC event. Handling ECC events as exceptions increases the system's availability by running the ECC exception handler.
The affected CSRs are listed in the table below:
Table 66.  List of Affected CSR
Affected CSR Description
alt_ecc_status A custom CSR that specifies which ECC sources and error types can trigger the following processor reactions:
  • Flag exception code 19 in mcause
  • Switch pc to the address specified in mtvec
  • Initiate mtval and mtval2 reaction
mcause An exception code 19 (0x13 – Hardware Error Exception) is written to the mcause.
mtval
  • Contains the violating address when an ECC error occurs during a load/store or instruction fetch error.
  • Contains the violating register number in one-hot encoding when an ECC error occurs on a register file
(For example: If reading x2 register causes a single-bit ECC fault, then mtval[2] bit field is set.)
mtval2 Provides information about the ECC error memory source and error type. Refer to the table List of ECC Sources based on mtval2 Bit Field for more information.
Table 67.  List of ECC Sources based on mtval2 Bit Field
mtval2 ECC Error Source
0 (32’h0) GPR ECC Correctable Error
1 (32’h1) GPR ECC Uncorrectable Error