Altera Nios II User Manual page 101

Hide thumbs Also See for Nios II:
Table of Contents

Advertisement

Chapter 3: Programming Model
Instruction Set Categories
Other Control Instructions
Table 3–48. Other Control Instructions
Instruction
The trap and eret instructions generate and return from exceptions. These instructions are similar to the
call/ret pair, but are used for exceptions. trap saves the status register in the estatus register, saves
trap
the return address in the ea register, and then transfers execution to the general exception handler. eret
eret
returns from exception processing by restoring status from estatus, and executing the instruction
specified by the address in ea.
The break and bret instructions generate and return from breaks. break and bret are used exclusively
break
by software debugging tools. Programmers never use these instructions in application code.
bret
These instructions read and write control registers, such as the status register. The value is read from or
rdctl
stored to a general-purpose register.
wrctl
flushd
flushda
flushi
These instructions are used to manage the data and instruction cache memories.
initd
initda
initi
This instruction flushes all prefetched instructions from the pipeline. This is necessary before jumping to
flushp
recently-modified instruction memory.
This instruction ensures that all previously-issued operations have completed before allowing execution of
sync
subsequent load and store operations.
These instructions read and write a general-purpose registers between the current register set and another
register set.
rdprs
wrprs
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.
f
For more information, refer to the "Custom Instructions" section of the
Architecture
Instruction User
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.
No-Operation Instruction
The Nios II assembler provides a no-operation instruction, nop.
February 2014 Altera Corporation
Description
chapter of the Nios II Processor Reference Handbook and to the
Guide.
3–61
Processor
Nios II Custom
Nios II Processor Reference Handbook

Advertisement

Table of Contents
loading

Table of Contents