Nios II Custom Instruction User Guide

ID 683242
Date 4/27/2020
Public
Document Table of Contents

3.3.3.1. Select Index Field (N)

The custom instruction N field, bits 13:6, is the custom instruction select index. The select index determine which custom instruction executes.

The Nios II processor supports up to 256 distinct custom instructions through the custom opcode. A custom instruction component can implement a single instruction, or multiple instructions.

In the case of a simple (non-extended) custom instruction, the select index is a simple 8-bit value, assigned to the custom instruction block when it is instantiated in Platform Designer.

Components that implement multiple instructions possess an n port, as described in "Extended Custom Instructions". The n port implements an extension index, which is a subfield of the select index, as shown in the following figure.

Figure 11. Select Index Format
Note: Do not confuse N, the selection index field of the custom instruction, with n, the extension index port. Although n can be 8 bits wide, it generally corresponds to the low-order bits of N.