An Introduction to Asymmetric Multiprocessing: when this architecture can be a game changer and how to survive it.

Similar documents
i.mx 7 - Hetereogenous Multiprocessing Architecture

Software Design Challenges for heterogenic SOC's

HKG : OpenAMP Introduction. Wendy Liang

Making Full use of Emerging ARM-based Heterogeneous Multicore SoCs

Development of Real-Time Systems with Embedded Linux. Brandon Shibley Senior Solutions Architect Toradex Inc.

Getting Started with FreeRTOS BSP for i.mx 7Dual

Multicore platform towards automotive safety challenges

Heterogeneous multi-processing with Linux and the CMSIS-DSP library

Heterogeneous Software Architecture with OpenAMP

LAS16-TR06 Remoteproc & rpmsg development. Bjorn Andersson

Use ZCU102 TRD to Accelerate Development of ZYNQ UltraScale+ MPSoC

Designing with NXP i.mx8m SoC

Designing, developing, debugging ARM Cortex-A and Cortex-M heterogeneous multi-processor systems

Real-Timeness and System Integrity on a Asymmetric Multi Processing configuration

FTF-CON-F0403. An Introduction to Heterogeneous Multiprocessing (ARM Cortex -A + Cortex- M) on Next-Generation i.mx Applications Processors

Partitioning of computationally intensive tasks between FPGA and CPUs

VORAGO VA108x0 GCC IDE application note

Simplifying the Development and Debug of 8572-Based SMP Embedded Systems. Wind River Workbench Development Tools

OpenAMP Discussion - Linaro2018HK. Copyright 2018 Xilinx

Postmortem Debugging with Coresight HKG18-TR14. Leo Yan, Linaro Support and Solutions Engineering

RN2483_Silica Documentation

Asymmetric MultiProcessing for embedded vision

Profiling and Debugging OpenCL Applications with ARM Development Tools. October 2014

Working with Cortex-M4 on i.mx7 Dual

BlazePPS (Blaze Packet Processing System) CSEE W4840 Project Design

Aport-212PG Programmable Device Server User Guide

esi-risc Development Suite Getting Started Guide

No Crash Dump? No Problem! Light-weight remote kernel crash reporting for settop boxes

MCUXpresso IDE User Guide. Rev November, 2018

BeagleLogic Documentation

Efficient and Large Scale Program Flow Tracing in Linux. Alexander Shishkin, Intel

Intel SoC FPGA Embedded Development Suite User Guide

Building a reference IoT product with Zephyr. Ricardo Salveti Michael Scott Tyler Baker

EMBEDDED LINUX ON ARM9 Weekend Workshop

Simulation Based Analysis and Debug of Heterogeneous Platforms

NI Linux Real-Time. Fanie Coetzer. Field Sales Engineer SA North. ni.com

Parallella Linux - quickstart guide. Antmicro Ltd

Imperas Guide to using Virtual Platforms. Platform / Module Specific Information for mips.ovpworld.org / BareMetalMipsSingle. Imperas Software Limited

Kexec: Soft-Reboot and Crash-Dump Analysis for Linux and Xen

Altera SoC Embedded Design Suite User Guide

Leverage Vybrid's asymmetrical multicore architecture for real-time applications by Stefan Agner

Engineer-to-Engineer Note

A unified multicore programming model

Operating Systems Course 2 nd semester 2016/2017 Chapter 1: Introduction

WearDrive: Fast and Energy Efficient Storage for Wearables

CS 261 Fall Mike Lam, Professor. Virtual Memory

MCUXpresso IDE Installation Guide. Rev November, 2017 User guide

Here to take you beyond. ECEP Course syllabus. Emertxe Information Technologies ECEP course syllabus

SOMNIUM DRT Benchmarks Whitepaper DRT v3.4 release : August 2016

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edit9on

OpenAMP Framework Getting Started Guide Mentor Graphics Corporation All rights reserved.

CS Operating Systems

Using Industry Standards to Exploit the Advantages and Resolve the Challenges of Multicore Technology

Introduction. What is an Operating System? A Modern Computer System. Computer System Components. What is an Operating System?

10 Steps to Virtualization

Building CircuitPython

Real Safe Times in the Jailhouse Hypervisor Unrestricted Siemens AG All rights reserved

SE300 SWE Practices. Lecture 10 Introduction to Event- Driven Architectures. Tuesday, March 17, Sam Siewert

