Software running on the Nios® II cannot directly inject an ECC error in an ITCM because the Nios® II only writes ITCMs when correcting ECC errors. To inject an ECC in an ITCM, the TCM RAM must also be connected to a DTCM master. The Nios® II provided DTCM error injection mechanism (i.e. ECCINJ register) is used to inject an error in the TCM RAM as follows:
- Use a WRCTL instruction to set ECCINJ so that it injects ECC errors in the DTCM connected to the ITCM.
- Use a STW instruction to write the DTCM.
- Use a RDCTL instruction to ensure the value of the ECCINJ field written by the WRCTL is NOINJ.
- Use a JMP instruction to jump to an instruction address in the ITCM.
- The ECC error should be triggered on the target of the JMP instruction.
Did you find the information on this page useful?