[Instruction] Contents

[Instruction] Contents [Instruction] Contents

servotechnica.ru
from servotechnica.ru More from this publisher
13.07.2015 Views

Advanced Function InstructionFUN122 PMXORMATRIX EXCLUSIVE OR(XOR)FUN122 PMXOROperation controlENLadder symbol122P.MXORMa :Mb :Md :L :Ma : Starting register of source matrix aMb : Starting register of source matrix bMd : Starting register of destination matrixL : Length of matrix (Ma, Mb and Md)Ma, Mb, Md may combine with V, Z, P0~P9 to serveindirect 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∣D4095Ma ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○Mb ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○Md ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○L ○ ○* ○ ○2∣256V、ZP0~P9Ma Mb Md• When operation control "EN" = 1 or "EN↑" ( P instruction) has atransition from 0 to 1, this instruction will performs a logic XOR (ifthe 2 bits are different, then the result will be 1, otherwise it will be0)between 2 source matrixes with a length of L, Ma and Mb. Theresult will then be stored back into the destination matrix Md, whichalso has a length of L. For example the XOR operation is done bybits with the same bit numbers - for example, if Ma 0 = 0, Mb 0 = 1,then Md 0 = 1; if Ma 1 = 1, Mb 1 = 1, then Md 1 = 0; etc, right up untilXOR reaches Ma 16L-1 and Mb 16L-1.LXORX0122P.MXOREN Ma : R 0Mb : R 10Md : R 20L : 5• In the program at left, when X0 goes from 0→1, willperform a XOR operation between matrix Ma, comprisedby R0 to R4, and matrix Mb, comprised by R10 to R14.The results will then be stored in destination matrix Md,comprised by R20 to R24. The results are shown at rightin the diagram below.Ma15Ma0 Mb15Mb0 Md15Md0↓Ma↓↓Mb↓↓Md↓R0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 R20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1R1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 R11 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 R21 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1R2 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 R12 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 R22 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0R3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R23 0 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 R14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 R24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0↑↑↑↑↑↑Ma79Ma64Mb79Mb64Md79Md64Before executionAfter execution7-105

Advanced Function InstructionFUN123 PMXNRMATRIX EXCLUSIVE NOR(XNR)FUN123 PMXNRMa : Starting register of source matrix aMb : Starting register of source matrix bMd : Starting register of destination matrixL : Length of matrix (Ma, Mb and Md)Ma, Mb, Md may combine with V, Z,P0~P9 to serveindirect address applicationOperandRangeWX WY WM WS TMR CTR HR IR OR SR ROR DR K XRWX0 WY0 WM0 WS0 T0 C0 R0 R3840 R3904 R3968 R5000 D0 2 V、Z∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣WX240 WY240 WM1896 WS984 T255 C255 R3839 R3903 R3967 R4167 R8071 D4095 256 P0~P9Ma ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○Mb ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○Md ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○L ○ ○* ○ ○• When operation control "EN" = 1 or "EN↑" ( P instruction) has atransition from 0 to 1, will perform a logic XNR operation (if the 2bits are the same, then the result will be 1, otherwise it will be0)between 2 source matrixes with a length of L, Ma and Mb. Theresults will then be stored into the destination matrix Md, whichalso has the same length (the XNR operation is done by bits withthe same bit numbers). For example, if Ma 0 = 0, Mb 0 = 1, then Md 0= 0; Ma 1 = 0, Mb 1 = 0, then Md 1 = 1; etc, right up until XNRreaches Ma 16L-1 and Mb 16L-1.LMa Mb MdXNRX0123P.MXNREN Ma : R 0Mb : R 10Md : R 10L : 5• When operation control "EN" = 1 or "EN↑" ( P instruction)goes from 0 to 1, will perform a XNR operation between Mamatrix comprised by R0~R9 and Mb matrix comprised byR10~R19. The results will then be stored into thedestination matrix Md comprised by R10~R19. The resultsare shown at right in the diagram below.Ma15Ma0 Mb15Mb0 Md15Md0↓Ma↓↓Mb↓↓Md↓R0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 R20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0R1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 R11 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 R21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0R2 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 R12 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 R22 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1R3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R23 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1R4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 R14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 R24 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1↑↑↑↑↑↑Ma79Ma64Mb79Mb64Md79Md64Before executionAfter execution7-106

Advanced Function <strong>Instruction</strong>FUN122 PMXORMATRIX EXCLUSIVE OR(XOR)FUN122 PMXOROperation controlENLadder symbol122P.MXORMa :Mb :Md :L :Ma : Starting register of source matrix aMb : Starting register of source matrix bMd : Starting register of destination matrixL : Length of matrix (Ma, Mb and Md)Ma, Mb, Md may combine with V, Z, P0~P9 to serveindirect 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∣D4095Ma ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○Mb ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○Md ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○L ○ ○* ○ ○2∣256V、ZP0~P9Ma Mb Md• When operation control "EN" = 1 or "EN↑" ( P instruction) has atransition from 0 to 1, this instruction will performs a logic XOR (ifthe 2 bits are different, then the result will be 1, otherwise it will be0)between 2 source matrixes with a length of L, Ma and Mb. Theresult will then be stored back into the destination matrix Md, whichalso has a length of L. For example the XOR operation is done bybits with the same bit numbers - for example, if Ma 0 = 0, Mb 0 = 1,then Md 0 = 1; if Ma 1 = 1, Mb 1 = 1, then Md 1 = 0; etc, right up untilXOR reaches Ma 16L-1 and Mb 16L-1.LXORX0122P.MXOREN Ma : R 0Mb : R 10Md : R 20L : 5• In the program at left, when X0 goes from 0→1, willperform a XOR operation between matrix Ma, comprisedby R0 to R4, and matrix Mb, comprised by R10 to R14.The results will then be stored in destination matrix Md,comprised by R20 to R24. The results are shown at rightin the diagram below.Ma15Ma0 Mb15Mb0 Md15Md0↓Ma↓↓Mb↓↓Md↓R0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 R20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1R1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 R11 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 R21 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1R2 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 R12 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 R22 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0R3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 R23 0 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 R14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 R24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0↑↑↑↑↑↑Ma79Ma64Mb79Mb64Md79Md64Before executionAfter execution7-105

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

Saved successfully!

Ooh no, something went wrong!