DSPRelated.com
Forums

is there 40 bit Accumulator in TI 6xxx ?

Started by Alexander Chervov April 30, 2009
Dear collegues

Is there a 40bit accumulator in TI6xxx ?

I mean a register where I can accumulate
a sum of several 32 numbers, but the sum can be more than 32 bits.

Sincerely Yours Alex

_____________________________________
Dear collegues
>
>Is there a 40bit accumulator in TI6xxx ?
>
>I mean a register where I can accumulate
>a sum of several 32 numbers, but the sum can be more than 32 bits.
>
>Sincerely Yours Alex
>
>_____________________________________

Most certainly is.
There is in fact two, one in each half of the working set.

I'm assumuing you mean TMS320C6xxx ?

Cheers, Ray

_____________________________________
Alex,

A long long int is 64 bits.

That may be what you need.

R. Williams

---------- Original Message -----------
From: "Alexander Chervov"
To: c...
Sent: Thu, 30 Apr 2009 12:25:07 +0400
Subject: [c6x] is there 40 bit Accumulator in TI 6xxx ?

> Dear collegues
>
> Is there a 40bit accumulator in TI6xxx ?
>
> I mean a register where I can accumulate
> a sum of several 32 numbers, but the sum can be more than 32 bits.
>
> Sincerely Yours Alex
------- End of Original Message -------

_____________________________________
Alex,

On Thu, Apr 30, 2009 at 5:31 PM, wrote:
> Dear collegues
>>
>>Is there a 40bit accumulator in TI6xxx ?

c6xxx's have 40 bit accumulators. If you need this level of detail,
you need to read the specifics for the particular c6xxx device that
you are interested in [all c6xxx devices do not have the same number
of registers - or number/size of accumulators].

mikedunn
>>
>>I mean a register where I can accumulate
>>a sum of several 32 numbers, but the sum can be more than 32 bits.
>>
>>Sincerely Yours Alex
>>
>>_____________________________________
>>
>> Most certainly is.
> There is in fact two, one in each half of the working set.
>
> I'm assumuing you mean TMS320C6xxx ?
>
> Cheers, Ray

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php

_____________________________________
I remembered digging related to code portability issues some time ago. I
know that this is from the compiler, and not what is really in the hardware,
but I thought I'd mentions it here. I'm using a
TMS320C6713and
code composer studio 3.1.23. The issues I was dealing with were
related
to the fact that a long on this platform is 8 bytes, while on Microsoft 32
bit compilers it's only 4 bytes, while a long long is 8 bytes.

After thinking more about it, I'm only positive that the output I'm
generating is related to the alignment size of the values, and not the
actual number of bits that are used for calculation, can anyone clarify it?

Adding these lines to my program:

fprintf(tx,"%u\t: sizeof(char)\n",sizeof(char));
fprintf(tx,"%u\t: sizeof(short)\n",sizeof(short));
fprintf(tx,"%u\t: sizeof(int)\n",sizeof(int));
fprintf(tx,"%u\t: sizeof(long int)\n",sizeof(long int));
fprintf(tx,"%u\t: sizeof(unsigned long int)\n",sizeof(unsigned long int));
fprintf(tx,"%u\t: sizeof(long long)\n",sizeof(long long));
fprintf(tx,"%u\t: sizeof(bool)\n",sizeof(bool));
fprintf(tx,"%u\t: sizeof(float)\n",sizeof(float));
fprintf(tx,"%u\t: sizeof(double)\n",sizeof(double));
fprintf(tx,"%u\t: sizeof(long double)\n",sizeof(long double));

Produced:

1 : sizeof(char)
2 : sizeof(short)
4 : sizeof(int)
8 : sizeof(long int)
8 : sizeof(unsigned long int)
8 : sizeof(long long)
1 : sizeof(bool)
4 : sizeof(float)
8 : sizeof(double)
8 : sizeof(long double)
On Fri, May 1, 2009 at 2:39 PM, Richard Williams wrote:

>
> Alex,
>
> A long long int is 64 bits.
>
> That may be what you need.
>
> R. Williams
> ---------- Original Message -----------
> From: "Alexander Chervov" >
> To: c...
> Sent: Thu, 30 Apr 2009 12:25:07 +0400
> Subject: [c6x] is there 40 bit Accumulator in TI 6xxx ?
>
> > Dear collegues
> >
> > Is there a 40bit accumulator in TI6xxx ?
> >
> > I mean a register where I can accumulate
> > a sum of several 32 numbers, but the sum can be more than 32 bits.
> >
> > Sincerely Yours Alex
> ------- End of Original Message -------
>
>
>
wim,

