listen sinam.
this is what we told you many time.
you can not save a file. unless you have FAT formated device.
only if you could save a file with the program.
what will you do after then?
read file? to where ?
what you can do is reading the file into memory on NiosII again.
do you understand?
you can not open the file with you PC, because Flash memory is stuck with your board.
who can access the flash is only NiosII.
but, your final destination is not saving file.
your destination is to check the data, right?
if so, you don't have to save file, just send data via something like Ethernet.
I have no idea why you can not save a file on you flash.
because, I haven't seen your system structure.
but I am sure. you can not construct file-system on your FPGA for now.
my advice is to give up saving file for now.
send data to PC via Ethernet instead.
plz. do understand.
you can study how to save files later on by taking many time.