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.

__mnop(); instruction is too long (CLA in C)

Hello,

I am using C28035 CPU and i am programming CLA in C.

When I use __mnop(); instruction , it take 3 CPU clocks times (49.8ns instead of 16.6ns expected of a NOP execution time).

Why this instruction is so long ? How could i do to have a single cpu clock time wait ?

Thank you

Henri

  • Henri, thank you for highlighting.

    As per the CLA documentation, this talks about the "MNOP" instruction and not __mnop(); function call.

    Can you verify this?

    Regards,

    Gautam

  • hello

    we test with henri to put some asm code in C CLA function like that :

    asm("      MNOP");

    but the assembly code generated give 3*MNOP , it has been also checked on osiloscope

    regards

    Frederic

  • Ohh.. that's very weird. I hope a TI employee sheds some light on this issue.

    Regards,

    Gautam

  • hello

    with this coding style it look better

    ;----------------------------------------------------------------------
    ;  51 | __asm("         MNOP\n"                                                
    ;  52 |           "             MNOP\n"                                        
    ;  53 |           "     MNOP\n");                                              
    ;----------------------------------------------------------------------
            MNOP      ; [CPU_]
            MNOP
            MNOP
         MNOP
            MNOP      ; [CPU_]

    my understading is to prevent  pipeling error the assembler insert one MNOP at the start and end of __asm("") directive.

    is there is way the remove this feature ?

  • Here's an equivalent of NOP:

    void nop( void )
         {
         ; /* A semicolon without an instruction may produce a NOP. */
         }

    Check it out and revert.

    Regards,

    Gautam