
R
Appendix : PicoBlaze Instruction Set and Event Reference
Examples
SL0 sX; Shift left. 0 shifts into LSB, MSB shifts into CARRY.
SL1 sX; Shift left. 1 shifts into LSB, MSB shifts into CARRY.
SLX sX; Shift left. LSB shifts into LSB, MSB shifts into CARRY.
SLA sX; Shift left. CARRY shifts into LSB, MSB shifts into CARRY.
Pseudocode
case (INSTRUCTION) when “SL0”
LSB Å 0 when “SL1” LSB Å 1 when “SLX”
LSB Å sX(7) when “SLA”
LSB Å CARRY end case
CARRY Å sX[7]
sX Å {sX[6:0], LSB}
if ( sX = 0 ) then
ZERO Å 1 else
ZERO Å 0 endif
PC Å PC + 1
Registers/Flags Altered
Registers: sX, PC
Flags: CARRY, ZERO
SR[ 0 1 X A ] sX — Shift Right Register sX
There are four variants of the shift right instruction, as shown in Table
110 | www.xilinx.com | PicoBlaze |
|
| UG129 (v1.1.2) June 24, 2008 |