Arithmetic Logic Unit - Altera Nios II User Manual

Hide thumbs Also See for Nios II:
Table of Contents

Advertisement

2–4

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
Arithmetic
The ALU supports addition, subtraction, multiplication, and division on signed and unsigned operands.
The ALU supports the equal, not-equal, greater-than-or-equal, and less-than relational operations (==,
Relational
!= >=, <) on signed and unsigned operands.
Logical
The ALU supports AND, OR, NOR, and XOR logical operations.
The ALU supports shift and rotate operations, and can shift/rotate data by 0 to 31 bit positions per
Shift and Rotate
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.
f
For a list of potential unimplemented instructions, refer to the
chapter of the Nios II Processor Reference Handbook.
Custom Instructions
The Nios II architecture supports user-defined custom instructions. The Nios II ALU
connects directly to custom instruction logic, enabling you to implement operations in
hardware that are accessed and used exactly like native instructions.
f
For more information, refer to the
Refer to "Custom Instruction Tab" in the
the Nios II Processor Reference Handbook. for additional information.
Nios II Processor Reference Handbook
Details
Nios II Custom Instruction User Guide
Instantiating the Nios II Processor
Chapter 2: Processor Architecture
Arithmetic Logic Unit
Programming Model
chapter of
February 2014 Altera Corporation

Advertisement

Table of Contents
loading

Table of Contents