DSPRelated.com
Forums

Filter from dsplib fails

Started by Sven Jaborek June 18, 2006
Hi All!

i use fir filter from the ti dsplib with CCS 2.x. I rebuild it for my
version of CCS allready.

The filter works fine if i place input and output buffer in iram and the
coefficients are in sdram.

It was a accident to place the in sdram, so i wanted to benefit from the
performance and changed #pragma so the array is in iram.
But then the filter doesnt work anymore.

I can not understand this, any suggestions?

(Probably someone of you knocks on my blacklist filter, i receive
bounces and needed to reactivate my yahoo group account once again.
Can someone else answer, who (emailadress) posted the last messages.
Thank you!)
Sven-

> i use fir filter from the ti dsplib with CCS 2.x. I rebuild it for my
> version of CCS allready.
>
> The filter works fine if i place input and output buffer in iram and the
> coefficients are in sdram.
>
> It was a accident to place the in sdram, so i wanted to benefit from the
> performance and changed #pragma so the array is in iram.
> But then the filter doesnt work anymore.
>
> I can not understand this, any suggestions?

Just a guess, but maybe base address had N zeros (N=order of FFT) when in
SDRAM (for example, 0x80000000) but does not have that in internal SRAM.
I seem to recall the dsplib fir() functions use "modulo addressing" which
makes this requirement of both data and coefficient base addresses.

Also, just a comment: if you enable L2 cache, then leaving the
coefficients in SDRAM is not a bad idea -- would help conserve memory
usage. Once the coefficients are touched once during the FIR filter, they
will stay in cache for for the remainder of the FIR loop.

-Jeff
Hi!

Additional information. I made the filter work with coefficients in
iram.
Bevor the change the array was declared in myfilters.h and used in
myfilters.c . Myfilters.c containes a method called by a main function
of course.

My fix now was to declare the array in the file with the main function
(global) and forward the pointer through a init function in myfilters.c.

The prama used was datasection.

I fixed it now, so it works. But i dislike the fact the array is a
global one. Can anyone understand why #pragma datasection(arrayname,
"iram") failed inside the myfilter.h and passed in the main-file?
I have not checked the hole memory map, but what i saw has been ok in
both versions.

regards, Sven

Am Samstag, den 17.06.2006, 18:41 +0200 schrieb Sven Jaborek:
> Hi All!
>
> i use fir filter from the ti dsplib with CCS 2.x. I rebuild it for my
> version of CCS allready.
>
> The filter works fine if i place input and output buffer in iram and the
> coefficients are in sdram.
>
> It was a accident to place the in sdram, so i wanted to benefit from the
> performance and changed #pragma so the array is in iram.
> But then the filter doesnt work anymore.
>
> I can not understand this, any suggestions?
>
> (Probably someone of you knocks on my blacklist filter, i receive
> bounces and needed to reactivate my yahoo group account once again.
> Can someone else answer, who (emailadress) posted the last messages.
> Thank you!)
>
>