How qshen3/cnn-fpga works
This repository provides Verilog modules for CNN inference on FPGA, rather than a complete training or deployment system. The documented example wires convolution, max pooling, optional ReLU activation, and fully connected layers into a classification path; average pooling is another documented feature. The README describes the modules as fully parallel and without pipelining. No source excerpts were available, so the internal relationships of the arithmetic and convolution helper modules are not asserted; workflow edges reflect only the README example.
Main entry points: Conv2d.v 2D Convolution · Max_pool.v Max Pooling · Relu_activation.v ReLU Activation · FullConnect.v Fully Connected
Components 12
Convolution
- 2D Convolution
src/Conv2d.v - Convolution Kernel
src/ConvKernel.v
Feature Operations
- Max Pooling
src/Max_pool.v - Average Pooling
src/Avg_pool.v - ReLU Activation
src/Relu_activation.v
Classification
- Fully Connected
src/FullConnect.v
Arithmetic Primitives
- Maximum Primitive
src/Max.v - Average Primitive
src/Avg.v - ReLU Primitive
src/Relu.v - Multiplier
src/Mult.v
Other components
- Feature Input
- Classification Result
Connections 9
- Feature Input → 2D Convolution: provides data
README.md - 2D Convolution → Max Pooling: feeds features
README.md - Max Pooling → ReLU Activation: feeds features
README.md - ReLU Activation → 2D Convolution: feeds next layer
README.md - 2D Convolution → Max Pooling: feeds features
README.md - Max Pooling → ReLU Activation: feeds features
README.md - ReLU Activation → Fully Connected: feeds features
README.md - Fully Connected → Fully Connected: feeds next layer
README.md - Fully Connected → Classification Result: produces result
README.md