Forum Discussion
Altera_Forum
Honored Contributor
15 years agoError reading file
Hi I'm trying to read a text file which is basically many lines of 1s and 0s, e.g. 1 0 1 1 0 At the moment if I include the file I get the following error message when I try to co...
Altera_Forum
Honored Contributor
10 years agoHi, I am having the same issue with $fopen.
I am trying to read in an .rbf file and use the following snippet of code: integer file; file = $fopen("helper.rbf", "r"); and receive this error: Error (10174): Verilog HDL Unsupported Feature error at testbench.v(40): system function "$fopen" is not supported for synthesis I followed what you suggested by storing the file ID to a variable, but I also need to read in the file. Here is part of my code integer char; integer file = 32'h3C2718; char = $fgetc(file); I receive this error: Error (10174): Verilog HDL Unsupported Feature error at testbench.v(40): system function "$fgetc" is not supported for synthesis Note-I am doing simulation only. I compile using Processing->Start->Start Analysis & Elaboration I am using Quartus II v16.0 on linux Is there another method where I can read and write to a file? Thanks