13.07.2015 Views

[Instruction] Contents

[Instruction] Contents

[Instruction] Contents

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Advanced Function <strong>Instruction</strong>FUN128 PMBSHFMATRIX BIT SHIFTFUN128 PMBSHFLadder symbolShift controlFill-in bitLeft/Right directionENINCCLR128P.MBSHFMs :Md :L :OTBShift out bitMs : Starting register of source matrixMd : Starting register of destinationmatrixL : Length of matrix (Ms and Md)Ms, Md may combine with V, Z, P0~P9to serve indirect address applicationOperandRangeWX WY WM WS TMR CTR HR IR OR SR ROR DR K XRWX0∣WX240WY0∣WY240WM0∣WM1896WS0∣WS984T0∣T255C0∣C255R0∣R3839R3840∣R3903R3904∣R3967R3968∣R4167R5000∣R8071D0∣D4095P0~P9Ms ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○Md ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○L ○* ○ ○2∣256V、Z• When shift control "EN" = 1 or "EN↑" ( P instruction) has atransition from 0 to 1, source matrix Ms will be retrievedand completely shifted one position to the left (when L/R =1) or one position to the right (when L/R = 0). The spacecaused by the shift (with a left shift it will be M 0, and with aright shift it will be M 16L-1), is replaced by the status of fill-inbit "INB". The status of the bits popped out (with a left shiftit will be M 16L-1, and with a right shift it will be M 0) willappear at the output bit "OTB". Then the results of thisshifted matrix will be filled into the destination matrix Md.OTBMsShiftleft1 bitINBMdL• The program at left is an example where Ms and Md arethe same matrix. When X0 goes from 0→1, Ms will becompletely retrieved and moved to the left (because L/R =1) by 1 bit. It will then be stored back to Md, and the resultsare shown at right in the diagram below.MsOTBMdX0X0ENINBL/R128P.MBSHFMs : R 0Md :L :R 05OTBINBShiftright1 bitLMs15Ms0Md15Md0↓Ms↓↓ Md↓R0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1R1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 X0= R1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0R2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 R2 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1R3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1R4 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 R4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0↑↑↑↑Ms79Ms64Md79Md64Before executionAfter execution7-111

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!