Re: speeding up my runtime on a c6713.



On Apr 28, 7:09 pm, "William C Bonner <wbon...@xxxxxxxxxxxxx>"
<wimbon...@xxxxxxxxx> wrote:
Are you writing a program that utilizes the TI DSP BIOS, or just runs
straight on the processor with no BIOS?

Are you using all 256k of DSP ram, or have you reserved up to 64k of
it for cache, and possibly enabled the cache controller?

How many of your variables are automatic / stack variables, vs how
many are global?

I believe the pragma before any variables you want to label for a
different section is #pragma DATA_SECTION("sectionname") but I don't
have my compiler in front of me so I can't be sure. If that's correct,
then it goes along with #pragma CODE_SECTION("othersectionname").
Take note that the C++ does not declare the variable in the pragma,
while the C version does.

On Apr 28, 1:41 pm, jleslie48 <j...@xxxxxxxxxxxxxxxxxx> wrote:

I'm running way too slow, but I know I've done a few things
inefficiently on in my C program.

1) I ran out of IRAM memory so I moved all my variables to ERAM.
What did this cost me?
1A) How can I pick and choose where in memory my C++ variables
reside?

2) instead of using 'float variablea;" I used 'double variablea;'
what did this cost me and what can I expect by changing all my
variables to float (32 bit vs 64 bit.) ?

3) How else can I effect the runtime of my program, I see there is a
clock properties, setting, I know by removing all my fprintf's I pick
up save some 20% of the runtime, What about switching from debug to
release mode, or something else I haven't considered?

I'm using the TI DSP with BIOS.

"Are you using all 256k of DSP ram, or have you reserved up to 64k of
it for cache, and possibly enabled the cache controller?"

I don't know about the 256k DSP ram, or the reserve 64k cache, how
would check and for that matter what are the implications of it? I'm
new to DSP programming, and I've gotten as far as to get my routines
and algorithms to run, but now I need to optimize and I'm not sure how
to proceed.

" How many of your variables are automatic / stack variables, vs how
many are global?"

I was using mostly global static variables, specifically an array of
10,000 of a structure consisting of several double values:

typedef struct {
double dtimeindex;
double damplitude;
double dampfrombestfitline;
double dsdvalue;
} itmlstrec_type;

itmlstrec_type itemlist [10000];

this is of course over the top, but in the PC world of 2gb memory
machines, out-of-sight out of mind. Now that I'm dealing with a real
machine, I have remember my roots and build and design clean. The
above stucture is clearly full of pork, and needs to be trimmed. #1)
float will cut the size in half, and as I understand it,#2) the C6713
chip has a floating point math that's fast, but only for the 32-bit
version, with the 64-bit floating point precision values, I'm on the
slow boat to china...

"#pragma CODE_SECTION("othersectionname").
Take note that the C++ does not declare the variable in the pragma,
while the C version does."

pragma is fine with me, I've seen it used before but I've personally
never had the need to use it. I'm programming in straight C.

.



Relevant Pages

  • Re: speeding up my runtime on a c6713.
    ... it for cache, and possibly enabled the cache controller? ... then it goes along with #pragma CODE_SECTION. ... I'm using the TI DSP with BIOS. ... I don't know about the 256k DSP ram, or the reserve 64k cache, how ...
    (comp.dsp)
  • Re: speeding up my runtime on a c6713.
    ... it for cache, and possibly enabled the cache controller? ... then it goes along with #pragma CODE_SECTION. ... 1A) How can I pick and choose where in memory my C++ variables ... external ram using the other 64k of internal ram. ...
    (comp.dsp)
  • Re: Ajax bizare
    ... A small correction: the last one (Pragma) doesn't handle the UA's cache ... It instructs the intermediary servers do not serve the ...
    (comp.lang.javascript)
  • Re: Ajax bizare
    ... A small correction: the last one (Pragma) doesn't handle the UA's cache ... It instructs the intermediary servers do not serve the ...
    (comp.lang.javascript)