Sign in

Not a member? | Forgot your Password?

Search code-comp

Search tips


Subscribe to code-comp

Search tips

Free PDF Downloads

A Quadrature Signals Tutorial: Complex, But Not Complicated

Understanding the 'Phasing Method' of Single Sideband Demodulation

Complex Digital Signal Processing in Telecommunications

Introduction to Sound Processing

C++ Tutorial

Discussion Groups

IIR Filter Design Software

See Also

Embedded SystemsFPGA

Discussion Groups | Code-Composer | Real data type sizes

Technical discussions about Code Composer Studio.

  

Post a new Thread



Is this thread worth a thumbs up?

0

Real data type sizes - romaxin - Feb 7 5:48:00 2005



Hi all,

I am extremly confused about data types in CCS. Help tells me the
following:

Type Size Representation
char, unsigned char 16 bits ASCII
short, signed short 16 bits 2s complement
unsigned short 16 bits Binary
int, signed int 16 bits 2s complement
unsigned int 16 bits Binary
long, signed long 32 bits 2s complement
unsigned long 32 bits Binary
long long 40 bits 2s complement

But when checking the actual data size with 'sizeof' function I get
the following:

sizeof(char) = 1
sizeof(long) = 2
sizeof(long long) = 4
sizeof(int) = 1

It does not match at all. Does someone know the actual data type
sizes?

Thanks.




_____________________________
 Free pdf download: Digital Signal Processor Fundamentals and System Design.




Re: Real data type sizes - Harland Christofferson - Feb 8 8:29:00 2005


looks like it is returning bytes?

At Monday, 07 February 2005, "romaxin" <> wrote:

>Hi all,
>
>I am extremly confused about data types in CCS. Help tells me the
>following:
>
>Type Size Representation
>char, unsigned char 16 bits ASCII
>short, signed short 16 bits 2s complement
>unsigned short 16 bits Binary
>int, signed int 16 bits 2s complement
>unsigned int 16 bits Binary
>long, signed long 32 bits 2s complement
>unsigned long 32 bits Binary
>long long 40 bits 2s complement
>
>But when checking the actual data size with 'sizeof' function I get
>the following:
>
>sizeof(char) = 1
>sizeof(long) = 2
>sizeof(long long) = 4
>sizeof(int) = 1
>
>It does not match at all. Does someone know the actual data type
>sizes?
>
>T ----------------------------------------------------------------------
Zero Crossings, Inc. -- Embedded and Digital Signal Processing Systems

http://www.zerocrossings.com/



_____________________________
 Free pdf download: Complex Digital Signal Processing in Telecommunications.




re: Real data type sizes - Bhooshan Iyer - Feb 9 0:53:00 2005


Gee, harland its definetly not matching! Int=16 bits and sizeof(int)= 1?
Romaxin, somethhing is wrong somwhere. Can you tell us which DSP are
you targeting? 54x? 55x?

--Bhooshan

On Tue, 08 Feb 2005 07:29:44 -0500, Harland Christofferson
<> wrote: > looks like it is returning bytes?
>
> At Monday, 07 February 2005, "romaxin" <> wrote:
>
> >Hi all,
> >
> >I am extremly confused about data types in CCS. Help tells me the
> >following:
> >
> >Type Size Representation
> >char, unsigned char 16 bits ASCII
> >short, signed short 16 bits 2s complement
> >unsigned short 16 bits Binary
> >int, signed int 16 bits 2s complement
> >unsigned int 16 bits Binary
> >long, signed long 32 bits 2s complement
> >unsigned long 32 bits Binary
> >long long 40 bits 2s complement
> >
> >But when checking the actual data size with 'sizeof' function I get
> >the following:
> >
> >sizeof(char) = 1
> >sizeof(long) = 2
> >sizeof(long long) = 4
> >sizeof(int) = 1
> >
> >It does not match at all. Does someone know the actual data type
> >sizes?
> >
> >T --
-------------------------------------------------------------------
"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
--------------------------------------------------------------------




_____________________________
 Free pdf download: Complex Digital Signal Processing in Telecommunications.