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.

asked Aug 14, 2017 at 22:23
\$\endgroup\$

2 Answers 2

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.

answered Aug 15, 2017 at 2:41
\$\endgroup\$
1
  • \$\begingroup\$ I see, I could think of this multistep method as well \$\endgroup\$ Commented Aug 15, 2017 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.

answered Aug 15, 2017 at 10:00
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.