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

4–16 Altera Corporation
Nios II Processor Reference Handbook October 2007
Custom Instructions Page
1 To display custom instructions in the table of active components
on the SOPC Builder System Contents tab, click Filter in the
lower-right of the System Contents tab, and turn on Nios
Custom Instruction.
To create your own custom instruction using the component editor, click
Import. After finishing in the component editor, click Refresh
Component List on the File menu to add the new instruction to the list at
the left side of the Custom Instructions page.
f A complete discussion of the hardware and software design process for
custom instructions is beyond the scope of this chapter. For full details
on the topic of custom instructions, including working example designs,
see the Nios II Custom Instruction User Guide.
The following sections describe the default custom instructions Altera
provides.
Interrupt Vector Custom Instruction
The Nios II processor offers an interrupt vector custom instruction which
reduces average and worst case interrupt latency.
To add the interrupt vector custom instruction to the Nios II processor,
select Interrupt Vector from the list, and click Add.
There can only be one interrupt vector custom instruction component in
a Nios II processor. If the interrupt vector custom instruction is present in
the Nios II processor, the hardware abstraction layer (HAL) source
detects it at compile time and generates code using the custom
instruction.
The interrupt vector custom instruction improves both average and worst
case interrupt latency by up to 20%. To achieve the lowest possible
interrupt latency, consider using tightly-coupled memories so that
interrupt handlers can run without cache misses.
f For details of the interrupt vector custom instruction implementation,
see the Exception and Interrupt Controller section in the Processor
Architecture chapter of the Nios II Processor Reference Handbook. For
guidance with tightly-coupled memories, see the Tightly-Coupled Memory
section in the Processor Architecture chapter of the Nios II Processor
Reference Handbook.