Git Product home page Git Product logo

risc-v-on-pynq's Introduction

RISC-V-On-PYNQ

This repository demonstrates a library for evaluating RISC-V Projects from the paper "Everyone's a Critic: A Tool for Evaluating RISC-V Projects".

This repository is a python package for the PYNQ 2.4 distribution on the PYNQ-Z2 board. You can install this package by running the following command:

sudo -H pip3 install https://github.com/Siudya/RISC-V-On-PYNQ/

This will install:

  • The riscvonpynq Python package.

  • A RISC-V-Tutorial folder with notebooks describing how to add new processor overlays

  • A RISC-V-Demo folder with notebooks demonstrating how to interact with existing processor overlays

riscvonpynq Package

The riscvonpynq package contains:

  • An Overlay Driver (a subclass of pynq.Overlay). It extends the Overlay functionality by adding the location of an Overlay class to the bitstream search path.

  • Jupyter Notebook Magics. This allows Jupyter Notebook Cells to compile C/C++ and Assembly programs for for RISC-V Processor Overlays. Users write main and can pass arguments as Numpy types.

  • A RISC-V Program Class. This class allows programs to be manipulated and compiled from Python using pre-existing build files for a processor.

  • Processor drivers (a subclass of pynq.DefaultHierarchy). These drivers allow users to upload binaries, run programs, and read RISC-V Processor Memory.

There are two RISC-V Processor Drivers: One driver for RISC-V Processors with BRAM-only Memory, and one driver for RISC-V Processors with BRAM and DDR Mixed Memory.

More examples and demonstrations are available in the notebooks installed by this package.

RISC-V-Tutorial Notebooks

The RISC-V Tutorial Notebooks are a set of notebooks describing how to set up the RISC-V Toolchain, and then build RISC-V processor overlays. There are five notebooks:

  1. Downloading Dependencies
  2. Creating a FPGA Bitstream
  3. Compiling the RISC-V GCC Toolchain
  4. Packaging a RISC-V Overlay

Completing these notebooks require:

  1. A PYNQ-Z2 with a 16 GB MicroSD Card
  2. A Host (Windows or Linux) with Vivado 2018.3
  3. An Internet Connection on both computers

RISC-V-Demo Notebooks

The RISC-V Demonstration notebooks show examples of existing processor overlays. We provide two example overlays using processors from one RISC-V Processor Projects.

Each notebook demonstrates how to upload programs using the Jupyter Notebook Magics we have provided. Each processor has a set of build files (a makefile, init.S file for initialization, and a .ld linker script) and we briefly describe these in each notebook.

We have internally tested other processors and will be adding them as we clean up the code.

We welcome pull requests!

risc-v-on-pynq's People

Contributors

codspalaniappan95 avatar drichmond avatar siudya avatar

Watchers

 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.