department of electrical engineering electronics computers communications technion israel institute...
TRANSCRIPT
Department of Electrical EngineeringElectronicsComputersCommunications
Technion Israel Institute of Technology
High Speed Digital Systems Lab.
DYNAMIC HARDWARE RECONFIGURATION
CONTROLLED BY ANDROID OS
ON ZYNQ
Performed By: Itamar Niddam and Lior MotorinInstructor: Inna Rivkin
Bi-Semesterial.Winter 2012/2013
2
SOPC on ZYNQ running AndroidApplication performance acceleration
Programmable Logic
Peripherals ControllersCore 1 : A9 ARM
Core 0 : A9 ARM
Dynamic Hardware
AXI4 BUSSoftware applicationProcessing System
running Android
Hardwareaccelerator
Standard SOPC approach• The Hardware is constant• The user can only switch between application
Task specific - Software
3
SOPC on ZYNQ running AndroidPerformance Acceleration of applications
Using Dynamic Partial Hardware Reconfiguration
• Partial dynamic hardware reconfiguration by OS (Android)
• Hardware system dynamically changed & adapted to a specific application.
• The hardware change is done at runtime by application & OS
Programmable Logic
Peripherals ControllersCore 1 : A9 ARM
Core 0 : A9 ARM
Dynamic Hardware
AXI4 BUS
Processing Systemrunning Android
Custom IPHardware
Acceleratior #1
Application
#1
Custom IPHardware
Acceleratior #2
Application
#2
New approach
The user controls the software and the hardware
Task specific - Software & Hardware
4
Sobel Edge Detection Filter Example
for(i = 0; i < height, i++){for(j=0; j < width; j++){
x_dir = 0;y_dir = 0;if((i > 0 && (i < (height-1)) && (j > 0) && (j < (width-1))){for(rowOffset = -1; rowOffset <= 1; rowOffset++){
for(colOffset = -1; colOffset <=1; colOffset++){x_dir = x_dir + input_image[i+rowOffset][j+colOffset]* Gx[1+rowOffset][1+colOffset];y_dir = y_dir + input_image[i+rowOffset][j+colOffset]* Gy[1+rowOffset][1+colOffset];}
}edge_weight = ABS(x_dir) + ABS(y_dir);output_image[i][j] = edge_weight;
}
5
Sobel Filter
Sobel FilterSoftware Implementation
7
Sobel Filter
Programmable Logic
Peripherals ControllersCore 1 : A9 ARM
Core 0 : A9 ARM
Dynamic Hardware
AXI4 BUS
Sobel Filter Software & Hardware Specific Accelerator
Sobel Software
applicationProcessing Systemrunning Android
Sobel Hardware
module
10
SYSTEM COMPONENTS
Processing System
Programmable Logic
LogicBricksHDMI
ControllerCustom IP
Core 1 : A9 ARM
Core 0 : A9 ARM
USB 0
AXI4
HDMI
FMC
UART
11
Processing System
Programming Logic
Linux Kernel
Zynq ZC-702
Xylon GPU Driver
Xylon HardwareARM CPU0
• The Xilinx ZC-702 Board for Zynq-7000 have the ability to run Android OS on it.
• Android porting supplied by Iviea• FMC Touch screen controller supplied by
Xylon.
• Android relies on Linux kernel 2.6.• Hardware accelerator drivers are
implemented by loadable kernel modules.• Drivers interact with hardware by memory-
mapped IO.
• Android apps communicates with hardware by System services.
• System service represents an Hardware abstraction layer between the App and the kernel driver
12
Processing System
Programming Logic
Linux Kernel
Zynq ZC-702
Xylon GPU Driver
Custom IP Xylon HardwareARM CPU0
Custom IP Module Driver
Partial Re-Configuration
Service
Partial Configuration
Driver
13
Processing System
Programming Logic
Linux Kernel
Zynq ZC-702
Xylon GPU Driver
Custom IP Xylon HardwareARM CPU0
Custom IP Module Driver
Partial Re-Configuration
Service
Partial Configuration
Driver
App
Code Bitstream
14
Driver module
HAL API
HAL module
The custom linux device driver..ko file located in /dev…/
System Server
• Supplies basic functions on the given hardware type, using the driver.
• Provided by the driver developer.• A shared library located in
/system/lib...
• The Hardware Abstraction Layer API.
• Supplies basic interface between the service and the custom new hardware.
• Essential for bridging the native and Java code.
CustomService
JAVA
CJNI
APP
System service API
Binder
• The custom service run within the System server.
• Enables the system server to reach the HAL.
• Bridging methods called by the user in JAVA to native code in order to use the HAL.
• Make our system service available through the SDK.
• Supplies a basic interface between the APP and the custom service that has been created.
• The end user application provided by the client.
HOW DOES THE APPLICATION ACCESS THE HARDWARE?
15
THE DEVELOPMENT ENVIRONMENT
Xilinx Platform Studio
Xilinx SDK
VIVADO HLS
C/C++ for Android Kernel
Java Eclipse
16
• XPS & SDK - Setup and configure the base system (which can run Android OS).
• Xilinx Vivado HLS - implement a custom IP module using a native programming language (C).
• XPS & SDK - Integrate the custom IP with the system.
Xilinx Platform Studio
Xilinx SDK
VIVADO HLS
17
C/C++ for Android Kernel
• Developing the custom device driver in C.
• Developing the HAL (Hardware Abstraction Layer) which supplies a simple interface between the user App and the custom hardware.
• Customizing the Android Kernel in order to provide the partial reconfiguration OS support.
18
Java Eclipse
• Developing a custom android application in java, which can use the HAL in order to get the services provided by the custom IP we implemented.
• Developing the system service which is a part of the HAL.
SO.. WHAT HAVE WE DONE SO FAR? Setting up a development environment to modify and compile
Android OS & Linux kernel.
Configuring a Fully working Android OS system on ZYNQ with a touch
screen.
Custom IP development & Hardware integration using Xilinx tools.
Developing a simple Linux device driver (char device) which can be
accessed (Read / Write) by the Android on Zynq.
Solving Android privileges limitations by writing a service which can
communicate with our char device.
Enabling a smooth access to the custom hardware from any typical
Android JAVA code.
• Learning the partial reconfiguration technology deeply in
order to get the ability to operate it by the OS.
• Developing the Partial reconfiguration driver and service in
order to support Dynamic Hardware.
• Writing more complicated Android drivers to support AXI-4
Streaming for video processing
• Writing efficient hardware with Vivado HLS and integrate it
with the system.
NEXT STEPS …