SlideShare a Scribd company logo
Erlang Embedded
Concurrent Blinkenlights and More!

       Omer Kilic || @OmerK
       omer@erlang-solutions.com
Agenda

●   Challenges in Modern Embedded Systems
●   Overview of Erlang
●   Erlang Embedded
●   Q&A




15/11/2012   Open Source Hardware User Group Meetup #22   Slide 2/26
Challenges in Embedded Systems (I)


●   Larger, more complex systems than ever before
●   Multi-core processing
     ●   Harder to develop for using the standard embedded
         development flow
     ●   Harder to utilise the full processing potential
     ●   Much harder to debug (and fix!)




15/11/2012    Open Source Hardware User Group Meetup #22   Slide 3/26
Challenges in Embedded Systems (II)


●   Increasingly higher degrees of heterogeneity in
    terms of:
     ●   Cores
     ●   Hardware acceleration (GPU, co-processor etc)
     ●   Interconnect
     ●   Memory hierarchies




15/11/2012    Open Source Hardware User Group Meetup #22   Slide 4/26
Internet of Things (I)




15/11/2012   Open Source Hardware User Group Meetup #22   Slide 5/26
Internet of Things (II)




         http://blogs.cisco.com/news/the-internet-of-things-infographic/

15/11/2012         Open Source Hardware User Group Meetup #22              Slide 6/26
Erlang?
●   {functional, concurrent/parallel, garbage-collected,
    soft real-time, fault-tolerant, distributed, message-
    passing}
●   First version developed in 1986
     ●   Open-sourced in 1998.
●   Battle-tested at Ericsson and many other companies
     ●   Originally designed for Embedded Systems!




15/11/2012     Open Source Hardware User Group Meetup #22   Slide 7/26
Erlang Advantage (I)

●   Declarative
     ●   Functional programming language, high abstraction
         level, concise readable programs.
●   Concurrent and Parallel
     ●   Highly scalable, transparent or explicit concurrency,
         lightweight processes. Takes full advantage of
         multicore architectures.




15/11/2012    Open Source Hardware User Group Meetup #22   Slide 8/26
Erlang Advantage (II)

●   Robust
     ●   Simple and consistent error recovery and supervision
         hierarchies, built-in fault tolerance.
●   Portable, Distributed
     ●   Runs on a variety of platforms, network-aware
         runtime, supports heterogeneous networks.




15/11/2012    Open Source Hardware User Group Meetup #22   Slide 9/26
Erlang Advantage (III)
●    External Interfaces
     ●   NIFs and ports used to interface external world to the
         Erlang runtime.
●   Soft Real-Time
     ●   Response time (can be) in the order of milliseconds,
         per-process garbage collection.
●   Hot-code loading
     ●   Dynamic reconfiguration.


15/11/2012    Open Source Hardware User Group Meetup #22   Slide 10/26
Erlang, the Maestro




       (flickr/dereckesanches)



15/11/2012         Open Source Hardware User Group Meetup #22   Slide 11/26
External Interfaces
●   Native Implemented Functions (NIFs) and ports
    used to interface external world to the Erlang
    runtime.

              Erlang VM

                     app


                            hw_if                         hw_driver.c




15/11/2012   Open Source Hardware User Group Meetup #22       Slide 12/26
#include “stats.h”




             Source: http://embedded.com/electronics-blogs/programming-pointers/4372180/Unexpected-trends




15/11/2012       Open Source Hardware User Group Meetup #22                         Slide 13/26
Actor Model
●   Proposed in 1973 by Hewitt, Bishop, and Steiger
    ●   “Universal primitives of concurrent computation”
●   Building blocks for modular, distributed and concurrent
    systems
●   No shared-state, self-contained and atomic
●   Implemented in a variety of programming languages
    ●   Erlang, Scala (AKKA), Java (Kilim), Ruby (Celluloid), C++11 (libcppa)




15/11/2012       Open Source Hardware User Group Meetup #22   Slide 14/26
Actor Model
●   Asynchronous message passing
     ●   Messages kept in a mailbox and processes in the
         order they are received in
●   Upon receiving a message, actors can:
     ●   Make local decisions and change internal state
     ●   Spawn new actors
                                                                         state
     ●   Send messages to other actors                               functionality

                                                                         mailbox



15/11/2012    Open Source Hardware User Group Meetup #22   Slide 15/26
Example: GPIO
             proc_a



                   {in
                       it,
                       17
                         ,o
                           ut
                             pu
                               t}
                                      GPIO




                                      pin17




15/11/2012   Open Source Hardware User Group Meetup #22   Slide 16/26
Example: GPIO
             proc_a                                                  proc_b
                                                                 }
                                                            ,l ow
                                                        7
                   {s                                 ,1
                     ta                             te
                       te                   {s
                                               ta
                       ,1
                         7,
                            hi                                                        proc_c
                               gh                                                 }
                                  }                                   ,1   7, high
                                      GPIO                      {state




                                      pin17




15/11/2012   Open Source Hardware User Group Meetup #22                 Slide 17/26
GPIO “Proxy”
●   Replaces the “locks” in traditional sense of
    embedded design
     ●   Access control/mutual exclusion
●   Can be used to implement safety constraints
     ●   Toggling rate, sequence detection, direction control,
         etc.




15/11/2012    Open Source Hardware User Group Meetup #22   Slide 18/26
TI OMAP Reference System




15/11/2012   Open Source Hardware User Group Meetup #22   Slide 19/26
Fine Grain Abstraction
●   Advantages
     ●   Application code becomes simpler
             –   Concise and shorter modules
             –   Testing becomes easier
             –   Code re-use (potentially) increases
●   Disadvantages
     ●   Architecting fine grain systems is difficult




15/11/2012          Open Source Hardware User Group Meetup #22   Slide 20/26
Erlang Embedded


             “The aim of this KTP project is to bring
               the benefits of concurrent systems
             development using Erlang to the field
                 of embedded systems; through
                investigation, analysis, software
                 development and evaluation."



15/11/2012       Open Source Hardware User Group Meetup #22   Slide 21/26
Hardware Projects




15/11/2012   Open Source Hardware User Group Meetup #22   Slide 22/26
Future Explorations
Parallella!




15/11/2012    Open Source Hardware User Group Meetup #22   Slide 23/26
Interested in Erlang?
●   http://www.erlang.org/doc/
●   http://learnyousomeerlang.com/




                                 http://www.youtube.com/watch?v=xrIjfIjssLE :)



15/11/2012   Open Source Hardware User Group Meetup #22                          Slide 24/26
Erlang Embedded Training Stack
●   A complete package for people interested in
    developing the next generation of
    concurrent/distributed Embedded Systems
●   Training Modules
                                                            Erlang Embedded Framework
     ●   Embedded Linux Primer
                                                                   Erlang/OTP 101
     ●   Erlang/OTP 101
     ●   Erlang Embedded Framework
                                                              Embedded Linux Primer
●   Hardware included!
                                                                 Hardware Platform




15/11/2012     Open Source Hardware User Group Meetup #22    Slide 25/26
Thank you

               ●   www.erlang-embedded.com
               ●   embedded@erlang-solutions.com
               ●   @ErlangEmbedded


  “          Any sufficiently complicated concurrent program in
             another language contains an ad-hoc, informally-
             specified, bug-ridden, slow implementation of half of
             Erlang.
                                                – Robert Virding
                                                                Co-Inventor of Erlang



15/11/2012         Open Source Hardware User Group Meetup #22     Slide 26/26

More Related Content

What's hot

International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER) International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER) ijceronline
 
An In-Depth Look Into Microcontrollers
An In-Depth Look Into MicrocontrollersAn In-Depth Look Into Microcontrollers
An In-Depth Look Into MicrocontrollersICS
 
OliverStoneResume2015-2
OliverStoneResume2015-2OliverStoneResume2015-2
OliverStoneResume2015-2Oliver Stone
 
OliverStoneSWResume2015-05
OliverStoneSWResume2015-05OliverStoneSWResume2015-05
OliverStoneSWResume2015-05Oliver Stone
 
FEL Flyer F12
FEL Flyer F12FEL Flyer F12
FEL Flyer F12chitlesh
 
Digital VLSI Design and FPGA Implementation
Digital VLSI Design and FPGA ImplementationDigital VLSI Design and FPGA Implementation
Digital VLSI Design and FPGA ImplementationAmber Bhaumik
 
Chapter 5 introduction to VHDL
Chapter 5 introduction to VHDLChapter 5 introduction to VHDL
Chapter 5 introduction to VHDLSSE_AndyLi
 
