SlideShare una empresa de Scribd logo
1 de 28
Descargar para leer sin conexión
Me3D: A Model-driven Methodology
                Model-
          Expediting Embedded Device
              Driver Development
        Hui Chen, Guillaume Godet-Bar, Frédéric Rousseau, Frédéric Pétrot

                TIMA Laboratory (CNRS – Grenoble INP – UJF) - France

                          {FirstName.LastName}@imag.fr




         22nd IEEE International Symposium on Rapid System Prototyping

27/05/2011
Device driver context
    Considerable time & effort for the SW development in a
    typical MPSoC project
    o Device driver development: a serious bottleneck
            Interdisciplinary knowledge required
            Laborious to write
              • 19.6 person-years of effort in developing device drivers for the
                LH7A404 SoC

            Unreliable
              • 85% of unexpected Windows stops caused by device drivers

         A new methodology to address reliability for device
         driver generation



TIMA Laboratory                                   RSP 2011                         2
Outline
      Device driver context

      Device driver overview

      Related work

      Device driver generation environment
      D i d i             ti      i      t

      Evaluation

      Conclusion and future work

TIMA Laboratory                    RSP 2011   3
Outline
o     Device driver context

      Device driver overview

o     Related work

o     Device driver generation environment
      D i d i             ti      i      t

o     Evaluation

o     Conclusion and future work

TIMA Laboratory                    RSP 2011   4
Device driver interaction in low-level SW
                             low-
    Device driver: a low-level component in the OS, which
    allows upper-level SW to interact with the device

    Device/hardware device: a specific HW resource for a
    dedicated task

                   APPLICATION
                                                                   Interactions:
       APPLICATION PROGRMMING INTERFACE                            a) Kernel




                                                LIBRARIES
                           b)
                                                                   b) User
       KERNEL                     DRIVER
  OS




                  a)     DRIVER
                                  DRIVER
                                           c)                      c) Libraries

                                                L
                           d)                                      d) HAL (Hardware
                  HAL INTERFACE
                                                                      abstraction
          HARDWARE ABSTRACTION LAYER                                  layer) I/F
                       HARDWARE


TIMA Laboratory                                         RSP 2011                      5
Device driver role
    Implements an interface to the kernel for an underlying
    device
         Requires kernel services, and often also offers services to
         other kernel components

    Provides a l
    P   id     lower-level communication channel t th
                     l   l       i ti     h    l to the
    device
         Acts as a translator from the kernel to the HW interface




TIMA Laboratory                            RSP 2011                    6
Device driver complexity
    Device driver entry points
                                               static inline uint32_t registerA_bitfieldX_rd() {
return_type entry_a_name(…) {                    return <read primitive> (IO_BASE 
  …                         1           4        + REGISTER_A_OFFSET) &
                                                   REGISTER A OFFSET) &
  <kernel memory allocation>                     BIT_FIELD_X_MASK;}                       5
  …                       2
  access_hardware(…);
  access_hardware(…);           void access_hardware(…) {                          6
  …                               registerB_bitfieldY_wr($VAL);
                                     i    B bi fi ldY   ($VAL)
}                                 …
                                  $VAL2 = registerA_bitfieldX_rd();
return_type entry_b_name(…) {   }                                   3
  …
  strcpy(…);      7                 1 Kernel‐driver interface        5 Platform‐related
  …                                  2 Kernel service                6 Device‐related
  <create MMC card>
  …                                  3 De ice feat res
                                       Device‐features               7 C library related
                                                                       C library‐related
                   8
}                                    4 HAL‐related                   8   Device class‐related

    Various and interrelated sources of information
         Device driver generation is intrinsically complex
TIMA Laboratory                                      RSP 2011                                      7
Outline
o     Device driver context

o     Device driver overview

      Related work

o     Device driver generation environment
      D i d i             ti      i      t

o     Evaluation

o     Conclusion and future work

TIMA Laboratory                    RSP 2011   8
Device driver synthesis methodologies
            Tool for synthesizing                         Device driver synthesis
            embedded device drivers                       with Termite (NICTA /
            (Princeton U )
                       U.)                                U.
                                                          U of New South Wales)
       cation




                       Core                                    Device
      vice




                       Gen                               specification
