Giter VIP home page Giter VIP logo

pynq-redpitaya-125's Introduction

PYNQ for Redpitaya-125-14


ℹī¸ For a tutorial on FPGA programming with Redpitaya-125-14 and PYNQ see FPGA Notes for Scientists.


This repository describes the generation of a PYNQ image for the Redpitaya STEMlab 125-14 board. The device tree has been simplified and the supported MIO peripherals are:

  • SD 0
  • UART 0
  • ENET 0
  • USB 0

Ready-to-use downloads, links and base design

  • Controlling the base design from a PYNQ Jupyer Notebook:
import time
import pynq
ol = pynq.Overlay("base.bit")

for i in range(8):
    ol.led_ctrl.channel1.write(val=(1<<i), mask=0xff)
    time.sleep(0.5)

Build process

Get the environment ready

We follow the steps outlined under PYNQ SD card:

  • Install a virtual machine running Ubuntu 18_04_4 LTS with more than 150 GB of storage space. Do not update Ubuntu since this will roll the version and make it incompatible with the Xilinx tools below.

  • Clone the PYNQ repository (for this build we used v2.6):

git clone https://github.com/Xilinx/PYNQ
  • Install dependencies using the following script.
source <PYNQ repository>/sdbuild/scripts/setup_host.sh
  • Install the Xilinx tools (for this build we used v2020.1):

    • Vitis (which includes Vivado)
    • Petalinux
    • Go for lunch! This will take a few hours...
  • Download the prebuilt board-agnostic (PYNQ rootfs arm v2.6) image from Pynq Development Boards and unzip it.

  • Download the PYNQ distribution tarball (Pynq-2.6.0.tar.gz) from the PYNQ release repository. You will find the distribution tarball within the WFH Release section under a drop-down called Assets.

Prepare build

  • Clone this repository:
git clone https://github.com/dspsandbox/Pynq-Redpitaya-125
  • Copy the provided board directory <this repository>/Pynq/boards/Pynq-Redpitaya-125-14 to <PYNQ repository>/boards.

  • Modify the FPGA makefile under <PYNQ repository>/sdbuild/Makefile:

    • Locate on line 162 the command petalinux-config --silentconfig -p $$(PL_PROJ_$1).
    • Add above it a command to copy the petalinux_project located in our board directory. This will include our device tree (system-user.dtsi) into the PYNQ build process. The modified makfile reads:
# ...
echo 'CONFIG_zocl=y' >> $$(PL_ROOTFS_CONFIG_$1)
echo 'CONFIG_opencl-headers-dev=y' >> $$(PL_ROOTFS_CONFIG_$1)
echo 'CONFIG_opencl-clhpp-dev=y' >> $$(PL_ROOTFS_CONFIG_$1)
cp -a $$(BOARDDIR_$1)/petalinux_project/. $$(PL_PROJ_$1)  # ADD THIS LINE !!!
petalinux-config --silentconfig -p $$(PL_PROJ_$1) 
# ...

Build PYNQ

  • Open a terminal and run the settings files for Vitis and Petalinux:
source <path-to-vitis>/Vitis/2020.1/settings64.sh
source <path-to-petalinux>/petalinux-2020.1-final/settings.sh
petalinux-util --webtalk off
  • Navigate to
cd <PYNQ repository>/sdbuild
  • Issue a dummy sudo call:
sudo echo hello
  • Run the makefile
make PREBUILT=<absolute path to unzipped board-agnostic perbuilt image (.img)> PYNQ_DIST=<absolute path to PYNQ tarball (.tar.gz)> BOARDS=Pynq-Redpitaya-125-14
  • The generated PYNQ image will be located within <PYNQ repository>/sdbuild/output/Pynq-Redpitaya-125-14-2.6.0.img

pynq-redpitaya-125's People

Contributors

dspsandbox avatar

Stargazers

Timothy avatar

Watchers

James Cloos avatar Alfred 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.