On Mon, May 4, 2009 at 1:34 PM, William C Bonner wrote:
> I remembered digging related to code portability issues some time ago. I
> know that this is from the compiler, and not what is really in the hardware,
> but I thought I'd mentions it here. I'm using a TMS320C6713 and code
> composer studio 3.1.23. The issues I was dealing with were related to the
> fact that a long on this platform is 8 bytes, while on Microsoft 32 bit
> compilers it's only 4 bytes, while a long long is 8 bytes.

Actually a long is 40 bits. 'sizeof' will only determine the amount of
storage space required - not the actual size.

Although there is usually some correlation between 'C sizes' and
hardware, no assumptions can be made.
For example, the size for floats is always same for c6x devices -
whether or not the device has a floating point register.

mikedunn

>
> After thinking more about it, I'm only positive that the output I'm
> generating is related to the alignment size of the values, and not the
> actual number of bits that are used for calculation, can anyone clarify it?
>
> Adding these lines to my program:
>
> fprintf(tx,"%u\t: sizeof(char)\n",sizeof(char));
> fprintf(tx,"%u\t: sizeof(short)\n",sizeof(short));
> fprintf(tx,"%u\t: sizeof(int)\n",sizeof(int));
> fprintf(tx,"%u\t: sizeof(long int)\n",sizeof(long int));
> fprintf(tx,"%u\t: sizeof(unsigned long int)\n",sizeof(unsigned long int));
> fprintf(tx,"%u\t: sizeof(long long)\n",sizeof(long long));
> fprintf(tx,"%u\t: sizeof(bool)\n",sizeof(bool));
> fprintf(tx,"%u\t: sizeof(float)\n",sizeof(float));
> fprintf(tx,"%u\t: sizeof(double)\n",sizeof(double));
> fprintf(tx,"%u\t: sizeof(long double)\n",sizeof(long double));
>
> Produced:
>
> 1 : sizeof(char)
> 2 : sizeof(short)
> 4 : sizeof(int)
> 8 : sizeof(long int)
> 8 : sizeof(unsigned long int)
> 8 : sizeof(long long)
> 1 : sizeof(bool)
> 4 : sizeof(float)
> 8 : sizeof(double)
> 8 : sizeof(long double)
> On Fri, May 1, 2009 at 2:39 PM, Richard Williams
> wrote:
>>
>> Alex,
>>
>> A long long int is 64 bits.
>>
>> That may be what you need.
>>
>> R. Williams
>>
>> ---------- Original Message -----------
>> From: "Alexander Chervov"
>> To: c...
>> Sent: Thu, 30 Apr 2009 12:25:07 +0400
>> Subject: [c6x] is there 40 bit Accumulator in TI 6xxx ?
>>
>> > Dear collegues
>> >
>> > Is there a 40bit accumulator in TI6xxx ?
>> >
>> > I mean a register where I can accumulate
>> > a sum of several 32 numbers, but the sum can be more than 32 bits.
>> >
>> > Sincerely Yours Alex
>> ------- End of Original Message -------
>>

--
www.dsprelated.com/blogs-1/nf/Mike_Dunn.php

_____________________________________
Thanks. Your clarification was along the lines that I was thinking. I'd
read somewhere that the long was 40 bits, but I wasn't able to find the
details. Do you happen to know where the information is documented for the
code composer studio? (I may have found the correct answer below.)
http://msdn.microsoft.com/en-us/library/cc953fe1(VS.80).aspx has a current
listing of Microsoft's definitions of the fundamental data types, but they
vary from compiler to compiler.

I found
http://tiexpressdsp.com/wiki/index.php?title=Code_Generation_Tools_FAQ just
now, which is interesting related to plenty of questions I've seen come
across the list in the past year.

I just found http://focus.ti.com/lit/ug/spru198i/spru198i.pdf which is
interesting reading in general, and includes the following list.

char 8 bits
short 16 bits
int 32 bits
float 32 bits
long 40 bits
long long 64 bits
double 64 bits

Wim.

On Mon, May 4, 2009 at 2:20 PM, Michael Dunn wrote:

