Forum Discussion
Altera_Forum
Honored Contributor
13 years agothe string values need to be a constant. So you need to decalre romfile as such. The bast way would be:
constant romfile : string := "./roms/weight_lay0_engine" & integer'image(i) & ".hex"; and put this before the begin like you have done with the variables; you cannot put variables where you have them - you can only use variables inside processes, functions and procedures. You dont need to declare the length of the string because it's implicitly declared with the length of the declaration. You could use the to_string function instead of integer'image, but Quartus doesnt support them yet (but modelsim does).