Specifications
Instruction Description
rdprs
wrprs
These instructions read and write a general-purpose registers between the current
register set and another register set.
wrprs can set r0 to 0 in a shadow register set. System software must use wrprs to
initialize r0 to 0 in each shadow register set before using that register set.
Custom Instructions
The custom instruction provides low-level access to custom instruction logic. The inclusion of custom
instructions is specified with the Nios II Processor parameter editor in Qsys, and the function
implemented by custom instruction logic is design dependent.
For more information, refer to the “Custom Instructions” section of the Processor Architecture chapter of
the Nios II Processor Reference Handbook
For continued more information refer to the Nios II Custom Instruction User Guide.
Machine-generated C functions and assembly language macros provide access to custom instructions, and
hide implementation details from the user. Therefore, most software developers never use the custom
assembly language instruction directly.
Related Information
• Nios II Custom Instruction User Guide
• Processor Architecture on page 2-1
• Processor Architecture
No-Operation Instruction
The Nios II assembler provides a no-operation instruction, nop.
Potential Unimplemented Instructions
Some Nios II processor cores do not support all instructions in hardware. In this case, the processor
generates an exception after issuing an unimplemented instruction. Only the following instructions can
generate an unimplemented instruction exception:
• mul
• muli
• mulxss
• mulxsu
• mulxuu
• div
• divu
• initda
All other instructions are guaranteed not to generate an unimplemented instruction exception.
An exception routine must exercise caution if it uses these instructions, because they could generate
another exception before the previous exception is properly handled.
Refer to the "Unimplemented Instruction" section of this chapter for more information regarding
unimplemented instruction processing.
NII51003
2015.04.02
Custom Instructions
3-65
Programming Model
Altera Corporation
Send Feedback