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.

NOP instruction,taking 6cycles

Other Parts Discussed in Thread: OMAPL138

Greetings,

i am working on c674x dsp of omapl138 processor.

i am using NOP instruction, in between of  convolution.asm function.

while debugging,i saw that NOP is taking 6cycles,which seriously influencing clock throughput of convolution.

PLZ help ASAP.

  • Hi,

    How you are measuring the cycles for NOP?

    Can you use disassembly option to check exact clock cycles?

    In CCS click on View -> Disassembly while stepping through the program.

  • Hi,

    I had build my project using -g option of debugging model.

    i had a break-point at NOP instruction( wriiten in between of assembly code.) and breakpoint at line next to it.

    using the Clock->enable option (which tells cpu execute clock) , i ran through my code, and saw 6 clocks was taken by NOP.

    I don't know how to see exact clock cycles using disassembly option.

    only thing i saw, disassembly of ASM code.

    i tired doing like this also,in my assembly code:

    NOP

    NOP

    NOP

    NOP

    so for all above NOP it took 24 clock cycles,each taking 6 clock cycles.

    Any information on this will be helpful.

    Thanks for consideration.

  • Hi Vijay Singh,

    Yes, the NOP instruction takes 6 clock cycles for me too using CCS. ( .text -> DDR2)

    But in the following WIKI, it gives some insights like " from where the instruction is fetched, whether internal or external memory"; according to which the CPU clock cycles will be consumed. CPU clock cycles will be consumed more if the code is in external memory when compared to internal memory.

    http://processors.wiki.ti.com/index.php/Profile_clock_in_CCS#Considerations_when_measuring_time

     

    Regards,

    Shankari

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • Greetings,

    NOP instruction were executed from Internal Memory L2. and it tooks only 1 clock cycles.this was verified by using 100 NOPs and putting breakpoint at first NOP and at last NOP.so total cycle count taken was 105 (99+6).so cycle count depends how you are debugging.if your are using breakpoint line by line,then minimun cycle count will be 6 clock cycles,for any instruction including NOP.

    plus it depends also on memory location where your .text sections(program/code) resides.CPU will take some time to FETCH,LOAD and EXECUTE  intstruction.There is not always 1:1 ratio, in this case CPU will face WAIT/STALL.

    IF i am wrong,please correct me.

  • Hi Vijay Singh,

    Thanks for the update.

    Please close the post by clicking verify button if you are done with it.

     

    Regards,

    Shankari