Developing Multicore is Easy, If…

Freescale Technical Forum - Summer 2009

Emeka Nwafor Director, Product Management Development Tools

© 2009 , 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 Multicore 12% 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

Source: 2009 TechInsights Embedded Market Study

4 © 2009 Wind River Systems, Inc. Some Qualitative Observations

“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…” 5

© 2009 Wind River Systems, Inc. Multicore Development Challenges

System/Device Architecture: Application Architecture: New technologies require new system What is the best approach to meet architectures design goals?

• What us the best or most appropriate • Reuse of software – is the configuration – SMP or AMP? existing application suitable? • Partitioning and Offloading? • Is my middleware suitable? • Fault Isolation and What new skills, • Optimize for what? Recovery processes and (Performance, re-use, TTM, …) tools does my Business Goals: team need? Software Development How do I balance my market and Test: goals with my business constraints? What do I need to consider for multicore? • Low product cost – purchase and operational • Software development lifecycle • Innovation versus quality versus TTM • New skills and tools • Performance versus power consumption “Time tested process in doubt?” • Certification? • Debug multicore applications?

6 © 2009 Wind River Systems, Inc. Wind River Multicore Software

CustomerCustomer ApplicationApplication

RuntimeRuntime ToolsTools

Multicore Aware Prototype

Multi OS Analyze

Flexible Config Diagnose

Ecosystem Test

Only Wind River Provides… Choice of Leading Operating Systems – VxWorks, Wind River Linux Flexible multicore software configurations – SMP, AMP, Virtualization, other OS/executives Advanced tools to configure, debug, and optimize multicore/ multi-OS systems - Workbench

7 © 2009 Wind River Systems, Inc. What about Edit-Build-Debug?

Edit-Build-Debug

1961 – Multicore Era

8 © 2009 Wind River Systems, Inc. Sample Client Configuration (uAMP1)

ToolsTools Control/Mgmt Plane User Plane User Plane User Plane Prototype Wind River PNE-LE 3.02 VxW 6.7 VxW 6.7 VxW 6.7 Analyze

Core 0 Core 1 Core 2 Core 7 Diagnose P4080 Test

