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.

TMS2837xD is a real 32 bits processor?

Other Parts Discussed in Thread: TEST2

Hello

I'm using the evaluation board F2837x controlCARD.

I read the assembly code generated for the following C code:

float Test1;

Test1 = 1000.000061;     /* 36ns */  

The generated assembly code is:


0864e1:   28480001    MOV          *-SP[8], #0x0001
0864e3:   2847447A    MOV          *-SP[7], #0x447a

Then 1000.00061 in float is wel coded 0x447a0001,

1) Why the instruction is not directly coded in 32 bits?

like following : MOV32 ??, #447a0001

2) I'm looking for the CPU instruction set (mnemonic) which list all assembly instruction with the instruction size and instruction cycle. Where can I find it??

  • Hi A GIR

    The instruction set information is available in the TMS320C28x CPU and instruction set reference guide (SPRU430) from page 107 to 472.
    You can find this in control suite or on the TI website here www.ti.com/lit/pdf/spru430

  • A GIR,

    In your example, each instruction is 32-bits long.  The processor is using an immediate addressing in which the data is embedded into the instruction.   The opcode occupies the upper 16-bits, and the data the lower 16-bits.  This is pretty efficient, since if any other addressing mode had been used a pointer would have had to be initialised with the data address before the move.

    If there had been an instruction such as "MOV32 ??, #447a0001" it would occupy more than 32-bits and could not have been fetched in a single cycle.

    Probably you have declared "Test1" as a local variable, which is why the compiler is using the stack.  If you make it global, you'll see a different series of instructions to load an internal register and ending in a 32-bit move to the variable data address.

    If you assign Test1 to another float variable, say "Test2", you should see the move accomplished in a pair of 32-bit moves, probably through the accumulator.

    Chapter 5 of the user's guide Toby recommended should help.

    Regards,

    Richard

  • Ok,

    So you said to have a 32 bit instruction is faster to have an instruction coded on many 32bit right?

    Because in comparaison, on old 8 bit controller, for exemple we had instruction
    MOV x, #0x1 : Copy the immediate value0x01 to the adresse pointed by register x. This instruction take 2 bytes to copy a 8 bits.

    Now, in 32 µP bits, i'm exepcted to have:
    "Mov, x, #0xnnnnnnnn" which can be coded with more than 32bits, but which copy in one instruction the immediate value 0xnnnnnnnn to the adress pointed by x register (stack in ou case) because the bus has 32 bits..

    But it is ok,

    Thank for your explanation.

    Could you know where I can find the instruction set?

  • The instruction set is in the document I linked to in my first post. On the pages I mentioned.
    ...
    ...
    In case you missed it:

    "The instruction set information is available in the TMS320C28x CPU and instruction set reference guide (SPRU430) from page 107 to 472.
    You can find this in control suite or on the TI website here www.ti.com/lit/pdf/spru430"