Nios® II Processor Reference Guide

ID 683836
Date 8/28/2023
Public
Document Table of Contents

3.7.7.4. Illegal Instruction

Illegal instructions are instructions with an undefined opcode or opcode-extension field. The Nios® II processor can check for illegal instructions and generate an exception when an illegal instruction is encountered. Illegal instruction checking is always on regardless of MMU or MPU settings.

For information about controlling this option, refer to the Instantiating the Nios® II Processor chapter of the Nios® II Processor Reference Handbook.

When the processor issues an instruction with an undefined opcode or opcode-extension field, and illegal instruction exception checking is turned on, an illegal instruction exception is generated.

Refer to the OP Encodings and OPX Encodings for R-Type Instructions tables in the Instruction Set Reference chapter of the Nios® II Processor Reference Handbook to see the unused opcodes and opcode extensions.

Note: All undefined opcodes are reserved. The processor does occasionally use some undefined encodings internally. Executing one of these undefined opcodes does not trigger an illegal instruction exception.

Refer to the Nios II Core Implementation Details chapter of the Nios® II Processor Reference Handbook for information about each specific Nios II core.