3.4.2.1. The status Register
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.4.2.2. The estatus Register
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.4.2.3. The bstatus Register
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.4.2.4. The ienable Register
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.4.2.5. The ipending Register
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.4.2.6. The cpuid Register
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.4.2.7. The exception Register
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.4.2.8. The pteaddr Register
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.4.2.9. The tlbacc Register
                                                    
                                                    
                                                
                                                    
                                                        3.4.2.10. The tlbmisc Register
                                                    
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.4.2.11. The badaddr Register
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.4.2.12. The config Register
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.4.2.13. The mpubase Register
                                                    
                                                    
                                                
                                                    
                                                        3.4.2.14. The mpuacc Register
                                                    
                                                    
                                                    
                                                
                                            
                                        
                                                
                                                
                                                    
                                                    
                                                        3.6.3.1. Instruction Cache Tag RAM
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.6.3.2. Instruction Cache Data RAM
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.6.3.3. ITCMs
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.6.3.4. Register File RAM Blocks
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.6.3.5. Data Cache Tag RAM
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.6.3.6. Data Cache Data RAM (Clean Line)
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.6.3.7. Data Cache Data RAM (Dirty Line)
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.6.3.8. Data Cache Victim Line Buffer RAM
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.6.3.9. DTCMs
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.6.3.10. MMU TLB RAM
                                                    
                                                    
                                                
                                            
                                        
                                    
                                    
                                        
                                        
                                            3.7.1. Terminology
                                        
                                        
                                    
                                        
                                        
                                            3.7.2. Exception Overview
                                        
                                        
                                    
                                        
                                            3.7.3. Exception Latency
                                        
                                        
                                        
                                    
                                        
                                        
                                            3.7.4. Reset Exceptions
                                        
                                        
                                    
                                        
                                            3.7.5. Break Exceptions
                                        
                                        
                                        
                                    
                                        
                                            3.7.6. Interrupt Exceptions
                                        
                                        
                                        
                                    
                                        
                                            3.7.7. Instruction-Related Exceptions
                                        
                                        
                                        
                                    
                                        
                                        
                                            3.7.8. Other Exceptions
                                        
                                        
                                    
                                        
                                            3.7.9. Exception Processing Flow
                                        
                                        
                                        
                                    
                                        
                                            3.7.10. Determining the Cause of Interrupt and Instruction-Related Exceptions
                                        
                                        
                                        
                                    
                                        
                                            3.7.11. Handling Nested Exceptions
                                        
                                        
                                        
                                    
                                        
                                        
                                            3.7.12. Handling Nonmaskable Interrupts
                                        
                                        
                                    
                                        
                                            3.7.13. Masking and Disabling Exceptions
                                        
                                        
                                        
                                    
                                
                            
                                                
                                                
                                                    
                                                    
                                                        3.7.7.1. Trap Instruction
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.7.7.2. Break Instruction
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.7.7.3. Unimplemented Instruction
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.7.7.4. Illegal Instruction
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.7.7.5. Supervisor-Only Instruction
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.7.7.6. Supervisor-Only Instruction Address
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.7.7.7. Supervisor-Only Data Address
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.7.7.8. Misaligned Data Address
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.7.7.9. Misaligned Destination Address
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.7.7.10. Division Error
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.7.7.11. Fast TLB Miss
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.7.7.12. Double TLB Miss
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.7.7.13. TLB Permission Violation
                                                    
                                                    
                                                
                                                    
                                                    
                                                        3.7.7.14. MPU Region Violation
                                                    
                                                    
                                                
                                            
                                        
                                    
                                    
                                        
                                        
                                            3.9.1. Data Transfer Instructions
                                        
                                        
                                    
                                        
                                        
                                            3.9.2. Arithmetic and Logical Instructions
                                        
                                        
                                    
                                        
                                        
                                            3.9.3. Move Instructions
                                        
                                        
                                    
                                        
                                        
                                            3.9.4. Comparison Instructions
                                        
                                        
                                    
                                        
                                        
                                            3.9.5. Shift and Rotate Instructions
                                        
                                        
                                    
                                        
                                        
                                            3.9.6. Program Control Instructions
                                        
                                        
                                    
                                        
                                        
                                            3.9.7. Other Control Instructions
                                        
                                        
                                    
                                        
                                        
                                            3.9.8. Custom Instructions
                                        
                                        
                                    
                                        
                                        
                                            3.9.9. No-Operation Instruction
                                        
                                        
                                    
                                        
                                        
                                            3.9.10. Potential Unimplemented Instructions
                                        
                                        
                                    
                                
                            
                                    
                                    
                                        
                                        
                                            8.5.1. add
                                        
                                        
                                    
                                        
                                        
                                            8.5.2. addi
                                        
                                        
                                    
                                        
                                        
                                            8.5.3. and
                                        
                                        
                                    
                                        
                                        
                                            8.5.4. andhi
                                        
                                        
                                    
                                        
                                        
                                            8.5.5. andi
                                        
                                        
                                    
                                        
                                        
                                            8.5.6. beq
                                        
                                        
                                    
                                        
                                        
                                            8.5.7. bge
                                        
                                        
                                    
                                        
                                        
                                            8.5.8. bgeu
                                        
                                        
                                    
                                        
                                        
                                            8.5.9. bgt
                                        
                                        
                                    
                                        
                                        
                                            8.5.10. bgtu
                                        
                                        
                                    
                                        
                                        
                                            8.5.11. ble
                                        
                                        
                                    
                                        
                                        
                                            8.5.12. bleu
                                        
                                        
                                    
                                        
                                        
                                            8.5.13. blt
                                        
                                        
                                    
                                        
                                        
                                            8.5.14. bltu
                                        
                                        
                                    
                                        
                                        
                                            8.5.15. bne
                                        
                                        
                                    
                                        
                                        
                                            8.5.16. br
                                        
                                        
                                    
                                        
                                        
                                            8.5.17. break
                                        
                                        
                                    
                                        
                                        
                                            8.5.18. bret
                                        
                                        
                                    
                                        
                                        
                                            8.5.19. call
                                        
                                        
                                    
                                        
                                        
                                            8.5.20. callr
                                        
                                        
                                    
                                        
                                        
                                            8.5.21. cmpeq
                                        
                                        
                                    
                                        
                                        
                                            8.5.22. cmpeqi
                                        
                                        
                                    
                                        
                                        
                                            8.5.23. cmpge
                                        
                                        
                                    
                                        
                                        
                                            8.5.24. cmpgei
                                        
                                        
                                    
                                        
                                        
                                            8.5.25. cmpgeu
                                        
                                        
                                    
                                        
                                        
                                            8.5.26. cmpgeui
                                        
                                        
                                    
                                        
                                        
                                            8.5.27. cmpgt
                                        
                                        
                                    
                                        
                                        
                                            8.5.28. cmpgti
                                        
                                        
                                    
                                        
                                        
                                            8.5.29. cmpgtu
                                        
                                        
                                    
                                        
                                        
                                            8.5.30. cmpgtui
                                        
                                        
                                    
                                        
                                        
                                            8.5.31. cmple
                                        
                                        
                                    
                                        
                                        
                                            8.5.32. cmplei
                                        
                                        
                                    
                                        
                                        
                                            8.5.33. cmpleu
                                        
                                        
                                    
                                        
                                        
                                            8.5.34. cmpleui
                                        
                                        
                                    
                                        
                                        
                                            8.5.35. cmplt
                                        
                                        
                                    
                                        
                                        
                                            8.5.36. cmplti
                                        
                                        
                                    
                                        
                                        
                                            8.5.37. cmpltu
                                        
                                        
                                    
                                        
                                        
                                            8.5.38. cmpltui
                                        
                                        
                                    
                                        
                                        
                                            8.5.39. cmpne
                                        
                                        
                                    
                                        
                                        
                                            8.5.40. cmpnei
                                        
                                        
                                    
                                        
                                        
                                            8.5.41. custom
                                        
                                        
                                    
                                        
                                        
                                            8.5.42. div
                                        
                                        
                                    
                                        
                                        
                                            8.5.43. divu
                                        
                                        
                                    
                                        
                                        
                                            8.5.44. eret
                                        
                                        
                                    
                                        
                                        
                                            8.5.45. flushd
                                        
                                        
                                    
                                        
                                        
                                            8.5.46. flushda
                                        
                                        
                                    
                                        
                                        
                                            8.5.47. flushi
                                        
                                        
                                    
                                        
                                        
                                            8.5.48. flushp
                                        
                                        
                                    
                                        
                                        
                                            8.5.49. initd
                                        
                                        
                                    
                                        
                                        
                                            8.5.50. initda
                                        
                                        
                                    
                                        
                                        
                                            8.5.51. initi
                                        
                                        
                                    
                                        
                                        
                                            8.5.52. jmp
                                        
                                        
                                    
                                        
                                        
                                            8.5.53. jmpi
                                        
                                        
                                    
                                        
                                        
                                            8.5.54. ldb / ldbio
                                        
                                        
                                    
                                        
                                        
                                            8.5.55. ldbu / ldbuio
                                        
                                        
                                    
                                        
                                        
                                            8.5.56. ldh / ldhio
                                        
                                        
                                    
                                        
                                        
                                            8.5.57. ldhu / ldhuio
                                        
                                        
                                    
                                        
                                        
                                            8.5.58. ldw / ldwio
                                        
                                        
                                    
                                        
                                        
                                            8.5.59. mov
                                        
                                        
                                    
                                        
                                        
                                            8.5.60. movhi
                                        
                                        
                                    
                                        
                                        
                                            8.5.61. movi
                                        
                                        
                                    
                                        
                                        
                                            8.5.62. movia
                                        
                                        
                                    
                                        
                                        
                                            8.5.63. movui
                                        
                                        
                                    
                                        
                                        
                                            8.5.64. mul
                                        
                                        
                                    
                                        
                                        
                                            8.5.65. muli
                                        
                                        
                                    
                                        
                                        
                                            8.5.66. mulxss
                                        
                                        
                                    
                                        
                                        
                                            8.5.67. mulxsu
                                        
                                        
                                    
                                        
                                        
                                            8.5.68. mulxuu
                                        
                                        
                                    
                                        
                                        
                                            8.5.69. nextpc
                                        
                                        
                                    
                                        
                                        
                                            8.5.70. nop
                                        
                                        
                                    
                                        
                                        
                                            8.5.71. nor
                                        
                                        
                                    
                                        
                                        
                                            8.5.72. or
                                        
                                        
                                    
                                        
                                        
                                            8.5.73. orhi
                                        
                                        
                                    
                                        
                                        
                                            8.5.74. ori
                                        
                                        
                                    
                                        
                                        
                                            8.5.75. rdctl
                                        
                                        
                                    
                                        
                                        
                                            8.5.76. rdprs
                                        
                                        
                                    
                                        
                                        
                                            8.5.77. ret
                                        
                                        
                                    
                                        
                                        
                                            8.5.78. rol
                                        
                                        
                                    
                                        
                                        
                                            8.5.79. roli
                                        
                                        
                                    
                                        
                                        
                                            8.5.80. ror
                                        
                                        
                                    
                                        
                                        
                                            8.5.81. sll
                                        
                                        
                                    
                                        
                                        
                                            8.5.82. slli
                                        
                                        
                                    
                                        
                                        
                                            8.5.83. sra
                                        
                                        
                                    
                                        
                                        
                                            8.5.84. srai
                                        
                                        
                                    
                                        
                                        
                                            8.5.85. srl
                                        
                                        
                                    
                                        
                                        
                                            8.5.86. srli
                                        
                                        
                                    
                                        
                                        
                                            8.5.87. stb / stbio l
                                        
                                        
                                    
                                        
                                        
                                            8.5.88. sth / sthio
                                        
                                        
                                    
                                        
                                        
                                            8.5.89. stw / stwio
                                        
                                        
                                    
                                        
                                        
                                            8.5.90. sub
                                        
                                        
                                    
                                        
                                        
                                            8.5.91. subi
                                        
                                        
                                    
                                        
                                        
                                            8.5.92. sync
                                        
                                        
                                    
                                        
                                        
                                            8.5.93. trap
                                        
                                        
                                    
                                        
                                        
                                            8.5.94. wrctl
                                        
                                        
                                    
                                        
                                        
                                            8.5.95. wrprs
                                        
                                        
                                    
                                        
                                        
                                            8.5.96. xor
                                        
                                        
                                    
                                        
                                        
                                            8.5.97. xorhi
                                        
                                        
                                    
                                        
                                        
                                            8.5.98. xori
                                        
                                        
                                    
                                
                            8.2. Instruction Opcodes
 The OP field in the Nios II instruction word specifies the major class of an opcode as listed in the two tables below. 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. 
  
 
  | 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 | initda | 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 | rdprs | 
