Nios® II Processor Reference Guide

ID 683836
Date 10/22/2020
Public
Document Table of Contents

3.9.7. Other Control Instructions

Table 52.  Other Control Instructions
Instruction Description
trap
eret
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 the return address in the ea register, and then transfers execution to the general exception handler. eret returns from exception processing by restoring status from estatus, and executing the instruction specified by the address in ea.
break
bret
The break and bret instructions generate and return from breaks. break and bret are used exclusively by software debugging tools. Programmers never use these instructions in application code.
rdctl
wrctl
These instructions read and write control registers, such as the status register. The value is read from or stored to a general-purpose register.
flushd
flushda
flushi
initd
initda
initi
These instructions are used to manage the data and instruction cache memories.
flushp
This instruction flushes all prefetched instructions from the pipeline. This is necessary before jumping to recently-modified instruction memory.
sync
This instruction ensures that all previously-issued operations have completed before allowing execution of subsequent load and store operations.
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.

Did you find the information on this page useful?

Characters remaining:

Feedback Message