Sign in

username:

password:



Not a member?

Search code-comp



Search tips

Subscribe to code-comp



code-comp by Keywords

ARM7 | BIOS | Bug | EVM | JTAG | Linker | LOG_printf | McBSP | Profiling | Relocation | RTDX | Simulator | Target | Watch


Discussion Groups

Discussion Groups | Code-Composer | urgently needing the solution:about file IO in ccs

Technical discussions about Code Composer Studio.

  

Post a new Thread

urgently needing the solution:about file IO in ccs - sandipbiranwar - May 15 7:20:00 2005



hi,
I'm working on the simulator c54x(ccs v2). In my c code i'm inputing
two *.dat files through probe points and also taking the output in
two *.dat files . I'v converted the wav file to dat file through c
code and store them in teh project folder and included the ccs header
into the dat files. when i'm
running code, i get this message

open error: Invalid file ID (32768)in CIO message!

The code for the programm is #include <stdio.h>
#include <stdlib.h>

#define NO_OF_TAPS 700
#define STEP_SIZE 0.09
#define BUFFSIZE 300

int input1[BUFFSIZE];
int input2[BUFFSIZE];
int output1[BUFFSIZE];
int output2[BUFFSIZE];
float mue=STEP_SIZE;
int M=NO_OF_TAPS;

static void dataIO();
static void lms_algorithm();

void main()
{
FILE *fp;
fp=fopen("base.dat","rb");

while(!feof(fp))
{
dataIO(); /* here i'm putting probe point */

lms_algorithm();
}
}

static void dataIO()
{
/* do data IO */
return;
}

static void lms_algorithm()
{
int size=BUFFSIZE;
int i,j;
float W[300]={0.0};

while(size--)
{
for(i=0;i<M;i++)
output1[size] = output1[size] + W[size]*input1
[size-i];

output2[size]=input2[size]-output2[size];

for(j=0;j<M;j++)
W[size]=mue*input1[size]*output2[size];
}
return;
}
How anyody help me in this regurd.




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

RE: urgently needing the solution:about file IO in ccs - Ος ³¬ - May 17 5:06:00 2005

just give us the dat file.
There may be something wrong in that file.

Chao Xiang

>From: "sandipbiranwar" <sandipbiranwar@sand...>
>To: code-comp@code...
>Subject: [code-comp] urgently needing the solution:about file IO in ccs
>Date: Sun, 15 May 2005 11:20:00 -0000
>
>hi,
>I'm working on the simulator c54x(ccs v2). In my c code i'm inputing
>two *.dat files through probe points and also taking the output in
>two *.dat files . I'v converted the wav file to dat file through c
>code and store them in teh project folder and included the ccs header
>into the dat files. when i'm
>running code, i get this message
>
>open error: Invalid file ID (32768)in CIO message!
>
>The code for the programm is >#include <stdio.h>
>#include <stdlib.h>
>
>#define NO_OF_TAPS 700
>#define STEP_SIZE 0.09
>#define BUFFSIZE 300
>
>int input1[BUFFSIZE];
>int input2[BUFFSIZE];
>int output1[BUFFSIZE];
>int output2[BUFFSIZE];
>float mue=STEP_SIZE;
>int M=NO_OF_TAPS;
>
>static void dataIO();
>static void lms_algorithm();
>
>void main()
>{
> FILE *fp;
> fp=fopen("base.dat","rb");
>
> while(!feof(fp))
> {
> dataIO(); /* here i'm putting probe point */
>
> lms_algorithm();
> }
>}
>
>static void dataIO()
>{
> /* do data IO */
> return;
>}
>
>static void lms_algorithm()
>{
> int size=BUFFSIZE;
> int i,j;
> float W[300]={0.0};
>
> while(size--)
> {
> for(i=0;i<M;i++)
> output1[size] = output1[size] + W[size]*input1
>[size-i];
>
> output2[size]=input2[size]-output2[size];
>
> for(j=0;j<M;j++)
> W[size]=mue*input1[size]*output2[size];
> }
> return;
>} >
>How anyody help me in this regurd.




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