specific
  Dev




                                           Virtual                                  .c
                Core functions (.c)                      Device-class
                                        environment                      Termite
                                                         specification

                                                                                   Device
      uration




                                            Target
                      Mapper            environment                OS              driver
      iver




                                        (
                                        (library etc.)
                                               y     )   specification
configu
   Dri




                        .c     Device
                               driver



   TIMA Laboratory                                          RSP 2011                        9
Device driver generation methodology
    Device driver generation based on the RTL test bench of
    an IP (Polytechnic U. of Turin & U. of Verona)

                                    Device    Test bench
                                  cardinality   (RTL)




                  CPU model
                                       Device driver        .c
                                        generation

                  I/O memory                               Device
                  specification                            drivers




TIMA Laboratory                                        RSP 2011      10
Other related work
    Device interface languages: offer some constructs to
    describe device interface
    o Laddie: generates register access functions
    o NDL: a new way to write the device drivers, but not for
      legacy ones

    Hardware specification languages: able to describe
    some parts of electronic components & designs
    o UML MARTE: widely used
    o IP-XACT: IEEE standard describes …
      IP XACT:      standard,
            structural information about HW devices & designs
            some contents, e.g., a register map



TIMA Laboratory                              RSP 2011           11
Outline
o     Device driver context

o     Device driver overview

o     Related work

      Device driver generation environment
      D i d i             ti      i      t

o     Evaluation

o     Conclusion and future work

TIMA Laboratory                    RSP 2011   12
Device driver generation environment

Specification of device driver generation
     Objective: to help device driver development
       p
     Inputs
     o Hardware specifications
     o Device features model
     o In-kernel interface specification
     o Libraries
     o Driver configuration parameters

     Output: device driver in C
     Validation by execution




 TIMA Laboratory                           RSP 2011   13
Device driver generation environment

Methodology and inputs
     Abstract view of the Me3D methodology
                              Hardware          Device Features       In-Kernel Interface
                            Specifications           Model               Specification


     Driver Configuration
                                             Device Driver Generation                  Libraries
         Parameters
         P       t

                                                                                    Is used by
          Validation                              Device driver                     Produces



     HW specifications (e.g., in IP-XACT, UML MARTE)
     o D i specification(s)
       Device  ifi   i ( )
     o Platform specification
             Processor (e.g., byte ordering)
                       ( g, y             g)
             Device instantiations, I/O offsets, …

 TIMA Laboratory                                           RSP 2011                                14
Device driver generation environment

Inputs
     Device features model
     o Captures a sequence of
       interactions with the HW
     o A set of predefined
       device features:
       init, read, etc.

     In-kernel interface specification
                          p
     o Contains mainly kernel data structures (if any) to be
       used, software events, & transitions
     o S f
       Software events: messages f
                                 from/to the kernel
                                     /    h k     l
     o Transitions: define the driver's desired reactions to requests




 TIMA Laboratory                         RSP 2011                       15
Device driver generation environment

Inputs (cont.)
     Libraries
     o HAL library: low-level
       HW access primitives
     o Basic library: an               Basic Library
                                                       StrCpy = (Newlib) “strcpy” + “…”
       abstract layer for usual
                  y                      Lib X
                                         Lib X
       data manipulation                 Lib Y
                                                       StrCpy = (uClibc) “strcpy” + “…”
       methods                           Lib Z         StrCpy = “dna_strcpy” + “…”


     Driver configuration
     parameters
     o D i driver development: d i i
       Device d i d   l     t decision-making processes
                                         ki
     o High-level configuration parameters: to efficiently &
       effectively explore the device driver design space



 TIMA Laboratory                                 RSP 2011                                 16
Device driver generation environment

Device driver generation (step by step)
     Step 1: Parsing & inline
     functions generation




     Step 2: Device features generation




 TIMA Laboratory                       RSP 2011   17
Device driver generation environment

Device driver generation (step by step)
     Step 3: Driver source & Makefile
     generation




 TIMA Laboratory                        RSP 2011   18
Outline
o     Device driver context

o     Device driver overview

o     Related work

o     Device driver generation environment
      D i d i             ti      i      t

      Evaluation

