Download presentation
Presentation is loading. Please wait.
1
Automated Gateware Discovery Using Open Firmware
A presentation on my part time MSc research that aims to lay foundation for automating gateware detection. Shanly Rajan Embedded Systems Engineer, SKA SA Masters Student, UCT SKA SA Post-graduate Bursary Conference 1st DECEMBER 2010 Thanks Aaron Morning all, I believe that this is the first talk under software tools category. We heard about some of the hardware developments that is happening every year at a steady pace . Similarly there is a need for development and evolution of software systems or tools to adapt to the changing hardware needs. Currently operating system for ROACH is BORPH which most of you are familiar with by now. Active ROACH users recognize some of the limitations that the OS provide mainly relating to performance. So there is a need for alternative researches in the field of software that cater for the hardware development. This presentation is an update on the alternative software approach discussed and presented in 2009 CASPER workshop held in Cape Town. This is my part-time masters research topic, looking into alternatives for controlling gateware(logic programmed into FPGA) effectively and efficiently with software specifically open-source software.(SPLIT)
2
F P G ROACH RHINO A Modular Hardware (Reconfigurable (Reconfigurable
Yesterday we heard about some of the hardware platforms /hardware boards in use. The boards that are actively being used in the field of radio astronomy. WE heard about ROACH being actively used in the international community And then we heard about another innovative product RHINO which is being planned to use in research community. What do these boards have in common? IT is FPGA. (Reconfigurable Hardware Interface for computiNg and radiO) (Reconfigurable Open Architecture Computing Hardware)
3
What is an FPGA? elements – bread-boards on a chip
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
4
G A T E W A R E Modular Gateware
Each gateware design implementation/instrument requires software support Changing personalities on FPGA require software to be written each time Investigation on a mechanism that facilitates the process of gateware detection
5
Recent OS for FPGAs 2009 2008 2006 2004 2002 1994 Unified HW/SW OS
for PRFPGA systems VPOS ReconOS FDT for FreeBSD FDT for ROACH OS for Reconfigurable Embedded Platforms BORPH OS GATOS FOCA OF Research Issues in OS for reconfigurable computing If we look into the background of the researches that exist on operating systems for FPGA we can see that it traces back to the year 1994. :Conceptualizing process with very few prototypes being developed on what operating system is best suited for FPGAs but none that came out had run-time support which a traditional operating system would provide. The year 2002 brought a breakthrough paper with Grant Wigely and David Kearney proposing the set of features, services, components and abstractions that an OS designed for FPGAs requires. The services which an OS designed for RC should have are application loader, FPGA area management, resource & application scheduling, application protection and IO. A Java based RC OS integrated with Xilinx Jbits was implemented. This paper triggered further researches that attempted to address the highlighted research issues. In 2004,An operating system for embedded platforms was implemented with focus on partitioning of FPGA area into hardware task areas and the concept of task wrappers for managing FPGA tasks. Year 2006 onwards saw an increase in the prototypes coming out and more emphasis on specific set of services and usability was given. BORPH in a way bridging the gap between hardware and software developers. CASPER community has been actively using this OS. BORPH is a good OS in many ways in that the concept of partitioning into hardware and software processes and exposes all the hardware-mapped register as /proc entries in userspace. In 2008 an OS was developed with emphasis on tapping into the partial reconfigurability of FPGAs. Year 2009 yielded more diverse research approaches like VPOS,ReconOS and utilizing Open Firmware supported flattened device trees for ROACH boards. The radio astronomy field applications require systems where performance weighs over ease of use as the applications grow large. For small applications BORPH is ideal but applications that require performance needs to utilise the support and services provided by traditional operating systems without compromising on performance. The current active researches in the field of reconfigurable computing are VPOS,ReconOS and more prominently researches on Open Firmware supported flattened device tree exists. Traditional operating systems like linux do not compromise on performance. This is where my research slides in. In extending the available support provided by Open Firmware and facilitating the discovery of pieces of logic termed as gateware programmed onto the FPGA. 1994 Virtual Hardware Operating System for Xilinx XC6002
6
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 the set of devices attached to the system, including permanently installed devices and plug-in devices, as described by an Open Firmware. A FDT: Data structure for describing hardware Passed to kernel at boot-time Alternative to hard-coded platform details OF is similar to the BIOS of an x-86 based PC,but unlike the BIOS of an x86 system, the boot code is hardware independent. OF was developed originally by Sun and later the efforts were joined by Apple and IBM. It is an IEEE standard and is the boot firmware in apple machines. Its main functions are: It provides boot time drivers for testing machine hardware and It builds device trees which OS later uses for enumeration of devices. What does OF do? OF allows the system to enumerate devices attached to it. Normally, device enumeration takes the form of a tree, with every branch (node) representing a device. The operating system uses the device tree as a quick way to identify available hardware. Furthermore, during boot time, OF code might directly use devices if they have provided suitable access methods. Open Firmware provides a wealth of information to the Linux kernel describing the underlying hardware in great detail. With Open Firmware support, Linux no longer needs to "hard code" information about the underlying hardware it is running on. This detail is in the form of a flattened device tree(FDT). A FDT is: Data structure for describing hardware Passed to kernel at boot Alternative to hard-coded platform details
7
Implementation Choices
Technology Hardware CPU Open Firmware ROACH Power PC Bootloader: Uboot Denx Linux Kernel (Supported bootloader and kernels)
8
Research Design Device Drivers Device Drivers U-boot Open Firmware
Pluggable Peripherals Device Tree Linux Kernel Traditional Method Can be treated Add Me? Can be represented Gateware Images Device Drivers Device Database Extension
9
OF Device Tree Model root Tree with nodes & properties platform
Nodes give structure Properties add detail platform spi bridge Drivers registered against bus types uart i2c bus Tree with nodes & properties ● Nodes give structure – Properties add detail Key-value pairs 'compatible' property Each 'compatible' value associated with a 'binding'. 'phandles' secondary connections between nodes irqs, gpios, mdio, i2s, etc temp platform_bus_type pci bus i2c_bus_type ethernet pci_bus_type
10
Open Firmware Implementation
Gateware Implementations Uboot OF Bootloader Linux OF Data Capture Ethernet Serial root { ……………….. Ethernet Serial Data Capture ……….. ……………… } DEVICE DRIVER Serial UART driver Ethernet driver Sound driver OF Client Interface Calls The design and implementation of an OF complaint system for ROACH is 3 stages: 1] Gateware implementation includes a meta-information file gets compiled along with the bit stream that gets programmed onto the FPGA. 2] u-boot probes the device tree blob programmed and appends it to the FDT blob thus extending the device database avaiable to u-boot. This extension of u-boot flattened device tree ensures that the FPGA gateware image gets identified and registered as any other physical peripheral. 3] For kernels compiled with ARCH=powerpc,the information required by the kernel has the form of a device tree, which is based on the Open Firmware specification. The operating system then uses client interface calls to translate Open Firmware device tree into the operating system’s own format. Bit stream + Meta-information file dts dtb DEVICE TREE EXTENSION
11
Serial UART example SERIAL DEVICE DEVICE DRIVER Uartlite Driver
Uartlite Serial bit Uartlite Driver OPERATES FPGA DESCRIPTION FPGAV5 : device_type = "serial"; compatible = "xlnx,opb-uartlite-1.00.b"; reg = <0xd >; current-speed = <115200>; clock-frequency = < >; xlnx,data-bits = <8>; xlnx,odd-parity = <0>; xlnx,use-parity = <0>; }; INVOKES MATCH The strategy was to first establish that it is possible to treat gateware pieces as devices just like any other physical peripheral and operate the device/peripheral by loading the appropriate device driver without the user needing to control the process each time. Xilinix uartlite serial core selected and the bit stream was programmed onto the FPGA. The device tree database was extended with the serial gateware image programmed as follows. Most importantly the FPGA location was provided with serial settings specified. The linux OF supported Denx kernel was loaded with the OF code enumerating the device tree provided and loading the appropriate Xilinx uart driver to operate on the piece of gateware image treating it as any other physical peripheral. This demonstrates the link that FPGA gateware pieces can be identified just like any other physical peripheral with little work on explaining the gateware bit in the device tree,thus expanding it and handing over to the kernel to enumerate and operate it with a device driver. In radio astronomy environment gain blocks, delay blocks are the gateware pieces. In any case logic needs to be written to control these blocks be it any operating system. The logic that we write can be modelled as a device driver and then all we need to do is explain it in the device tree. Thus building on the database of device drivers required to operate radio astronomy gateware pieces. EXTENDING DEVICE TREES
12
Treating katADC as a soundcard
Current Status Aiming to record and playback ADC data captured into BRAMS with a modified sound device driver and utilize sound analysis tools for visualization and playback. Future Work A mkfdt utility that converts FPGA bit stream and meta information into the required flattened device tree format. Hot Pluggability Adding device drivers specific to radio astronomy. My present attempt is to treat katADC as a soundcard and make it operational by extending a sound card device driver. The ADC data captured into block rams needs to be controlled with a device driver. The work is under progress and the outcome would determine that radio astronomy specific gateware pieces can be treated as another pluggable physical peripheral and can be operated with existing or modifying an existing device driver. Future directions and considerations: Enabling hot pluggable support for Open Firmware,thus avoiding the need to recompile kernel and load it every time a gateware FPGA image changes. Some of the initialization code that are used for systems can be integrated into uboot, so that a driver doesn’t need be loaded for only reading and writing a set of values to and from registers.
13
Conclusion Open Firmware U-boot Open Firmware
OF design and implementation for ROACH Once fully implemented can be integrated in meerKAT digital backend software which leads to an improved performance system. ALTERNATIVE APPROACH CONSIDERED (EXTENDING DEVICE TREES)
14
Questions q ? ? ? ? ? ? ? ?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.