This design outputs a waggling 6-bit rainbow demo on VGA.
The demo will change effect based on inputs on ui_in
.
Pin | Pin Name | Setting | Effect |
---|---|---|---|
ui_in[0] |
DUAL_EN |
Dual mode | Horizontally flips the image each scan line |
ui_in[1] |
HWAVE_EN |
H wave | Enables use of horizontal waves |
ui_in[4:2] |
P0_OFF_{2,1,0} |
P0 offset | Controls the speed of the H wave |
ui_in[7:5] |
P1_OFF_{2,1,0} |
P1 offset | Controls the speed of the V wave |
<br /> Default
<br /> Dual Mode
<br /> H Wave
A video of a different (software rather than hardware) implementation, of the waggling rainbow effect can be found at https://www.youtube.com/watch?v=AxT45_7WZUQ.
If wanting to test without hardware, use the VGA
playground. Copy and paste the
contents of the entire src/project.v
file into the playground's text editor,
replacing all previous content. Then, change the name of the module from
tt_um_patater_demokit
to tt_um_vga_example
and the simulator will start
running in your browser.
If testing with hardware, use a TinyVGA
PMOD. Clock the design with 25.175 MHz as
described in info.yaml
(25.157 MHz is standard for 60 Hz 640x480 VGA video).
If testing with lower level simulation tools, an incomplete cocotb test bench
(test/test.py
) is provided. Passing the tests in the cocotb bench is no
guarantee that the design will work.
External hardware required:
# | Input | Output | Bidirectional |
---|---|---|---|
0 | DUAL_EN | R1 | |
1 | HWAVE_EN | G1 | |
2 | P0_OFF_0 | B1 | |
3 | P0_OFF_1 | VSync | |
4 | P0_OFF_2 | R0 | |
5 | P1_OFF_0 | G0 | |
6 | P1_OFF_1 | B0 | |
7 | P1_OFF_2 | HSync |