Racing the beam in VGA, framework and demos!
January 17, 2024 ยท View on GitHub
This folder contains a small framework to create VGA demos, shader-style. All these demos are racing the beam, e.g. the picture is produced while the VGA signal is generated, without any framebuffer.
The main file is vga_demo_main.si. Each demo includes it and then defines a
frame_display module that computes a color for each pixel, as the VGA signal
is being generated. Yes, there is no framebuffer here!
(if you are familiar with GPU pixel shaders, this is a very similar programming
style for the effects, except that we
are racing the beam here).
Demos typically run on the IceStick (with VGA DAC page), IceBreaker and ECPIX5 (with VGA PMOD), de10-nano (with I/O board VGA). Note that the custom VGA DAC page can be connected to all boards with the proper pinout (see link).
All demos can be run in simulation (opens a graphical window) with e.g.
make verilator -f Makefile.flyover3d for the flyover demo.
To build for specific hardware use make <target>, for instance make icebreaker.
Similarly use -f to select a specific demo.
Available demos:
- Roto texture, use
-f Makefile.rototexture - Flying over a plane, use
-f Makefile.flyover3d - Copper bars, use
-f Makefile.copperbars - 3D Menger sponge pipeline, use
-f Makefile.msponge - rsqrt tunnel, use
-f Makefile.circles - Monte Carlo geometry, use
-f Makefile.mc
Credits
- Ring oscillator for the ECP5 from https://github.com/dpiegdon/verilog-buildingblocks, by David R. Piegdon (GPLv3)