o     Conclusion and future work

TIMA Laboratory                    RSP 2011   19
Evaluation
    Evaluation points
    1. Feasibility of describing device features & in-kernel I/F
    2.                       Hardware          Device Features       In-Kernel Interface
                           Specifications           Model               Specification


    Driver Configuration
        Parameters
                                                    ?
                                            Device Driver Generation                  Libraries



                                                 Device driver



    o To evaluate point 1: specified HW devices & platform in
      IP-XACT, in-kernel interfaces with in-house IISL, device
      features with DFDL
    o To evaluate point 2: manual conversion according to the
      proposed methodology

TIMA Laboratory                                           RSP 2011                                20
Evaluation

Case study and inputs
     Case study: MCI device driver for the ATMEL D940 MPSoC
     o MCI device and its neighborhood:




     Hardware specifications
     o Device specifications for MCI PMC & PIO
                                 MCI, PMC,
     o Platform specification: only necessary parts modeled
 TIMA Laboratory                        RSP 2011              21
Evaluation

Inputs
     MCI device features model: in DFDL, which has some
     constructs tailored for modeling device features
     In-kernel interface specification: with our in-house
     language IISL
     o In-kernel interfaces for the MCI driver
        In kernel




     Driver configuration parameters: synchronization
     mechanism, …

 TIMA Laboratory                      RSP 2011              22
Evaluation

Conversion
     Conversion step 1:            Conversion step 2:
     Macros & inline functions     MCI device features
     generation                    generation




 TIMA Laboratory                 RSP 2011                23
Evaluation

Conversion (cont.)
     Conversion step 3.1: Synthesize EFSM & derive driver
     functionalities




     Conversion step 3 2 G
     C      i    t   3.2: Generate M k fil
                                t Makefile

 TIMA Laboratory                    RSP 2011                24
Evaluation

Conversion results
       Source lines of code, binary sizes of the native &
       generated MCI drivers w/o and w/ Me3D




       Efforts for MCI driver development w/o and w/ Me3D
 Person‐days
 P      d
                            Device features model
  30                                                            3200
                            In‐kernel interface specification   3000
  20
                            Platform specification              2800
  10                                                            2600
                            Device specifications
                                                                2400
   0                                                            2200
        w/o Me3D w/ Me3D                                               SLOC
 TIMA Laboratory                                RSP 2011                      25
Outline
o     Device driver context

o     Device driver overview

o     Related work

o     Device driver generation environment
      D i d i             ti      i      t

o     Evaluation

      Conclusion and future work

TIMA Laboratory                    RSP 2011   26
Conclusion and future work
    Conclusion
    o Advanced device driver generation environment
            Inputs: specifications/model (hardware, device features, in-
            kernel interface), libraries, & driver configuration parameters
            Output: C file of the device driver
            Validation by execution

    Future work
    o Evaluate the methodology on several OSes
    o Introduce an intermediate format for driver generation &
      validation
        ld
    o Develop a tool for fully automatic device driver generation
    o Verify device drivers by symbolic execution (in cooperation
      with NICTA)

TIMA Laboratory                                   RSP 2011                    27
Thank you
         for your attention!
        Me3D: A Model-driven Methodology Expediting
                Model driven
           Embedded Device Driver Development

        Hui Ch
        H i Chen, G ill
                  Guillaume Godet-Bar, F édé i R
                            G d   B    Frédéric Rousseau, F édé i Pé
                                                          Frédéric Pétrot
                TIMA Laboratory (CNRS – Grenoble INP – UJF) - France




         22nd IEEE International Symposium on Rapid System Prototyping
27/05/2011

Más contenido relacionado

La actualidad más candente

15.00 hr van Hilten
15.00 hr van Hilten15.00 hr van Hilten
15.00 hr van HiltenThemadagen
 
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning AccelerationclCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning AccelerationIntel® Software
 
XS Boston 2008 Paravirt Ops in Linux IA64
XS Boston 2008 Paravirt Ops in Linux IA64XS Boston 2008 Paravirt Ops in Linux IA64
XS Boston 2008 Paravirt Ops in Linux IA64The Linux Foundation
 
20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Jorisimec.archive
 