Using To talk with. Remote Cores. Ohad Ben-Cohen

Breaking the Boundaries in Heterogeneous-ISA Datacenters

Introducing The Lab in a Box Concept ELC-E Prague, October 2017 Patrick Titiano - Kevin Hilman, Baylibre.

Intel SoC FPGA Embedded Development Suite (SoC EDS) Release Notes

MCUXpresso SDK USB Stack User s Guide

Getting Started with MCUXpresso SDK

Outline Background Jaluna-1 Presentation Jaluna-2 Presentation Overview Use Cases Architecture Features Copyright Jaluna SA. All rights reserved

SBC-S32V234 QUICK START GUIDE (QSG)

Installation and Quick Start of isystem s winidea Open in DAVE. Tutorial Version 1.0, May, 2014

Getting Started with DS-MDK. Create Applications for Heterogeneous ARM Cortex -A/Cortex-M Devices

Red Suite 4 Getting Started. Applies to Red Suite 4.22 or greater

Department of Computer Science, Institute for System Architecture, Operating Systems Group. Real-Time Systems '08 / '09. Hardware.

System Wide Tracing User Need

Kinetis SDK Freescale Freedom FRDM-KL03Z Platform User s Guide

Using a Hypervisor to Manage Multi-OS Systems Cory Bialowas, Product Manager

Growth outside Cell Phone Applications

Freescale Semiconductor Inc. Vybrid DS-5 Getting Started Guide Rev 1.0

Frequently Asked Questions

MYD-C437X-PRU Development Board

GET STARTED FAST WITH THIS COMPREHENSIVE ENABLEMENT OFFERING FOR LPC800 MCUS

Bare Metal User Guide

Engineer-to-Engineer Note

Working with Cortex-M4 on i.mx6 SoloX COM Board

Linux Kernel on RISC-V: Where do we stand?

Atmel Studio IDE for RIO-2015PG User Guide

Nios II Embedded Design Suite Release Notes

Track One Building a connected home automation device with the Digi ConnectCore Wi-i.MX51 using LinuxLink

突破 8-/16-/32- 位和 DSP 界限的 ARM MCU 解决方案

CANvu 355 & VeeCAN 320 SDK

EMBEDDED SYSTEMS WITH ROBOTICS AND SENSORS USING ERLANG

Imperas Guide to using Virtual Platforms. Platform / Module Specific Information for imperas.ovpworld.org / ArmuKernelDual. Imperas Software Limited

Introduction to Operating Systems

An Introduction to Android. Jason Chen Developer Advocate Google I/O 2008

Wind River. All Rights Reserved.

μc/probe on the element14 BeagleBone Black

Performance Optimization for an ARM Cortex-A53 System Using Software Workloads and Cycle Accurate Models. Jason Andrews

Optional Eclipse Workspace Configurations

Accelerating NVMe-oF* for VMs with the Storage Performance Development Kit

Kinetis SDK v Release Notes for KV5x Derivatives

Copyright 2014 Xilinx

Using the i.mxrt L1 Cache

Software Quality is Directly Proportional to Simulation Speed

Transcription:

An Introduction to Asymmetric Multiprocessing: when this architecture can be a game changer and how to survive it. Nicola La Gloria, Laura Nao Kynetics LLC Santa Clara, California

Hybrid Architecture: warpx.io The Hybrid Design Architecture (HDA) combines the power of an application processor with the ease-of-use of micro-controllers.

Software on warpx HDA

SMP vs AMP SMP on homogeneous architectures: App OS Kernel SMP... Core N Core 1 Single OS controlling two or more identical cores sharing system resources Dynamic scheduling and load balancing App

SMP vs AMP AMP on heterogeneous architectures: App Task OS Task OS/RTOS MCAPI... Core N Core 1 Different OS on each core --> full-featured OS alongside a real-time kernel Inter processor communication protocol Efficient when the application can be statically partitioned across cores - high performance is achieved locally App

Supervised vs Not Supervised Strong isolation Hides non-trivial AMP details (e.g. resource assignment, inter-core communication) Security and robustness Overhead of a software layer Achieve best performances by running natively Boot sequence complexity Harder to debug

Interprocessor Communication

