On Wed, Aug 5, 2015 at 11:57 AM, Attila Kinali <[email protected]> wrote: > Well, I wanted to read some binary data from a file and thought > that reading it from c and passing an uint32_t trough VHPI into > VHDL would be the right thing to do. If there is another way > I am not aware of, please let me know.
Generally, from a VHDL point of view, this is possible using the standard FILE mechanism. But it isn't all that straightforward. You have to read the files as characters, then convert them to integers. A basic discussion is here: http://stackoverflow.com/questions/14173652/how-can-i-read-binary-data-in-vhdl-modelsim-whithout-using-special-binary-format However, it is significantly simpler to pre-process the binary data into text files and then read in either vectors or hex values (as suggested in the above link). _______________________________________________ Ghdl-discuss mailing list [email protected] https://mail.gna.org/listinfo/ghdl-discuss
