Coder Social home page Coder Social logo

hsa-on-fpga's Introduction

HSA-on-FPGA

Main repository of the HSA-on-FPGA demonstrator project. The design uses the LibHSA library described by Reichenbach et al. to connect an x86 host CPU via David de la Chevallerie et al.'s PCIe interface to a custom image processing accelerator. All kernels are dispatched according to the HSA Foundation standards.

Prerequisites

  • Vivado (tested with 2017.2 to 2018.3)
  • GIT LFS for the compiler submodule https://git-lfs.github.com
  • TaPaSCo prerequisites:
    • Ubuntu 16.04/18.04
    sudo apt-get -y update && sudo apt-get -y install unzip git zip findutils curl build-essential linux-headers-generic python cmake libelf-dev libncurses-dev git rpm
    curl -s "https://get.sdkman.io" | bash
    source "$HOME/.sdkman/bin/sdkman-init.sh"
    sdk install java
    sdk install sbt
    • Fedora 27/28/29
    sudo dnf -y install which unzip git zip findutils kernel-devel make gcc gcc-c++ elfutils-libelf-devel cmake ncurses-devel python libatomic git rpm-build
    curl -s "https://get.sdkman.io" | bash
    source "$HOME/.sdkman/bin/sdkman-init.sh"
    sdk install java
    sdk install sbt

Tested Hardware

  • Xilinx Virtex-7 VC709 FPGA
  • AMD Ryzen CPU
  • AMD Carrizo APU
  • Intel Haswell CPU

Install

  1. Make sure all submodules are correctly initialized
  2. Install both custom MIPS compiler toolchains
  3. Set the paths to both installed compilers in LibHSA/global_conf.sh (MIPS(32/64)_GCC_PATH)
  4. Setup Tapasco with make install

setup image processing test case

  • compile the x86 host program with make software
  • create the FPGA bitstream with make hardware

running a test case

  1. setup the Tapasco environment source Tapasco/setup.sh
  2. load driver and bitstream tapasco-load-bitstream --reload-driver vc709_bitstream.bit
  3. run the host program ./imgproc --operation=GAUSS3x3 image.png

More options of the host program can be explored with ./imgproc --help

hsa-on-fpga's People

Contributors

jahofmann avatar marc-reichenbach avatar phholzinger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hsa-on-fpga's Issues

ERROR: [axi_bram_cntlr-1] Port-A interface property <CONFIG.READ_WRITE_MODE> is not defined.

Hi HSA-on-FPGA team,

I have some problems when i try to build project by using command "make build_backend".

My vivado version is 2018.3.

The first error :

Error:xilinx.com:ip:axi_bram_ctrl:4.0 is not supported for the current part. The latest supported version for this part is:4.1

It seems like that 2018.3 must use bram controller 4.1 version. So i modify the tcl file and change all bram_ctrl:4.0 to bram_ctrl:41.

By this way, the above error is solved.

Then i continue to "make build_backend". i have new error and i have tried my best to solve it but i failed.

The second error :

ERROR: [axi_bram_cntlr-1] Port-A interface property <CONFIG.READ_WRITE_MODE> is not defined.

Obviously, bram controller ip setting errors.

The error file is: https://github.com/HSA-on-FPGA/HSA-on-FPGA/blob/master/image_accelerator/image_accelerator.tcl

At line 123 and 129, it creates a bram controller. vivado tells me to define 'CONFIG.READ_WRITE_MODE', so i modify the file.

Before the modification:

 # Create instance: axi_bram_ctrl_1, and set properties
    create_bd_cell -type ip -vlnv xilinx.com:ip:axi_bram_ctrl:4.1 axi_bram_ctrl_1
    set_property -dict [ list \
        CONFIG.PROTOCOL {AXI4} \
        CONFIG.SINGLE_PORT_BRAM {1} \
    ] [get_bd_cells axi_bram_ctrl_1]

  # Create instance: axi_bram_ctrl_4, and set properties
    create_bd_cell -type ip -vlnv xilinx.com:ip:axi_bram_ctrl:4.1 axi_bram_ctrl_4
    set_property -dict [ list \
        CONFIG.DATA_WIDTH {64} \
        CONFIG.SINGLE_PORT_BRAM {1} \
    ] [get_bd_cells axi_bram_ctrl_4]

After the modification:

 # Create instance: axi_bram_ctrl_1, and set properties
    create_bd_cell -type ip -vlnv xilinx.com:ip:axi_bram_ctrl:4.1 axi_bram_ctrl_1
    set_property -dict [ list \
        CONFIG.PROTOCOL {AXI4} \
        CONFIG.SINGLE_PORT_BRAM {1} \
        CONFIG.READ_WRITE_MODE {READ_WRITE} \ 
    ] [get_bd_cells axi_bram_ctrl_1]

  # Create instance: axi_bram_ctrl_4, and set properties
    create_bd_cell -type ip -vlnv xilinx.com:ip:axi_bram_ctrl:4.1 axi_bram_ctrl_4
    set_property -dict [ list \
        CONFIG.DATA_WIDTH {64} \
        CONFIG.SINGLE_PORT_BRAM {1} \
        CONFIG.READ_WRITE_MODE {READ_WRITE} \
    ] [get_bd_cells axi_bram_ctrl_4]

But i still get the same error, can you give me some advice :)?

Thanks.

make bitstream error

Hi, HSA teams:
when i run make bitstream, i got an error:

create_bd_cell -type ip -vlnv fau.de:hsa:packet_processor:2.0 packet_processor_0
ERROR: [BD 5-390] IP definition not found for VLNV: fau.de:hsa:packet_processor:2.0
ERROR: [Common 17-39] 'create_bd_cell' failed due to earlier errors.

can give me some adivce?

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.