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++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

Read file by NIOS

Altera_Forum
Honored Contributor II
826 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
107 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
107 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