Specifications
Table Of Contents
- Nios II Processor Reference Handbook
- Contents
- Chapter Revision Dates
- About This Handbook
- Section I. Nios II Processor
- 1. Introduction
- 2. Processor Architecture
- 3. Programming Model
- Introduction
- General- Purpose Registers
- Control Registers
- Operating Modes
- Exception Processing
- Memory and Peripheral Access
- Instruction Set Categories
- Referenced Documents
- Document Revision History
- 4. Instantiating the Nios II Processor in SOPC Builder
- Section II. Appendices
- 5. Nios II Core Implementation Details
- Introduction
- Device Family Support
- Nios II/f Core
- Nios II/s Core
- Nios II/e Core
- Referenced Documents
- Document Revision History
- 6. Nios II Processor Revision History
- 7. Application Binary Interface
- 8. Instruction Set Reference
- Introduction
- Word Formats
- Instruction Opcodes
- Assembler Pseudo- instructions
- Assembler Macros
- Instruction Set Reference
- add
- addi
- and
- andhi
- andi
- beq
- bge
- bgeu
- bgt
- bgtu
- ble
- bleu
- blt
- bltu
- bne
- br
- break
- bret
- call
- callr
- cmpeq
- cmpeqi
- cmpge
- cmpgei
- cmpgeu
- cmpgeui
- cmpgt
- cmpgti
- cmpgtu
- cmpgtui
- cmple
- cmplei
- cmpleu
- cmpleui
- cmplt
- cmplti
- cmpltu
- cmpltui
- cmpne
- cmpnei
- custom
- div
- divu
- eret
- flushd
- flushda
- flushi
- flushp
- initd
- initi
- jmp
- jmpi
- ldb / ldbio
- ldbu / ldbuio
- ldh / ldhio
- ldhu / ldhuio
- ldw / ldwio
- mov
- movhi
- movi
- movia
- movui
- mul
- muli
- mulxss
- mulxsu
- mulxuu
- nextpc
- nop
- nor
- or
- orhi
- ori
- rdctl
- ret
- rol
- roli
- ror
- sll
- slli
- sra
- srai
- srl
- srli
- stb / stbio
- sth / sthio
- stw / stwio
- sub
- subi
- sync
- trap
- wrctl
- xor
- xorhi
- xori
- Referenced Documents
- Document Revision History

8–4 Altera Corporation
Nios II Processor Reference Handbook October 2007
Instruction Opcodes
Instruction
Opcodes
The OP field in the Nios II instruction word specifies the major class of an
opcode as shown in Table 8–1 and Table 8–2. Most values of OP are
encodings for I-type instructions. One encoding, OP = 0x00, is the J-type
instruction call. Another encoding, OP = 0x3a, is used for all R-type
instructions, in which case, the OPX field differentiates the instructions.
All undefined encodings of OP and OPX are reserved.
Table 8–1. OP Encodings
OP Instruction OP Instruction OP Instruction OP Instruction
0x00 call 0x10 cmplti 0x20 cmpeqi 0x30 cmpltui
0x01 jmpi 0x11 0x21 0x31
0x02 0x12 0x22 0x32 custom
0x03 ldbu 0x13 0x23 ldbuio 0x33 initd
0x04 addi 0x14 ori 0x24 muli 0x34 orhi
0x05 stb 0x15 stw 0x25 stbio 0x35 stwio
0x06 br 0x16 blt 0x26 beq 0x36 bltu
0x07 ldb 0x17 ldw 0x27 ldbio 0x37 ldwio
0x08 cmpgei 0x18 cmpnei 0x28 cmpgeui 0x38
0x09 0x19 0x29 0x39
0x0A 0x1A 0x2A 0x3A
R-type
0x0B ldhu 0x1B flushda 0x2B ldhuio 0x3B flushd
0x0C andi 0x1C xori 0x2C andhi 0x3C xorhi
0x0D sth 0x1D 0x2D sthio 0x3D
0x0E bge 0x1E bne 0x2E bgeu 0x3E
0x0F ldh 0x1F 0x2F ldhio 0x3F