
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
10 / 153
2.10 Shift instructions
This section covers the shift instructions. Shifts include 'shift left' and 'shift right', 'shift by
register' and 'shift immediate', 'normal shift' and 'signed shift' in which the most significant
bit does not change, and 32-bit shifts in which the 'mh' and 'ml' registers are treated as a
single 32-bit register in which the 'mh' register's lsb connects with the 'ml's registers msb.
Shifts take one instruction cycle per shifted bit and the 'arith_reg' register's 'OD' bit can
be tested to determine when the shift is completed. So an 11-bit shift would normally
take 11 clock cycles to execute. However, there is a special 8-bit shift which takes just a
single clock cycle so shifts by constants greater than 8 bit positions can be accelerated
by combining the 8-bit shift with the immediate shift.
Table 10. Shift instructions
Shift left multiplication result register
Shift left multiplication result register by immediate value
Shift right multiplication result register
Shift right multiplication result register by immediate value
Shift left ALU register
Shift left ALU register by 8 bits
Shift left the ALU register by immediate value
Shift left signed ALU register
Shift left signed ALU register by immediate value
Shift right ALU register
Shift right ALU register by 8 bits
Shift right the ALU register immediate value
Shift right signed ALU register
Shift right signed ALU register immediate value
2.11 Control, status, and flags instructions
This section covers the instructions that handle the control register, the status register
and the flags register. Note that each of the four cores has its own control and status
register but the four cores share the flag register.
The flags register has many purposes. The devices' input pins can be read through
the (single) flags register (refer to register 1C1h and 1C3h). On the other hand, if flags
are configured as output pins (refer to register 1C1h and 1C3h) they can be controlled
through the flags register. The flags register can also be used by the 'wait' instruction to
execute a section of code depending on its value high or low.
Table 11. Control, status and flags instructions
Reset registers (control, status, automatic diagnostics...)
Set control register bit
Set flag
Set status register bit