> On Mon, May 4, 2009 at 1:34 PM, William C Bonner
> wrote:
> > I remembered digging related to code portability issues some time ago. I
> > know that this is from the compiler, and not what is really in the
> hardware,
> > but I thought I'd mentions it here. I'm using a TMS320C6713 and code
> > composer studio 3.1.23. The issues I was dealing with were related to the
> > fact that a long on this platform is 8 bytes, while on Microsoft 32 bit
> > compilers it's only 4 bytes, while a long long is 8 bytes.
>
> Actually a long is 40 bits. 'sizeof' will only determine the amount of
> storage space required - not the actual size.
>
> Although there is usually some correlation between 'C sizes' and
> hardware, no assumptions can be made.
> For example, the size for floats is always same for c6x devices -
> whether or not the device has a floating point register.
>
> mikedunn
>
> >
> > After thinking more about it, I'm only positive that the output I'm
> > generating is related to the alignment size of the values, and not the
> > actual number of bits that are used for calculation, can anyone clarify
> it?
> >
> > Adding these lines to my program:
> >
> > fprintf(tx,"%u\t: sizeof(char)\n",sizeof(char));
> > fprintf(tx,"%u\t: sizeof(short)\n",sizeof(short));
> > fprintf(tx,"%u\t: sizeof(int)\n",sizeof(int));
> > fprintf(tx,"%u\t: sizeof(long int)\n",sizeof(long int));
> > fprintf(tx,"%u\t: sizeof(unsigned long int)\n",sizeof(unsigned long
> int));
> > fprintf(tx,"%u\t: sizeof(long long)\n",sizeof(long long));
> > fprintf(tx,"%u\t: sizeof(bool)\n",sizeof(bool));
> > fprintf(tx,"%u\t: sizeof(float)\n",sizeof(float));
> > fprintf(tx,"%u\t: sizeof(double)\n",sizeof(double));
> > fprintf(tx,"%u\t: sizeof(long double)\n",sizeof(long double));
> >
> > Produced:
> >
> > 1 : sizeof(char)
> > 2 : sizeof(short)
> > 4 : sizeof(int)
> > 8 : sizeof(long int)
> > 8 : sizeof(unsigned long int)
> > 8 : sizeof(long long)
> > 1 : sizeof(bool)
> > 4 : sizeof(float)
> > 8 : sizeof(double)
> > 8 : sizeof(long double)
> >
> >
> > On Fri, May 1, 2009 at 2:39 PM, Richard Williams > >
> > wrote:
> >>
> >>
> >>
> >> Alex,
> >>
> >> A long long int is 64 bits.
> >>
> >> That may be what you need.
> >>
> >> R. Williams
> >>
> >> ---------- Original Message -----------
> >> From: "Alexander Chervov"
> >> To: c...
> >> Sent: Thu, 30 Apr 2009 12:25:07 +0400
> >> Subject: [c6x] is there 40 bit Accumulator in TI 6xxx ?
> >>
> >> > Dear collegues
> >> >
> >> > Is there a 40bit accumulator in TI6xxx ?
> >> >
> >> > I mean a register where I can accumulate
> >> > a sum of several 32 numbers, but the sum can be more than 32 bits.
> >> >
> >> > Sincerely Yours Alex
>

_____________________________________
> Re: is there 40 bit Accumulator in TI 6xxx ?
> Posted by: William C Bonner
> Date: Mon May 4, 2009 1:56 pm ((PDT))
>
> After thinking more about it, I'm only positive that the output I'm
> generating is related to the alignment size of the values, and not the
> actual number of bits that are used for calculation, can anyone clarify it?

The sizes are defined in spru187o.pdf, sect 6.3, tbl 6-1, page 125, except
time_t and size_t though...

Rgds,
Andrew

_____________________________________
William--

On Tue, May 5, 2009 at 3:42 AM, William C Bonner wrote:
> Thanks. Your clarification was along the lines that I was thinking. I'd
> read somewhere that the long was 40 bits, but I wasn't able to find the
> details. Do you happen to know where the information is documented for the
> code composer studio?

I am pretty sure 187o has details about the C6000 compilers data types
and sizes and usage advices for each of them. Have you searched for
it?

--Bhooshan

