vhpidirect: add 'arrays/matrices/framebuffer' #20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is work in progress to extend example 'matrices' with an RGB24 framebuffer. A 2D array of integers is allocated and used in VHDL to represent a virtual screen. The buffer can be either saved to PNGs/GIF or shown in an X11 window in "real-time".
A subexample is included where a synthesisable VGA pattern generator is instantiated in a testbench along with a "Virtual VGA screen" module. The virtual screen captures the VGA signals (hsync, vsync, R, G and B), a draws the frames using one of the aforementioned methods. See the figure and explanations added to the docs.
To run all the subexamples locally, packages
imagemagick
andlibx11-dev
are required on Debian. On Windows, x11docker can be used along with a docker container:x11docker --runx --no-auth --user=0 -i -- -v /$(pwd)://src -- ghdl/ext bash
These sources are inspired by http://ygdes.com/GHDL/fb/ and hackfin/ghdlex.
Pending enhancements:
integer_to_raw24
as a byte-wise operation, instead of decomposing the integer through arithmetic.Future work/ideas: #22