This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F280049: Park transform with TMU

Part Number: TMS320F280049

Hi,

On the top of TMS320F28004x datasheet (PSRS945E), 1.1 Features, it says;

– Trigonometric Math Unit (TMU)
– 3×-cycle to 4×-cycle improvement for common trigonometric functions versus software libraries
13-cycle Park transform

My customer is asking;
Q1) What does the “Park transform” exactly mean here?

Q2) Which TMU supported instructions (see below) are used to perform the “Park transform” above?


Q3) What makes this 13 cycle?

Thanks and regards,
Koichiro Tashiro

  • Park transform is given by following equation. As you can see the TMU helps calculate Sin and Cosine Theta faster compared to non-TMU based calculation. If the CPU clock is 100MHz (10nS time period) then 13-cycle means that it takes about 130nS (13*10nS) to complete park transform.

  • Thanks Shamim. The picture you attached didn't display at my end, so I am typing out the equation.

    pOutVec->value[0] = (value_0 * cosTh) + (value_1 * sinTh);
    pOutVec->value[1] = (value_1 * cosTh) - (value_0 * sinTh);

    Thanks,

    Sira

  • I will close this thread assuming that your questions are answered accurately. If not, then please let us know.

    Shamim

  • Hi Shamim,

    Thanks for your reply.
    Customer also wants how 13 cycles are divided into each instruction.

    For example, here is my guess.

    pOutVec->value[0] = (value_0 * cosTh) + (value_1 * sinTh);
    pOutVec->value[1] = (value_1 * cosTh) - (value_0 * sinTh);

    cosTh is COSPUF32 RaH, RbH then 4cycle
    one MPY 1cycle?
    sinTh is SINPUF32 RaH, RbH then 4cycle
    one MPY 1cycle?
    one ADD 1cycle?
    one MOV 1cycle?
    Total 12 cycle?

    Can you provide assembly representation of above equations and cycles needed?

    Thanks and regards,
    Koichiro Tashiro

  • Koichiro,

    I tried to see if the Compiler would generate the most effective assembly, but it is not doing so even with optimization enabled.  See the code segment I used - it is taking 45 cycles.

    For example, I wanted to see if the NOPs within the COSPUF32 and SINPUF32 could be used with different registers, but the compiler isn't doing so. I will look into this more, including whether hand-written assembly is required.

    volatile float32_t value0, value1, theta;
    volatile float32_t value_0, value_1, cosTh, sinTh;
    volatile float32_t temp1, temp2, temp3, temp4;

    cosTh = cosf(theta);
    sinTh = sinf(theta);
    temp1 = value_0 * cosTh;
    temp2 = value_1 * cosTh;
    temp3 = value_1 * sinTh;
    temp4 = value_1 * cosTh;

    value0 = temp1 + temp2;
    value1 = temp3 - temp4;

    Thanks,

    Sira

  • I am closing this thread assuming that your questions are answered accurately.

    Shamim