Developing Multicore Software is Easy, If… · 2016. 3. 12. · Wind River PNE-LE 3.02 VxW 6.7...

34
© 2009 Wind River Systems, Inc. Developing Multicore Software is Easy, If… Freescale Technical Forum - Summer 2009 Emeka Nwafor Director, Product Management Development Tools

Transcript of Developing Multicore Software is Easy, If… · 2016. 3. 12. · Wind River PNE-LE 3.02 VxW 6.7...

  • © 2009 Wind River Systems, Inc.

    Developing Multicore Softwareis Easy, If…

    Freescale Technical Forum - Summer 2009

    Emeka NwaforDirector, Product Management

    Development Tools

  • © 2009 Wind River Systems, Inc.

    Abstract

    Multicore is here. There has been much written and discussed about how challenging developing

    Multicore Software can be. Most of us have heard the saying "you shouldn't bring a knife to a gunfight". This

    principle applies to developing Multicore Software. We will talk about how Wind River's development tools help to make developing Multicore Software

    easier on Freescale's family of multicore processors. We will also talk about directions that Wind River is

    taking to make developing Multicore Software "easy".

    2

  • © 2009 Wind River Systems, Inc.

    Agenda

    Context: Where are we with multicore, today?

    What is Wind River's Multicore Software solution?

    Simplifying development on Freescale's multicore devices

    Directions for Multicore Software

    3

  • © 2009 Wind River Systems, Inc.

    Some Market Trends around Multicore12% Decline in single processor projects since 2006

    18% Increase in dual-processor based designs since 2006

    42% Percentage of embedded developers that say that chip technology will represent the most dramatic area change in embedded software development over the next 2-5 years

    34% Percentage of embedded developers saying that embedded development / design processes will change significantly in the next 2-5 years

    84% State that in-house code from previous projects is reused in new projects

    4

    Source: 2009 TechInsights Embedded Market Study

  • © 2009 Wind River Systems, Inc.

    Some Qualitative Observations

    5

    “We found that things were obscenely sensitive while we were trying to optimize the usage of our cache…”

    “It is very easy to write a slow multicore application and very hard to figure why it is slow.”

    “Software Engineers didn’t ask for multicore – it was forced on them…”

    “We are absolutely terrified about multicore and the challenges that parallelism and concurrency are introducing.

    We saw it coming, it just arrived faster than we anticipated…”

  • © 2009 Wind River Systems, Inc.

    Business Goals:How do I balance my marketgoals with my business constraints?

    • Low product cost – purchase and operational• Innovation versus quality versus TTM• Performance versus power consumption• Certification?

    Application Architecture:What is the best approach to meet

    design goals?

    • Reuse of software – is theexisting application suitable?• Is my middleware suitable?

    • Optimize for what?(Performance, re-use, TTM, …)

    Software Development and Test:

    What do I need to consider for multicore?

    • Software development lifecycle • New skills and tools

    “Time tested process in doubt?”• Debug multicore applications?

    System/Device Architecture: New technologies require new system architectures

    • What us the best or most appropriate configuration – SMP or AMP?

    • Partitioning and Offloading?• Fault Isolation and Recovery

    What new skills, processes and tools does my

    team need?

    Multicore Development Challenges

    6

  • © 2009 Wind River Systems, Inc.

    Wind River Multicore Software

    ToolsToolsPrototype

    Analyze

    Diagnose

    Test

    RuntimeRuntimeMulticore Aware

    Multi OS

    Flexible Config

    Ecosystem

    Customer ApplicationCustomer Application

    Only Wind River Provides…Choice of Leading Operating Systems – VxWorks, Wind River Linux

    Flexible multicore software configurations – SMP, AMP, Virtualization, other OS/executivesAdvanced tools to configure, debug, and optimize multicore/ multi-OS systems - Workbench

    7

  • © 2009 Wind River Systems, Inc.

    What about Edit-Build-Debug?

    8

    Edit-Build-DebugEdit-Build-Debug

    1961 – 1961 – Multicore EraMulticore Era

  • © 2009 Wind River Systems, Inc.

    Sample Client Configuration (uAMP1)

    P4080Core 0 Core 1 Core 2 Core 7

    Control/MgmtPlane

    Wind RiverPNE-LE 3.02 VxW 6.7

    User Plane

    Characteristics • Leverage existing applications• Direct driver access• Suitable schedules (Simics/Silicon)• Leverage WRLoad and MIPC technologies• Migration to optimal solution at appropriate time

    (technology/schedule)

    1 – Unsupervised AMP (not hypervisor/supervisor)2 – May run on only core 0 or one instance across core 0 and core 1

    VxW 6.7

    User Plane

    VxW 6.7

    User Plane

    ToolsToolsPrototypeAnalyze

    DiagnoseTest

    9

  • © 2009 Wind River Systems, Inc.

    RuntimeRuntime

    Multicore Software Prototype Capabilities

    ToolsToolsPrototypePrototype

    Analyze

    Diagnose

    Test

    Customer ApplicationCustomer Application

    Necessary for identifying the most suitable multicore configuration for Necessary for identifying the most suitable multicore configuration for the application and the project schedulethe application and the project schedule

    QEMUVxSim

    Simulation Partners

    Key Tools Capabilities•Assess the suitability of the software for multicore•Pre-silicon and throughout the lifecycle

    System Configuration

    10

  • © 2009 Wind River Systems, Inc.

    RuntimeRuntime

    Multicore Software Analysis Capabilities

    ToolsToolsPrototype

    AnalyzeAnalyze

    Diagnose

    Test

    Customer ApplicationCustomer Application

    Key Tools Capabilities•Tune performance•Identify livelocks and data race conditions•Measure core utilization•Optimize cache

    Event Views Profiler

    Core / Cache Utilization

    Essential for obtaining the insight needed to optimize performanceEssential for obtaining the insight needed to optimize performance

    11

  • © 2009 Wind River Systems, Inc.

    RuntimeRuntime

    Multicore Software Diagnosis Capabilities

    ToolsToolsPrototype

    Analyze

    DiagnoseDiagnose

    Test

    Customer ApplicationCustomer Application

    Key Tools Capabilities•Debug multiple contexts•System-level debugging•Profiling OCD/JTAG Debugger

    Agent Debugger

    Sensor Points

    Improve the effectiveness in isolating and repairing issuesImprove the effectiveness in isolating and repairing issues

    12

  • © 2009 Wind River Systems, Inc.

    RuntimeRuntime

    Multicore Software Test Capabilities

    ToolsToolsPrototype

    Analyze

    Diagnose

    TestTest

    Customer ApplicationCustomer Application

    Key Tools Capabilities•Reusable test assets•Automated testing throughout the lifecycle

    Unit Test Coverage

    Test Management

    Partners

    Lab Management

    Ensure that you are testing the right things as you repurpose your Ensure that you are testing the right things as you repurpose your software for multicoresoftware for multicore

    13

  • © 2009 Wind River Systems, Inc.14

    Multiple Context Debugging with Workbench

    Multiple Targets• One Wind River Workbench

    instance• Target manager• Multiple simultaneous

    connections includingshared connections

    • Multiple OS types supported simultaneously

    • Multiple target processors supported simultaneously

    Bay Networks

    Bay Networks

    Bay Networks

    FunctionProcessors

    ControlProcessors

    Multiple Contexts• Core, process, or thread• Each context has a set of views:

    • Source• Stack• Registers

    Processes/Threads• Qualify breakpoints on a

    process or specific thread• Stop the entire process or an

    individual thread

    Target boards may be any mix of physical, logical, or virtual boards and any mix of uP or SMP VxWorks and Wind River Linux - and bare metal sw.

    Host System Target System

    OCD Connection

    AgentConnection

  • © 2009 Wind River Systems, Inc.

    Visualize System Activity Over Time

    • Reveal complex interactions of tasks, threads, interrupts, and system objects

    • Detect deadlocks, starvation, and race conditions

    • Understand performance problems due to wrong priorities or resource contention

    • Essential for multi-core development

    System Viewer

  • © 2009 Wind River Systems, Inc.

    Optimize Performance

    • Find out where the CPU cycles are consumed• Find and eliminate performance bottlenecks• Low-overhead, non-intrusive• No instrumentation or recompilation of code required

    Performance Profiling

  • © 2009 Wind River Systems, Inc.

    Wind River On-Chip DebuggingFreescale Multicore Processor Support

    17

    MPC8641D MPC8572 QorIQ P2020 QorIQ P4080

    Workbench OCD version 2.6 and higher

    Workbench OCD version 3.0.2 and higher

    Workbench OCD version 3.1.1(available in July 2009)

    Targeted for Late 2009 introduction

    2 e600 coresUp to 1.5 GHz

    2 e500 coresUp to 1.5GHz

    2 e500 coresUp to 1.2 GHz

    8 e500mc coresUp to 1.5 GHz

    High-performance I/O for high-bandwidth, low-latency applications

    Computationally- intensive control plane processing with advanced content & security features.

    Balance of power- consumption and performance for data/control plane processing.

    High-performance, highly-integrated data plane, control, application-layer processing

    Wind River ICE 2 – A high-performance JTAG debug unit for Freescale multicore processors – current and future.

  • © 2009 Wind River Systems, Inc.

    Developing with Freescale QorIQ P2020 andWind River On-Chip Debugging

    QorIQ P2020 Key Attributes

    • Dual e500 cores running at up to 1.2 GHz

    • Good balance of performance and thermals for power-sensitive networking, telecom, military and industrial equipment

    • High single-threaded performance-per-watt effective suitable for control plane applications that also require data plane processing (i.e. Layer 2 baseband processing for wireless base stations)

    Wind River OCD Benefits

    • Visibility/Access to key on-chip data:

    – cache & memory– internal registers including dedicated

    security engine

    • Prototyping, diagnosis (debug), and test for a variety of core partitioning

    – SMP across both cores for optimal performance

    – AMP w/different OS on each core to guarantee critical function performance

    – One core for data plane, one core for control plan

    18

  • © 2009 Wind River Systems, Inc.

    Developing with Freescale QorIQ P4080 andWind River On-Chip Debugging

    QorIQ P4080 Key Attributes

    • Eight e500mc cores running at up to 1.5 GHz

    • High-performance, next-generation networking services within a low power envelope: enterprise & service provider routers, switches, BSC, RNC, ...

    • Consolidation of control, data path, and application layer processing on single device reducing board space and line card cost and power

    Wind River OCD Benefits

    • Visibility/Access to key on-chip data – on-chip registers– cache and memory– registers for security and pattern

    matching accelerators– performance and power monitoring

    registers– cross-correlated breakpoints

    • Future support for Aurora-based high-speed trace port

    – Wind River Trace 2 - optional external trace buffer supporting 8 channels

    – Nexus data & instruction trace– Event monitoring

    • Prototyping, diagnosis (debug), and test for a variety of core partitioning

    – Optimize performance for a variety of SMP and AMP configurations

    19

  • © 2009 Wind River Systems, Inc.

    Virtutech Simics® Key Characteristics

    20

    SIMICS® ADAPTATIVE SIMULATION PLATFORM

    Virtual Platform Models

    Firmware & Operating System

    Customer’ Application Stack

    Scripted API Eclipse API Co-Simulation Enterprise Integration

    Real-world equipment

    • High Performance High Performance – Fast and accurate enough for developers to run real system software loads

    • High Fidelity High Fidelity – Functionally accurate & software transparent• Full System Visibility Full System Visibility – Everything can be seen and modified• Run-to-Run Repeatable and Controllable Run-to-Run Repeatable and Controllable – Hardware state, IO streams & Time are re-

    playable.

    • CustomizableCustomizable – Any system can be virtualized

    Virtutech, Inc. Copyright ©2009. All Rights Reserved.

  • © 2009 Wind River Systems, Inc.

    Virtutech Simics and Wind River

    21

    SIMICS ADAPTATIVE SIMULATION PLATFORM

    Simics Virtual Platform for Freescale QorIQ P4080

    Wind River VxWorks SMP/AMP, Linux, Hypervisor

    App

    #1

    Core 4Core 1

    Core 0

    Scripted API Eclipse API Co-Simulation

    Enterprise Integration

    Virtutech, Inc. Copyright ©2009. All Rights Reserved.

    WorkbenchCore 4

    Connect via WR Debug Agent

    Connect via WR/Simics Debugger

    Integration

    App

    #2

    App

    #3

    App

    #4

    App

    #5

    App

    #6

    App

    #7

    App

    #8

    Customer Application Stacks

  • © 2009 Wind River Systems, Inc.

    Wind River and the Simics P4080 Virtual Platform

    • Wind River began porting VxWorks to the P4080 architecture 18 months prior to P4080 silicon availability

    • Within 2 months of receiving the Simics P4080 Virtual Platform, Wind River was able to demo VxWorks running on the P4080

    • Used it to develop VxWorks SMP and Wind River Hypervisor

    • Used it to debug & test multi-core aspects of VxWorks and Hypervisor– Leveraged reverse execution– Leveraged checkpointing– Leveraged visibility and control of internal device states– Leveraged ability to stretch/compress virtual time to force abnormal timing conditions

    Virtutech’s Virtual Systems Development solution has provided internal Virtutech’s Virtual Systems Development solution has provided internal benefits to Wind River and external benefits to Freescale customers benefits to Wind River and external benefits to Freescale customers

    adopting the QorI! P4080adopting the QorI! P4080

  • © 2009 Wind River Systems, Inc.

    Development Tools Directions for Multicore Software

    • Advanced debugger capabilities for IPC

    • Advanced performance analysis and monitors

    • Virtual Systems Development to streamline the development lifecycle

    23

  • © 2009 Wind River Systems, Inc.

    Thank you!

    • Additional resources can be found on Wind River.com Multicore Solutions Page

    http://www.windriver.com/announces/do-more-with-less/

    Wind River On-Chip Debugging Pagehttp://www.windriver.com/products/OCD/freescale/

    Wind River Workbenchhttp://www.windriver.com/products/workbench/

    24

    http://www.windriver.com/announces/do-more-with-less/http://www.windriver.com/announces/do-more-with-less/http://www.windriver.com/announces/do-more-with-less/http://www.windriver.com/products/OCD/freescale/http://www.windriver.com/products/OCD/freescale/http://www.windriver.com/products/OCD/freescale/http://www.windriver.com/products/OCD/freescale/http://www.windriver.com/products/OCD/freescale/http://www.windriver.com/products/workbench/http://www.windriver.com/products/workbench/http://www.windriver.com/products/workbench/

  • © 2009 Wind River Systems, Inc.

  • © 2009 Wind River Systems, Inc.

    BACKUP SLIDES

    26

  • © 2009 Wind River Systems, Inc.

    Market DemandsBusiness Constraints

    • Time-to-market pressure• Price erosion• Fewer resources• Lower cost

    Business Constraints• Increased functionality• Smaller packaging• Higher reliability• Lower operations cost (power)

    Market Demands

    27

    Business & Market Paradox

  • © 2009 Wind River Systems, Inc.28

    Multicore’s Business Potential

    • Optimized Device Config• Offloading

    fast packet forwarding rendering crypto, …

    • ‘True’ Parallel Processing• Load Balancing• Higher Robustness

    Performance Gains• Hardware Consolidation• Smaller Form Factor

    Reduced space weight power

    • Increased Re-use• Improved TCO

    Lowered OPEX/CAPEX

    Lower Costs• Less Hardware

    transition from multiprocessing to multicore

    • Improved Power Management• Dynamic Capacity Monitoring

    Reduced Power

    Multicore Software Platform Benefits

  • © 2009 Wind River Systems, Inc.

    29

    Software Configurations

    Core 1

    OS

    Core 2

    SMP

    Virtualization

    CPU

    OS OS

    Hypervisor

    OS

    Supervisor

    Core 2Core 1

    Supervised AMP

    OS

    CPU

    OS

    Single Core

    Multicore

    “Traditional”

    29

    Hypervisor, Virtualization, and Supervisor are used almost interchangeably

  • © 2009 Wind River Systems, Inc.

    Solution: Runtime Support

    30

    Operating System Choices

    SMP, AMP, and Virtualization

    Inter-core Communications

    Distributed Shared Memory / MIPC

    Scalable Virtualization Support Multicore Enabled Networking

    Linux SMP/AMP

    VxWorks SMP/AMP

    Other or None

    Fully Virtualized “Virtual Boards”

    Virtualized Shared Devices

    Fault Isolation

    Loader

  • © 2009 Wind River Systems, Inc.

    Runtime Platform

    Multicore Software Platform Example

    Multicore Processor (4, 8, 16+ cores)Core 0 Core 1 Core 2 Core n

    Control Plane

    Wind RiverLinux WRE

    Processing Engine

    (WR HWOF)

    Wind River Hypervisor (as Supervisor)

    WRE

    Processing Engine

    (WR HWOF)

    WRE

    Processing Engine

    (WR HWOF)

    Characteristics • Performance focused• Scalable Protection via supervisor• Multicore of 4+ cores• System partitioned

    - Control Plane- Data Plane (with or w/o offload)

    Network EquipmentSemi Integration & Benefits• WRE would integrate semi’s “bare

    metal” executives – Cavium SE SDK, RMI RmiOS SDK, FSL LWE SDK, etc.

    • Provides easy migration given API compatability

    31

  • © 2009 Wind River Systems, Inc.

    What is Simics?

    Virtutech Simics

    Virtual System

    32

    Simics - an adaptive simulation platform that enable customers to define, develop and deploy electronics systems more efficiently

    using full system simulation

  • © 2009 Wind River Systems, Inc.

    Virtutech Simics® Key Characteristics

    33

    SIMICS® ADAPTATIVE SIMULATION PLATFORM

    Virtual Platform Models

    Firmware & Operating System

    Customer’ Application Stack

    Scripted API Eclipse API Co-Simulation Enterprise Integration

    Real-world equipment

    • High Performance – Fast and accurate enough for developers to run real system software loads

    • High Fidelity – Functionally accurate & software transparent• Full System Visibility – Everything can be seen and modified• Run-to-Run Repeatable and Controllable – Hardware state, IO streams & Time are re-

    playable.

    • Customizable – Any system can be virtualized

    Virtutech, Inc. Copyright ©2009. All Rights Reserved.

  • © 2009 Wind River Systems, Inc.34

    PowerPoint PresentationAbstractAgendaSome Market Trends around MulticoreSome Qualitative ObservationsSlide 6Wind River Multicore SoftwareWhat about Edit-Build-Debug?Sample Client Configuration (uAMP1)Multicore Software Prototype CapabilitiesMulticore Software Analysis CapabilitiesMulticore Software Diagnosis CapabilitiesMulticore Software Test CapabilitiesMultiple Context Debugging with WorkbenchVisualize System Activity Over TimeOptimize PerformanceWind River On-Chip Debugging Freescale Multicore Processor SupportDeveloping with Freescale QorIQ P2020 and Wind River On-Chip DebuggingDeveloping with Freescale QorIQ P4080 and Wind River On-Chip DebuggingVirtutech Simics® Key CharacteristicsVirtutech Simics and Wind RiverWind River and the Simics P4080 Virtual PlatformDevelopment Tools Directions for Multicore SoftwareThank you!Slide 25BACKUP SLIDESSlide 27Slide 28Software ConfigurationsSolution: Runtime SupportMulticore Software Platform ExampleWhat is Simics?Slide 33Slide 34