Automated gateware discovery using Open Firmware
Transcription
Automated gateware discovery using Open Firmware
Automated gateware discovery using Open Firmware Shanly Rajan Embedded systems & software engineer (SA SKA) MSc Student (UCT) 6th SKA SA postgraduate bursary conference [email protected] 23rd November 2011 Modular Hardware 2009 RHINO ROACH (Reconfigurable Hardware Interface for computiNg and radiO) 2010 (Reconfigurable Open Architecture Computing Hardware) ROACH 2 2011 What is an FPGA? FPGAs are programmable logic elements – bread-boards on a chip that can have their circuits reconfigured to perform specific tasks very efficiently ß FPGAs can be reconfigured many times with different function FPGA needs to be programmed with hardware logic to make it meaningful Modular Gateware I N S T R U M E N T S Acknowledgment: CASPER GATE WARE What is Gateware? Gateware - Berkeley coined term “Design logic that goes into the FPGA” Gateware contains registers, memory, LUTs. MSSGE Toolchain - (Matlab,Simulink,SysGen,Edk) Bit File/ Bof File FPGA Gateware Hardware Need for Software Support Each gateware design implementation/instrument requires software support (Meaningful) Changing personalities on FPGA require software to be written each time (Time Consuming) Investigation on a mechanism that facilitates the process of gateware detection (Research) Modular Software BORPH (Berkeley Operating System for Reconfigurable Hardware) OS for evolving modular hardware (ibobs, BEE2s, ROACHs) Presents a file system of hardware registers to userspace Performance limitations Linux OS with FDT(Flattened Device Tree) support Advantage of latest kernel and driver development Use device trees and device drivers Parameterization What this research provides? A research framework which uses Open Firmware to describe FPGA designs to facilitate their detection by the operating system to operate these designs using conventional device drivers Design Choices Framework Open Firmware Platform ROACH Bootloader: Uboot PowerPC Linux Kernel (Supported bootloader and kernels) CPU Power PC More about Open Firmware Open Firmware : Hardware Independent Boot Code Boot time drivers for testing machine hardware Building device trees which OS later uses Device Tree : Data Structure that holds information about set of devices attached to a system, including permanently installed devices and plug-in devices, as described by Open Firmware In short we have • Data structure for describing hardware / gateware • Passed to kernel at boot time OF Device Tree Model Tree with nodes & properties Nodes give structure Properties add detail root platform spi bridge uart Drivers registered against bus types i2c bus temp pci bus platform_bus_type ethernet i2c_bus_type pci_bus_type Acknowledgment:Grant Labs Overall System Architecture Research Concept (DDO) DDO - Describe, Detect and Operate pluggable peripherals Can be treated Uboot Open Firmware Device Drivers Device Tree Linux Kernel Can be represented Add Me? Gateware Images Conventional Method Device Database Extension Serial UART Example Serial UART Example 1st Case: We describe a device in the device tree and use existing linux kernel device drivers to operate on the device Serial UART Example Serial Device Uartlite Serial Bit Device Driver Operates Uartlite Driver FPGA Description FPGAV5 : serial@d0010000{ device_type = "serial"; compatible = "xlnx,opb-uartlite-1.00.b"; reg = <0xd0010000 10000>; current-speed = <115200>; clock-frequency = <66666666>; xlnx,data-bits = <8>; xlnx,odd-parity = <0>; xlnx,use-parity = <0>; }; Extending device trees Detect (Invokes Match) Treating katADC as a soundcard Use katADCs to capture data into Block RAMS with a modified sound device driver and utilize sound analysis tools for visualization and playback Treating katADC as a soundcard 2nd Case We describe device in device tree and write a modified / custom device driver to operate on the device but use existing audio applications for gain adjustment and recording Use kat wit an Treating katADC as a soundcard 2nd Case We describe device in device tree and write a modified / custom device driver to operate on the device but use existing audio applications for gain adjustment and recording •Modified audio device driver •Adjusted gain using aumix audio application and observed the change Use kat wit an Advantages & Future work Advantages Future Work Alternative approach for software-FPGA interaction Hot pluggability (Kernel hotplug) Reduces time and effort spent on writing software for each piece of gateware generated Gateware resident initialisation code (Device Driver) Performance benefit Radio instruments device drivers Conclusion Open Firmware Infrastructure extended to include suitably designed gateware images Described gateware in device tree, verified detection and loading of appropriate device driver by linux OS. This research work provides a parameterized interface that can be integrated into the meerKAT digital backend software CASPER COLLABORATION 2011, India THANK YOU Supervisors: Prof Mike Inggs Dr Marc Welz SKA/KAT