Skip to content

This project includes a CNN (Convolutional Neural Network) written in SystemVerilog. It is built for simulation and testing image classification logic in hardware design.

License

Notifications You must be signed in to change notification settings

meds-uet/CNN-Accelerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CNN Hardware Accelerator

MEDS Logo

License Documentation Status

A fully parameterized Convolutional Neural Network (CNN) accelerator implemented in SystemVerilog, designed for FPGA and ASIC deployment.


Key Features

  • Modular RTL design: Convolution, ReLU, MaxPooling, Flatten, GAP, and Argmax blocks
  • FSM-controlled operation
  • Parameterized image size, kernel size, and data width
  • Supports real-image testbench for hardware-level verification
  • Efficient FPGA resource utilization
  • Configurable for various embedded AI workloads

Top-Level Architecture

System-level CNN Accelerator pipeline
Figure: System-level CNN Accelerator pipeline.

Processing Flow:
Input → Convolution + ReLU → MaxPooling → Flatten → GAP → Argmax → Output


Quick Start

# Clone the repository
git clone https://github.com/meds-uet/CNN-Accelerator.git
cd CNN-Accelerator

# Run a basic simulation (ModelSim / Questa / Vivado)
make sim

To modify global parameters, edit:

# File: rtl/cnn_defs.svh
parameter int DATA_WIDTH = 8;
parameter int IFMAP_SIZE = 128;
parameter int KERNEL_SIZE = 3;
parameter int STRIDE = 1;
parameter int PADDING = 1;

Full Documentation

Complete documentation — including architecture theory, module descriptions, signal references, and simulation setup — is available on ReadTheDocs:

🔗 https://cnn-accelerator-docs.readthedocs.io/en/latest/


Developed by Maktab-e-Digital Systems Lahore
Authors: Abdullah Nadeem & Talha Ayyaz
License: Apache License 2.0
Date: July/August 2025

About

This project includes a CNN (Convolutional Neural Network) written in SystemVerilog. It is built for simulation and testing image classification logic in hardware design.

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •