Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).
Post a new Thread
Optimizing:Loop contains a call - wang...@yahoo.com.cn - Jul 27 23:32:00 2005
Hi,
I just begin to learn DSP.Now I have a question about optimizing.And I hope to get your
help.
There is a division in a loop as shown in the following(C64x):
...
for(i=0;i<n;i++)
{
...
a = b / 3;
...
}
The information of .asm says that

(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )
Re: Optimizing:Loop contains a call - Bhooshan Iyer - Jul 28 0:02:00 2005
On 7/28/05, wangfeng_scu@wang... <wangfeng_scu@wang...> wrote:
> Hi,
> I just begin to learn DSP.Now I have a question about optimizing.And I hope to get your
help.
...
> The information of .asm says that
You message is incomplete.Can you repost the information ?
--Bhooshan

(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )
Re: Optimizing:Loop contains a call - Jeff Brower - Jul 28 0:34:00 2005
Hi Bhooshan-
> On 7/28/05, wangfeng_scu@wang... <wangfeng_scu@wang...> wrote:
> > Hi,
> > I just begin to learn DSP.Now I have a question about optimizing.And I hope to get
your help.
>
> ...
>
> > The information of .asm says that
>
> You message is incomplete.Can you repost the information ?
Below is the rest of Wang Feng's info, plus his question.
-Jeff
The infomation of .asm says that "Pipeline disqualified:Loop contains
a call".
My question is: How can I improve this division in order to meet the
pipeline qualification?

(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )
Re: Optimizing:Loop contains a call - Bernhard Gustl Bauer - Jul 28 1:33:00 2005
Hi,
it is not clear what function is called, but you can try to inline the
function.
HTH Gustl
wangfeng_scu@wang... wrote:
> Hi,
> I just begin to learn DSP.Now I have a question about optimizing.And I hope to get your
help.
> There is a division in a loop as shown in the following(C64x):
> ...
> for(i=0;i<n;i++)
> {
> ...
> a = b / 3;
> ...
> }
> The information of .asm says that

(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )
Re: Optimizing:Loop contains a call - Med Anouar Hadj Taïeb - Jul 28 6:06:00 2005
Hi,
I think that your
problem is the division by 3, and as we know the C64x is a fixed point
DSP. So
when you use a division by 3, it tries to call some functions like
__divf and
__frcdivf to do this division. So the solution is to write your
equation otherwise
for example:
a = (b * Y)>>X;
It means we replace 1/3
with Y>>X ==> Y
=
(2^X)/3
Try to choose X between
20 and 30 for exp X = 22 ==>
Y = 1398101
But you should pay
attention when you do the multiplication between b and Y, the result
can be
double and not int.
And also this solution
is only for a fixed point results, it means the result of “a” isn't
float.
Kindest regards,
Anouar
Bernhard Gustl Bauer wrote:
Hi,
it is not clear what function is called, but you can try to inline the function.
HTH Gustl
w...@yahoo.com.cn wrote:
Hi,
I just begin to learn DSP.Now I have a question about optimizing.And I hope to get your help.
There is a division in a loop as shown in the following(C64x):
...
for(i=0;i<n;i++)
{
...
a = b / 3;
...
}
The information of .asm says that

(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )