Thesis Donato Slides EN

16
A software platform to support dynamically reconfigurable Systems-on-Chip under the GNU/Linux operating system 26th July 2005 Alberto Donato [email protected] Relatore: Correlatore: Prof. Fabrizio Ferrandi Ing. Marco Domenico Santambrogio

description

 

Transcript of Thesis Donato Slides EN

Page 1: Thesis Donato Slides EN

A software platform to support dynamicallyreconfigurable Systems-on-Chip under the

GNU/Linux operating system

26th July 2005

Alberto [email protected]

Relatore: Correlatore:Prof. Fabrizio Ferrandi Ing. Marco Domenico Santambrogio

Page 2: Thesis Donato Slides EN

Index

- Aim of the work

- The reconfigurable platform:• Hardware architecture• Partial dynamic reconfiguration flows

- Software architecture:• The ICAP kernel module• The IP-Core Manager

- Tests and results

- Future work

Alberto Donato A software platform to support dynamically reconfigurable Systems-on-Chip under the GNU/Linux operating system 2/16

Page 3: Thesis Donato Slides EN

Aim of the Work

FPGAs reconfiguration capabilities allow creation of Systems-on-Chipwhose hardware components can be modified, added and removed atruntime.

Provide software support for dynamic partial reconfigurationon Systems-on-Chip running the LINUX operating system.

Issues:• Partial reconfiguration process management from the OS

• Addition and removal of hardware reconfigurable components• Automatic loading and unloading of specific drivers for the IP-Cores

upon components configuration/deconfiguration• Easier programming interface for specific drivers

Alberto Donato A software platform to support dynamically reconfigurable Systems-on-Chip under the GNU/Linux operating system 3/16

Page 4: Thesis Donato Slides EN

Hardware Architecture

Memory

General PurposeProcessor

Bridge

ReconfigurableModule

ReconfigurableModule

ReconfigurableModuleICAP

BUSBUS

Architecture derived from Caronte:

• General purpose processor• Memory (BRAM, DDR)• ICAP

• Reconfigurable components

Alberto Donato A software platform to support dynamically reconfigurable Systems-on-Chip under the GNU/Linux operating system 4/16

Page 5: Thesis Donato Slides EN

Hardware Architecture (2)

PPC405Processor

SRAMMemory

SDRAMMemory

FlashMemory

ICAP7−Segments

Display

GPIOLEDs

EthernetControllerBridge

UARTInterface

InterruptControler

BRAMMemory

PLB bus OPB bus

Components of the hardware architecture:

• PPC405 processor• SRAM and SDRAM memory• Flash memory• Xilinx ICAP IP-Core

I/O peripherals:

• Xilinx UARTLite interface• Ethernet controller• GPIO LEDs• 7-Segments display

Alberto Donato A software platform to support dynamically reconfigurable Systems-on-Chip under the GNU/Linux operating system 5/16

Page 6: Thesis Donato Slides EN

Partial Dynamic Reconfiguration Flows

Reconfiguration of areas of the FPGA fabric without interfering with therest of the system.

Two different approaches: small-bits and module-based reconfiguration.

Small-bits manipulation:• change single reconfigurable elements, such as slices• useful to modify the configuration of hardware components of the

system

Module-based reconfiguration:• addition or removal of system components• changes in the resources available to the system

Alberto Donato A software platform to support dynamically reconfigurable Systems-on-Chip under the GNU/Linux operating system 6/16

Page 7: Thesis Donato Slides EN

Software Side: Previous Work

Device Drivers

ICAP API EmulatedICAP API

XPART

Application Code

HardwareDependent

HardwareIndepentent

External (Windows/Unix)Embedded Microprocessor

Level 1

Level 2

Level 3

Level 0

PeripheralInterface

Core

PeripheralInterface

Core

CPUHard or Soft

Core

FPGA

RSoC Core Module

PeripheralDevice

Peripheral Module

PeripheralDevice

Peripheral ModuleInternal CPU bus

Self-reconfigurable platform:• PowerPc/MicroBlaze processor• ICAP component• Stand-alone application using

the XPART API

Supports small-bits reconfiguration.

Egret architecture:• Modular hardware/software

architecture• Based on the LINUX OS

• Dynamic configuration of hard-ware modules and loading ofdrivers

Alberto Donato A software platform to support dynamically reconfigurable Systems-on-Chip under the GNU/Linux operating system 7/16

Page 8: Thesis Donato Slides EN

Software Architecture

Linux Kernel

Applications

IP−Core Manager

Low−level Device Drivers

Reconfigurable Devices

ICAPDriver

ICAP

Composed of two main elements:

• Driver to support partial reconfiguration• Manager for the IP-Cores devices

The software architecture provides:

• Access to ICAP componentfrom userspace

• Interface between IP-Coreslow-level drivers and kernel

• Access to reconfigurabledevices from userspaceprocesses

Alberto Donato A software platform to support dynamically reconfigurable Systems-on-Chip under the GNU/Linux operating system 8/16

Page 9: Thesis Donato Slides EN

The ICAP Kernel Module

ApplicationConfiguration

DataDataI/O

Reconfig.Controller

Reconfig.Controller

Driver

Kernel

Implements a device driver, adds kernel support for the Xilinx ICAP

component.

• Access from userspace via standard device node mechanism(i.e. /dev/icap)

• Masks hardware details• Reconfiguration data provided in the form of partial bitstream files

Alberto Donato A software platform to support dynamically reconfigurable Systems-on-Chip under the GNU/Linux operating system 9/16

Page 10: Thesis Donato Slides EN

The ICAP Kernel Module: Reconfiguration

partialbitstreammemorybuffer

ICAP

Memory−Mapped I/OSpace

copy contentof buffer

configurationIOCTL call

ICAPmodule

Linux Kernel

WRITEsystem call

partialbitstream

/dev/icap

IOCTL call

Reconfiguration process usingthe ICAP kernel module:

1. partial bitstream is copied intoICAP module buffer from auserspace process

2. reconfiguration ioctlcall is performed from userspace

3. the kernel module sendspartial configuration datato the ICAP component

The hardware ICAP component is accessedthrough the memory mapping mechanism.

Alberto Donato A software platform to support dynamically reconfigurable Systems-on-Chip under the GNU/Linux operating system 10/16

Page 11: Thesis Donato Slides EN

The IP-Core Manager

IP−Core HW IPCMI/O mem region

Device type

IPCMDeviceDriver

Load

Readdevice

infoInterrupt

A LINUX kernel module which implements a unified infrastructurefor the management of the IP-Cores.

• IP-Cores Plug-and-Play• Runtime loading of specific

IP-Cores drivers• Management of operations

common to all drivers• Access to reconfigurable

components from userspace• Standardize and simplify

writing of specific drivers

Alberto Donato A software platform to support dynamically reconfigurable Systems-on-Chip under the GNU/Linux operating system 11/16

Page 12: Thesis Donato Slides EN

The IP-Core Manager: Hierarchy

Kernel Module IP−Core Manager (SW)

Kernel

Driver Driver Driver

IP−Core IP−Core IP−Core IP−Core IP−Core

kernelmodules

IP−Coredrivers

reconfigurablehardware

register/unregister devicerequest/free memory areas

register system calls

data I/O

The IP-Core Manager acts as a layer between the operating systemkernel and the low-level device drivers.

The low-level drivers contain:

• system calls implementation• devices initialization

and shutdown functions

The drivers also contain a stub:

• provides standard kernelmodule interface

• provides module initializationand shutdown functions

Alberto Donato A software platform to support dynamically reconfigurable Systems-on-Chip under the GNU/Linux operating system 12/16

Page 13: Thesis Donato Slides EN

The IP-Core Manager: Structure

registered drivers

ipcm_core_register()

ipcm_stub_init()

Driverrequest_module()

device data structure

ipc_dev_t

allocate new driver structure

driver data structure

drv_t

drv_t *

registered devices

device datadrv_id,

baseaddr,range IPCM

ipcm_drv_register()

Registration process of a new IP-Core with the IPCM:

1. interrupt is received from the HW-IPCM

2. read device data (base address, device id, address range)

3. load low-level driver if not already loaded

4. the low-level driverinitialization functionregisters driver datastructures

5. data structures for thenew device is initialized

Alberto Donato A software platform to support dynamically reconfigurable Systems-on-Chip under the GNU/Linux operating system 13/16

Page 14: Thesis Donato Slides EN

Tests and Results

Comparison between original Caronte architecture and the onesupporting LINUX

Resource Orignal Caronte Caronte LINUX TotalElem. Perc. Elem. Perc. available

Slice Flip Flops 1843 18% 2369 24% 98564-input LUTs 1727 17% 2173 22% 9856Occupied Slices 1818 36% 2262 45% 4928Bonded IOBs 107 27% 168 42% 396Block RAM 32 72% 32 72% 44DCMs 2 50% 2 50% 4

Resources usage in different hardware architectures supporting LINUX

Resource Base Arch. No Ethernet No Flash TotalElem. Perc. Elem. Perc. Elem. Perc. available

Slice Flip Flops 5079 51% 2369 24% 4668 47% 98564-input LUTs 5883 59% 2173 22% 5598 56% 9856Occupied Slices 4926 99% 2262 45% 4711 95% 4928Bonded IOBs 205 51% 168 42% 36 81% 396Tbufs 64 2% 64 2% 64 2% 2464Block RAM 36 81% 32 72% 36 81% 44GCLKs 6 37% 4 25% 6 37% 16DCMs 2 50% 2 50% 2 50% 4

Alberto Donato A software platform to support dynamically reconfigurable Systems-on-Chip under the GNU/Linux operating system 14/16

Page 15: Thesis Donato Slides EN

Tests and Results (2)

Small-bits manipulation partial reconfiguration tests

Label Reconfig. Bitstream Configuration Throughputframes size (Byte) time (msec) (MByte/sec)

RC 0 33 24179 15.509 1.487RC 1 46 40171 25.674 1.492RC 2 50 44907 28.628 1.496RC 3 60 51347 32.700 1.497RC 4 68 53619 34.203 1.495RC 5 88 67099 42.814 1.495RC 6 104 60567 38.598 1.459RC 7 132 100595 64.140 1.496RC 8 148 94063 60.045 1.494RC 9 182 119319 76.049 1.496

Reconfiguration times have been measured on the Avnet Virtex-II ProDevelopment Board :

• with 66 Mhz processor: throughput ~1.5 Mbyte/s• with 100 Mhz processor: throughput > 3.0 Mbyte/s

Alberto Donato A software platform to support dynamically reconfigurable Systems-on-Chip under the GNU/Linux operating system 15/16

Page 16: Thesis Donato Slides EN

Future Work

Possible extensions of the described software architecture:

• extension of the ICAP driver to allow creation of reconfigurationcommand from reconfiguration data (without pre-synthesizedbitstreams)

• runtime calculation of difference bitstreams• implementation of the HW-IPCM

• extension of the ICAP component to support DMA transfers

Alberto Donato A software platform to support dynamically reconfigurable Systems-on-Chip under the GNU/Linux operating system 16/16