Sign in

username:

password:



Not a member?

Search c6x



Search tips

Subscribe to c6x



c6x by Keywords

AD535 | BIOS | Booting | Bootloader | C621 | C6211 | C6415 | C671 | C6711 | C6711DSK | C6713 | CCS | Chassaing | COFF | DAT | DM64 | DM642 | DMA | DSK671 | DSK6711 | EDM | EDMA | EMIF | Emulator | EVM | EVM620 | FFT | FIR | GPIO | Halting | HPI | HWI | IDK | JTAG | LDB | LDH | LDW | Linker | LMS | LOG_printf | Matlab | McBSP | MEM_alloc | MIPS | PCI | PCM3003 | Pipeline | Profiling | QDM | Reset | ROM | RTDX | Sampling | SDRAM | Stack | TEB | THS1206 | TMS320C621 | TMS320C6416 | TMS320C6711 | TMS320C6713 | UART | Vector Table | XBUS | XDS560

Sponsor

Industry's highest performing at the lowest power DSPs now as low as $5.00*
Start development today!
*volume pricing for 10ku

Discussion Groups

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | TMS320C6x | Where's the bug?

Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).

  

Post a new Thread

Where's the bug? - Author Unknown - Mar 14 22:00:00 2000

Hello All,
I got the TI c6211 DSK set and tried to follow the examples that they
have and I ran into problem. I am sure many of you who has the c6211
DSK must have seen the following example.
In the TI's first example, the code is something like this:

int dotp(short *m, short *n, int count);
#include <stdio.h>
#include "data.h"
#define COUNT 256
short a[COUNT] = {A_ARRAY};
short x[COUNT] = {X_ARRAY};
volatile int y=0;
main ()
{
y=dot(a,x,COUNT);
y=dot(a,x,COUNT);
printf("y = %x hex \n",y);
printf("y = %y decimal \n",y);
}
int dotp(short *m, short *n, int count)
{
int i=0;
int product=0;
int sum=0;
for (i=0; i<count; i++)
{
product = m[i]*n[i];
sum += product;
}
return (sum);
}

In data.h, they have the array a that runs from 1 to 256
and the array x runs from 256 to 1.
The value for y is 2829056 which I got.
The problem is when I single stepped through the method dotp,
as soon as I stepped into the line which contains product=0,
both m[i] and n[i] suddenly took an a huge value and nomatter
how many times the for loop runs, the values of product and sum
are always zero (which are the initialization value). How can
this be the case. Why y has the correct value of 2829056 is even
stranger! I tried both hardware and software reset and have ran
the diagnosis test for the connections between the DSK and the
computer. Everythings looked fine except running the algorithm.
Can anyone help?

Regards
John Lai



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



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

Re: Where's the bug? - Scott Specker - Mar 15 0:51:00 2000

It sounds like you have version 1.05 of Code Composer Studio for the 'C6211
DSP Starter Kit. It has a bug in the watch window.

I'm not sure if a patch has been posted to the TI website yet or not. I know
they are releasing a new version of Code Composer Studio in April. I'm sure
it'll be fixed in that.

-sgsns

>-----Original Message-----
>From:
>Sent: Tuesday, March 14, 2000 4:01 PM
>To:
>Subject: [c6x] Where's the bug? >Hello All,
>I got the TI c6211 DSK set and tried to follow the examples that they
>have and I ran into problem. I am sure many of you who has the c6211
>DSK must have seen the following example.
>In the TI's first example, the code is something like this:
>
>int dotp(short *m, short *n, int count);
>#include <stdio.h>
>#include "data.h"
>#define COUNT 256
>short a[COUNT] = {A_ARRAY};
>short x[COUNT] = {X_ARRAY};
>volatile int y=0;
>main ()
>{
> y=dot(a,x,COUNT);
> y=dot(a,x,COUNT);
> printf("y = %x hex \n",y);
> printf("y = %y decimal \n",y);
>}
>int dotp(short *m, short *n, int count)
>{
> int i=0;
> int product=0;
> int sum=0;
> for (i=0; i<count; i++)
> {
> product = m[i]*n[i];
> sum += product;
> }
> return (sum);
>}
>
>In data.h, they have the array a that runs from 1 to 256
>and the array x runs from 256 to 1.
>The value for y is 2829056 which I got.
>The problem is when I single stepped through the method dotp,
>as soon as I stepped into the line which contains product=0,
>both m[i] and n[i] suddenly took an a huge value and nomatter
>how many times the for loop runs, the values of product and sum
>are always zero (which are the initialization value). How can
>this be the case. Why y has the correct value of 2829056 is even
>stranger! I tried both hardware and software reset and have ran
>the diagnosis test for the connections between the DSK and the
>computer. Everythings looked fine except running the algorithm.
>Can anyone help?
>
>Regards
>John Lai >---------------------------------------------------------------------
>To Join: Send an email to
>To Post: Send an email to
>To Leave: Send an email to
>Archives: http://www.egroups.com/group/c6x
>Other Groups: http://www.dsprelated.com
______________________________________________________



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



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