
NXP Semiconductors
PT2001SWUG
PT2001 programming guide and instruction set
PT2001SWUG
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2019. All rights reserved.
User guide
Rev. 3.0 — 29 April 2019
2 / 153
• Shift operations.
The operand is shifted one position (left or right) each ck clock cycle,
so it requires from 1 to 16 ck clock cycles to execute. The shift operations always
consume the operand. It is also possible to shift an operand by eight positions (left or
right) or to swap the eight MSBs with the eight LSBs in one ck clock cycle.
• Logic operation.
It is possible to operate a bitwise logical operation (and, not, or, xor)
between an operand and a mask. It is also possible to bitwise invert an operand. All
these operations are completed in a single ck clock cycle. These operations always
consume the operand.
C2 conversions.
It is possible to convert data from an unsigned representation to two's
complement and vice versa. These operations are completed in a single ck clock cycle.
aaa-028738
ALU
Instruction_decoder
Arithmetic and Logic Core
General Purpose Register 0
General Purpose Register 1
General Purpose Register 2
General Purpose Register 3
General Purpose Register 4
Immediate Register
Multiplication Results MSBs
(GPR6)
ALU Condition Register
Multiplication Results LSBs
(GPR7)
Figure 1. ALU block diagram
These operations consume the operand. While the ALU is busy performing an operation,
request of other operations is impossible. In such cases, the request is ignored by the
ALU.
The ALU instructions are:
•
Addition (add), addition with immediate (addi)
•
Subtraction (sub), subtraction with immediate (subi)
•
Multiplication (mul), multiplication with immediate (muli)
•
Logical operation (and, not, or, xor)
•
Conversion from positive to two's complement (toc2) and from two's complement to
positive (toint)
•
Shift operation (sh32r, sh32l, shl, shr, shls, shrs), shift operation with immediate
(sh32ri, sh32li, shli, shri, shlsi, shrsi), and byte manipulation shift (shl8, shr8, swap)
•
ALU configuration (stal)
Some ALU instructions are multicycle (mul, muli and possibly sh32r, sh32l, shl, shr, shls,
shrs, sh32ri, sh32li, shli, shri, shlsi, shrsi, depending on how many shift positions are
required). While a multicycle operation is in progress, all ALU instructions are ignored,
except for the stal instruction.
During this time any operations which try to modify the ALU registers (GPR0-7, arith_reg)
are ignored (ldirl, ldirh and possibly cp, load if their destination address is one of the ALU
registers). Instructions which try to read the ALU registers are successful (possibly cp