Forums

Linear Assembly in TMS320C6416,Compiler Options

Started by Swam...@lntinfotech.com March 28, 2006
Hi,

In order to increase the performance of my application,I hav converted one of my MIPS intensive module into linear assembly.I hav tried testing it with different compiler options.Converting the c module to asm must give considerable reduction,right.But, there is a reduction of 0.05 only that too after some changes in the code such as loop unrolling,Can i know some suggestions regarding this situation??

Swaminathan.S
India.
Hi swaminathan,

Converting or writing LinearASM will not give optimization. In c64x
optimization is fully depends upon the information we providing to the
compiler.
So don't thing the after writing linearASM for one code we can get
optimization.

You should use the assembler directives and as per as possible avoid
nops in the code.

Writting ASM does n't be a burden task but after writting that u should
beat the compiler performance that is really a burden task.

I had experience like u. So don't worry try to remeber the following
while writting the code,

* Try to use Packed data processing.
(if u r data is short our registers are int i.e 32bit so try to Pack as
word and process it)

*Please try to use the delay cycles from load,store and branch.

*Try to use assembler directives(in linearASM) to inform the compiler to
control the optimization process. Refer spru187)

I am also a beginner like u if any comments on these i welcome it from
experts.....

(Note: As per my opinion instead on writting linearASM you can write
HandHeld ASM. LinearASM is pipeline unprotected so just go with Pure ASM
coding. )
----- Original Message -----
From:
To:
Sent: Tuesday, March 28, 2006 4:19 PM
Subject: [c6x] Linear Assembly in TMS320C6416,Compiler Options
>
> Hi,
>
> In order to increase the performance of my application,I hav converted
> one of my MIPS intensive module into linear assembly.I hav tried testing
> it with different compiler options.Converting the c module to asm must
> give considerable reduction,right.But, there is a reduction of 0.05 only
> that too after some changes in the code such as loop unrolling,Can i know
> some suggestions regarding this situation??
>
> Swaminathan.S
> India.
Swaminathan,

--- hari wrote:

> Hi swaminathan,
>
> Converting or writing LinearASM will not give
> optimization. In c64x
> optimization is fully depends upon the information
> we providing to the
> compiler.
> So don't thing the after writing linearASM for one
> code we can get
> optimization.
>
> You should use the assembler directives and as
> per as possible avoid
> nops in the code.
>
> Writting ASM does n't be a burden task but
> after writting that u should
> beat the compiler performance that is really a
> burden task.
>
> I had experience like u. So don't worry try to
> remeber the following
> while writting the code,
>
> * Try to use Packed data processing.
> (if u r data is short our registers are int i.e
> 32bit so try to Pack as
> word and process it)
>
> *Please try to use the delay cycles from
> load,store and branch.
>
> *Try to use assembler directives(in linearASM) to
> inform the compiler to
> control the optimization process. Refer spru187)
>
> I am also a beginner like u if any comments on
> these i welcome it from
> experts.....
>
> (Note: As per my opinion instead on writting
> linearASM you can write
> HandHeld ASM. LinearASM is pipeline unprotected so
> just go with Pure ASM
> coding. )
> ----- Original Message -----
> From:
> To:
> Sent: Tuesday, March 28, 2006 4:19 PM
> Subject: [c6x] Linear Assembly in
> TMS320C6416,Compiler Options
> >
> > Hi,
> >
> > In order to increase the performance of my
> application,I hav converted
> > one of my MIPS intensive module into linear
> assembly.I hav tried testing
> > it with different compiler options.Converting the
> c module to asm must
> > give considerable reduction,right.
No. As Hari said, there is no 'automatic benefit' by
converting your code to either linear assembly or hand
coded assembly. TI's C compiler geberates very
efficient code in most cases.
> > But, there is a
> reduction of 0.05 only
> > that too after some changes in the code such as
> loop unrolling,Can i know
> > some suggestions regarding this situation??
The first issue is to identify the problem area.
There are many things to consider, here are a few:
1. Is there any I/O in your application?? If yes,
could the I/O + your code be the limiting factor??
2. If you are using I/O, are you using interrupts??
If yes, do you have any 'idle time?? If no, should
you be using interrupts??
3. If you are using a newer version of CCS that
supports compiler consult, did you use it??
4. Have you made any efforts to profile your code??
5. Does your software execute code in an optimal
sequence for your application??

The bottom line is that there are dozens [hundreds??]
of issues to look at. The first is a solid
understanding of the result that you are trying to
achieve and the environment in which you are trying to
achieve it.

mikedunn
> >
> > Swaminathan.S
> > India.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > c...
>
>
>