Specifications
Instruction Set Reference
8
2015.04.02
NII51017
Subscribe
Send Feedback
This section introduces the Nios
®
II instruction word format and provides a detailed reference of the
Nios II instruction set.
Word Formats
There are three types of Nios II instruction word format: I-type, R-type, and J-type.
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 8-1: 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
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:
©
2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera 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 Altera. Altera 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.
ISO
9001:2008
Registered
www.altera.com
101 Innovation Drive, San Jose, CA 95134