Code Monkey home page Code Monkey logo

fpgaconvnet-tutorial's Introduction

fpgaConvNet Tutorial

A collection of tutorials for the fpgaConvNet framework. It is recommeneded to start with the end-to-end-example.

Setup

Python Tools

It is recommended to use conda to manage your python environment. Also, a python version above 3.8 is required.

conda create -n fpgaconvnet python=3.8

SAMO and fpgaConvNet packages are also required.

python -m pip install samo fpgaconvnet-model fpgaconvnet-hls

Vivado

The fpgaconvnet-hls project relies on Vivado 2019.1. To install, first download from the Xilinx website.

Once installed, you will need to add a license server to your .bashrc file. You will also need to add Vivado to your path. To do so, add the following to your .basrc:

export PATH=/tools/Xilinx/Vivado/2019.1/bin:$PATH
export PATH=/tools/Xilinx/SDK/2019.1/bin:$PATH

You will need to setup JTAG drivers to program a device. To do so, execute the following script:

/tools/Xilinx/Vivado/2019.1/data/xicom/cable_drivers/lin64/install_script/install_drivers/install_drivers

For more information, visit here.

Bug Workarounds

The Y2K22 patch is required to fix issues with exporting designs in HLS. Please follow the instructions here.

Also, there is a known bug to do with C++ libraries. A workaround for this is adding the mpfr.h and gmp.h headers manually. For this project, you need to create a header file fpgaconvnet/hls/hardware/system.hpp which includes the following:

#ifndef SYSTEM_HPP_
#define SYSTEM_HPP_

#include "(path to Vivado 2019.1)/include/gmp.h"
#include "(path to Vivado 2019.1)/include/mpfr.h"

#endif

this isn't always necessary, so you can just create a blank header file if your system doesn't encounter this bug

Jupyter Setup

All the tutorials are done with jupyter notebook. Firstly, ipykernel and jupyter need to be installed.

conda install -c anaconda ipykernel jupyter

To run the notebooks locally, firstly you will need to add the python environment to ipykernel.

python -m ipykernel install --user --name=fpgaconvnet

Now you can start the notebook. Follow the instructions in the command line to view it in your browser.

jupyter notebook --no-browser --port=8888

fpgaconvnet-tutorial's People

Contributors

alexmontgomerie avatar michalpalic 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.