NXP i.mx7 overview Cortex-A7 core + Cortex-M4 core Master - Slave architecture A7 is the master M4 is the slave Inter processor communication MU - Messaging Unit RPMsg component (OpenAMP framework) Safe sharing of resources RDC - Resource Domain Controller

NXP i.mx7 - RDC

NXP i.mx7 IPC - MU

MAC (VirtIO)

The OpenAMP framework - RPMsg

RPMsg on Linux

Hybrid Linux/FreeRTOS Demo Demo Goal: IMU sensor (I2C) read by MCU task Calculate objective function (module of acc, mag, gyro vectors) Log/plot sensor samples on MPU Safely recover from a kernel panic Hardware Setup Boundary Devices Nitrogen 7, Toradex Colibri i.mx7 SOM NXP i.mx7d processor - ARM dual Cortex-A7 + ARM Cortex-M4 Segger J-Link Probe

Cortex M4 Bring Up (1) Environment setup: Download FreeRTOS sources https://github.com/boundarydevices/freertos-boundary.git Download GNU ARM Embedded Toolchain https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/download Example applications for Cortex-M4 are located in the examples/imx7d_nitrogen7_m4/ folder Scripts for building both debug and release binaries are available in the armgcc subfolder

Cortex M4 Bring Up (2) M4 Binary application can be loaded on the Cortex-M4 in different ways: U-Boot - ums gadget + m4update using remoteproc framework (linux userspace) using imx-m4fwloader from NXP (linux userspace): https://github.com/codeauroraforum/imx-m4fwloader M4 code can be linked and loaded to one of the following: TCM - 32KB (preferred) OCRAM - 32KB DDR - up to 1MB QSPI Flash - 128KB

IDE Setup Eclipse for C/C+ GNU MCU Eclipse : plugins and tools for embedded ARM development https://marketplace.eclipse.org/content/gnu-mcu-eclipse GDB J-Link scripts for imx7d for debugging both Cortex-A7 cores and Cortex-M4 https://wiki.segger.com/imx7d FreeRTOS Kernel Awareness plugin from NXP http://freescale.com/lgfiles/updates/eclipse/kds ARM DS-5 (not free) Sourcery Codebench (not free)

Workbench Break points (MCU) code MPU console FreeRTOS kernel awareness MCU console

Demo Parameters Remote core: Sample IMUs every 10ms Calculate the objective function on MCU (module of vectors) Buffer of 300 elements = 3Kb (stored TCM Memory only 32 Kb) Items (12 byte each) are dequeued and sent to master 10 at a time every 100 ms Master core: Master reads incoming samples by polling the character device

Architecture Overview Linux 4.9 start_cmd, stop_cmd, heartbeat FreeRTOS 1.0.1

The OpenAMP framework - RPMsg

Control Flow (2 cores) rpmsg_char_client Data sender task Register rpmsg char driver + probe Channel created Master is dead open /dev/rpmsg0 close /dev/rpmsg0 start_cmd Master heartbeat read /dev/rpmsg0 S0 RPMsg channel is down S1 RPMsg channel is up, /dev/rpmsg0 is created S2 RPMsg channel is up, endpoint created, data is dumped into a log file stop_cmd S0 RPMsg channel is down S1 RPMsg channel is up (sampling IMU sensor, buffering data) S2 RPMsg channel is up, sending data to master core, (sampling IMU sensor, buffering data),

What if Linux Kernel Panics Kexec: system call to load and boot into another kernel from the currently running kernel (4.9.74). crashkernel=128m [normal kernel cmdline] irqpoll, nosmp, reset_devices [crash kernel cmdline] --load-panic option Kdump: Linux mechanism to dump machine memory content on kernel panic. Kexec/Kdump support on ARM platforms is still experimental

Video of the Demo VIDEO

Pitfalls Before announcing the remote service, MCU checks whether master is up. If notification arrives too early (virtqueue kick function call) when booting crash kernel the system might hang Sometimes kexec still hangs and fails to soft-reboot - more frequent when streaming continuously instead of sending data bursts (but we don t know why)

References OpenAMP project page: https://github.com/openamp/ Asymmetric multiprocessing and embedded linux (ELC 2017): https://elinux.org/images/3/3b/novak_cervenka.pdf Mantainers: Open-amp: Wendy Liang RPMsg (Linux) Ohad Ben-Cohen Bjorn Andersson Kexec (Linux) Eric Biederman Kdump (Linux) Dave Young Baoquan He

Q/A