Characteristics • Leverage existing applications • Direct driver access • Suitable schedules (/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

9 © 2009 Wind River Systems, Inc. Multicore Software Prototype Capabilities

CustomerCustomer ApplicationApplication

Key Tools Capabilities System Configuration •Assess the suitability RuntimeRuntime ToolsTools of the software for VxSim QEMU Prototype multicore Simulation Partners •Pre-silicon and Analyze throughout the lifecycle Diagnose

Test

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

10 © 2009 Wind River Systems, Inc. Multicore Software Analysis Capabilities

CustomerCustomer ApplicationApplication

Key Tools Capabilities •Tune performance RuntimeRuntime ToolsTools •Identify livelocks and Prototype data race conditions Event Views Profiler Analyze •Measure core Core / Cache Utilization utilization Diagnose •Optimize cache Test

Essential for obtaining the insight needed to optimize performance

11 © 2009 Wind River Systems, Inc. Multicore Software Diagnosis Capabilities

CustomerCustomer ApplicationApplication

Key Tools Capabilities •Debug multiple RuntimeRuntime ToolsTools contexts Prototype •System-level debugging Analyze Agent Debugger •Profiling OCD/JTAG Debugger Diagnose Sensor Points Test

Improve the effectiveness in isolating and repairing issues

12 © 2009 Wind River Systems, Inc. Multicore Software Test Capabilities

CustomerCustomer ApplicationApplication

Key Tools Capabilities •Reusable test assets RuntimeRuntime ToolsTools •Automated testing Prototype throughout the lifecycle Analyze

Diagnose Unit Test Coverage Test Test Management

Lab Management

Partners

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

13 © 2009 Wind River Systems, Inc. Multiple Context Debugging with Workbench

Host System Target System Multiple Targets

Bay Networks • One Wind River Workbench Agent instance Connection Control • Target manager Processors • Multiple simultaneous connections including shared connections

• Multiple OS types supported Bay Networks simultaneously • Multiple target processors supported simultaneously Function Processors Multiple Contexts OCD Connection • Core, process, or thread Bay Networks • Each context has a set of views: • Source • Stack • Registers

Processes/Threads • Qualify breakpoints on a Target boards may be any mix of physical, logical, or process or specific thread • Stop the entire process or an virtual boards and any mix of uP or SMP VxWorks and individual thread Wind River Linux - and bare metal sw.

14 © 2009 Wind River Systems, Inc. Visualize System Activity Over Time System Viewer

• 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

© 2009 Wind River Systems, Inc. Optimize Performance Performance Profiling • Find out where the CPU cycles are consumed • Find and eliminate performance bottlenecks • Low-overhead, non-intrusive • No instrumentation or recompilation of code required

© 2009 Wind River Systems, Inc. Wind River On-Chip Debugging Freescale Multicore Processor Support

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

Workbench OCD Workbench OCD Workbench OCD Targeted for Late version 2.6 and version 3.0.2 and version 3.1.1 2009 introduction higher higher (available in July 2009)

2 e600 cores 2 e500 cores 2 e500 cores 8 e500mc cores Up to 1.5 GHz Up to 1.5GHz Up to 1.2 GHz Up to 1.5 GHz High-performance I/O Computationally- Balance of power- High-performance, for high-bandwidth, intensive control consumption and highly-integrated data low-latency plane processing performance for plane, control, applications with advanced data/control plane application-layer content & security processing. processing features.

17 © 2009 Wind River Systems, Inc. Developing with Freescale QorIQ P2020 and Wind River On-Chip Debugging

QorIQ P2020 Key Attributes Wind River OCD Benefits

• Dual e500 cores running at up to • Visibility/Access to key on-chip 1.2 GHz data: – cache & memory • Good balance of performance and – internal registers including dedicated thermals for power-sensitive security engine networking, telecom, military and industrial equipment • Prototyping, diagnosis (debug), and test for a variety of core • High single-threaded partitioning performance-per-watt effective – SMP across both cores for optimal suitable for control plane performance applications that also require data – AMP w/different OS on each core to guarantee critical function plane processing (i.e. Layer 2 performance baseband processing for wireless – One core for data plane, one core for base stations) control plan

18 © 2009 Wind River Systems, Inc. Developing with Freescale QorIQ P4080 and Wind River On-Chip Debugging

QorIQ P4080 Key Attributes Wind River OCD Benefits

• Eight e500mc cores running at up to • Visibility/Access to key on-chip data 1.5 GHz – on-chip registers – cache and memory • High-performance, next-generation – registers for security and pattern networking services within a low power matching accelerators envelope: enterprise & service provider routers, switches, BSC, – performance and power monitoring RNC, ... registers – cross-correlated breakpoints • Consolidation of control, data path, and application layer processing on single • Future support for Aurora-based device reducing board space and line high-speed trace port card cost and power – 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

• 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

Customer’ Application Stack Real-world equipment Firmware & Operating System

Virtual Platform Models

SIMICS® ADAPTATIVE SIMULATION PLATFORM

Scripted API Eclipse API Co-Simulation Enterprise Integration

20 Virtutech, Inc. Copyright ©2009. All Rights Reserved. © 2009 Wind River Systems, Inc. Virtutech Simics and Wind River

Connect via WR Debug Agent Customer Application Stacks App App App App App App App App

#1 #2 #3 #4 #5 #6 #7 #8 Wind River VxWorks SMP/AMP, Linux, Hypervisor

Simics Virtual Platform for Core 4 Core 1 Core 0 Freescale QorIQ P4080 Core 4 Workbench

SIMICS ADAPTATIVE SIMULATION PLATFORM

Scripted API Eclipse API Co- Enterprise Simulation Integration Connect via WR/Simics Debugger Integration

21 Virtutech, Inc. Copyright ©2009. All Rights Reserved. © 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 benefits to Wind River and external benefits to Freescale customers adopting 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 Page http://www.windriver.com/products/OCD/freescale/

 Wind River Workbench http://www.windriver.com/products/workbench/

24 © 2009 Wind River Systems, Inc. © 2009 Wind River Systems, Inc. BACKUP SLIDES

26 © 2009 Wind River Systems, Inc. Business & Market Paradox

Business Constraints Market Demands

Business Constraints Market Demands • Time-to-market pressure • Increased functionality • Price erosion • Smaller packaging • Fewer resources • Higher reliability • Lower cost • Lower operations cost (power)

© 2009 Wind River Systems, Inc. 27 Multicore’s Business Potential

Performance Gains Lower Costs Reduced Power

• Optimized Device Config • Hardware Consolidation • Less Hardware • Offloading • Smaller Form Factor  transition from  fast packet forwarding  Reduced space multiprocessing to  rendering  weight multicore  crypto, …  power • Improved Power • ‘True’ Parallel Processing • Increased Re-use Management • Load Balancing • Improved TCO • Dynamic Capacity • Higher Robustness  Lowered OPEX/CAPEX Monitoring

Multicore Software Platform Benefits

28 © 2009 Wind River Systems, Inc. Software Configurations

“Traditional” Virtualization

OS OS OS Hypervisor Single Core CPU CPU

SMP Supervised AMP

Multicore OS OS OS Core 1 Core 2 Supervisor Core 1 Core 2

Hypervisor, Virtualization, and Supervisor are used almost interchangeably 29 © 2009 Wind River Systems, Inc. 29 Solution: Runtime Support

Operating System Choices Inter-core Communications

Linux SMP/AMP

VxWorks SMP/AMP

Other or None

SMP, AMP, and Virtualization Distributed Shared Memory / MIPC

Scalable Virtualization Support Multicore Enabled Networking

Fully Virtualized “Virtual Boards”

Virtualized Shared Devices Fault Isolation Loader

© 2009 Wind River Systems, Inc. 30 Multicore Software Platform Example Network Equipment

Characteristics Semi Integration & Benefits • Performance focused • WRE would integrate semi’s “bare • Scalable Protection via supervisor metal” executives – Cavium SE SDK, • Multicore of 4+ cores RMI RmiOS SDK, FSL LWE SDK, etc. • System partitioned • Provides easy migration given API - Control Plane compatability - Data Plane (with or w/o offload)

Control Processing Processing Processing Plane Engine Engine Engine (WR HWOF) (WR HWOF) (WR HWOF) Wind River Linux WRE WRE WRE Wind River Hypervisor (as Supervisor)

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

31 © 2009 Wind River Systems, Inc. What is Simics?

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

Virtutech Simics

Virtual System

© 2009 Wind River Systems, Inc. 32 Virtutech Simics® Key Characteristics

• 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

Customer’ Application Stack Real-world equipment Firmware & Operating System

Virtual Platform Models

SIMICS® ADAPTATIVE SIMULATION PLATFORM

Scripted API Eclipse API Co-Simulation Enterprise Integration

33 Virtutech, Inc. Copyright ©2009. All Rights Reserved. © 2009 Wind River Systems, Inc. 34 © 2009 Wind River Systems, Inc.