Ncm2010 ruo ando
Ncm2010 ruo andoNcm2010 ruo ando
Ncm2010 ruo andoRuo Ando
 
Denis Nagorny - Pumping Python Performance
Denis Nagorny - Pumping Python PerformanceDenis Nagorny - Pumping Python Performance
Denis Nagorny - Pumping Python PerformanceSergey Arkhipov
 
Fpga computing
Fpga computingFpga computing
Fpga computingrinnocente
 
RISC-V 30907 summit 2020 joint picocom_mentor
RISC-V 30907 summit 2020 joint picocom_mentorRISC-V 30907 summit 2020 joint picocom_mentor
RISC-V 30907 summit 2020 joint picocom_mentorRISC-V International
 
Vasiliy Litvinov - Python Profiling
Vasiliy Litvinov - Python ProfilingVasiliy Litvinov - Python Profiling
Vasiliy Litvinov - Python ProfilingSergey Arkhipov
 
AI is Impacting HPC Everywhere
AI is Impacting HPC EverywhereAI is Impacting HPC Everywhere
AI is Impacting HPC Everywhereinside-BigData.com
 
The Microarchitecure Of FPGA Based Soft Processor
The Microarchitecure Of FPGA Based Soft ProcessorThe Microarchitecure Of FPGA Based Soft Processor
The Microarchitecure Of FPGA Based Soft ProcessorDeepak Tomar
 
PA Develops an LTE PHY for Catapult
PA Develops an LTE PHY for CatapultPA Develops an LTE PHY for Catapult
PA Develops an LTE PHY for Catapultgrahambell
 
Nobuya Okada presentation
Nobuya Okada presentationNobuya Okada presentation
Nobuya Okada presentationkazu_papasan
 
Advance hdl design training on xilinx fpga
Advance hdl design training on xilinx fpgaAdvance hdl design training on xilinx fpga
Advance hdl design training on xilinx fpgademon_2M
 
Developing new zynq based instruments
Developing new zynq based instrumentsDeveloping new zynq based instruments
Developing new zynq based instrumentsGraham NAYLOR
 

La actualidad más candente (20)

15.00 hr van Hilten
15.00 hr van Hilten15.00 hr van Hilten
15.00 hr van Hilten
 
ate_full_paper
ate_full_paperate_full_paper
ate_full_paper
 
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning AccelerationclCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
 
XS Boston 2008 Paravirt Ops in Linux IA64
XS Boston 2008 Paravirt Ops in Linux IA64XS Boston 2008 Paravirt Ops in Linux IA64
XS Boston 2008 Paravirt Ops in Linux IA64
 
20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris
 
Ncm2010 ruo ando
Ncm2010 ruo andoNcm2010 ruo ando
Ncm2010 ruo ando
 
Denis Nagorny - Pumping Python Performance
Denis Nagorny - Pumping Python PerformanceDenis Nagorny - Pumping Python Performance
Denis Nagorny - Pumping Python Performance
 
Resume_new1_may
Resume_new1_mayResume_new1_may
Resume_new1_may
 
Fpga computing
Fpga computingFpga computing
Fpga computing
 
RISC-V 30907 summit 2020 joint picocom_mentor
RISC-V 30907 summit 2020 joint picocom_mentorRISC-V 30907 summit 2020 joint picocom_mentor
RISC-V 30907 summit 2020 joint picocom_mentor
 
Vasiliy Litvinov - Python Profiling
Vasiliy Litvinov - Python ProfilingVasiliy Litvinov - Python Profiling
Vasiliy Litvinov - Python Profiling
 
AI is Impacting HPC Everywhere
AI is Impacting HPC EverywhereAI is Impacting HPC Everywhere
AI is Impacting HPC Everywhere
 
The Microarchitecure Of FPGA Based Soft Processor
The Microarchitecure Of FPGA Based Soft ProcessorThe Microarchitecure Of FPGA Based Soft Processor
The Microarchitecure Of FPGA Based Soft Processor
 
CPLDs
CPLDsCPLDs
CPLDs
 
CPLDs
CPLDsCPLDs
CPLDs
 
CPLD & FPLD
CPLD & FPLDCPLD & FPLD
CPLD & FPLD
 
