Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Read file by NIOS

Altera_Forum
Honored Contributor II
831 Views

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
Altera_Forum
Honored Contributor II
112 Views

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.

Altera_Forum
Honored Contributor II
112 Views

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.

Reply