Sign in

username:

password:



Not a member?

Search c6x



Search tips

Subscribe to c6x



c6x by Keywords

AD535 | BIOS | Booting | Bootloader | C621 | C6211 | C6415 | C671 | C6711 | C6711DSK | C6713 | CCS | Chassaing | COFF | DAT | DM64 | DM642 | DMA | DSK671 | DSK6711 | EDM | EDMA | EMIF | Emulator | EVM | EVM620 | FFT | FIR | GPIO | Halting | HPI | HWI | IDK | JTAG | LDB | LDH | LDW | Linker | LMS | LOG_printf | Matlab | McBSP | MEM_alloc | MIPS | PCI | PCM3003 | Pipeline | Profiling | QDM | Reset | ROM | RTDX | Sampling | SDRAM | Stack | TEB | THS1206 | TMS320C621 | TMS320C6416 | TMS320C6711 | TMS320C6713 | UART | Vector Table | XBUS | XDS560


Discussion Groups

Discussion Groups | TMS320C6x | Re: Optimizing:Loop contains a call

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 )