Skip to content

Welcome to the repository for **Exercise 3 of the AI Systems Course** at the **University of Tehran**. This project focuses on designing and implementing a lightweight, efficient **processing element (PE)** for performing operations of neurons in a **multi-layer perceptron (MLP)** using Verilog.

Notifications You must be signed in to change notification settings

Alighorbani1380/AI-based-Neural-Network-Processing-Unit

Repository files navigation

AI-based Neural Network Processing Unit 🚀

A high-performance, lightweight Verilog implementation of a Neural Network Processing Element (PE) for Multi-Layer Perceptron (MLP) acceleration. Developed as Exercise 3 in the AI Systems Course at the University of Tehran.

License Verilog


Table of Contents


Project Goals 🎯

  • Design & Implementation: Develop a neural network processing unit capable of performing multiply-accumulate (MAC), ReLU activation, and quantization operations.
    {0338E447-C208-4419-840B-023EC0028C7A}

  • Hardware Acceleration: Use Verilog to create an optimized pipelined architecture for low-latency execution.
    {B829FE59-7D0F-4503-9982-FA8B1EDEBF3F}

  • Lightweight & Scalable: Minimize execution time and resource usage with parameterizable data widths and pipeline depths.


Features ⭐

  • Pipelined MAC Unit: Overlapping multiply-accumulate operations to achieve high throughput.
  • ReLU Activation: Hardware-optimized rectified linear unit for non-linearity.
  • Quantizer: Fixed-point quantization to control dynamic range and bit-width.
  • SRAM Interface: Dual-port, ping-pong memory for efficient weight & data buffering.
  • Control FSM: Manages read/write cycles and pipeline sequencing.
  • Parameterizable Design: Configure word width, memory depth, and pipeline stages via Verilog parameters.

Project Structure 📂

AI-based-Neural-Network-Processing-Unit/
├── src/
│   ├── PE.v           # Top-level Processing Element module
│   ├── MAC.v          # Multiply-Accumulate Unit
│   ├── ReLU.v         # ReLU Activation Module
│   ├── Quantizer.v    # Fixed-point Quantization Unit
│   ├── SRAM.v         # SRAM Storage Interface
│   └── Controller.v   # Control FSM
├── tests/
│   └── PE_testbench.v # Functional verification testbench
├── docs/
│   ├── simulation/    # Waveforms and logs
│   └── README.md      # Documentation (this file)
└── reports/
    ├── 403_EAI-CA3.pdf    # Assignment instructions
    └── Gozaresh_final.pdf # Final project report

Installation & Simulation 🛠️

  1. Clone the repository
    git clone https://github.com/Alighorbani1380/AI-based-Neural-Network-Processing-Unit

Usage 🔧

  • Parameter Tuning: Edit src/PE.v to adjust data widths and pipeline stages.
  • SoC Integration: Instantiate PE module in your top-level design for on-chip acceleration.
  • Custom Verification: Use tests/PE_testbench.v as a template for targeted test scenarios.

Results 📊

Simulation confirms accurate MAC, ReLU, and quantization at 100 MHz with full throughput:
{5BF38F42-E5CC-4895-9213-7F20ECDBE04E}

GitHub Topics (SEO) 🔍

verilog hardware-acceleration neural-network MLP processing-element FPGA AI-systems

About

Welcome to the repository for **Exercise 3 of the AI Systems Course** at the **University of Tehran**. This project focuses on designing and implementing a lightweight, efficient **processing element (PE)** for performing operations of neurons in a **multi-layer perceptron (MLP)** using Verilog.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published