Fel Flyer F11
Fel Flyer F11Fel Flyer F11
Fel Flyer F11chitlesh
 
Interoperability of Reconfiguring System on FPGA Using a Design Entry of Hard...
Interoperability of Reconfiguring System on FPGA Using a Design Entry of Hard...Interoperability of Reconfiguring System on FPGA Using a Design Entry of Hard...
Interoperability of Reconfiguring System on FPGA Using a Design Entry of Hard...IDES Editor
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitSulamita Garcia
 
Resume-Zhuyu
Resume-ZhuyuResume-Zhuyu
Resume-Zhuyu雨 朱
 
Digital design lect 26 27
Digital design lect 26 27Digital design lect 26 27
Digital design lect 26 27babak danyal
 
Eric Theis resume61.1
Eric Theis resume61.1Eric Theis resume61.1
Eric Theis resume61.1Eric Theis
 
Jython for embedded software validation
Jython for embedded software validationJython for embedded software validation
Jython for embedded software validationPyCon Italia
 
Overview of the Intel® Internet of Things Developer Kit
Overview of the Intel® Internet of Things Developer KitOverview of the Intel® Internet of Things Developer Kit
Overview of the Intel® Internet of Things Developer KitIntel® Software
 

What's hot (20)

International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER) International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
 
An In-Depth Look Into Microcontrollers
An In-Depth Look Into MicrocontrollersAn In-Depth Look Into Microcontrollers
An In-Depth Look Into Microcontrollers
 
OliverStoneResume2015-2
OliverStoneResume2015-2OliverStoneResume2015-2
OliverStoneResume2015-2
 
OliverStoneSWResume2015-05
OliverStoneSWResume2015-05OliverStoneSWResume2015-05
OliverStoneSWResume2015-05
 
FEL Flyer F12
FEL Flyer F12FEL Flyer F12
FEL Flyer F12
 
Digital VLSI Design and FPGA Implementation
Digital VLSI Design and FPGA ImplementationDigital VLSI Design and FPGA Implementation
Digital VLSI Design and FPGA Implementation
 
Chapter 5 introduction to VHDL
Chapter 5 introduction to VHDLChapter 5 introduction to VHDL
Chapter 5 introduction to VHDL
 
Vhdl design flow
Vhdl design flowVhdl design flow
Vhdl design flow
 
Fel Flyer F11
Fel Flyer F11Fel Flyer F11
Fel Flyer F11
 
Embedded Android : System Development - Part IV (Android System Services)
Embedded Android : System Development - Part IV (Android System Services)Embedded Android : System Development - Part IV (Android System Services)
Embedded Android : System Development - Part IV (Android System Services)
 
Del Sozzo's talk @ ICCD17
Del Sozzo's talk @ ICCD17Del Sozzo's talk @ ICCD17
Del Sozzo's talk @ ICCD17
 
Interoperability of Reconfiguring System on FPGA Using a Design Entry of Hard...
Interoperability of Reconfiguring System on FPGA Using a Design Entry of Hard...Interoperability of Reconfiguring System on FPGA Using a Design Entry of Hard...
Interoperability of Reconfiguring System on FPGA Using a Design Entry of Hard...
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
 
Resume-Zhuyu
Resume-ZhuyuResume-Zhuyu
Resume-Zhuyu
 
Digital design lect 26 27
Digital design lect 26 27Digital design lect 26 27
Digital design lect 26 27
 
Eric Theis resume61.1
Eric Theis resume61.1Eric Theis resume61.1
Eric Theis resume61.1
 
Jython for embedded software validation
Jython for embedded software validationJython for embedded software validation
Jython for embedded software validation
 
FPGA Based VLSI Design
FPGA Based VLSI DesignFPGA Based VLSI Design
FPGA Based VLSI Design
 
Overview of the Intel® Internet of Things Developer Kit
Overview of the Intel® Internet of Things Developer KitOverview of the Intel® Internet of Things Developer Kit
Overview of the Intel® Internet of Things Developer Kit
 
LPC4300_two_cores
LPC4300_two_coresLPC4300_two_cores
LPC4300_two_cores
 

Similar to Erlang Embedded — Concurrent Blinkenlights and More!

