0
\$\begingroup\$

Is there a standard way to load an image into VHDL testbench so image processing logic output can be tested? Obviously there will be an output from the testbench, also an image that must be possible to open and view.

\$\endgroup\$
2
\$\begingroup\$

No. In the past I have made a Matlab script to convert an image into a format the is easy to read into a testbench such as an rgb image stored in a simple format like hexadecimal rgb stored one pixel per line ( use the textio library to parse the file line by line). For my tests There was some assumed row/column ordering and a fixed size image. Then I run the testbench that reads the simple image test file and outputs another simple image test file. Then I have a third script to import the simple file back into Matlab.

\$\endgroup\$
  • \$\begingroup\$ I see, I could think of this multistep method as well \$\endgroup\$ – quantum231 Aug 15 '17 at 8:53
2
\$\begingroup\$

You might consider writing a VHDL package to read and write some simple image format, such as XPM which, being text, is probably easier to handle than binary files such as bmp,jpg etc.

Just use GIMP or other image processing software to export the images you want to XPM, and import your testbench's results.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.