Other Parts Discussed in Thread: TMS570LS0332
Hello,
I have a question concerning the ADD instruction on the N2HET micromachine of the TMS570LS0332 for a safety application.
I need to add an immediate value with the B register and I need to store it in a remote destination.
In the ADD control field, I set:
C[22:19] = 0001: src1 = IMM: current instruction address;
C[18:16] = 011: src2 = register B;
C[4:3] = 01: rdest = REM: remote destination specified by remote[8:0]
What is the best to set in the dest field as I want to store the result only in the remote destination
and no where else ? I would like to specify dest=NONE and be sure of storing it nowhere else.
Solution 1: C[7]C[2:1] = 011
But in SPNU517B page 647, it is said "case 011:IR2 is not stored in register, immediate".
What means immediate ? I don't want to store the result immediate data field.
How much cycle would require this instruction ?
Solution 2: C[7]C[2:1] = 000
But in SPNU517B page 647, it is said "case 000:A[24:0] = IR2[31:8]".
I don't want to store the result in the A register which is used for an other timer in my application.
Solution 3: C[7]C[2:1] = 010
The result is save into an unsued register such as register T.
How much cycle would require this instruction ?
Line 8 in table 17-53 of SPNU517B: in the dest column, the term n/a (meaning not applicable, I suppose) is confusing with regard to the
Execution description page 647 :
/********** WRITE REGISTER DESTINATION STAGE ***********/
switch (C7, C2:C1)
{
case 000:A[24:0] = IR2[31:8]
case 001:B[24:0] = IR2[31:8]
case 010:T[31:0] = IR2[31:0]
case 011:IR2 is not stored in register, immediate
case 100:R[31:0] = IR2[31:0]
case 101:S[31:0] = IR2[31:0]
case 110:Immediate Data Field[31:0] = IR2
case 111:IR2 is not stored in register, immediate
}
Thank you in advance for your answers and clarifications;
Jean Daniel