Sign in

username:

password:



Not a member?

Search c3x



Search tips

Subscribe to c3x



c3x by Keywords

Boot | C31 | TMS320VC33 | VC33

Sponsor

Evaluate multicore with Texas Instruments:
Low-cost evaluation module & free software development kit available NOW.

Discussion Groups

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | TMS320C3x | Efficient memory usage

Technical discussions about the TI C3x DSPs (including the C31, C32 and C33 DSPs).

  

Post a new Thread

Efficient memory usage - tun875 - Nov 7 9:19:16 2006

Hi everyone,

I am programming for the VC33 and want to optimize the way memory is 
currently being used for a large amount of C code.  I have a couple 
of questions on how to make the best use of the memory capabilities 
of the VC33:

1) How do I ensure that two accesses occur per cycle in dual access 
memory?  If I'm doing something like repetitive calculations on 
matrices, it would be nice to have those two accesses at once.  Does 
this happen  automatically for all data stored in RAM0 and RAM1, or 
does it need to be done manually by doing the calculations in 
assembly? 

2) Regarding parallel operations, it appears from the documentation 
that the ordering of the operands can have an effect on the cycle 
count.  For example, if src1 is in internal memory and src2 is in 
external memory, the two accesses take 1 cycle.  If the ordering is 
reversed, however, it takes 2 cycles.  Does the C programmer have any 
control over the ordering?  Since linking occurs after compiling, I 
assume the compiler cannot know where data resides in memory, and as 
such cannot order the operands itself.  Can this ordering, therefore, 
only take place in assembly? 

Thanks in advance,

Jenny

______________________________
New Code Sharing Section now Live on DSPRelated.com. Learn about the Reward Program for Contributors here.



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

Re: Efficient memory usage - Keith Larson - Nov 9 8:17:01 2006

Hi Jenny

Yes, you would be correct that to get this kind of performance you will 
need to write your routine in ASM.  This is not so bad.  Start with 
plain C and have the compiler keep the resulting ASM (-k option ?).  
This should be enough for you to figure out how to get started.  Also 
have a look at the C compiler guide.  In it you will find a list of what 
registers do and do not require preservation during a call.

Best regards,
Keith Larson

DSP and Analog Consultant  home.comcast.net/~klarsondsp
CTO Smith & Larson Audio   www.woofertester.com
Lincoln, Ma 01773
tun875 wrote:

> Hi everyone,
>
> I am programming for the VC33 and want to optimize the way memory is
> currently being used for a large amount of C code. I have a couple
> of questions on how to make the best use of the memory capabilities
> of the VC33:
>
> 1) How do I ensure that two accesses occur per cycle in dual access
> memory? If I'm doing something like repetitive calculations on
> matrices, it would be nice to have those two accesses at once. Does
> this happen automatically for all data stored in RAM0 and RAM1, or
> does it need to be done manually by doing the calculations in
> assembly?
>
> 2) Regarding parallel operations, it appears from the documentation
> that the ordering of the operands can have an effect on the cycle
> count. For example, if src1 is in internal memory and src2 is in
> external memory, the two accesses take 1 cycle. If the ordering is
> reversed, however, it takes 2 cycles. Does the C programmer have any
> control over the ordering? Since linking occurs after compiling, I
> assume the compiler cannot know where data resides in memory, and as
> such cannot order the operands itself. Can this ordering, therefore,
> only take place in assembly?
>
> Thanks in advance,
>
> Jenny
>
>  




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