ETICS- quality certification of open source cloud software, OW2con'12, Paris
ETICS- quality certification of open source cloud software, OW2con'12, ParisETICS- quality certification of open source cloud software, OW2con'12, Paris
ETICS- quality certification of open source cloud software, OW2con'12, ParisOW2
 
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...Mickael Istria
 
Teaching Open Source In The University
Teaching Open Source In The UniversityTeaching Open Source In The University
Teaching Open Source In The UniversityDominique Cimafranca
 
Leveraging Android's Linux Heritage at ELC-E 2011
Leveraging Android's Linux Heritage at ELC-E 2011Leveraging Android's Linux Heritage at ELC-E 2011
Leveraging Android's Linux Heritage at ELC-E 2011Opersys inc.
 
Security of OpenDaylight platform
Security of OpenDaylight platformSecurity of OpenDaylight platform
Security of OpenDaylight platformOpenDaylight
 
OSGi & JOnAS, OW2con11, Nov 24-25, Paris
OSGi & JOnAS, OW2con11, Nov 24-25, ParisOSGi & JOnAS, OW2con11, Nov 24-25, Paris
OSGi & JOnAS, OW2con11, Nov 24-25, ParisOW2
 
Leverage OSGi in business application with JOnAS
Leverage OSGi in business application with JOnASLeverage OSGi in business application with JOnAS
Leverage OSGi in business application with JOnASGuillaume Sauthier
 
Voxxed days Vilnius 2015 - Android Reverse Engineering Lab
Voxxed days Vilnius 2015 - Android Reverse Engineering LabVoxxed days Vilnius 2015 - Android Reverse Engineering Lab
Voxxed days Vilnius 2015 - Android Reverse Engineering LabRon Munitz
 
libreCMC : The Libre Embedded GNU/Linux Distro
libreCMC : The Libre Embedded GNU/Linux DistrolibreCMC : The Libre Embedded GNU/Linux Distro
libreCMC : The Libre Embedded GNU/Linux DistroAll Things Open
 
Implementing Microservices with Jakarta EE and MicroProfile
Implementing Microservices with Jakarta EE and MicroProfileImplementing Microservices with Jakarta EE and MicroProfile
Implementing Microservices with Jakarta EE and MicroProfileKevin Sutter
 
Leveraging Android's Linux Heritage
Leveraging Android's Linux HeritageLeveraging Android's Linux Heritage
Leveraging Android's Linux HeritageOpersys inc.
 
Start your open source project
Start your open source projectStart your open source project
Start your open source projectAhmed Othman
 
Verilog HDL 0001.pdf
Verilog HDL  0001.pdfVerilog HDL  0001.pdf
Verilog HDL 0001.pdfMONEERTHAMEER
 
LAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoTLAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoTLinaro
 
Is Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIIs Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIOpersys inc.
 
JUC Paris 2012 — Jenkins @ Nuxeo
JUC Paris 2012 — Jenkins @ NuxeoJUC Paris 2012 — Jenkins @ Nuxeo
JUC Paris 2012 — Jenkins @ NuxeoJulien Carsique
 
Code, ci, infrastructure - the gophers way
Code, ci, infrastructure - the gophers wayCode, ci, infrastructure - the gophers way
Code, ci, infrastructure - the gophers wayAlex Baitov
 
Bootify Yyour App from Zero to Hero
Bootify Yyour App from Zero to HeroBootify Yyour App from Zero to Hero
Bootify Yyour App from Zero to HeroEPAM
 
Embedded Android Workshop with Lollipop
Embedded Android Workshop with LollipopEmbedded Android Workshop with Lollipop
Embedded Android Workshop with LollipopOpersys inc.
 

Similar to Erlang Embedded — Concurrent Blinkenlights and More! (20)

ETICS- quality certification of open source cloud software, OW2con'12, Paris
ETICS- quality certification of open source cloud software, OW2con'12, ParisETICS- quality certification of open source cloud software, OW2con'12, Paris
ETICS- quality certification of open source cloud software, OW2con'12, Paris
 
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) ca...
 
Teaching Open Source In The University
Teaching Open Source In The UniversityTeaching Open Source In The University
Teaching Open Source In The University
 
Leveraging Android's Linux Heritage at ELC-E 2011
Leveraging Android's Linux Heritage at ELC-E 2011Leveraging Android's Linux Heritage at ELC-E 2011
Leveraging Android's Linux Heritage at ELC-E 2011
 
