Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Output files to host

I want my NisoII Processor send real-time information to the host, and write these information into a file.

This is my C code.

FIFE* fp=fopen("/mnt/host/h.txt");

if(fp==NULL){

printf("Error in opening file\n");

return -1;

}

fprintf(fp,"Hello world\n");

fclose(fp);

return 0;

This code will work well in debug mode step by step, and it will generate a file named h.txt in my host PC machine.

But It will not work in release mode.

Can anyone help me?

Thanks

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You need a data channel to the host.

    In debug mode the jtag interface can be used.

    For releases you need to add some other interface between the fpga and whatever host you are using.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    You need a data channel to the host.

    In debug mode the jtag interface can be used.

    For releases you need to add some other interface between the fpga and whatever host you are using.

    --- Quote End ---

    Can you describe detail?

    what kind of interface need add?

    Is there any interface already existed in the SOPC Build?

    Thanks