All Projects → DreamIP → Haddoc2

DreamIP / Haddoc2

Licence: bsd-2-clause
Caffe to VHDL

Projects that are alternatives of or similar to Haddoc2

xeda
Cross EDA Abstraction and Automation
Stars: ✭ 25 (-56.14%)
Mutual labels:  fpga, hardware, vhdl
Space Invaders Vhdl
Space Invaders game implemented with VHDL
Stars: ✭ 142 (+149.12%)
Mutual labels:  hardware, fpga, vhdl
Neorv32
A small and customizable full-scale 32-bit RISC-V soft-core CPU and SoC written in platform-independent VHDL.
Stars: ✭ 106 (+85.96%)
Mutual labels:  hardware, fpga, vhdl
Hal
HAL – The Hardware Analyzer
Stars: ✭ 298 (+422.81%)
Mutual labels:  hardware, fpga, vhdl
Platformio Vscode Ide
PlatformIO IDE for VSCode: The next generation integrated development environment for IoT
Stars: ✭ 676 (+1085.96%)
Mutual labels:  hardware, fpga
Platformio Atom Ide
PlatformIO IDE for Atom: The next generation integrated development environment for IoT
Stars: ✭ 475 (+733.33%)
Mutual labels:  hardware, fpga
Pipecnn
An OpenCL-based FPGA Accelerator for Convolutional Neural Networks
Stars: ✭ 775 (+1259.65%)
Mutual labels:  hardware, fpga
Aes
AES-128 hardware implementation
Stars: ✭ 25 (-56.14%)
Mutual labels:  fpga, vhdl
Cascade
A Just-In-Time Compiler for Verilog from VMware Research
Stars: ✭ 413 (+624.56%)
Mutual labels:  hardware, fpga
Audioxtreamer
ASIO driver, Usb Driver, FX2LP Firmware, VHDL Fpga, Schematics & PCB Layout for the AudioXtreamer, a USB 2.0 32ch Audio/Midi interface for retrofitting into digital mixers/interfaces.
Stars: ✭ 22 (-61.4%)
Mutual labels:  fpga, vhdl
Flownet2
FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks
Stars: ✭ 938 (+1545.61%)
Mutual labels:  cnn, caffe
Liteflownet
LiteFlowNet: A Lightweight Convolutional Neural Network for Optical Flow Estimation, CVPR 2018 (Spotlight paper, 6.6%)
Stars: ✭ 474 (+731.58%)
Mutual labels:  cnn, caffe
Vunit
VUnit is a unit testing framework for VHDL/SystemVerilog
Stars: ✭ 438 (+668.42%)
Mutual labels:  fpga, vhdl
Spinalhdl
Scala based HDL
Stars: ✭ 696 (+1121.05%)
Mutual labels:  fpga, vhdl
Firesim
FireSim: Easy-to-use, Scalable, FPGA-accelerated Cycle-accurate Hardware Simulation in the Cloud
Stars: ✭ 415 (+628.07%)
Mutual labels:  hardware, fpga
Tenyr
Simple, orthogonal 32-bit computer architecture and environment
Stars: ✭ 24 (-57.89%)
Mutual labels:  hardware, fpga
Image Processing
Image Processing Toolbox in Verilog using Basys3 FPGA
Stars: ✭ 31 (-45.61%)
Mutual labels:  fpga, vhdl
Clash Compiler
Haskell to VHDL/Verilog/SystemVerilog compiler
Stars: ✭ 958 (+1580.7%)
Mutual labels:  fpga, vhdl
Fpga Fft
A highly optimized streaming FFT core based on Bailey's 4-step large FFT algorithm
Stars: ✭ 45 (-21.05%)
Mutual labels:  fpga, vhdl
Spi Fpga
SPI master and slave for FPGA written in VHDL
Stars: ✭ 50 (-12.28%)
Mutual labels:  fpga, vhdl

Haddoc2 : Hardware Automated Dataflow Description of CNNs

Haddoc2 is a tool to automatically design FPGA-based hardware accelerators for convolutional neural networks (CNNs). Using a Caffe model, Haddoc2 generates a hardware description of the network (in VHDL-2008) which is constructor and device independent. Haddoc2 is built upon the principals of Dataflow stream-based processing of data, and, implements CNNs using a Direct Hardware Mapping approach, where all the actors involved in CNN processing are physically mapped on the FPGA.

More implementation details can be found in this technical report and the this paper If you find Haddoc2 useful in your research, please consider citing the following paper

@article{Abdelouahab17,
author = {Abdelouahab, Kamel and Pelcat, Maxime and Serot, Jocelyn. and Bourrasset, Cedric and Berry, Fran{\c{c}}ois},
doi = {10.1109/LES.2017.2743247},
issn = {19430663},
journal = {IEEE Embedded Systems Letters},
keywords = {CNN,Dataflow,FPGA,VHDL},
pages = {1--4},
title = {Tactics to Directly Map CNN graphs on Embedded FPGAs},
url = {http://ieeexplore.ieee.org/document/8015156/},
year = {2017}}

For a short demo of the tool, see here

Pre-requisite

  • Caffe with A simple CPU-only build is needed.
  • Quartus II or Vivado (Optional) : to compile and synthesize your design
  • GPStudio FPGA (Optional): Haddoc2 generated accelerators are compatible with GPStudio, a tool-chain to to deploy image processing applications on FPGA-based smart cameras.

Execution

To run haddoc2, please use the binders in bin/ directory.

python ../lib/haddoc2.py \
       --proto=<path to caffe prototxt> \
       --model=<path to caffe model> \
       --out=<output directory> \
       --nbits=<fixed point format. Default nbits=8>

Note that Haddoc2 needs to know where your Caffe and Haddoc2 installation directories are. Please add the following environment variables or edit you .bashrc file in Linux. For instance :

export CAFFE_ROOT="$HOME/caffe"
export HADDOC2_ROOT="$HOME/dev/haddoc2"

Components required to implement the supported CNN layers can be found at lib/hdl/ directory. Important: Be sure to synthesize your project in VHDL 2008 mode !

Generating an example

example/ directory contains pre-trained BVLC_caffe model version of the Lenet5 CNN. Please use the Makefile given to test Haddoc2.

  • make hdl generates the VHDL description of the CNN
  • make quartus_proj creates a simple Quartus II project to implement LeNet on an Intel Cyclone V FPGA
  • make compile lunches Quartus tool to compile and synthesize your design. This command requires quartus binary to be on your path
cd $HADDOC2_ROOT/example
make hdl
>> Haddoc2 CNN parameter parser:
  prototxt: ./caffe/lenet.prototxt
  caffe model: ./caffe/lenet.caffemodel
  vhdl out: ./hdl_generated
  bit width : 5
>> Generated toplevel file: ./hdl_generated/cnn_process.vhd
make quartus_proj
>> Succefully generated quartus project
make compile
>> quartus_map cnn_process -c cnn_process
...

TODO

  1. Add support of BatchNorm / Sigmoid / ReLU layers
  2. Implement Dynamic Fixed Point Arithmetic
  3. Support conv layers with sparse connections (such AlexNet's conv2 layer, where each neuron is connected to only half of conv1 outputs i.e n_outputs(layer-1) != n_inputs(layer) )
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].