PA Develops an LTE PHY for Catapult
PA Develops an LTE PHY for CatapultPA Develops an LTE PHY for Catapult
PA Develops an LTE PHY for Catapult
 
Nobuya Okada presentation
Nobuya Okada presentationNobuya Okada presentation
Nobuya Okada presentation
 
Advance hdl design training on xilinx fpga
Advance hdl design training on xilinx fpgaAdvance hdl design training on xilinx fpga
Advance hdl design training on xilinx fpga
 
Developing new zynq based instruments
Developing new zynq based instrumentsDeveloping new zynq based instruments
Developing new zynq based instruments
 

Similar a Me3D: A Model-driven Methodology for Expediting Embedded Device Driver Development

V Labs Product Presentation
V Labs  Product PresentationV Labs  Product Presentation
V Labs Product PresentationWil Huijben
 
Iris an architecture for cognitive radio networking testbeds
Iris   an architecture for cognitive radio networking testbedsIris   an architecture for cognitive radio networking testbeds
Iris an architecture for cognitive radio networking testbedsPatricia Oniga
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework OverviewDoncho Minkov
 
Achieving Performance Isolation with Lightweight Co-Kernels
Achieving Performance Isolation with Lightweight Co-KernelsAchieving Performance Isolation with Lightweight Co-Kernels
Achieving Performance Isolation with Lightweight Co-KernelsJiannan Ouyang, PhD
 
2015 10-30 面試心得分享
2015 10-30 面試心得分享2015 10-30 面試心得分享
2015 10-30 面試心得分享Hung Liu
 
RackN Physical Layer Automation Innovation
RackN Physical Layer Automation InnovationRackN Physical Layer Automation Innovation
RackN Physical Layer Automation Innovationrhirschfeld
 
PIL - A Platform Independent Language
PIL - A Platform Independent LanguagePIL - A Platform Independent Language
PIL - A Platform Independent Languagezefhemel
 
How Java 19 Influences the Future of Your High-Scale Applications .pdf
How Java 19 Influences the Future of Your High-Scale Applications .pdfHow Java 19 Influences the Future of Your High-Scale Applications .pdf
How Java 19 Influences the Future of Your High-Scale Applications .pdfAna-Maria Mihalceanu
 
Os Madsen Block
Os Madsen BlockOs Madsen Block
Os Madsen Blockoscon2007
 
Marco Cattaneo "Event data processing in LHCb"
Marco Cattaneo "Event data processing in LHCb"Marco Cattaneo "Event data processing in LHCb"
Marco Cattaneo "Event data processing in LHCb"Yandex
 
Windows内核技术介绍
Windows内核技术介绍Windows内核技术介绍
Windows内核技术介绍jeffz
 
Net Framework Overview
Net Framework OverviewNet Framework Overview
Net Framework OverviewLuis Goldster
 
Hadoop: Code Injection, Distributed Fault Injection
Hadoop: Code Injection, Distributed Fault InjectionHadoop: Code Injection, Distributed Fault Injection
Hadoop: Code Injection, Distributed Fault InjectionCloudera, Inc.
 
Preparing to program Aurora at Exascale - Early experiences and future direct...
Preparing to program Aurora at Exascale - Early experiences and future direct...Preparing to program Aurora at Exascale - Early experiences and future direct...
Preparing to program Aurora at Exascale - Early experiences and future direct...inside-BigData.com
 
What Your Jvm Has Been Trying To Tell You
What Your Jvm Has Been Trying To Tell YouWhat Your Jvm Has Been Trying To Tell You
What Your Jvm Has Been Trying To Tell YouJohn Pape
 

Similar a Me3D: A Model-driven Methodology for Expediting Embedded Device Driver Development (20)

V Labs Product Presentation
V Labs  Product PresentationV Labs  Product Presentation
V Labs Product Presentation
 
Jnode
JnodeJnode
Jnode
 
淺談探索 Linux 系統設計之道
淺談探索 Linux 系統設計之道 淺談探索 Linux 系統設計之道
淺談探索 Linux 系統設計之道
 
Understanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual MachineUnderstanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual Machine
 
