https://github.com/mattvenn/xor_vga_fpga
playing with XOR video patterns on an FPGA
https://github.com/mattvenn/xor_vga_fpga
Last synced: about 2 months ago
JSON representation
playing with XOR video patterns on an FPGA
- Host: GitHub
- URL: https://github.com/mattvenn/xor_vga_fpga
- Owner: mattvenn
- Created: 2021-04-19T14:44:29.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-19T14:46:06.000Z (about 4 years ago)
- Last Synced: 2025-04-01T18:09:57.948Z (about 2 months ago)
- Language: Verilog
- Size: 2.54 MB
- Stars: 13
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-2.0.txt
Awesome Lists containing this project
README
# XOR video fun on an FPGA
Saw this: https://hackaday.com/2021/04/13/alien-art-drawn-with-surprisingly-simple-math/
The magic line is:
assign rrggbb = ((x_px ^ y_px) % 10'd9) == 1 ? 6'b111111 : 6'b000000;
And made an [FPGA implementation](rtl/xor.v).

## Simulation instructions
Ensure that you have libsdl2-dev and verilator installed.
sudo apt-get install libsdl2-dev libsdl2-image-dev verilator
To run the simulation use the following commands:
cd rtl
make verilator && ./obj_dir/Vxor
## FPGA Build instructions
It's setup to run on [1 Bit Squared icebreaker](https://1bitsquared.com/products/icebreaker) with my [VGA pmod](https://github.com/mattvenn/6bit-pmod-vga) plugged into pmod1a.
type
make prog
to build & upload to the icebreaker
## License
This software and hardware is licensed under the [Apache License version 2](LICENSE-2.0.txt)