Reply by salaria April 11, 20072007-04-11
>I assume that the CPU load you're talking about is the DSP/BIOS CPU load >graph. Is that correct?
Yes.
>CPU load for main? Are you talking about the function main? If you're >using BIOS you need to return from main in order for the BIOS scheduler >to take over. I'm not sure how it's even calculating a CPU load if you >never return from main.
I think i had not phrased my question properly. though i am not sure of what exactly i have to ask...
>You can use STS_set and STS_delta in conjunction with an STS object to >get some real-time profiling info on a specific function. Alternatively
>you can bring up the clock under Profile -> Clock and measure the number
>of cycles from one breakpoint to the next (i.e. start and finish of a >function).
I measured the number of cycles before and after making changes in my code using the method you have suggested(measuring clock between the breakpoints). The number of cycles reduced by a few million but the CPU load graph increased. How? This is the part i am not able to understand.
>A more low-level way to profile a function is to set a GPIO at the >beginning of the function and then clear it as you exit the function. >Of course if that function gets interrupted it may look like you're in >the function for a really long time so you may need to disable >interrupts within the function for the purpose of profiling. An >alternate way with similar idea is to have your idle thread constantly >toggle an I/O pin. When you look at it on the scope any time the pin >stops toggling you know that you're doing "active" computations. > >> >> 2. The CCS compiler produces .obj files for all source files in a
project.
>> For my project the size of function1.obj is 90.0kB and main.obj is
4kB(as
>> seen on host PC). After building the project a map file is generated.
The
>> map file shows that the memory taken by function1.obj and main.obj in
the
>> DSP memory is 18.7kB and and 0.06kB!(so many times less) Even the .out >> file is 433 kB on the Pc and 81.6 kB on the DSP. Could somebody
explain
>> this?? > >The out file contains all the symbolic info for your project. That's >what enables you to be able to type in the name of a variable into the >watch window and have CCS recognize it. Also, all the code itself is >ascii not binary so that takes up a lot more space too.
Ok.
>>
Thanks again APS
>> _____________________________________ >> Do you know a company who employs DSP engineers? >> Is it already listed at http://dsprelated.com/employers.php ? >
_____________________________________ Do you know a company who employs DSP engineers? Is it already listed at http://dsprelated.com/employers.php ?
Reply by Brad Griffis April 10, 20072007-04-10
salaria wrote:
> Hello, > > I am working on EVM DM642 and have the following problems: >
I assume that the CPU load you're talking about is the DSP/BIOS CPU load graph. Is that correct?
> 1. Is there a way to calculate the CPU load manually? I have been trying > to optimize a funciton in my CCS project. i reduced the cycles taken by a > function by a few million by making some change in the code. I saw that > the CPU load had incresed! Could someone explain how the CPu load is > calculated? Is this additive? meaning can the CPU load for main be > subtracted form total load to see load for a fucntion?
CPU load for main? Are you talking about the function main? If you're using BIOS you need to return from main in order for the BIOS scheduler to take over. I'm not sure how it's even calculating a CPU load if you never return from main. You can use STS_set and STS_delta in conjunction with an STS object to get some real-time profiling info on a specific function. Alternatively you can bring up the clock under Profile -> Clock and measure the number of cycles from one breakpoint to the next (i.e. start and finish of a function). A more low-level way to profile a function is to set a GPIO at the beginning of the function and then clear it as you exit the function. Of course if that function gets interrupted it may look like you're in the function for a really long time so you may need to disable interrupts within the function for the purpose of profiling. An alternate way with similar idea is to have your idle thread constantly toggle an I/O pin. When you look at it on the scope any time the pin stops toggling you know that you're doing "active" computations.
> > 2. The CCS compiler produces .obj files for all source files in a project. > For my project the size of function1.obj is 90.0kB and main.obj is 4kB(as > seen on host PC). After building the project a map file is generated. The > map file shows that the memory taken by function1.obj and main.obj in the > DSP memory is 18.7kB and and 0.06kB!(so many times less) Even the .out > file is 433 kB on the Pc and 81.6 kB on the DSP. Could somebody explain > this??
The out file contains all the symbolic info for your project. That's what enables you to be able to type in the name of a variable into the watch window and have CCS recognize it. Also, all the code itself is ascii not binary so that takes up a lot more space too.
> > Thanks > > APS > > > _____________________________________ > Do you know a company who employs DSP engineers? > Is it already listed at http://dsprelated.com/employers.php ?
Reply by salaria April 10, 20072007-04-10
Hello,

I am working on EVM DM642 and have the following problems:

1. Is there a way to calculate the CPU load manually? I have been trying
to optimize a funciton in my CCS project. i reduced the cycles taken by a
function by a few million by making some change in the code. I saw that
the CPU load had incresed! Could someone explain how the CPu load is
calculated? Is this additive? meaning can the CPU load for main be
subtracted form total load to see load for a fucntion? 



2. The CCS compiler produces .obj files for all source files in a project.
For my project the size of function1.obj is 90.0kB and main.obj is 4kB(as
seen on host PC). After building the project a map file is generated. The
map file shows that the memory taken by function1.obj and main.obj in the
DSP memory is 18.7kB and and 0.06kB!(so many times less) Even the .out
file is 433 kB on the Pc and 81.6 kB on the DSP. Could somebody explain
this??

Thanks

APS


_____________________________________
Do you know a company who employs DSP engineers?  
Is it already listed at http://dsprelated.com/employers.php ?