Security of OpenDaylight platform
Security of OpenDaylight platformSecurity of OpenDaylight platform
Security of OpenDaylight platform
 
OSGi & JOnAS, OW2con11, Nov 24-25, Paris
OSGi & JOnAS, OW2con11, Nov 24-25, ParisOSGi & JOnAS, OW2con11, Nov 24-25, Paris
OSGi & JOnAS, OW2con11, Nov 24-25, Paris
 
Leverage OSGi in business application with JOnAS
Leverage OSGi in business application with JOnASLeverage OSGi in business application with JOnAS
Leverage OSGi in business application with JOnAS
 
Voxxed days Vilnius 2015 - Android Reverse Engineering Lab
Voxxed days Vilnius 2015 - Android Reverse Engineering LabVoxxed days Vilnius 2015 - Android Reverse Engineering Lab
Voxxed days Vilnius 2015 - Android Reverse Engineering Lab
 
libreCMC : The Libre Embedded GNU/Linux Distro
libreCMC : The Libre Embedded GNU/Linux DistrolibreCMC : The Libre Embedded GNU/Linux Distro
libreCMC : The Libre Embedded GNU/Linux Distro
 
Implementing Microservices with Jakarta EE and MicroProfile
Implementing Microservices with Jakarta EE and MicroProfileImplementing Microservices with Jakarta EE and MicroProfile
Implementing Microservices with Jakarta EE and MicroProfile
 
Leveraging Android's Linux Heritage
Leveraging Android's Linux HeritageLeveraging Android's Linux Heritage
Leveraging Android's Linux Heritage
 
Start your open source project
Start your open source projectStart your open source project
Start your open source project
 
Java 2012 conference keynote - Java Strategy & Roadmap - WebLogic & GlassFish...
Java 2012 conference keynote - Java Strategy & Roadmap - WebLogic & GlassFish...Java 2012 conference keynote - Java Strategy & Roadmap - WebLogic & GlassFish...
Java 2012 conference keynote - Java Strategy & Roadmap - WebLogic & GlassFish...
 
Verilog HDL 0001.pdf
Verilog HDL  0001.pdfVerilog HDL  0001.pdf
Verilog HDL 0001.pdf
 
LAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoTLAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoT
 
Is Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIIs Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VI
 
JUC Paris 2012 — Jenkins @ Nuxeo
JUC Paris 2012 — Jenkins @ NuxeoJUC Paris 2012 — Jenkins @ Nuxeo
JUC Paris 2012 — Jenkins @ Nuxeo
 
Code, ci, infrastructure - the gophers way
Code, ci, infrastructure - the gophers wayCode, ci, infrastructure - the gophers way
Code, ci, infrastructure - the gophers way
 
Bootify Yyour App from Zero to Hero
Bootify Yyour App from Zero to HeroBootify Yyour App from Zero to Hero
Bootify Yyour App from Zero to Hero
 
Embedded Android Workshop with Lollipop
Embedded Android Workshop with LollipopEmbedded Android Workshop with Lollipop
Embedded Android Workshop with Lollipop
 

More from Omer Kilic

Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
Bare Metal from a Hardware Perspective: Embedded Frameworks & Build SystemsBare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
Bare Metal from a Hardware Perspective: Embedded Frameworks & Build SystemsOmer Kilic
 
Gearing up for Volume Manufacturing
Gearing up for Volume ManufacturingGearing up for Volume Manufacturing
Gearing up for Volume ManufacturingOmer Kilic
 
The Process of Shipping Hardware Products
The Process of Shipping Hardware ProductsThe Process of Shipping Hardware Products
The Process of Shipping Hardware ProductsOmer Kilic
 
Confusion of Things — The IoT Hardware Kerfuffle
Confusion of Things — The IoT Hardware KerfuffleConfusion of Things — The IoT Hardware Kerfuffle
Confusion of Things — The IoT Hardware KerfuffleOmer Kilic
 
Fast and Furious: Overclocking chips for fun and profit
Fast and Furious: Overclocking chips for fun and profitFast and Furious: Overclocking chips for fun and profit
Fast and Furious: Overclocking chips for fun and profitOmer Kilic
 
Interfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the WorldInterfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the WorldOmer Kilic
 
