
R
Chapter 3: PicoBlaze Instruction Set
Processing Data
All data processing instructions operate on any of the 16
•Logic instructions
•Arithmetic instructions
•Test and Compare instructions
•Shift and Rotate instructions
Logic Instructions
The logic instructions perform a bitwise logical AND, OR, or XOR between two operands. The first operand is a register location. The second operand is either a register location or a literal constant. Besides performing pure AND, OR, and XOR operations, the logic instructions provide a means to:
•complement or invert a register
•clear a register
•set or clear specific bits within a register
Bitwise AND, OR, XOR
All logic instructions are bitwise operations. The AND operation, illustrated in Figure
AND sX, sY
AND sX, kk
Register sY Literal kk
Register sX
7 |
7 |
6 |
6 |
5 |
5 |
4 |
4 |
3 |
3 |
2 |
2 |
1 |
1 |
0 |
0 |
UG129_c3_01_051204
Figure 3-1: Bitwise AND Instruction
The OR and XOR instructions are similar to the AND instruction illustrated in Figure
See also:
•“AND sX, Operand — Logical Bitwise AND Register sX with Operand,” page 93
•“OR sX, Operand — Logical Bitwise OR Register sX with Operand,” page 103
•“XOR sX, Operand — Logical Bitwise XOR Register sX with Operand,” page 118
24 | www.xilinx.com | PicoBlaze |
|
| UG129 (v1.1.2) June 24, 2008 |