> (I may have found the correct answer below.)
> http://msdn.microsoft.com/en-us/library/cc953fe1(VS.80).aspx has a current
> listing of Microsoft's definitions of the fundamental data types, but they
> vary from compiler to compiler.
>
> I found
> http://tiexpressdsp.com/wiki/index.php?title=Code_Generation_Tools_FAQ just
> now, which is interesting related to plenty of questions I've seen come
> across the list in the past year.
>
> I just found http://focus.ti.com/lit/ug/spru198i/spru198i.pdf which is
> interesting reading in general, and includes the following list.
>
> char 8 bits
> short 16 bits
> int 32 bits
> float 32 bits
> long 40 bits
> long long 64 bits
> double 64 bits
>
> Wim.
>
> On Mon, May 4, 2009 at 2:20 PM, Michael Dunn wrote:
>
> > On Mon, May 4, 2009 at 1:34 PM, William C Bonner
> > wrote:
> > > I remembered digging related to code portability issues some time ago. I
> > > know that this is from the compiler, and not what is really in the
> > hardware,
> > > but I thought I'd mentions it here. I'm using a TMS320C6713 and code
> > > composer studio 3.1.23. The issues I was dealing with were related to the
> > > fact that a long on this platform is 8 bytes, while on Microsoft 32 bit
> > > compilers it's only 4 bytes, while a long long is 8 bytes.
> >
> > Actually a long is 40 bits. 'sizeof' will only determine the amount of
> > storage space required - not the actual size.
> >
> > Although there is usually some correlation between 'C sizes' and
> > hardware, no assumptions can be made.
> > For example, the size for floats is always same for c6x devices -
> > whether or not the device has a floating point register.
> >
> > mikedunn
> >
> > >
> > > After thinking more about it, I'm only positive that the output I'm
> > > generating is related to the alignment size of the values, and not the
> > > actual number of bits that are used for calculation, can anyone clarify
> > it?
> > >
> > > Adding these lines to my program:
> > >
> > > fprintf(tx,"%u\t: sizeof(char)\n",sizeof(char));
> > > fprintf(tx,"%u\t: sizeof(short)\n",sizeof(short));
> > > fprintf(tx,"%u\t: sizeof(int)\n",sizeof(int));
> > > fprintf(tx,"%u\t: sizeof(long int)\n",sizeof(long int));
> > > fprintf(tx,"%u\t: sizeof(unsigned long int)\n",sizeof(unsigned long
> > int));
> > > fprintf(tx,"%u\t: sizeof(long long)\n",sizeof(long long));
> > > fprintf(tx,"%u\t: sizeof(bool)\n",sizeof(bool));
> > > fprintf(tx,"%u\t: sizeof(float)\n",sizeof(float));
> > > fprintf(tx,"%u\t: sizeof(double)\n",sizeof(double));
> > > fprintf(tx,"%u\t: sizeof(long double)\n",sizeof(long double));
> > >
> > > Produced:
> > >
> > > 1 : sizeof(char)
> > > 2 : sizeof(short)
> > > 4 : sizeof(int)
> > > 8 : sizeof(long int)
> > > 8 : sizeof(unsigned long int)
> > > 8 : sizeof(long long)
> > > 1 : sizeof(bool)
> > > 4 : sizeof(float)
> > > 8 : sizeof(double)
> > > 8 : sizeof(long double)
> > >
> > >
> > > On Fri, May 1, 2009 at 2:39 PM, Richard Williams > > >
> > > wrote:
> > >>
> > >>
> > >>
> > >> Alex,
> > >>
> > >> A long long int is 64 bits.
> > >>
> > >> That may be what you need.
> > >>
> > >> R. Williams
> > >>
> > >> ---------- Original Message -----------
> > >> From: "Alexander Chervov"
> > >> To: c...
> > >> Sent: Thu, 30 Apr 2009 12:25:07 +0400
> > >> Subject: [c6x] is there 40 bit Accumulator in TI 6xxx ?
> > >>
> > >> > Dear collegues
> > >> >
> > >> > Is there a 40bit accumulator in TI6xxx ?
> > >> >
> > >> > I mean a register where I can accumulate
> > >> > a sum of several 32 numbers, but the sum can be more than 32 bits.
> > >> >
> > >> > Sincerely Yours Alex
> >
--
-----------------------
"I've missed more than 9000 shots in my career.
I've lost almost 300 games. 26 times I've been trusted to take the
game winning shot and missed.
I've failed over and over again in my life.
And that is why I succeed."
-- Michael Jordan
-----------------------

