Domain-Specific Embedded Systems

Slides:



Advertisements
Similar presentations
System Area Network Abhiram Shandilya 12/06/01. Overview Introduction to System Area Networks SAN Design and Examples SAN Applications.
Advertisements

Operating Systems Lecture 10 Issues in Paging and Virtual Memory Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing.
Department of Computer Science and Engineering University of Washington Brian N. Bershad, Stefan Savage, Przemyslaw Pardyak, Emin Gun Sirer, Marc E. Fiuczynski,
Introduction CSCI 444/544 Operating Systems Fall 2008.
Fast Communication Firefly RPC Lightweight RPC  CS 614  Tuesday March 13, 2001  Jeff Hoy.
Cache Coherent Distributed Shared Memory. Motivations Small processor count –SMP machines –Single shared memory with multiple processors interconnected.
Chapter 13 Embedded Systems
Presented By Srinivas Sundaravaradan. MACH µ-Kernel system based on message passing Over 5000 cycles to transfer a short message Buffering IPC L3 Similar.
ECE 526 – Network Processing Systems Design Software-based Protocol Processing Chapter 7: D. E. Comer.
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
Memory Management 2010.
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
Chapter 13 Embedded Systems
Figure 1.1 Interaction between applications and the operating system.
©Brooks/Cole, 2003 Chapter 7 Operating Systems Dr. Barnawi.
Computer Organization and Architecture
1 I/O Management in Representative Operating Systems.
1 Chapter 13 Embedded Systems Embedded Systems Characteristics of Embedded Operating Systems.
Copyright ©: Nahrstedt, Angrave, Abdelzaher
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
1 Input/Output. 2 Principles of I/O Hardware Some typical device, network, and data base rates.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
Multiple Processor Systems. Multiprocessor Systems Continuous need for faster and powerful computers –shared memory model ( access nsec) –message passing.
 Introduction to Operating System Introduction to Operating System  Types Of An Operating System Types Of An Operating System  Single User Single User.
RTS Meeting 8th July 2009 Introduction Middleware AUTOSAR Conclusion.
Hardware Definitions –Port: Point of connection –Bus: Interface Daisy Chain (A=>B=>…=>X) Shared Direct Device Access –Controller: Device Electronics –Registers:
1 Lecture 20: I/O n I/O hardware n I/O structure n communication with controllers n device interrupts n device drivers n streams.
Chapter 5 Operating System Support. Outline Operating system - Objective and function - types of OS Scheduling - Long term scheduling - Medium term scheduling.
July 30, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 8: Exploiting Memory Hierarchy: Virtual Memory * Jeremy R. Johnson Monday.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
Swapping to Remote Memory over InfiniBand: An Approach using a High Performance Network Block Device Shuang LiangRanjit NoronhaDhabaleswar K. Panda IEEE.
I/O management is a major component of operating system design and operation Important aspect of computer operation I/O devices vary greatly Various methods.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Computers Operating System Essentials. Operating Systems PROGRAM HARDWARE OPERATING SYSTEM.
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 2 (Part II) Operating System Overview.
I/O Computer Organization II 1 Interconnecting Components Need interconnections between – CPU, memory, I/O controllers Bus: shared communication channel.
Distributed System Concepts and Architectures 2.3 Services Fall 2011 Student: Fan Bai
CS533 - Concepts of Operating Systems 1 The Mach System Presented by Catherine Vilhauer.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNP 1 v3.0 Module 1 Overview of Scalable Internetworks.
Precomputation- based Prefetching By James Schatz and Bashar Gharaibeh.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
Operating Systems: Internals and Design Principles
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
CSC190 Introduction to Computing Operating Systems and Utility Programs.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
1 May-2014 Automotive Protocols & Standards. 2 CAN (Controller Area Network)  Overview Controller Area Network is a fast serial bus designed to provide.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
VIRTUAL NETWORK PIPELINE PROCESSOR Design and Implementation Department of Communication System Engineering Presented by: Mark Yufit Rami Siadous.
CMSC 611: Advanced Computer Architecture
Module 12: I/O Systems I/O hardware Application I/O Interface
Memory COMPUTER ARCHITECTURE
Alternative system models
Advanced Operating Systems
Human Complexity of Software
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
CS703 - Advanced Operating Systems
Translation Buffers (TLB’s)
Chapter 2: Operating-System Structures
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Translation Buffers (TLB’s)
CS703 - Advanced Operating Systems
Translation Buffers (TLBs)
Chapter 2: Operating-System Structures
Xen and the Art of Virtualization
Chapter 13: I/O Systems.
Review What are the advantages/disadvantages of pages versus segments?
Module 12: I/O Systems I/O hardwared Application I/O Interface
Presentation transcript:

Domain-Specific Embedded Systems Carlos Padilla

Overview Automobile Industry Network Applications

History Growth of Electronics in Cars Programming Languages C Some C++ but not using all of C++ functionality

Automotive Segments Body Chassis and Safety Driver Assistance Powertrain and transmission Infotainment and Telematics

Body Responsible for Comfort Safety and Networking Windows Doors HVAC CAN MOST LIN FlexRay Ethernet Windows Doors HVAC

Chassis and Safety This area is generally concerned with driver Safety Examples Anti-lock Braking System Reducing crashes by 30% in regular vehicles, 60% in SUVs Tire Pressure Monitoring System

Driver Assistance Advanced Driver Assistance System (ADAS) Adaptive Cruise Control Radar system Blind spot detection Crash Detection High/Low beam detection 360 degree camera support Map based ADAS support http://adasis.ertico.com/wp-content/uploads/sites/13/2014/09/ADASIS_Brochure.pdf

Powertrain and Transmission Emphasis on improving fuel efficiency High pressure injection systems Meet CO2 emission standards Hybrid Engines

Infotainment and Telematics Multimedia support Media player Phone Integration Bluetooth Support 3G/4G suppport High definition screens Telematics support GPS Navigation System

Automotive quality Safety is important in automotive systems and hence the quality of the software is very important. Engineers must design and implement their system with the following in mind Planning for Murphy’s law Plan for unlikely failure Fault-tolerant communications ACK/NACK, parity, recovery Fault-tolerant software Ensure system does not fall apart Different components may have contradictory information Zero-defect software Test early and often to avoid defects from being caught too late

Automotive quality Risk management and failure modes Identify high risk, create plans, and set priorities to deal with them ISO 31000 Failure modes and effects analysis (FMEA) Occurrence, Severity, Detection Multiply these to get Risk Priority Number (RPN) High RPN should be dealt with first

Development Subsystem interoperability Software specifications Modularity Software specifications SRS document, emphasis on safety ISO 830 SRS standard Software architecture Model of how system is organized, hierarchy, relationships Modeling Help engineers understand functional, non functional, and quality requirements for system Autocoding and drivers Converting Diagrams to code, code templates. Drivers to interact with low level hardware

Testing and Diagnostics Bench testing Code coverage: regression testing, unit testing, etc Trace and debug Ability to find and fix failures in software Final-phase testing Testing in the car, hardware in the loop Calibration Fine-tuning system to maximize performance Maintenance/ product lifetime support Support system for 15 years Diagnostics MIL Data logger, OBD II , DTC

Automotive Standards Standards allow engineers to follow similar guidelines Allows integration with third party sources Promote safety standards MISRA The Motor Industry Software Reliability Association MISRA C AUTOSAR AEC Automobile Electronics Council

AUTOSAR Stands for Automotive Open Software Architecture Purpose is to standardize interfaces, structures, and communication across car manufactures and third party providers Component based architecture Issues with AUTOSAR Lacks information on timing requirements Additional computation and memory needed

Paper: AUTOSAR Test Automation Purpose of paper is to develop test automation using AUTOSAR Car manufactures continue to provide most safety and comfort features The addition of these features increases the number of electronics in the car As number of embedded systems in a car increases so does the cost Due to the software needed and testing required Test automation offers a robust and efficient way of testing the ever increasing number of embedded components

Client Server Model A client server design pattern with AUTOSAR was used AUTOSAR Components Client Server Server provides services to the clients Clients use services provided by server N >= 0 Clients to 1 Server

HVAC System 1 Server 5 Clients (Control units) ECU 5 Clients (Control units) Blower unit Compressor Apt sensor Expansion valve Temperature sensor Serial Communication (RS232) Blower unit, Compressor CAN Communication Apt Sensor, Expansion Valve, Temperature Sensor

HVAC System: Clients Blower unit Compressor Apt sensor Expansion valve Cool down temp of Air-conditioner gas. Fan speed depends on gas temperature Compressor Power from Engine Transfers AC gas to Evaporator after compressing to low temperature low pressure gas Apt sensor Monitors AC line pressure to avoid accidents Expansion valve Controls force of cool down Temperature sensor Monitors inside and outside temperature Transfers temperature difference to ECU (Server) based on user input

HVAC Control Model

Test for HVAC

Strengths of Paper Make strong case for increased test automation Through this method ECU and control units could be tested without having to assemble the entire system Changing out parameters for Engine speed and Compressor torque is easier than attempting to achieve these values manually Allows for testing a variety of scenario by simply changing a few parameter values Good Structure Outlines purpose, provides background info, explains experiment, good diagrams

Weaknesses of Paper Weak Conclusion Short, more of summary Does not address some weakness of AUTOSAR Timing requirements Extra memory and computational processing Very short test case list Some translation issues

Relevance As cars system become more complex and filled with additional embedded systems efficient ways of testing must be found to keep costs down

Safety and Security Automotive safety Automotive security ISO 26262 ASIL Automotive security Past: Car alarms etc. Present: Hacking Future: Counterfeiting (modules)

Future Improved Performance Multicore in vehicle Mobile connectivity Self driving cars

Network Devices System Architecture Network Planes Data Plane Networking in Offices and Schools Security: Firewalls Network Planes Data, Control, Service, Management Data Plane First component to get data from IO (Ethernet) L3 routing, IPsec, firewall Service Plane Handles exception packets Control Plane Protocols to interact with peer networks. Management Plane HMI for network

Multicore System on Chip (SoCs) Contain multiple general purpose cores and multiple peripheral controllers Reduces cost by integrating multiple cores and IOs into one board Parser ARM, MIPS OS Linux, BSD

Packet engine hardware (PEH) Block Purpose is to distribute data to multiple cores On top of Ethernet layer Parts that make up PEH block Parser Distribution Classification Scheduler, queues and channels Accelerators

PEH Block: Parser Parse the messages from the Ethernet data block Check validity of message If valid extracts fields from data packet Capable of reassembling fragments

PEH Block: Distribution and Classification Extract data from fields to put place packet in queue CRC-32 and CRC-64 used to hash packets Classification Allows software to assign specific queues for types of packets Extracts value from packet Certain packets like GUI may be of higher priority and shouldn’t be left to hash

PEH Block: Scheduler Queues Channels Packets placed her by Distribution and Classification Also used by cores to send out packets or access hardware acceleration engines Channels Bundles set of Queues Cores can access data from one or more channels

PEH Block: Accelerators Used to handle computationally intensive algorithmic tasks away from cores Examples Cryptography Pattern matching Compression/decompression De-duplication Time management Ingress Acceleration Incoming packets Engress Acceleration Outgoing packets to interfaces

PEH Block: Buffer Manager Handles allocation and deallocation of memory Pools of memory Avoid software worrying about this memory management

Pipeline programming model Different Functions processed by different multiple cores Used often when migrating from single core to multi core to avoid concurrency issues High Complexity Throughput is based on functions that demand the most cores, losing efficiency on functions that need less cores Higher latency of packets (queuing tasks to other functions) Breaking up functions into multiple packets may be difficult

Run-to-completion programming All cores process all functions Focus here is in how the work flow is distributed to each flow Requirements needed to consider Important packets maintain order within flow Performance scaling expected to be linear Latency from ingress and egress should be low

Data-plane infrastructure (DP-Infra) Used to improve modularity Many forwarding engines (FE) Separate common functionality among Fes into modules Allows reuse Maintainability Portability Used by FEs to interact with Acceleration Engines (AEs)

Forward Engine (FE)Structure First, parses packet headers to extract desired field data. Next, uses extracted data to match flow context in flow database Exception packets do not match Then, process packet based on state of information Packet may be modified Lastly, send out updated packet to next FE Uses DP-Infra

Network application programming Techniques Hash tables are a common data structure used in network programming Searching for Packet should be fast to maintain good performance Avoid locks Important for packet processing to avoid lock state as much as possible If cores are made to spin no performance improvement is achieved Locks are still important for maintaining data integrity Avoid reference counting Read-Copy-Update (keep read side unlock, but write side is still locked) Reference counting used to avoid flow context while being used Should be avoided because locks are required Prone to errors, if count is not kept properly

Network application programming Techniques (cont) Safe reference mechanism A safe way to access data from a neighboring node API functions used to allow neighbors to access data Avoid use of pointers Removes need for reference counting Flow parallelization One data flow processed by one core at a time Different flows processed across multiple cores

Statistics Reducing cache thrashing is important Flow statistics Global statistics Keeping data in cache is important to avoid stalls from core Each core can have its’ own statistics and own cache lines Statistics acceleration Multicore SoC with this feature make the previous techniques unnecessary

General performance techniques Keep relevant data in cache to avoid stalls Cycles in which the core is just waiting Software-directed prefetching Software used to move data in DDR memory into L1 cache Compiler Built-ins for likely/unlikely Cores typically expect instructions to be right next to each other Branching can cause instructions to be DDR instead of cache This compiler built in setting is used to determine code that is mostly likely to operate together Keeping important data in cache Avoid data moving into DDR when it will be used often Need to be careful when locking data into cache because it minimizes cache available to CPU

General coding guidelines Avoid initialized variables until necessary not when declared Reduced unnecessary time spent by core cycles if that data is not needed Define inline macros Avoid buffer copies, string comparisons and allocations Use hardware acceleration when possible

Linux operating system Popular operating system for network devices Execution spaces Kernel User space Kernel space used for data and service plane programming User space is now also being looked at for data plane programming Translation lookaside buffer (TLB) misses associated with user-space programming Access to hardware peripherals and hardware accelerators Deterministic performance

Translation lookaside buffer (TLB) User space programs use virtual addresses Virtual addresses do not have one to one correspondence with physical addresses TLB is used to get physical address from virtual address Problem When address is not found TLB a fault is generated and the kernel space must now resolve it This decreased performance greatly if there are many misses Solutions Using Huge pages (hugetlbfs) can reduce misses Some multicore SoC come with hardware page walk, to avoid performance hits when page is missed

Access to hardware Problem Solution Hardware peripherals and hardware accelerators is obtained through physical memory Accessing hardware through User space involves context switch and buffer copying Solution Linux provides memory mapping so hardware registers can be accessed directly by user space Multicore SoC with IOMMU can convert virtual memory to physical memory

Deterministic performance Problem Linux General Purpose OS which causes cores to be share across multiple tasks Cores are not dedicated and hence cannot be deterministic Solution Threads can be created with an affinity to a particular core Cores can be dedicated to threads and Linux will not assign other processes or threads to these cores

Questions?

Sources (2013-04-01). Software Engineering for Embedded Systems: Methods, Practical Techniques, and Applications (Expert Guide) (Kindle Location 19943). Elsevier Science. Kindle Edition. H. Moon, G. Kim, Y. Kim, S. Shin. Automation Test Method for Automotive Embedded Software Based on AUTOSAR, Fourth International Conference on Software Engineering Advances, 2009. ICSEA '09, September 2009 The ADAS Horizon Concept http://adasis.ertico.com/wp- content/uploads/sites/13/2014/09/ADASIS_Brochure.pdf