A
Allan Herriman
Jonathan said:In most simulators, and using VHDL-93, you can declare a FILE OF CHARACTER
which will allow you to read standard Unix or Windows byte-stream files.
READ(F, C); will read the next character into C; CHARACTER'POS(C) will
then return its byte value.
Note that this is not guaranteed to be portable across simulators,
but it works OK in my experience.
If using a simulator that supports Tcl/Tk, it might be possible to use
the Tcl/Tk Img package that can read an image file (.bmp, .gif, .jpg,
whatever) into a pixmap image type. This can then be fed pixel by pixel
into the testbench.
I think this may be easier than trying to decode (or generate) the
various file formats in VHDL.
http://aspn.activestate.com/ASPN/docs/ActiveTcl/ActiveTcl8.4.1.0-html/img/index.htm
Regards,
Allan.