Coder Social home page Coder Social logo

fjshen / rosetta Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maltanar/rosetta

0.0 0.0 0.0 75 KB

Rapidly deploy Chisel and Vivado HLS accelerators on Xilinx PYNQ

License: BSD 2-Clause "Simplified" License

Makefile 3.07% C++ 12.93% C 0.34% Tcl 40.84% Shell 0.08% Python 0.06% Scala 32.06% Verilog 10.63%

rosetta's Introduction

Rosetta

Rosetta is a project template to rapidly deploy Chisel and Vivado HLS accelerators on the Xilinx PYNQ platform. It uses the PlatformWrapper components from the fpga-tidbits framework for easy memory mapped register file management.

For Chisel accelerators, use the master branch. For Vivado HLS accelerators, use the hls branch.

Requirements

  1. A working Chisel2 and sbt setup.
  2. Xilinx Vivado 2016.4 (make sure vivado is in PATH)
  3. A PYNQ board with network access

Quickstart

  1. Clone this repository and cd into it
  2. Run make pynq, this may take several minutes. This will create a deployment folder under build/rosetta
  3. Run make rsync to copy generated files to the PYNQ board. You may have to edit the BOARD_URI variable in the Makefile to get this working.
  4. Open a PYNQ terminal via ssh, and cd into ~/rosetta
  5. Run sudo ./load_bitfile.sh to configure the FPGA with the bitfile
  6. Try pressing the the buttons (BTN0..3) on the PYNQ to control the LEDs (LD0..3)
  7. Run ./compile_sw.sh to compile the sample application
  8. Run the sample application with sudo ./app
  9. Enter two integers -- you should see their sum printed correctly, as computed by the FPGA accelerator.

Under the Hood

  1. Have a look at the hardware description under the src/main/scala -- the accelerator definition is in Accelerator.scala, the "entry point" for code generation is in Main.scala, and the infrastructure (where the magic happens) is in Rosetta.scala
  2. Have a look at the example application under src/main/cpp/app -- note that it uses the auto-generated register driver to access the hardware signals. The register driver will be generated in build/hw/driver
  3. Have a look at what the different Makefile targets generate inside the build/ folder. You can also try launching Vivado with the make launch_vivado_gui target after the project has been generated.

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.