_____________________________________
William--

> I just found http://focus.ti.com/lit/ug/spru198i/spru198i.pdf which is
> interesting reading in general, and includes the following list.

I think the Assembly Language users guide(spru186), contrary to what
the name suggests, is also very interesting read for C programming and
in general for an insight into what happens "beneath the hood".

--Bhooshan

>
> char 8 bits
> short 16 bits
> int 32 bits
> float 32 bits
> long 40 bits
> long long 64 bits
> double 64 bits
>
> Wim.
>
> On Mon, May 4, 2009 at 2:20 PM, Michael Dunn wrote:
>
>> On Mon, May 4, 2009 at 1:34 PM, William C Bonner
>> wrote:
>> > I remembered digging related to code portability issues some time ago. I
>> > know that this is from the compiler, and not what is really in the
>> hardware,
>> > but I thought I'd mentions it here. I'm using a TMS320C6713 and code
>> > composer studio 3.1.23. The issues I was dealing with were related to
>> > the
>> > fact that a long on this platform is 8 bytes, while on Microsoft 32 bit
>> > compilers it's only 4 bytes, while a long long is 8 bytes.
>>
>> Actually a long is 40 bits. 'sizeof' will only determine the amount of
>> storage space required - not the actual size.
>>
>> Although there is usually some correlation between 'C sizes' and
>> hardware, no assumptions can be made.
>> For example, the size for floats is always same for c6x devices -
>> whether or not the device has a floating point register.
>>
>> mikedunn
>>
>> >
>> > After thinking more about it, I'm only positive that the output I'm
>> > generating is related to the alignment size of the values, and not the
>> > actual number of bits that are used for calculation, can anyone clarify
>> it?
>> >
>> > Adding these lines to my program:
>> >
>> > fprintf(tx,"%u\t: sizeof(char)\n",sizeof(char));
>> > fprintf(tx,"%u\t: sizeof(short)\n",sizeof(short));
>> > fprintf(tx,"%u\t: sizeof(int)\n",sizeof(int));
>> > fprintf(tx,"%u\t: sizeof(long int)\n",sizeof(long int));
>> > fprintf(tx,"%u\t: sizeof(unsigned long int)\n",sizeof(unsigned long
>> int));
>> > fprintf(tx,"%u\t: sizeof(long long)\n",sizeof(long long));
>> > fprintf(tx,"%u\t: sizeof(bool)\n",sizeof(bool));
>> > fprintf(tx,"%u\t: sizeof(float)\n",sizeof(float));
>> > fprintf(tx,"%u\t: sizeof(double)\n",sizeof(double));
>> > fprintf(tx,"%u\t: sizeof(long double)\n",sizeof(long double));
>> >
>> > Produced:
>> >
>> > 1 : sizeof(char)
>> > 2 : sizeof(short)
>> > 4 : sizeof(int)
>> > 8 : sizeof(long int)
>> > 8 : sizeof(unsigned long int)
>> > 8 : sizeof(long long)
>> > 1 : sizeof(bool)
>> > 4 : sizeof(float)
>> > 8 : sizeof(double)
>> > 8 : sizeof(long double)
>> >
>> >
>> > On Fri, May 1, 2009 at 2:39 PM, Richard Williams >> >
>> > wrote:
>> >>
>> >>
>> >>
>> >> Alex,
>> >>
>> >> A long long int is 64 bits.
>> >>
>> >> That may be what you need.
>> >>
>> >> R. Williams
>> >>
>> >> ---------- Original Message -----------
>> >> From: "Alexander Chervov"
>> >> To: c...
>> >> Sent: Thu, 30 Apr 2009 12:25:07 +0400
>> >> Subject: [c6x] is there 40 bit Accumulator in TI 6xxx ?
>> >>
>> >> > Dear collegues
>> >> >
>> >> > Is there a 40bit accumulator in TI6xxx ?
>> >> >
>> >> > I mean a register where I can accumulate
>> >> > a sum of several 32 numbers, but the sum can be more than 32 bits.
>> >> >
>> >> > Sincerely Yours Alex
>>

--
-----------------------
"I've missed more than 9000 shots in my career.
I've lost almost 300 games. 26 times I've been trusted to take the
game winning shot and missed.
I've failed over and over again in my life.
And that is why I succeed."
-- Michael Jordan
-----------------------

_____________________________________