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>FUN129 PMBROTMATRIX BIT ROTATEFUN129 PMBROTMs : Starting register of source matrixMd : Starting register of destination matrixL : Length of matrix (Ms and Md)Ms, Md may combine with V, Z, P0~P9 toserve 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 rotate control "EN" = 1 or "EN↑" ( P instruction)has a transition from 0 to 1, matrix Ms will becompletely retrieved and rotated by one bit towardsthe left (when L/R = 1) or to the right (when L/R = 0).The space created by the rotation (with a left rotation itwill be M0, and with a right rotation it will be M 16L-1) willbe replaced by the status of the rotated-out bit (with aleft rotation it will be M 16L-1, and with a right rotation itwill be M0). The rotated-out bit will not only be used tofill the above-mentioned space, it will also betransferred to rotated-out bit "OTB".L/R=1OTBL/R=0MsRotateleft1 bitMsOTBMdMdLLShiftright1 bitX0129P.MBROTEN Ms : R 0Md : R 0L/R L : 5OTB• In the program at left, Ms and Md are the same matrix.When X0 goes from 0 →1, then the whole of Ms isretrieved and rotated right (because L/R = 0) by 1 bit. It isthen stored back into Ms itself (because in this exampleMs and Md are the same matrix). The results are shownat right in the diagram below.Ms15Ms0Md15Md0↓Ms↓↓ Md↓R0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0R1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 X0= R1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1R2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 R2 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0R3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0R3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0R4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 R4 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1↑↑↑↑Ms79Ms64Md79Md64OTB0Before executionAfter execution7-112

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

Saved successfully!

Ooh no, something went wrong!