Code Monkey home page Code Monkey logo

ece-528-project's Introduction

ECE528 Project - Neural Network Hardware Implementation

Project Overview

This project, completed as part of ECE528, involves the hardware implementation of a neural network. The design is divided into three main units:

  • Multiplier and Adder Unit (MAC)
  • Accumulator Unit (ACC)
  • Sigmoid Activation Function Unit (SIG)

Team Members

  • M Iresh Jayawardana
  • Danuka Malinda Lama Hewage

Project Milestones

The project consists of three major milestones:

1. MAC Design

The MAC unit is composed of 16 8-bit multipliers, with their products summed using cascaded adders. To optimize throughput, three pipeline stages were added:

  • Initial design without pipelining
  • Design with input flops
  • Design with pipelining on both inputs and outputs

Performance improvements:

  • Worst negative slack (@100MHz): 2.076ns
  • Improved slack with additional pipelining: 5.058ns

Simulation

Behavioral and post-synthesis timing simulations were performed to validate the MAC unit. The simulation used data from digits_hex.txt and weights_hex, showing the initial pipeline latency with "xxxxx" in the first few clock cycles.

2. ACC Unit

The ACC unit adds four consecutive values from the MAC unit, utilizing a finite state machine (FSM) implemented in a separate module called acc_ctrl.

Simulation

The ACC unit was combined with the MAC unit, and simulations were run to ensure correct operation. The dumped data matched the expected results.

3. Sigmoid Activation Unit

The sigmoid activation function was added as an IP to the design. Due to a Vivado version mismatch, synthesis was not possible, and only behavioral simulation was performed. Integration required a sigmoid IP wrapper.

Simulation

Behavioral simulation results were obtained after integrating all modules, confirming the correct operation of the sigmoid activation unit.

Design Considerations

The project aimed to balance hardware utilization and performance:

  • An accumulator was used to reduce hardware costs by summing results from the multiplier circuitry.
  • Pipeline stages were added to the MAC unit to enhance throughput and reduce combinational delay.
  • The circuit operates at 100MHz, minimizing harmonic distortions and electromagnetic radiation, reducing health risks and power consumption while meeting timing requirements.

Repository Structure

Source files - > ECE-528-Project\Verilog\project_1\project_1.srcs\sources_1\new Test benchs - > ECE-528-Project\Verilog\project_1\project_1.srcs\sim_1\new

Usage

  1. Clone the repository:

    git clone <repository_url>
    cd <repository_name>
  2. Synthesize the design: Open Vivado and run the synthesis scripts for each module.

  3. Run simulations: Use the provided testbenches in the sim directory to verify the functionality of each module.

  4. View reports: Refer to the project_report.pdf in the reports directory for detailed project documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details.


This README provides a high-level overview of the project and instructions for usage. For detailed technical information, refer to the project report included in the reports directory.

Before pushing please run - reset_project

settings -> to avoid synthesis remove module hirachy - settingd-> systhesis -> flatten_hierachy -> none -> disable increamental sysnthesis

ece-528-project's People

Contributors

ireshjayawardana avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.