Upload
esug
View
354
Download
3
Tags:
Embed Size (px)
DESCRIPTION
Toward a Methodology to turn Smalltak code into FPGA IWST 2014 at ESUG, Cambridge
Citation preview
TOWARD A METHODOLOGY TO TURN SMALLTALK CODE INTO FPGA
LE Xuan Sang1,2 Loïc LAGADEC1, Luc FABRESSE2,
Jannik LAVAL2 and Noury BOURAQADI2
1 Lab-STICC, ENSTA Bretagne 2 Institut Mines-Telecom, Mines Douai
Robotic application requirements
2
Sensors Sensing Planification Control Actuators
• Robotics applications demand :
• Real-time + amount of data : Processing powerExample in vision : 20 images of 320x240/s ≃ 37Mbps.
• Flexibility to evolution and unforeseen change of hardware (adding more device/sensor/actuators, improvement of circuit etc.)
• Simplicity & rich semantic
• High-level abstraction
• Smalltalk is also an IDE:
• Support Agile methodology
• Valuable ability of debugging & testing application
• BUT : Time-consuming for mass data processing3
Smalltalk in Robotic Software Development
• Configurable hardware/chip
• Parallel processing
• FPGA circuits are designed using Hardware Description Language (HDLs).
• BUT: HDL-based design is unsuitable for hardware/software co-design
4
Field Programmable Gate Array (FPGA)
5
1. Hardware Design (HDL)
2. Write tech-bench and perform Register Transfer Level simulation (RTL)
3. Synthesis and code generation
4. Deployment on FPGA
FPGA HDL-BASED DESIGN
HW Design
Synthesis and
code generation
Deployment on FPGA
Test bench
RTL simulation
Vendor toolchain
dependent
• HDLs support specification up to Register Transfer Level (RTL). But :
• Lack abstractions to implement high-level algorithms
• Debugging is really hard (waveforms)
• Not adequate for high-level modelling/programming
• Hardware dependency → limit reusability
6
FPGA HDL-BASED DESIGN
OBJECTIVE
Using Smalltalk in hardware/software co-design
• Hardware : Smalltalk as a high-level description and verification language
!• Software : Smalltalk robotic
application that interact with FPGA
7
Smalltalk application
HW/SW Partitioning
SW HW
Pharo VM FPGA
Interface
8
• Smalltalk-based design
• Hardware design abstraction layer
• RTL simulation
• Waveform tracing
• Unit Test
• Smalltalk-VHDL conversion
• Reusability & extensibility
• Vendor’s tool interaction
SMALLTALK FOR HARDWARE DESIGN
Pharo VM
Smalltalk code
Hardware design abstraction layer
Smalltalk to VHDL RTL Simulation
FPGAVendor’s tools chain
SMALLTALK FOR SOFTWARE PROGRAMMING ON FPGA (1)
• Standalone FPGA
• Operate independently with the host system
• Communicate with the host system via interfaces of communication : USB, RS232, etc.
• Smalltalk application talk to FPGA via Foreign Function Interfaces (such as Native Boost)
• Problem : bandwidth bottleneck
9
Host System
Pharo VM
FPGA
FFI/ Language Binding
Interface (USB,
UART, etc.)
SMALLTALK FOR SOFTWARE PROGRAMMING ON FPGA (2)
• FPGA-ARM SoC/SoM
• FPGA System on Chip/Module : all in one system
• Accelerate FPGA - ARM communication →reduced bottleneck.
• Direct access to FPGA registers via system library
• Smalltalk application talk to FPGA registers via Register interaction abstraction layer which uses FFI
10
Linux Embedded System
Pharo
Smalltalk application
Register interaction abstraction layer
FPGA
Drivers / Extension Processing Platform Architecture
FFI/ Language Binding
ARM
EXPERIMENT•Build a Pharo robotic application
•Identify critical parts •Project the critical parts on FPGA
•Evaluation of performance gain/loss
11
VIDEOhttp://car.mines-douai.fr/2014/04/pharos-based-tracker-robot/
12
13
Camera RGB →HSV
HSV filtrer
Laser sensor
Object detector Motors
EXPERIMENT
Sensor Smalltalk application Actuators
14
Camera RGB →HSV
HSV filtrer
Laser sensor
Object detector
EXPERIMENT
Critical part !
Sensor Smalltalk application Actuators
Motors
15
RGB →HSV HSV filtrer
PERFORMANCE COMPARISON
192x128, 32 bit
Pharo Smalltalk C(OpenCV) FPGA circuits
73 ms 1.5ms 2.5ms
16
RGB →HSV HSV filtrer
PERFORMANCE COMPARISON
192x128, 32 bit
Pharo Smalltalk C(OpenCV) FPGA circuits
73 ms 1.5ms 2.5ms
! Bottleneck problem
CONCLUSION
• Future works :
• Modelling methodology of hardware design using Smalltalk.
• Pharo and FPGA interaction.
• Software/hardware co-design integration.
17
Smalltalk application
HW/SW Partitioning
SW HW
Pharo VM FPGA
Interface
TOWARD A METHODOLOGY TO TURN SMALLTALK CODE INTO FPGA
1 Lab-STICC, ENSTA Bretagne 2 Institut Mines-Telecom, Mines Douai
LE Xuan Sang1,2 Loïc LAGADEC1, Luc FABRESSE2,
Jannik LAVAL2 and Noury BOURAQADI2