# ADSP TS-201 (using the multiprocessor capability)

Started by March 22, 2007
Hi,

I am running a program on this processor. My program calculates sine and cosine values. It has a for loop as below:

for(n = 0L ; n <= p-2L ; n++)

{
..............
............

a = (long double) n * jfac ;

b = pfac * (long double) result ;

are = cosd (a) ;

aim = sind (a) ;

bre = cosd (b) ;

bim = sind (b) ;
......................//does various arithmetic operations based on the above calculated are,aim,bre,bim values.
tempre = are*bre - aim*bim ;
tempim = are*bim + aim*bre ;
....................

}
It seems like its possible to calculate sine and cosine of 'a' on dsp A and that of 'b' on dsp B on this processor, hoping that it would bring in some performance improvement. I am trying to improve the performance of this algorithm that does 64-bit floating point calculations. Hence, trying to see if this can be done using a multiprocessor and making this for loop to run on two processors.

My question is, how can the interleaving of the statements within a for loop be done to be run on these 2 DSP's?

As you can see I am pretty new to this, thanks a bunch!

Regards,
Dan

____________________________________________________________________________________
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/
Hey
You can do this by either using VDK or load programs manually on
processors and do synchronization with the help of interrupts. It can be
done in other ways also depends upon upon u.

Moinuddin
Sweden
On 22 Mar 2007 00:50:50 -0700, dsp newbie wrote:
>
> Hi,
>
> I am running a program on this processor. My program calculates sine and
> cosine values. It has a for loop as below:
>
> for(n = 0L ; n <= p-2L ; n++)
> {
> ..............
> ............
> a = (long double) n * jfac ;
> b = pfac * (long double) result ;
>
> are = cosd (a) ;
> aim = sind (a) ;
> bre = cosd (b) ;
> bim = sind (b) ;
>
> ......................//does various arithmetic operations based on the
> above calculated are,aim,bre,bim values.
> tempre = are*bre - aim*bim ;
> tempim = are*bim + aim*bre ;
> ....................
> }
>
> It seems like its possible to calculate sine and cosine of 'a' on dsp A
> and that of 'b' on dsp B on this processor, hoping that it would bring in
> some performance improvement. I am trying to improve the performance of this
> algorithm that does 64-bit floating point calculations. Hence, trying to see
> if this can be done using a multiprocessor and making this for loop to run
> on two processors.
>
> My question is, how can the interleaving of the statements within a for
> loop be done to be run on these 2 DSP's?
>
> As you can see I am pretty new to this, thanks a bunch!
>
> Regards,
> Dan
dsp newbie wrote:
> My program calculates sine and cosine values.
> It has a for loop as below:
>
> for(n = 0L ; n <= p-2L ; n++)
>
> {
> ..............
> ............
>
> a = (long double) n * jfac ;
>
> b = pfac * (long double) result ;
>
> are = cosd (a) ;
>
> aim = sind (a) ;
>
> bre = cosd (b) ;
>
> bim = sind (b) ;
>

If you split that computation up for two processors, you gain a
factor of 2 in speed. However, if instead of the cos and sin function
you use quadrature oscillators you should easily gain a factor of 20
or more in processing speed. Use single-precision float for another