Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
18 years ago

Host based and Read only Zip files

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

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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