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

Host based and Read only Zip files

Altera_Forum
Honored Contributor II
1,103 Views

Hi all, 

I got a certain code that I need to run having an input file. I download my program to RAM in general and just use the flash for the file when using the "rozipfs". 

 

I tried using once the host based file system and the other time the zip file and I used the performance counter to track a function that does NOT have any access to files in it. I got a difference of 40 million clocks between both results. What's the reason inspite of having no relation to file opening or samples' calling in the meant function ? 

 

And another thing too, in general which is faster the host-based system or the "rozipfs" ? (meaning JTAG or flash memory) 

 

Thanks in advance
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
392 Views

Flash/rozipfs will be much faster. Hostfs is going over a GDB link to your PC.  

 

With respect to your other question, I&#39;m not sure why you&#39;re seeing a significant slowdown when using hostfs, however, you&#39;ll never be using hostfs in a real-world embedded system, so I can&#39;t see that it matters much anyway http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif  

 

Cheers, 

 

- slacker
0 Kudos
Altera_Forum
Honored Contributor II
392 Views

Thanks Slacker for ur reply, u are right regarding the real-time operations but still it puzzles me, try me one last time, I will elaborate for a last time http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif  

 

My program is as follows:# include "stdio.h" 

void filter(int); 

int main() 

MyClass a; 

a.openMyFile("/mnt/rozipfs/aser.txt"); //function that opens a file stream 

int data = a.readCurrentInput(); //reads an integer from current data 

 

filter(data); //my function that I want to measure its performance 

 

void filter(int) 

int y=data; 

/*continue code normally*/ 

 

/************************************** 

***************************************/ 

 

I want to measure the performance of "filter(data)" for zip files and host based files. I get more time in case of ZIP FILE system ! I don&#39;t know the reason. 

 

Thanks
0 Kudos
Reply