| 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 | 
| OPX | Instruction | OPX | Instruction | OPX | Instruction | OPX | Instruction | 
|---|---|---|---|---|---|---|---|
| 0x00 | 0x10 | cmplt | 0x20 | cmpeq | 0x30 | cmpltu | |
| 0x01 | eret | 0x11 | 0x21 | 0x31 | add | ||
| 0x02 | roli | 0x12 | slli | 0x22 | 0x32 | ||
| 0x03 | rol | 0x13 | sll | 0x23 | 0x33 | ||
| 0x04 | flushp | 0x14 | wrprs | 0x24 | divu | 0x34 | break | 
| 0x05 | ret | 0x15 | 0x25 | div | 0x35 | ||
| 0x06 | nor | 0x16 | or | 0x26 | rdctl | 0x36 | sync | 
| 0x07 | mulxuu | 0x17 | mulxsu | 0x27 | mul | 0x37 | |
| 0x08 | cmpge | 0x18 | cmpne | 0x28 | cmpgeu | 0x38 | |
| 0x09 | bret | 0x19 | 0x29 | initi | 0x39 | sub | |
| 0x0A | 0x1A | srli | 0x2A | 0x3A | srai | ||
| 0x0B | ror | 0x1B | srl | 0x2B | 0x3B | sra | |
| 0x0C | flushi | 0x1C | nextpc | 0x2C | 0x3C | ||
| 0x0D | jmp | 0x1D | callr | 0x2D | trap | 0x3D | |
| 0x0E | and | 0x1E | xor | 0x2E | wrctl | 0x3E | |
| 0x0F | 0x1F | mulxss | 0x2F | 0x3F |