IPR-NIOS Altera, IPR-NIOS Datasheet - Page 193
IPR-NIOS
Manufacturer Part Number
IPR-NIOS
Description
IP NIOS II MEGACORE RENEW
Manufacturer
Altera
Type
MegaCorer
Datasheet
1.IP-NIOS.pdf
(294 pages)
Specifications of IPR-NIOS
License
Renewal License
Lead Free Status / RoHS Status
Not applicable / Not applicable
- Current page: 193 of 294
- Download datasheet (3Mb)
Chapter 8: Instruction Set Reference
Instruction Set Reference
add
December 2010 Altera Corporation
Operation:
Assembler Syntax:
Example:
Description:
Usage:
Exceptions:
Instruction Type:
Instruction Fields:
31
30
29
A
28
27
26
25
24
B
rC ← rA + rB
add rC, rA, rB
add r6, r7, r8
Calculates the sum of rA and rB. Stores the result in rC. Used for both signed and unsigned
addition.
Carry Detection (unsigned operands):
Following an add operation, a carry out of the MSB can be detected by checking whether the
unsigned sum is less than one of the unsigned operands. The carry bit can be written to a
register, or a conditional branch can be taken based on the carry condition. Both cases are
shown below.
add rC, rA, rB
cmpltu rD, rC, rA
add rC, rA, rB
bltu rC, rA, label
Overflow Detection (signed operands):
An overflow is detected when two positives are added and the sum is negative, or when two
negatives are added and the sum is positive. The overflow condition can control a conditional
branch, as shown below.
add rC, rA, rB
xor rD, rC, rA
xor rE, rC, rB
and rD, rD, rE
blt rD, r0,label
None
R
A = Register index of operand rA
B = Register index of operand rB
C = Register index of operand rC
23
22
21
20
19
C
18
17
16
15
14
# The original add operation
# rD is written with the carry bit
# The original add operation
# Branch if carry generated
# The original add operation
# Compare signs of sum and rA
# Compare signs of sum and rB
# Combine comparisons
# Branch if overflow occurred
0x31
13
12
11
10
9
0
8
Nios II Processor Reference Handbook
7
6
5
4
0x3a
3
2
1
add
8–7
0
Related parts for IPR-NIOS
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
CYCLONE II STARTER KIT EP2C20N
Manufacturer:
Altera
Datasheet:
Part Number:
Description:
CPLD, EP610 Family, ECMOS Process, 300 Gates, 16 Macro Cells, 16 Reg., 16 User I/Os, 5V Supply, 35 Speed Grade, 24DIP
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
CPLD, EP610 Family, ECMOS Process, 300 Gates, 16 Macro Cells, 16 Reg., 16 User I/Os, 5V Supply, 15 Speed Grade, 24DIP
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
CPLD, EP610 Family, ECMOS Process, 300 Gates, 16 Macro Cells, 16 Reg., 16 User I/Os, 5V Supply, 30 Speed Grade, 24DIP
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
High-performance, low-power erasable programmable logic devices with 8 macrocells, 10ns
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
High-performance, low-power erasable programmable logic devices with 8 macrocells, 7ns
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
Classic EPLD
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
High-performance, low-power erasable programmable logic devices with 8 macrocells, 10ns
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
Manufacturer:
Altera Corporation
Datasheet:
Part Number:
Description:
CPLD, EP610 Family, ECMOS Process, 300 Gates, 16 Macro Cells, 16 Reg., 16 User I/Os, 5V Supply, 25 Speed Grade, 24DIP
Manufacturer:
Altera Corporation
Datasheet: