i.mx 7 - Hetereogenous Multiprocessing Architecture

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

Getting Started with FreeRTOS BSP for i.mx 7Dual

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

Software Design Challenges for heterogenic SOC's

Designing with NXP i.mx8m SoC

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

SOM PRODUCTS BRIEF. S y s t e m o n M o d u l e. Engicam. SOMProducts ver

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

EMBEDDED SYSTEMS WITH ROBOTICS AND SENSORS USING ERLANG

Use ZCU102 TRD to Accelerate Development of ZYNQ UltraScale+ MPSoC

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

Kinetis KE1xF512 MCUs

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

DevKit7000 Evaluation Kit

HKG : OpenAMP Introduction. Wendy Liang

AT-501 Cortex-A5 System On Module Product Brief

Software Driven Verification at SoC Level. Perspec System Verifier Overview

Designing a Multi-Processor based system with FPGAs

Introduction to Sitara AM437x Processors

Freescale i.mx6 Architecture

MYD-IMX28X Development Board

Apalis A New Architecture for Embedded Computing

MYD-Y6ULX Development Board

MYC-C7Z010/20 CPU Module

The Rapid Development Platform

SAM A5 ARM Cortex - A5 MPUs

MYD-C7Z010/20 Development Board

Kontron s ARM-based COM solutions and software services

MYD-IMX28X Development Board

Developing a simple UVC device based on i.mx RT1050

64 bit Bare Metal Programming on RPI-3. Tristan Gingold

Introduction to L.A.P. 1

Embedded HW/SW Co-Development

Kinetis SDK Release Notes for the TWR-K24F120M Tower System Module

S32 SDK for Power Architecture Release Notes Version EAR

Dramatically Accelerate 96Board Software via an FPGA with Integrated Processors

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

MYC-C437X CPU Module

Asymmetric MultiProcessing for embedded vision

Enabling IoT OSs for Intel Quark MCU Platforms: the fast way. OpenIoT Summit Europe Andre Guedes

Product Technical Brief S3C2416 May 2008

Advanced Embedded Systems

Heterogeneous Software Architecture with OpenAMP

The industrial technology is rapidly moving towards ARM based solutions. Keeping this in mind, we are providing a Embedded ARM Training Suite.

Version History. V1.0 Original Version 1 / 13

Measuring Interrupt Latency

Developing a Camera Application with i.mx RT Series

SABRE Board for Smart Devices

Extending Fixed Subsystems at the TLM Level: Experiences from the FPGA World

Designing Multi-Channel, Real-Time Video Processors with Zynq All Programmable SoC Hyuk Kim Embedded Specialist Jun, 2014

OpenAMP Discussion - Linaro2018HK. Copyright 2018 Xilinx

MYD-JA5D2X Development Board

Introduction to Embedded System Design using Zynq

«Real Time Embedded systems» Cyclone V SOC - FPGA

Copyright 2016 Xilinx

Zynq-7000 All Programmable SoC Product Overview

Your Strategic Partner for Renesas RZ/G1x Products & Solutions

Designing with STM32F2x & STM32F4

Simplify rich applications & hard real-time

Microprocessor Systems

STM32F7 series ARM Cortex -M7 powered Releasing your creativity

Product Technical Brief S3C2413 Rev 2.2, Apr. 2006

HOW TO INTEGRATE NFC CONTROLLERS IN LINUX

w w w. b a s e t r a i n i n g i n s t i t u t e. c o

Embest SOC8200 Single Board Computer

pcduino V3B XC4350 User Manual

Low-Cost Microcontrollers

Zatara Series ARM ASSP High-Performance 32-bit Solution for Secure Transactions

XMC-ZU1. XMC Module Xilinx Zynq UltraScale+ MPSoC. Overview. Key Features. Typical Applications

30-Mar What's New in SDK V Highlights

ARM Cortex core microcontrollers 3. Cortex-M0, M4, M7

Full Linux on FPGA. Sven Gregori

arm MULTICORE PLATFORMS FOR ADVANCED APPLICATIONS Product Longevity

Product Technical Brief S3C2440X Series Rev 2.0, Oct. 2003

DevKit8500D Evaluation Kit

MYD-SAMA5D3X Development Board

MQX -celeration RTOS-integrated solutions

Power Consumption and Measurement of i.mx RT1020

MYD-C437X-PRU Development Board

TEVATRON TECHNOLOGIES PVT. LTD Embedded! Robotics! IoT! VLSI Design! Projects! Technical Consultancy! Education! STEM! Software!

Simulation Based Analysis and Debug of Heterogeneous Platforms

Quick Start Guide Multisensory Enablement Kit i.mx 8QuadXPlus MEK CPU Board. Based on i.mx 8QuadXPlus Applications Processor

ARM Cortex-A9 ARM v7-a. A programmer s perspective Part1

Introduction to ARM LPC2148 Microcontroller

EMAC SoM Presentation

Over 350M i.mx SOCs shipped to date Over 92M i.mx shipped in vehicles since 2007 #1 in Auto Infotainment Applications Processors

Get Started SUPPORT WARRANTY. Visit the i.mx community at

EMBEDDED SYSTEMS READY TO USE LECTURE MATERIALS FOR UNDERGRADUATES

The IoT and Thread in PHYTEC Nodes. Jonas Remmert July 15th, 2016

Kinetis SDK v Release Notes for the MK21DA5 and MKW24D5 Devices

STM32MP1 Microprocessor Continuing the STM32 Success Story. Press Presentation

Product Technical Brief S3C2412 Rev 2.2, Apr. 2006

Cookie User Manual. For NuMicro Edition 1.0. Rev. 1.0 Release: forum.coocox.org.

Values and history. Engicam is an italian company based in Scandicci (Florence), entirely debt-free and wholly managed by the owners.

Making Full use of Emerging ARM-based Heterogeneous Multicore SoCs

Freescale Kinetis Software Development Kit Release Notes

Design Choices for FPGA-based SoCs When Adding a SATA Storage }

EDJE PROJECT. The Software Foundation for IoT Devices. IS2T S.A All rights reserved.

Reducing Time-to-Market with i.mx6-based Qseven Modules

Working with Cortex-M4 on i.mx7 Dual

Transcription:

i.mx 7 - Hetereogenous Multiprocessing Architecture

Overview Toradex Innovative Business Model Independent Companies Direct Sales Publicly disclosed Sales Prices Local Warehouses In-house HW and SW Development Free Support by the Developers 10+ Year Product Life Cycle 23.05.16 2

Toradex Product Families Two complementary, pin-compatible product families targeting industrial applications: Apalis: MXM3-type small-form-factor SOM High-performance product family High-speed interface support: PCIe, GigE, SATA, USB 3.0, HDMI, edp, MIPI CSI/DSI, etc. Advanced multimedia support with HD 3D Graphics and multiple Display and Camera ports Colibri: SODIMM small-form-factor SOM Cost/performance optimized product family Common industrial interface support: Ethernet, UART, SPI, I2C, RGB/LVDS display, etc. Hugely popular for over 10 years

Build a self-balancing Robot with a Graphical User Interface Requirements Robot needs to balance on two wheels User Interface should act on changes in balance Challenges Balancing Inertial sensors, motor control Closed loop controller (real-time) User Interface... Resolution, Animations Communication? 4

Robot: Traditional approach Gyroscope Accelerometer I2C Distance Sensor I2C Controller HID Analog PWM SoC UART/SPI/I2C Real-time OS Closed Loop Controller Full-featured OS UI-Framework PWM + GPIO Motor Driver (Wheel) SDIO USB Microcontroller Servos (Arms) WiFi Parallel RGB Motor Driver (Wheel) LCD Display 5

NXP i.mx 7 Heterogeneous Multiprocessing Architecture Multiprocessing Two independent CPU cores in a single Chip Heterogeneous Do not use the same ISA (almost though) ARM Cortex-A7@1GHz (two in the i.mx 7D case) ARM Cortex-M4@200MHz Shared Bus Topology 6

NXP i.mx 7 Heterogeneous Multiprocessing Architecture Main CPU Platform Secondary CPU Platform Heterogeous Multicore Units Cortex-M4 Resource Domain Controller (RDC) Core #0 (Cortex-A7) Core #1 (Cortex-A7) 32 KB I-cache 32 KB D-cache FPU NEON 512 KB L2-cache 16 KB I-cache 16 KB D-cache Messaging Unit (MU) FPU MPU Semaphore (SEMA4/SEMA42) 32 KB TCML 32 KB TCMU AXI/AHB Interconnect Internal Memory External Memory Peripherals 96 KB ROM DDR Controller UART GPIO 128 KB OCRAM GPMI&BCH (NAND) ADC CAN I2C SPI PWM... 32 KB OCRAM_S... 7

NXP i.mx 7 HMP Applications Offload Real-time Tasks Real-time Operating System on Cortex-M4 Optimize Power Powerdown main CPU and its peripherals Keep DDR memory in Self-Refresh Increase Security Run Secure world only on one CPU complex Hardware partitioning of peripherals 8

NXP i.mx 7 HMP Advantages Fast communication between the two systems Simple Firmware upgrade Less Hardware Cost savings Availability Dynamic hardware Reallocation of Devices as Software evolves 9

Robot: HMP Approach Gyroscope Accelerometer I2C Distance Sensor I2C Analog NXP i.mx 7 Cortex-M4 Servos (Arms) PWM Real-time OS Closed Loop Controller Controller HID USB Cortex-A7 Full-featured OS UI-Framework Parallel RGB PWM + GPIO Motor Driver (Wheel) Motor Driver (Wheel) LCD Display WiFi SDIO

Balancing Robot TAQ 11

Demo

Robot: Software Stack Main CPU Platform Linux/Boot2Qt root file system Qt 5 User Interface Secondary CPU Platform FreeRTOS with Custom Firmware Communication Linux Rpmsg with Rpmsg based TTY driver FreeRTOS OpenAMP (bare-metal Rpmsg implementation) 13

Robot: Software Architecture

Robot: Simple Line-Based Protocol Implemented commands:?angle?speedleft?speedright?distance?voltage!move value!turnleft value!turnright value!stop!servo nr, value 15

HMP History NXP Vybrid: MQX, MCCv1 (Multi-Core Communcation) Kernel driver User-space Library CPU2CPU interrupts NXP i.mx 6 SoloX: MQX, MCCv2 Using Messaging Unit (MU) NXP i.mx 7: FreeRTOS, Rpmsg Kernel drivers 16

Boot flow The system (boot ROM) always starts on Cortex-A7 Cortex-M4 is clock gated Vector base is in OCRAM_S (0x00180000) U-Boot implements custom command bootaux fatload mmc 0:1 0x7F8000 hello_world.bin dcache flush bootaux 0x7F8000 Image Format: First word: Initial stack pointer Second word: Entry point 17

Software Stack in detail Linux Kernel NXP Beta BSP Linux 3.14.52 based (+ ~2.4k patches) NXP Final BSP Linux 4.1.15 based (+ ~1.6k patches) FreeRTOS FreeRTOS v8.0.0 kernel Various build systems supported (DS-5, CMake + gcc, IAR) Modified version of OpenAMP Drivers: ADC, GPIO, I2C, UART, WDOG, ECSPI, FlexCAN Some Mainline Support (starting with 4.4) 18

Remoteproc/Rpmsg Frameworks Upstream Linux Frameworks to support HMP systems Introduced in Linux 3.3 around 2011 (Ohad Ben-Cohen) Remoteproc: Remote Processor management Framework Currently no implementation for i.mx 7 Loading firmware Starting/Stopping the (remote) Processor Allocating and providing resources (e.g. memory) Setting up VirtIO devices 19

Rpmsg: Remote Processor Messaging Framework Used as communication Framework for i.mx 7 Rpmsg is a VirtIO driver (VIRTIO_ID_RPMSG 7) Bus driver (in the Linux driver framework) Each endpoint has a callback Endpoint created for each Rpmsg driver Created with control messages in mind Fixed message size of 512 bytes i.mx 7 specific VirtIO driver, making use of Messaging Unit 20

Rpmsg: Drivers 2 Rpmsg based Kernel drivers provided by NXP Pingpong (CONFIG_IMX_RPMSG_PINGPONG, drivers/rpmsg/imx_rpmsg_pingpong.c) In Kernel test driver Sends back a message upon message reception Serial Port (CONFIG_IMX_RPMSG_TTY, drivers/rpmsg/imx_rpmsg_tty.c) TTY driver (/dev/ttyrpmsg) One message per write Use it like a regular TTY (open/read/write/close) 21

Rpmsg: OpenAMP Rpmsg implementation for bare-metal firmware and RTOS Started by Mentor Graphics, Xilinx and NXP Open source project on Github https://github.com/openamp BSD License VirtIO implementation of FreeBSD RTOS-aware extension of RPMsg API by NXP Blocking, sequential API Like sockets but locally and zero-copy! 22

Rpmsg: Example OpenAMP/RTOS API struct remote_device *rdev = NULL; struct rpmsg_channel *app_chnl = NULL; void *rx_buf; int len; unsigned long src; /* Init */ rpmsg_rtos_init(0, &rdev, RPMSG_MASTER, &app_chnl); /* Receive */ rpmsg_rtos_recv_nocopy(app_chnl->rp_ept, &rx_buf, &len, &src, 0xFFFFFFFF); /* Process data in rx_buf... just sending them back... */ tx_buf = rpmsg_rtos_alloc_tx_buffer(app_chnl->rp_ept, &size); memcpy(tx_buf, rx_buf, len); rpmsg_rtos_send_nocopy(app_chnl->rp_ept, tx_buf, len, src); /* Free Receive buffer */ rpmsg_rtos_recv_nocopy_free(app_chnl->rp_ept, rx_buf); 23

Resources Balancing Robot TAQ Firmware https://github.com/antmicro/imx7-taq-demo (soon) Balancing Robot TAQ User Interface https://github.com/mitchcurtis/robot-faces Toradex Developer Article FreeRTOS on the Cortex-M4 of a Colibri imx7 Linux Kernel Sources Documentation/rpmsg.txt OpenAMP https://github.com/openamp FreeRTOS BSP (including NXP documentation) http://git.toradex.com/cgit/freertos-toradex.git/ Release Notes, Getting Started, API Reference Manual 24

Stefan Agner stefan.agner@toradex.com +1 (206) 319-5616