The previous README file is available here.
Work in progress documentation http://redpitaya.readthedocs.io/en/latest/index.html.
Our internal development is shifting toward Jupyter. Jupyter with a set of Python modules provides a great tool for quick prototyping:
- UIO drivers written directly in Python,
- dynamic and interactive data visualization with bokeh,
- data storage and processing with numpy, scipy, ...
- source code management with Git and GitHub,
- and under development is support for device tree overlays and FPGA manager.
Drivers for FPGA memory mapped peripherals can be written directly in Python using
mmap, ctypes
and numpy.
UIO description in a device tree
in combination with UDEV rules
provides named UIO devices as /dev/uio/name
.
Each device can be mapped into memory space and locked separately with
mmap and
fcntl.
Register sets can be written using Python ctypes and/or
numpy.dtpye.
Python offers language features for the creation of elegant APIs.
As a base Matplotlib provides a vast array of features for data visualization. With the addition of bokeh (JavaScript based library) visualization become dynamic with good frame rates (up to about 16fps depending on data size). There are widget libraries available for making interactive applications.
Python makes it easy to store data into a file, since the application is also written in Python, it easy to access data from various processing changes not just a filtered output. A simple data logger for example can write data file onto the SD card, the file can be later loaded onto a PC using the Jupyter file browser. Python is interpreted in Jupyter, which makes it slow. Fortunately most data processing can be done on arrays with dedicated libraries. Numpy and Scipy provide processing functions for a great spectrum of applications. They are well optimized although not very fast on the ZYNQ ARM CPU. Python wrappers can be written around optimized DSP libraries like Ne10. Processing can also be offloaded to the FPGA, project PYNQ is making progress there.
Applications can be developed directly on the board and edited in the Jupyter editor. Git is now installed on SD card images. In combination with Github it provides a great tool for version control, publishing and distribution of Python applications and libraries. TODO: under Welcome instructions for Git SSH keys, maybe they should be created at first boot and displayed.
Device tree overlays are already supported on our current 4.4 based kernel. We are working on a kernel 4.9 based version, which would also support FPGA manager. FPGA manager enables loading a FPGA bitstream with an overlay, which enables proper loading and unloading of kernel drivers (GPIO, LED, XADC, DMA, ...) needed by the overlay. Most of our problems are related to backward compatibility.