A Quick Introduction to Programmable Logic
A Quick Introduction to Programmable LogicA Quick Introduction to Programmable Logic
A Quick Introduction to Programmable LogicOmer Kilic
 
concurrency.cc OSHUG #3
concurrency.cc OSHUG #3concurrency.cc OSHUG #3
concurrency.cc OSHUG #3Omer Kilic
 
BURO Arduino Workshop
BURO Arduino WorkshopBURO Arduino Workshop
BURO Arduino WorkshopOmer Kilic
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to ArduinoOmer Kilic
 
Interfacing with Arduino
Interfacing with ArduinoInterfacing with Arduino
Interfacing with ArduinoOmer Kilic
 
Introduction to XMOS Software Defined Silicon Technology
Introduction to XMOS Software Defined Silicon TechnologyIntroduction to XMOS Software Defined Silicon Technology
Introduction to XMOS Software Defined Silicon TechnologyOmer Kilic
 
TinkerSoc Electronics 101
TinkerSoc Electronics 101TinkerSoc Electronics 101
TinkerSoc Electronics 101Omer Kilic
 
Beer Bottle Night Lamp
Beer Bottle Night LampBeer Bottle Night Lamp
Beer Bottle Night LampOmer Kilic
 

More from Omer Kilic (14)

Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
Bare Metal from a Hardware Perspective: Embedded Frameworks & Build SystemsBare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
 
Gearing up for Volume Manufacturing
Gearing up for Volume ManufacturingGearing up for Volume Manufacturing
Gearing up for Volume Manufacturing
 
The Process of Shipping Hardware Products
The Process of Shipping Hardware ProductsThe Process of Shipping Hardware Products
The Process of Shipping Hardware Products
 
Confusion of Things — The IoT Hardware Kerfuffle
Confusion of Things — The IoT Hardware KerfuffleConfusion of Things — The IoT Hardware Kerfuffle
Confusion of Things — The IoT Hardware Kerfuffle
 
Fast and Furious: Overclocking chips for fun and profit
Fast and Furious: Overclocking chips for fun and profitFast and Furious: Overclocking chips for fun and profit
Fast and Furious: Overclocking chips for fun and profit
 
Interfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the WorldInterfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the World
 
A Quick Introduction to Programmable Logic
A Quick Introduction to Programmable LogicA Quick Introduction to Programmable Logic
A Quick Introduction to Programmable Logic
 
concurrency.cc OSHUG #3
concurrency.cc OSHUG #3concurrency.cc OSHUG #3
concurrency.cc OSHUG #3
 
BURO Arduino Workshop
BURO Arduino WorkshopBURO Arduino Workshop
BURO Arduino Workshop
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Interfacing with Arduino
Interfacing with ArduinoInterfacing with Arduino
Interfacing with Arduino
 
Introduction to XMOS Software Defined Silicon Technology
Introduction to XMOS Software Defined Silicon TechnologyIntroduction to XMOS Software Defined Silicon Technology
Introduction to XMOS Software Defined Silicon Technology
 
TinkerSoc Electronics 101
TinkerSoc Electronics 101TinkerSoc Electronics 101
TinkerSoc Electronics 101
 
Beer Bottle Night Lamp
Beer Bottle Night LampBeer Bottle Night Lamp
Beer Bottle Night Lamp
 

