Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
723 Views

Read file by NIOS

Hi guys, 

 

Finally I could program NIOS to read and write a file from the host computer with fread and fwrite instruction (in debug mode). However, it's awfully slow. For instance, reading a 5MB image from the host computer takes more than 20 minutes! Any idea to fasten the process?  

 

Thanks in advance! 

Abbas
0 Kudos
2 Replies
Highlighted
Valued Contributor III
4 Views

Re: Read file by NIOS

That means about 4KB/s. I don't have any information of host-based filesystem performance, but I guess it could be a reasonable figure, especially if you use fread and fwrite calls with single byte or a few bytes. If this is your case, try the same file transfer by packing long byte streams into a single call.

0 Kudos
Highlighted
Valued Contributor III
4 Views

Re: Read file by NIOS

Probably the only way to get a real performance increase it to utilize a different interface, if you have one available. i.e. PCIe, or Ethernet. You could use Altera's TSE (or opencores, etc) to transfer the file to the local filesystem/memory.

0 Kudos