Nios II Classic Processor Reference Guide

ID 683620
Date 10/28/2016
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. When your system contains an MMU or MPU, illegal instruction checking is always on. When no MMU or MPU is present, you have the option to have the processor check for illegal instructions.

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.