Forum Discussion
Altera_Forum
Honored Contributor
16 years agoRead from file in vhdl
Hi, I have a whole heap of bits I need to hard-code into my hardware. Instead of writing them directly into my vhdl code I was wanting to be able to load them into the code via a .dat file or s...
Altera_Forum
Honored Contributor
16 years ago2 problems.
1. VHDL can only read text files (you can work around it to read in data files, but behaviour is not consistant from tool to tool). textio is really just a subset of std.textio that allows you to read/write directly to/from std_logic_vector. The main functions are in std.textio. Std_logic_textio is also a synopsis package and not an IEEE standard, which is probably why quartus just doesnt have that package anyway. 2. You cannot use textio in quartus for synthesis. Its a real pain because Xilinx allows it. The only way to do it is via direct instantiations of altsyncrams that allow you to specify a .mif or .hex as the initialisation file.