Forum Discussion

gazel's avatar
gazel
Icon for New Contributor rankNew Contributor
4 years ago

Multiplication using file I/O

I was able to implement a multiplication circuit using high-level synthesis and display the calculation results on the screen using nios.
Now, I want to change the system to read the two numbers to be multiplied from a file and output the calculation results to another file.

We think it will mainly be a rewrite of test.c.
I know that I need to write FILE*fp; etc., but I would like to know in detail how to pass the numbers from the file to a and b, and how to output the calculation results to a file.

3 Replies

  • gazel's avatar
    gazel
    Icon for New Contributor rankNew Contributor

    Now that I have a better understanding of how to input files, I tried only outputting files and got this error.

    • gazel's avatar
      gazel
      Icon for New Contributor rankNew Contributor

      It seems that the on-chip memory is not large enough.

      I want to do file I/O, so I can't use hello world small.