Lord Banshee
Golden Member
ok i have some code running on a DSP C6713, but i am using C/C++ to code so i am sure any good C programmer can give me some hints.
Well i have this section of code that loops a lot and inside this loop it access a large set of memory adds and avg's of the values in two different memory locations:
so i have something like this:
loop a 0 to (big#)
_ loop b 0 to (big#)
_ _ c = (b + a)
_ _ sum = abs(mem1(b) + mem(c))
_ end loop
_ avg(a) = sum / big#
end loop
Is there any faster methods of doing th above pseudo code?
My problem is i have the code running in Matlab and it takes matlab on my laptop 10 seconds to find an answer but it takes my DSP board 10 minutes. The only think i can think of is that those vector abilities have shown me how amazing they are and i wish i would run matlab on the dsp....
Also I was thinking it was so slow as all these memory calls are off-chip, external SDRAM, as the memory arrays are too large to fit in the cache of the DSP.
any help would be would be nice, i am not a very good programmer so if there are things i am missing or you think i am missing it would nice.
Well i have this section of code that loops a lot and inside this loop it access a large set of memory adds and avg's of the values in two different memory locations:
so i have something like this:
loop a 0 to (big#)
_ loop b 0 to (big#)
_ _ c = (b + a)
_ _ sum = abs(mem1(b) + mem(c))
_ end loop
_ avg(a) = sum / big#
end loop
Is there any faster methods of doing th above pseudo code?
My problem is i have the code running in Matlab and it takes matlab on my laptop 10 seconds to find an answer but it takes my DSP board 10 minutes. The only think i can think of is that those vector abilities have shown me how amazing they are and i wish i would run matlab on the dsp....
Also I was thinking it was so slow as all these memory calls are off-chip, external SDRAM, as the memory arrays are too large to fit in the cache of the DSP.
any help would be would be nice, i am not a very good programmer so if there are things i am missing or you think i am missing it would nice.