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
setupbash script to setup lightcube:bash PYNQ-Light-Cube/setup.sh -
Open your browser with
<pynq_ip>:9090and type inxilinxas password. -
Get started using
LightCube_GetStatednotebook. -
Find
LightCube_Playgroundnotebook and run. Then you can turn into<pynq_ip>:8080to view a webpage displaying real-time status of lightcube.
tips:
<pynq_ip>is the ip of your pynq.
This repository is organized as follows.
-
hwcontains constraints source file, custom ip, andtclfile to rebuild whole hardware design. -
notebookcontains lightcube controller in python, webserver resources, and notebook for playing. -
overlaycontainsbitandtclfile of hardware design, andpyto import overlay. -
setup.shhelps 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.shIn 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.
