Specifications
Related Information
• Programming Model on page 3-1
• Programming Model
• Instruction Set Reference on page 8-1
• Instruction Set Reference
Arithmetic Logic Unit
The Nios II ALU operates on data stored in general-purpose registers. ALU operations take one or two
inputs from registers, and store a result back in a register. The ALU supports the data operations
described in the table below. To implement any other operation, software computes the result by
performing a combination of the fundamental operations.
Table 2-1: Operations Supported by the Nios II ALU
Category Details
Arithmetic The ALU supports addition, subtraction, multiplication, and division on signed and
unsigned operands.
Relational The ALU supports the equal, not-equal, greater-than-or-equal, and less-than
relational operations (==, != >=, <) on signed and unsigned operands.
Logical The ALU supports AND, OR, NOR, and XOR logical operations.
Shift and
Rotate
The ALU supports shift and rotate operations, and can shift/rotate data by 0 to 31
bit positions per instruction. The ALU supports arithmetic shift right and logical
shift right/left. The ALU supports rotate left/right.
Unimplemented Instructions
Some Nios II processor core implementations do not provide hardware to support the entire Nios II
instruction set. In such a core, instructions without hardware support are known as unimplemented
instructions.
The processor generates an exception whenever it issues an unimplemented instruction so your exception
handler can call a routine that emulates the operation in software. Unimplemented instructions do not
affect the programmer’s view of the processor.
For a list of potential unimplemented instructions, refer to the Programming Model chapter of the Nios II
Processor Reference Handbook.
Related Information
• Programming Model on page 3-1
• Programming Model
2-4
Arithmetic Logic Unit
NII51002
2015.04.02
Altera Corporation
Processor Architecture
Send Feedback