DSPRelated.com
Forums

Re: An Important problem about C54x data types (extended precision)

Started by Jeff Brower May 18, 2008
Ahmad-

> 1- Would you know how we can perform 40-bit operations like add or
> multiply in C54x which its longest data tyype is 32 bit?
> In MELPe 1200bps there is some functions which does 40-bit
> operation do you know how can I implement them for C54x?

Here are some docs that should help:

http://focus.ti.com/lit/an/spra297/spra297.pdf

http://focus.ti.com/lit/ug/spru173/spru173.pdf

http://focus.ti.com/lit/an/spra554b/spra554b.pdf

The first doc is a good one, even though it's about C62xx and not C54x. It explains
how to use a series of 16-bit multiplies to achieve 32-bit and 64-bit results. The
graphics in the explanation are excellent.

In the second doc, look for section 6.4, Extended Precision Arithmetic.

> 2- if I want to define a big array in assembly I should write its
> type (for example .int or .word) at the first of each line. How
> can I do it if the number of lines in my array were high?

The question doesn't seem clear. Do you mean like this:

int ahmad_array[N] = {

5764, 5782, 6975, 6370, 5389,
7926, 6939, 7332, 8027, 8468,
...
...

}

The above array definition can be as big as you want. If you want the array to be
loaded into program memory (re. one of your previous questions), then use:

const int ahmad_array[N] = {

-Jeff