Accelerator for image convolution kernels, designed to run in a DE2-115. Mainly meant to run Sobel edge detection, but can be applied to any 3x3 convolution kernel, able to run two convolutions per iteration, with a few predefined ways of merging them into a result value (but both intermediate results are also available, if you want to merge them in another way in software).
git clone --recursive https://github.com/natanbc/neorv32-convolve-accelerator
- Open cpu.qpf in quartus
- Compile it
- Flash it
- Build the software:
cd software/projects/convolve
make NEORV32_HOME=$(pwd)/../../../neorv32 -j$(nproc)
- Connect to the serial port on the FPGA (19200-8-N-1), when prompted upload the
.build/convolve.flash
file generated by themake
command above.
Run make testbench
to run the VHDL testbench. You'll need yosys, ghdl and the yosys ghdl plugin.
The provided shell.nix
file sets up an environment with these packages.
To test the software, an emulator is provided:
cd software/projects/convolve/emulator
make