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.

optimization of video encoder on DM6437

Hello ,

I am optimizing the encoder code on DM6437 using CCS.

I have few basic doubts..

1) can we use the assembly code directly in the c program ?

2) what is difference between linear assembly code(.sa) and assembly code(.asm) ?

3) Can i have any doucment for the linear assembly code application (how it can be implemented)?

 

Thank you,

Thupakula.

  • Thupakula said:
    1) can we use the assembly code directly in the c program ?

    Yes, through the use of asm() statements, but it requires care and can be messy. Section 7.5 of SPRU187o discusses your various options for interfacing C and assembly.

    Thupakula said:
    2) what is difference between linear assembly code(.sa) and assembly code(.asm) ?

    Linear assembly is assembly code that has not been allocated registers or given scheduling information for what functional units it will operate on. The idea being that it is much easier to write than direct assembly, but still gives you the ability to write in assembly. A linear assembly file is fed into the assembly optimizer which acts sort of like a compiler, this is discussed in chapter 4 of SPRU187o. An actual assembly file will contain the physical registers to be used as well as any parallel execution information for each instruction, this means that they will be more complex and difficult to write in general.

    Thupakula said:
    3) Can i have any doucment for the linear assembly code application (how it can be implemented)?

    You probably want to start with chapter 4 of SPRU187o as mentioned above for guidelines in writing linear assembly, as well as SPRU732h for the actual instruction set.

  • Hi Bernie,

    Thank u for the clarification and the app note.

     Does it make any difference in the throughput of the application with assembly code and linear assembly code?

    Thank u,

    Thupakula.

  • Thupakula said:
    Does it make any difference in the throughput of the application with assembly code and linear assembly code?

    It can potentially, it really depends on how the assembly optimizer deals with your particular linear assembly versus how you would write it in assembly code directly. A human coder certainly has the potential to do a better job of optimizing the assembly than the assembly optimizer, however this will likely take a great deal of effort and it is entirely possible that the assembly optimizer will do a better job (generally it does a 'good enough' job), of course this is very situational and could go either way depending on the particular code being developed and the developer.

  • Hi Bernie,

    I am doing profiling using CCS3.3.Here I am getting only the cycle.total of the profiling data in the profile viewer, and also i am able to see only cycle event in the events tab of the profile set up window. Could you please tell me how to add all the events like cycle.cpu etc.?

    In the activities tab I have  only

    1)Profile all Functions and Loops for Total Cycles and

    2)Collect Application Level Profile for Total Cycles and Code Size, and Application Summary

    How to add  the remaining activities like for runtime Information ?

     

    Thank you,

    Thupakula.

     

  • For the above post I observed that the activities are missing because I am running the code on DM6437EVM.If I run on the simulator then iam getting the all activitie and events. am I right?

    But still I have a doubt i.e which simulator do I need to use ?

    I obesrved that it is taking so much to profile. Is it the way that works or Is there anything that I need to add to execute quickly?

    Thank You,

    Thupakula.

  • Thupakula said:
    For the above post I observed that the activities are missing because I am running the code on DM6437EVM.If I run on the simulator then iam getting the all activitie and events. am I right?

    The simulator does provide additional profiling information you cannot necessarily obtain on the hardware, though I have not checked which particular information would be missing.

    Thupakula said:
    But still I have a doubt i.e which simulator do I need to use ?

    Any C64x+ simulator would work for profiling of a basic algorithm, however if you have one of the newer service releases of CCS you should have a DM6437 Little Endian Simulator listed that gives you some additional peripheral simulation support.

    Thupakula said:
    I obesrved that it is taking so much to profile. Is it the way that works or Is there anything that I need to add to execute quickly?

    I am not sure what you mean here, are you referring to the execution time of the simulator, the execution time of the hardware, or the amount of time for CCS to bring up the profiling information?