RISC V in Spacer
RISC V in SpacerRISC V in Spacer
RISC V in Spacer
 
Iris an architecture for cognitive radio networking testbeds
Iris   an architecture for cognitive radio networking testbedsIris   an architecture for cognitive radio networking testbeds
Iris an architecture for cognitive radio networking testbeds
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
 
Achieving Performance Isolation with Lightweight Co-Kernels
Achieving Performance Isolation with Lightweight Co-KernelsAchieving Performance Isolation with Lightweight Co-Kernels
Achieving Performance Isolation with Lightweight Co-Kernels
 
2015 10-30 面試心得分享
2015 10-30 面試心得分享2015 10-30 面試心得分享
2015 10-30 面試心得分享
 
RackN Physical Layer Automation Innovation
RackN Physical Layer Automation InnovationRackN Physical Layer Automation Innovation
RackN Physical Layer Automation Innovation
 
PIL - A Platform Independent Language
PIL - A Platform Independent LanguagePIL - A Platform Independent Language
PIL - A Platform Independent Language
 
How Java 19 Influences the Future of Your High-Scale Applications .pdf
How Java 19 Influences the Future of Your High-Scale Applications .pdfHow Java 19 Influences the Future of Your High-Scale Applications .pdf
How Java 19 Influences the Future of Your High-Scale Applications .pdf
 
Os Madsen Block
Os Madsen BlockOs Madsen Block
Os Madsen Block
 
Marco Cattaneo "Event data processing in LHCb"
Marco Cattaneo "Event data processing in LHCb"Marco Cattaneo "Event data processing in LHCb"
Marco Cattaneo "Event data processing in LHCb"
 
Windows内核技术介绍
Windows内核技术介绍Windows内核技术介绍
Windows内核技术介绍
 
Net Framework Overview
Net Framework OverviewNet Framework Overview
Net Framework Overview
 
Hadoop: Code Injection, Distributed Fault Injection
Hadoop: Code Injection, Distributed Fault InjectionHadoop: Code Injection, Distributed Fault Injection
Hadoop: Code Injection, Distributed Fault Injection
 
Preparing to program Aurora at Exascale - Early experiences and future direct...
Preparing to program Aurora at Exascale - Early experiences and future direct...Preparing to program Aurora at Exascale - Early experiences and future direct...
Preparing to program Aurora at Exascale - Early experiences and future direct...
 
Faults inside System Software
Faults inside System SoftwareFaults inside System Software
Faults inside System Software
 
What Your Jvm Has Been Trying To Tell You
What Your Jvm Has Been Trying To Tell YouWhat Your Jvm Has Been Trying To Tell You
What Your Jvm Has Been Trying To Tell You
 

Último

The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Último (20)

The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