Erlang Embedded — Concurrent Blinkenlights and More!

  • 1. Erlang Embedded Concurrent Blinkenlights and More! Omer Kilic || @OmerK omer@erlang-solutions.com
  • 2. Agenda ● Challenges in Modern Embedded Systems ● Overview of Erlang ● Erlang Embedded ● Q&A 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 2/26
  • 3. Challenges in Embedded Systems (I) ● Larger, more complex systems than ever before ● Multi-core processing ● Harder to develop for using the standard embedded development flow ● Harder to utilise the full processing potential ● Much harder to debug (and fix!) 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 3/26
  • 4. Challenges in Embedded Systems (II) ● Increasingly higher degrees of heterogeneity in terms of: ● Cores ● Hardware acceleration (GPU, co-processor etc) ● Interconnect ● Memory hierarchies 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 4/26
  • 5. Internet of Things (I) 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 5/26
  • 6. Internet of Things (II) http://blogs.cisco.com/news/the-internet-of-things-infographic/ 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 6/26
  • 7. Erlang? ● {functional, concurrent/parallel, garbage-collected, soft real-time, fault-tolerant, distributed, message- passing} ● First version developed in 1986 ● Open-sourced in 1998. ● Battle-tested at Ericsson and many other companies ● Originally designed for Embedded Systems! 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 7/26
  • 8. Erlang Advantage (I) ● Declarative ● Functional programming language, high abstraction level, concise readable programs. ● Concurrent and Parallel ● Highly scalable, transparent or explicit concurrency, lightweight processes. Takes full advantage of multicore architectures. 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 8/26
  • 9. Erlang Advantage (II) ● Robust ● Simple and consistent error recovery and supervision hierarchies, built-in fault tolerance. ● Portable, Distributed ● Runs on a variety of platforms, network-aware runtime, supports heterogeneous networks. 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 9/26
  • 10. Erlang Advantage (III) ● External Interfaces ● NIFs and ports used to interface external world to the Erlang runtime. ● Soft Real-Time ● Response time (can be) in the order of milliseconds, per-process garbage collection. ● Hot-code loading ● Dynamic reconfiguration. 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 10/26
  • 11. Erlang, the Maestro (flickr/dereckesanches) 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 11/26
  • 12. External Interfaces ● Native Implemented Functions (NIFs) and ports used to interface external world to the Erlang runtime. Erlang VM app hw_if hw_driver.c 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 12/26
  • 13. #include “stats.h” Source: http://embedded.com/electronics-blogs/programming-pointers/4372180/Unexpected-trends 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 13/26
  • 14. Actor Model ● Proposed in 1973 by Hewitt, Bishop, and Steiger ● “Universal primitives of concurrent computation” ● Building blocks for modular, distributed and concurrent systems ● No shared-state, self-contained and atomic ● Implemented in a variety of programming languages ● Erlang, Scala (AKKA), Java (Kilim), Ruby (Celluloid), C++11 (libcppa) 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 14/26
  • 15. Actor Model ● Asynchronous message passing ● Messages kept in a mailbox and processes in the order they are received in ● Upon receiving a message, actors can: ● Make local decisions and change internal state ● Spawn new actors state ● Send messages to other actors functionality mailbox 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 15/26
  • 16. Example: GPIO proc_a {in it, 17 ,o ut pu t} GPIO pin17 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 16/26
  • 17. Example: GPIO proc_a proc_b } ,l ow 7 {s ,1 ta te te {s ta ,1 7, hi proc_c gh } } ,1 7, high GPIO {state pin17 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 17/26
  • 18. GPIO “Proxy” ● Replaces the “locks” in traditional sense of embedded design ● Access control/mutual exclusion ● Can be used to implement safety constraints ● Toggling rate, sequence detection, direction control, etc. 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 18/26
  • 19. TI OMAP Reference System 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 19/26
  • 20. Fine Grain Abstraction ● Advantages ● Application code becomes simpler – Concise and shorter modules – Testing becomes easier – Code re-use (potentially) increases ● Disadvantages ● Architecting fine grain systems is difficult 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 20/26
  • 21. Erlang Embedded “The aim of this KTP project is to bring the benefits of concurrent systems development using Erlang to the field of embedded systems; through investigation, analysis, software development and evaluation." 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 21/26
  • 22. Hardware Projects 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 22/26
  • 23. Future Explorations Parallella! 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 23/26
  • 24. Interested in Erlang? ● http://www.erlang.org/doc/ ● http://learnyousomeerlang.com/ http://www.youtube.com/watch?v=xrIjfIjssLE :) 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 24/26
  • 25. Erlang Embedded Training Stack ● A complete package for people interested in developing the next generation of concurrent/distributed Embedded Systems ● Training Modules Erlang Embedded Framework ● Embedded Linux Primer Erlang/OTP 101 ● Erlang/OTP 101 ● Erlang Embedded Framework Embedded Linux Primer ● Hardware included! Hardware Platform 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 25/26
  • 26. Thank you ● www.erlang-embedded.com ● embedded@erlang-solutions.com ● @ErlangEmbedded “ Any sufficiently complicated concurrent program in another language contains an ad-hoc, informally- specified, bug-ridden, slow implementation of half of Erlang. – Robert Virding Co-Inventor of Erlang 15/11/2012 Open Source Hardware User Group Meetup #22 Slide 26/26