All Projects → lulinchen → cnn_open

lulinchen / cnn_open

Licence: other
A hardware implementation of CNN, written by Verilog and synthesized on FPGA

Programming Languages

Coq
218 projects
Verilog
626 projects
Jupyter Notebook
11667 projects
VHDL
269 projects
tcl
693 projects
shell
77523 projects

Projects that are alternatives of or similar to cnn open

blarney
Haskell library for hardware description
Stars: ✭ 81 (-48.41%)
Mutual labels:  fpga, rtl, verilog
Verilog
Repository for basic (and not so basic) Verilog blocks with high re-use potential
Stars: ✭ 296 (+88.54%)
Mutual labels:  fpga, rtl, verilog
Fake-SDcard
Imitate SDcard using FPGAs.
Stars: ✭ 26 (-83.44%)
Mutual labels:  fpga, rtl, verilog
Hard-JPEG-LS
FPGA-based JPEG-LS image compressor.
Stars: ✭ 52 (-66.88%)
Mutual labels:  fpga, rtl, verilog
Ustc Rvsoc
FPGA-based RISC-V CPU+SoC.
Stars: ✭ 77 (-50.96%)
Mutual labels:  fpga, rtl, verilog
hwt
VHDL/Verilog/SystemC code generator, simulator API written in python/c++
Stars: ✭ 145 (-7.64%)
Mutual labels:  fpga, rtl, verilog
SpinalDev
Docker Development Environment for SpinalHDL
Stars: ✭ 17 (-89.17%)
Mutual labels:  fpga, rtl, verilog
Cores
Various HDL (Verilog) IP Cores
Stars: ✭ 271 (+72.61%)
Mutual labels:  fpga, rtl, verilog
Rggen
Code generation tool for configuration and status registers
Stars: ✭ 54 (-65.61%)
Mutual labels:  fpga, rtl, verilog
Darkriscv
opensouce RISC-V cpu core implemented in Verilog from scratch in one night!
Stars: ✭ 1,062 (+576.43%)
Mutual labels:  fpga, rtl, verilog
SpinalCrypto
SpinalHDL - Cryptography libraries
Stars: ✭ 36 (-77.07%)
Mutual labels:  fpga, rtl, verilog
Fpga readings
Recipe for FPGA cooking
Stars: ✭ 164 (+4.46%)
Mutual labels:  fpga, rtl, verilog
sphinxcontrib-hdl-diagrams
Sphinx Extension which generates various types of diagrams from Verilog code.
Stars: ✭ 37 (-76.43%)
Mutual labels:  fpga, rtl, verilog
FPGA-USB-Device
FPGA-based USB-device controller to implement USB-CDC, USB-HID, etc.
Stars: ✭ 29 (-81.53%)
Mutual labels:  fpga, rtl, verilog
virtio
Virtio implementation in SystemVerilog
Stars: ✭ 38 (-75.8%)
Mutual labels:  fpga, rtl, verilog
Spinalhdl
Scala based HDL
Stars: ✭ 696 (+343.31%)
Mutual labels:  fpga, rtl, verilog
Logic
CMake, SystemVerilog and SystemC utilities for creating, building and testing RTL projects for FPGAs and ASICs.
Stars: ✭ 149 (-5.1%)
Mutual labels:  fpga, rtl, verilog
vga-clock
Show the time on a VGA monitor. Submitted for the Google MPW1 ASIC shuttle.
Stars: ✭ 48 (-69.43%)
Mutual labels:  fpga, rtl, verilog
xeda
Cross EDA Abstraction and Automation
Stars: ✭ 25 (-84.08%)
Mutual labels:  fpga, verilog
Red Pitaya Notes
Notes on the Red Pitaya Open Source Instrument
Stars: ✭ 205 (+30.57%)
Mutual labels:  fpga, verilog

A CNN(Convolutional Neural Network) hardware implementation

This project is an attempt to implemnt a harware CNN structure.

The code is written by Verilog/SystemVerilog and Synthesized on Xilinx FPGA using Vivado.

The code is just experimental for function, not full optimized.

Architecture

Only 4 elementary modules implemented:

  • The conv, this module perform the convolution computing, the full connecting is also treated the same as convolution with the kernel size equal to input data size.
  • The max_pool
  • The relu
  • The iterator, jogging around the input data, and feed the computing units.

Demo

A LeNet is constructed using the 4 elementary modules, the weights and biases are hard coded in ROM.

The reference Tenserflow Lenet code is from CarND-LeNet-Lab .

Xilinx KCU105 Board, with HDMI input and output daughter boards is used.

Connect a PC to the HDMI input daughter through a HDMI cable.

A 32x32-size input is cropped from the PC screen output, then fed into the Lenet. The classified result is displayed on the HDMI output.

The following pic is cropped from the HDMI output of FPGA. The white rectangle is draw by FPGA. Move a Mnist digit picture into the rectangle, or draw a digit by hand using a Paint software. The printed digit under the rectangle is the the classified result.

Demo

Conclusion

  • Pure RTL hardware design is not a good choice for neural networks. Especially for large scale networks, the weights and intermediate results need to be stored in external memory. And the data iterator will be more complex. It's better to use a general or specific processor to do the control works, and let the hardware to perform computing.

Reference

CarND-LeNet-Lab .

Author

LulinChen
[email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].