Me3D: A Model-driven Methodology for Expediting Embedded Device Driver Development

  • 1. Me3D: A Model-driven Methodology Model- Expediting Embedded Device Driver Development Hui Chen, Guillaume Godet-Bar, Frédéric Rousseau, Frédéric Pétrot TIMA Laboratory (CNRS – Grenoble INP – UJF) - France {FirstName.LastName}@imag.fr 22nd IEEE International Symposium on Rapid System Prototyping 27/05/2011
  • 2. Device driver context Considerable time & effort for the SW development in a typical MPSoC project o Device driver development: a serious bottleneck Interdisciplinary knowledge required Laborious to write • 19.6 person-years of effort in developing device drivers for the LH7A404 SoC Unreliable • 85% of unexpected Windows stops caused by device drivers A new methodology to address reliability for device driver generation TIMA Laboratory RSP 2011 2
  • 3. Outline Device driver context Device driver overview Related work Device driver generation environment D i d i ti i t Evaluation Conclusion and future work TIMA Laboratory RSP 2011 3
  • 4. Outline o Device driver context Device driver overview o Related work o Device driver generation environment D i d i ti i t o Evaluation o Conclusion and future work TIMA Laboratory RSP 2011 4
  • 5. Device driver interaction in low-level SW low- Device driver: a low-level component in the OS, which allows upper-level SW to interact with the device Device/hardware device: a specific HW resource for a dedicated task APPLICATION Interactions: APPLICATION PROGRMMING INTERFACE a) Kernel LIBRARIES b) b) User KERNEL DRIVER OS a) DRIVER DRIVER c) c) Libraries L d) d) HAL (Hardware HAL INTERFACE abstraction HARDWARE ABSTRACTION LAYER layer) I/F HARDWARE TIMA Laboratory RSP 2011 5
  • 6. Device driver role Implements an interface to the kernel for an underlying device Requires kernel services, and often also offers services to other kernel components Provides a l P id lower-level communication channel t th l l i ti h l to the device Acts as a translator from the kernel to the HW interface TIMA Laboratory RSP 2011 6
  • 7. Device driver complexity Device driver entry points static inline uint32_t registerA_bitfieldX_rd() { return_type entry_a_name(…) { return <read primitive> (IO_BASE  … 1 4 + REGISTER_A_OFFSET) & REGISTER A OFFSET) & <kernel memory allocation> BIT_FIELD_X_MASK;} 5 … 2 access_hardware(…); access_hardware(…); void access_hardware(…) { 6 … registerB_bitfieldY_wr($VAL); i B bi fi ldY ($VAL) } … $VAL2 = registerA_bitfieldX_rd(); return_type entry_b_name(…) { } 3 … strcpy(…); 7 1 Kernel‐driver interface 5 Platform‐related … 2 Kernel service 6 Device‐related <create MMC card> … 3 De ice feat res Device‐features 7 C library related C library‐related 8 } 4 HAL‐related 8 Device class‐related Various and interrelated sources of information Device driver generation is intrinsically complex TIMA Laboratory RSP 2011 7
  • 8. Outline o Device driver context o Device driver overview Related work o Device driver generation environment D i d i ti i t o Evaluation o Conclusion and future work TIMA Laboratory RSP 2011 8
  • 9. Device driver synthesis methodologies Tool for synthesizing Device driver synthesis embedded device drivers with Termite (NICTA / (Princeton U ) U.) U. U of New South Wales) cation Core Device vice Gen specification specific Dev Virtual .c Core functions (.c) Device-class environment Termite specification Device uration Target Mapper environment OS driver iver ( (library etc.) y ) specification configu Dri .c Device driver TIMA Laboratory RSP 2011 9
  • 10. Device driver generation methodology Device driver generation based on the RTL test bench of an IP (Polytechnic U. of Turin & U. of Verona) Device Test bench cardinality (RTL) CPU model Device driver .c generation I/O memory Device specification drivers TIMA Laboratory RSP 2011 10
  • 11. Other related work Device interface languages: offer some constructs to describe device interface o Laddie: generates register access functions o NDL: a new way to write the device drivers, but not for legacy ones Hardware specification languages: able to describe some parts of electronic components & designs o UML MARTE: widely used o IP-XACT: IEEE standard describes … IP XACT: standard, structural information about HW devices & designs some contents, e.g., a register map TIMA Laboratory RSP 2011 11
  • 12. Outline o Device driver context o Device driver overview o Related work Device driver generation environment D i d i ti i t o Evaluation o Conclusion and future work TIMA Laboratory RSP 2011 12
  • 13. Device driver generation environment Specification of device driver generation Objective: to help device driver development p Inputs o Hardware specifications o Device features model o In-kernel interface specification o Libraries o Driver configuration parameters Output: device driver in C Validation by execution TIMA Laboratory RSP 2011 13
  • 14. Device driver generation environment Methodology and inputs Abstract view of the Me3D methodology Hardware Device Features In-Kernel Interface Specifications Model Specification Driver Configuration Device Driver Generation Libraries Parameters P t Is used by Validation Device driver Produces HW specifications (e.g., in IP-XACT, UML MARTE) o D i specification(s) Device ifi i ( ) o Platform specification Processor (e.g., byte ordering) ( g, y g) Device instantiations, I/O offsets, … TIMA Laboratory RSP 2011 14
  • 15. Device driver generation environment Inputs Device features model o Captures a sequence of interactions with the HW o A set of predefined device features: init, read, etc. In-kernel interface specification p o Contains mainly kernel data structures (if any) to be used, software events, & transitions o S f Software events: messages f from/to the kernel / h k l o Transitions: define the driver's desired reactions to requests TIMA Laboratory RSP 2011 15
  • 16. Device driver generation environment Inputs (cont.) Libraries o HAL library: low-level HW access primitives o Basic library: an Basic Library StrCpy = (Newlib) “strcpy” + “…” abstract layer for usual y Lib X Lib X data manipulation Lib Y StrCpy = (uClibc) “strcpy” + “…” methods Lib Z StrCpy = “dna_strcpy” + “…” Driver configuration parameters o D i driver development: d i i Device d i d l t decision-making processes ki o High-level configuration parameters: to efficiently & effectively explore the device driver design space TIMA Laboratory RSP 2011 16
  • 17. Device driver generation environment Device driver generation (step by step) Step 1: Parsing & inline functions generation Step 2: Device features generation TIMA Laboratory RSP 2011 17
  • 18. Device driver generation environment Device driver generation (step by step) Step 3: Driver source & Makefile generation TIMA Laboratory RSP 2011 18
  • 19. Outline o Device driver context o Device driver overview o Related work o Device driver generation environment D i d i ti i t Evaluation o Conclusion and future work TIMA Laboratory RSP 2011 19
  • 20. Evaluation Evaluation points 1. Feasibility of describing device features & in-kernel I/F 2. Hardware Device Features In-Kernel Interface Specifications Model Specification Driver Configuration Parameters ? Device Driver Generation Libraries Device driver o To evaluate point 1: specified HW devices & platform in IP-XACT, in-kernel interfaces with in-house IISL, device features with DFDL o To evaluate point 2: manual conversion according to the proposed methodology TIMA Laboratory RSP 2011 20
  • 21. Evaluation Case study and inputs Case study: MCI device driver for the ATMEL D940 MPSoC o MCI device and its neighborhood: Hardware specifications o Device specifications for MCI PMC & PIO MCI, PMC, o Platform specification: only necessary parts modeled TIMA Laboratory RSP 2011 21
  • 22. Evaluation Inputs MCI device features model: in DFDL, which has some constructs tailored for modeling device features In-kernel interface specification: with our in-house language IISL o In-kernel interfaces for the MCI driver In kernel Driver configuration parameters: synchronization mechanism, … TIMA Laboratory RSP 2011 22
  • 23. Evaluation Conversion Conversion step 1: Conversion step 2: Macros & inline functions MCI device features generation generation TIMA Laboratory RSP 2011 23
  • 24. Evaluation Conversion (cont.) Conversion step 3.1: Synthesize EFSM & derive driver functionalities Conversion step 3 2 G C i t 3.2: Generate M k fil t Makefile TIMA Laboratory RSP 2011 24
  • 25. Evaluation Conversion results Source lines of code, binary sizes of the native & generated MCI drivers w/o and w/ Me3D Efforts for MCI driver development w/o and w/ Me3D Person‐days P d Device features model 30 3200 In‐kernel interface specification 3000 20 Platform specification 2800 10 2600 Device specifications 2400 0 2200 w/o Me3D w/ Me3D SLOC TIMA Laboratory RSP 2011 25
  • 26. Outline o Device driver context o Device driver overview o Related work o Device driver generation environment D i d i ti i t o Evaluation Conclusion and future work TIMA Laboratory RSP 2011 26
  • 27. Conclusion and future work Conclusion o Advanced device driver generation environment Inputs: specifications/model (hardware, device features, in- kernel interface), libraries, & driver configuration parameters Output: C file of the device driver Validation by execution Future work o Evaluate the methodology on several OSes o Introduce an intermediate format for driver generation & validation ld o Develop a tool for fully automatic device driver generation o Verify device drivers by symbolic execution (in cooperation with NICTA) TIMA Laboratory RSP 2011 27
  • 28. Thank you for your attention! Me3D: A Model-driven Methodology Expediting Model driven Embedded Device Driver Development Hui Ch H i Chen, G ill Guillaume Godet-Bar, F édé i R G d B Frédéric Rousseau, F édé i Pé Frédéric Pétrot TIMA Laboratory (CNRS – Grenoble INP – UJF) - France 22nd IEEE International Symposium on Rapid System Prototyping 27/05/2011