reading binary files in vhdl. Use of read in a function.

Joined
Feb 3, 2009
Messages
3
Reaction score
0
Hello,

I wrote the following code (reading.txt in attachment) to read the header of a ppm file. Modelsim throws me an error during the compilation:
reading.vhd(54): (vcom-1282) Cannot reference file "ppm_file" inside pure function "readheader".

I don't know how to solve it and I don't want to put the code of the function ReadHeader in the process. It seems to be linked to the passing of the file parameter and MODELSIM (see below). A problem of type ?

Thanks in advance for your help.

I have made some additional tests to see where the problem comes from. I was surprised to see that my file could be compiled with GHDL and works fine with it. So my problem is clearly related to MODELSIM (6.5 PE).
 

Attachments

  • reading.txt
    3.5 KB · Views: 492
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top