This repo shows how to write a controller in python to control peripherals connected to FPGA. We can write any peripheral drivers in FPGA to achieve real-time high speed signal processing. Thanks to PYNQ platform, we can easily wrapper the FPGA drivers into simple python code.
- Introduction to lightcube on pynq and slides
- Demo video
- Run playground.ipynb
- Click webpage to control single LED
- Run pre-defined patterns
Based on PYNQ Image 2.0
-
Clone this repo on PYNQ board:
git clone https://github.com/sonnyhcl/PYNQ-Light-Cube.git
-
Run the
setup
bash script to setup lightcube:bash PYNQ-Light-Cube/setup.sh
-
Open your browser with
<pynq_ip>:9090
and type inxilinx
as password. -
Get started using
LightCube_GetStated
notebook. -
Find
LightCube_Playground
notebook and run. Then you can turn into<pynq_ip>:8080
to view a webpage displaying real-time status of lightcube.
tips:
<pynq_ip>
is the ip of your pynq.
This repository is organized as follows.
-
hw
contains constraints source file, custom ip, andtcl
file to rebuild whole hardware design. -
notebook
contains lightcube controller in python, webserver resources, and notebook for playing. -
overlay
containsbit
andtcl
file of hardware design, andpy
to import overlay. -
setup.sh
helps setting up this lightcube package.
.
├── hw
│ ├── ip
│ ├── build_hw.tcl
│ └── srcs
├── image
│ └── framework.png
├── notebook
│ ├── lc_const.py
│ ├── lc_pynq.py
│ ├── LightCube_GetStarted.ipynb
│ ├── LightCube_Playground.ipynb
│ ├── static
│ └── templates
├── overlay
│ ├── __init__.py
│ ├── lightcube.bit
│ ├── lightcube.py
│ └── lightcube.tcl
├── README.md
└── setup.sh
In order to rebuild this hardware design, you should clone this repo in a machine installed with Vivado 2016.1
(only tested with Vivado 2016.1
).
-
Clone this repo:
git clone https://github.com/sonnyhcl/PYNQ-Light-Cube.git
-
Change your work directory:
cd hw
-
Make sure you have successfully configure you vivado environments:
source build_hw.tcl
-
Wait for a minute and then you can open the new-built projects.
Thanks to John Pan@pjh177787 for his hardware design.
This project is based on PYNQ. You can find it → here.