8. Instruction Set Reference
This section introduces the Nios II instruction word format and provides a detailed
reference of the Nios II instruction set.
8.1. Word Formats
There are three types of Nios II instruction word format: I-type, R-type, and J-type.
8.1.1. I-Type
The defining characteristic of the I-type instruction word format is that it contains an
immediate value embedded within the instruction word. I-type instructions words
contain:
•
A 6-bit opcode field OP
•
Two 5-bit register fields A and B
•
A 16-bit immediate data field IMM16
In most cases, fields A and IMM16 specify the source operands, and field B specifies
the destination register. IMM16 is considered signed except for logical operations and
unsigned comparisons.
I-type instructions include arithmetic and logical operations such as
addi
and
andi
;
branch operations; load and store operations; and cache management operations.
Table 90.
I-Type Instruction Format
Bit Fields
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
A
B
IMM16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
IMM16
OP
8.1.2. R-Type
The defining characteristic of the R-type instruction word format is that all arguments
and results are specified as registers. R-type instructions contain:
•
A 6-bit opcode field OP
•
Three 5-bit register fields A, B, and C
•
An 11-bit opcode-extension field OPX
NII-PRG | 2018.04.18
Intel Corporation. All rights reserved. Intel, the Intel logo, Altera, Arria, Cyclone, Enpirion, MAX, Nios, Quartus
and Stratix words and logos are trademarks of Intel Corporation or its subsidiaries in the U.S. and/or other
countries. Intel warrants performance of its FPGA and semiconductor products to current specifications in
accordance with Intel's standard warranty, but reserves the right to make changes to any products and services
at any time without notice. Intel assumes no responsibility or liability arising out of the application or use of any
information, product, or service described herein except as expressly agreed to in writing by Intel. Intel
customers are advised to obtain the latest version of device specifications before relying on any published
information and before placing orders for products or services.
*Other names and brands may be claimed as the property of others.
ISO
9001:2008
Registered