DSPRelated.com
Forums

circular addressing

Started by Ashish Gupta January 12, 2009
Hello ,
I have used circular addressing for Ar6 and Ar7 by using BK47 and BSA67 in
assembly . I have also used dsplib function 'fir' in the same project in C
file. I am finding that BK47 is being modified by the dsplib function fir
which is also not restored in the fir function. The fir function also uses
circular addressing internally to execute convolution and filtering
operations. Also i cannot use Ar0-AR3 for circular addressing as these
registers are very frequently modified and used by C program. I want to know
how can i use circular addressing when mixing with C as C program and
functions use the ARs and other registers arbitrarily and we are left with
no control over the the registers which we want to be untouched (e.g
circular addressing).

Ashish

HI,
If you want the registers contents to be saved, just push those registers in to the stack before the function call and pop them after.
Hope this will help you.

Regards,
sravanthi
On Sat, 10 Jan 2009 Ashish Gupta wrote :
>Hello ,
>I have used circular addressing for Ar6 and Ar7 by using BK47 and BSA67 in
>assembly . I have also used dsplib function 'fir' in the same project in C
>file. I am finding that BK47 is being modified by the dsplib function fir
>which is also not restored in the fir function. The fir function also uses
>circular addressing internally to execute convolution and filtering
>operations. Also i cannot use Ar0-AR3 for circular addressing as these
>registers are very frequently modified and used by C program. I want to know
>how can i use circular addressing when mixing with C as C program and
>functions use the ARs and other registers arbitrarily and we are left with
>no control over the the registers which we want to be untouched (e.g
>circular addressing).
>
>Ashish
>
SRAVANTHI
Ashish,
except AR5, AR6, AR7, T2, T3, all the registers need be preserved before calling any C function from assembly. For more information regarding registers to be preserved by parent and child functions, just type "save on entry registers" in CCS help.

Thanks,
Santhosh

--- On Tue, 1/13/09, sravanthi wrote:
From: sravanthi
Subject: Re: [c55x] circular addressing
To: c...
Cc: "Ashish Gupta"
Date: Tuesday, January 13, 2009, 7:43 AM

HI,

If you want the registers contents to be saved, just push those registers in to the stack before the function call and pop them after.

Hope this will help you.

Regards,

sravanthi

On Sat, 10 Jan 2009 Ashish Gupta wrote :

>Hello ,

>I have used circular addressing for Ar6 and Ar7 by using BK47 and BSA67 in

>assembly . I have also used dsplib function 'fir' in the same project in C

>file. I am finding that BK47 is being modified by the dsplib function fir

>which is also not restored in the fir function. The fir function also uses

>circular addressing internally to execute convolution and filtering

>operations. Also i cannot use Ar0-AR3 for circular addressing as these

>registers are very frequently modified and used by C program. I want to know

>how can i use circular addressing when mixing with C as C program and

>functions use the ARs and other registers arbitrarily and we are left with

>no control over the the registers which we want to be untouched (e.g

>circular addressing).

>

>Ashish

>