+ All Categories
Home > Documents > Introduction to Embedded Computing Systems – part...

Introduction to Embedded Computing Systems – part...

Date post: 23-Aug-2020
Category:
Upload: others
View: 7 times
Download: 0 times
Share this document with a friend
21
Introduction to Embedded Computing Systems – part II Davide Bertozzi [email protected]
Transcript
Page 1: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

Introduction to Embedded Computing Systems – part II

Davide [email protected]

Page 2: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

Embedded System An embedded system is a special-purpose system in which the

computer is completely encapsulated by the “object” it controls. Customers want to buy the “object”, not its internal computer!

Unlike a general-purpose computer, such as a personal computer, an embedded system generally performs pre-defined tasks, usually with very specific requirements.

Since the system is dedicated to a specific task, design engineers can optimize it, reducing the size and cost of the product.

This is the category of computing devices with the most stringent power budgets and energy efficiency requirements (MOPS/mW). Performance is only modest with respect to other computing segments, however emerging embedded devices are more and more demanding performance-wise. The power-performance trade-off is exacerbated in battery-

operated devices2

Page 3: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

Embedded System Applications

3

Page 4: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

Embedded System Applications Robotic science

Ground Vehicles Drones Underwater Vehicles Industrial Robots

4

Medical Dialysis Machine Infusion Pumps Cardiac Monitor Prosthetic Device

Automotive Engine Control Ignition System Brake System Fuel Injection Lighting System Door Locks Air Bags ……

Home devices TVs Digital Alarm Air Conditioner DVD Video Player Cameras Appliances Game consoles

Military Missiles

Energy Smart grids

Space Space Stations Shuttles

Many others…

Networking Router Hubs Gateways modems

Page 5: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

Embedded Systems Characteristics Designed for one/ few specific task(s) or for one/few application domain(s). Generally, they are mass-produced.

I can spend a bit more to make the product super-efficient! In contrast, cost savings are multiplied by the whole sales volume.

It must be connected with sensors/actuators to perform its mission. The user is not expected to load a program onto it (only firmware upgrade) They are often diskless and use Flash memory as secondary storage. Require real time performance

embedded system must respond to a certain event within a “deadline”! E.g., anti-lock breaking system (ABS), counter-attack against missile detection Developed around a real-time operating system (RTOS)

It supports deterministic time-bounded performance and feasible scheduling. They should have high availability, reliability and (increasingly) security.

Reliability: also known as robustness, it is the ability to deliver the intended function even in abnormal or dangerous situations. One metric: MTBF.

Availability: fraction of time a system is operational. Security: The condition of being protected against attacks, that either take control

of the system or jeopardize its mission (quite nasty in the IoT era!).5

Page 6: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

An Holistic Approach to DesignThe field of embedded system research is rich with potential because it combines two factors: First, the system designer usually has control over both the hardware design

and the software design, unlike general-purpose computing Do you remember the “cross-stack” design notion? developers of embedded software often must understand the working

principles and mechanisms of the hardware and hardware layers during the development stage

Second, embedded systems are built upon a wide range of disciplines, including computer architecture, memory system design, compiler, scheduler/operating system, sensors, energy harvesting and storage, connectivity.

Combining these two factors means that barriers between these fields can be broken down, enabling synergy between multiple fields and resulting in optimizations which are greater than the sum of their parts.

6

Page 7: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

Real-Time OperationIn real-time embedded systems tasks must be executed in apredictable amount of time, within maximum execution time limits. Real time is divided into soft real time and hard real time.

Soft real time has less-stringent requirements; even if the time limit cannot bemet in some cases, it won’t have a fatal impact on the system. For example, amedia player system is soft real time. The system is supposed to play 24 framesin one second, but it is also acceptable when the system fails in some overloadedconditions.

Hard real time has strict requirements. The execution of tasks must be absolutelyensured in all situations; otherwise the consequences will be catastrophic. Forexample, aircraft autopilot and navigation system are hard real-time systems.They must accomplish a specific task within the certain time limit; otherwise amajor accident, collision, or crash could occur.

Many embedded systems (mobile phones, game consoles, and so on) do notneed real-time guarantees. But real time is the key for some embeddedsystems (e.g., industrial control, telemedicine, avionics, automotive, etc.)

In real time systems, enforcing time bounds for operations is moreimportant than performing such operations in short times!

7

Page 8: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

An Ideal World: Performance Predictability AND Efficiency One fundamental challenge with embedded systems is delivering predictably

good performance. Many embedded systems (e.g. anti-lock brakes in a car) have real-time

requirements; if computations are not completed before a tight deadline, the system will fail, possibly injuring the user.

Unfortunately, many of the performance enhancing features which make general-purpose computers so fast also make it difficult to predict their performance accurately. Such features include pipelined and out-of-order instruction execution in

the processor, and caches in the memory system. Hence real-time system designers typically operate between two opposite

extremes: .. designing fast systems with easily predictable technologies (if at all

feasible), ..or more accurately measuring existing complex but fast systems (if at

all possible).8

Page 9: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

Are Embedded Systems Really Application-Specific?

Their task specific nature make embedded systems rather different from general-purpose computing (laptops, desktop PCs, HPC, datacenter servers)

However, some embedded systems have grown into something similar to a general-purpose computer… I hardly find the phone icon in a smartphone!!!!!!!!! Nonetheless, few people would buy a cellphone just for its gaming

capability …. This is secondary (yet important!): you still buy a cellphone to call somebody.

With respect to desktop PCs and servers, they do connect to sensors/actuators.

Similarly, I can watch movies and connect to the internet on my game console. But not as easily on all of them! Also, the degree of «general-purposeness» is

limited (file mgt, Office suite support, etc.)9

Page 10: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

General Purpose Computing: Different Trade-Offs

Designers of embedded devices face more constraints thandesigners of general-purpose devices. Power, energy efficiency (MOPS/mW), cost, and physical

dimensions usually have a much bigger role in embeddedsystems

This is not to say that embedded devices are more difficultto build than general purpose devices: the latter tend to have higher overall performance goals (most aggressive: 1 exaFLOP per second) and huge compatibility requirements(backward compatibility with existing software is a must).

But the overall priorities and the balance among them are rather different for embedded devices.

10

Page 11: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

Integrated Hardware and Software

General-purpose computers install software dynamically. The software can be installed and uninstalled according to the users’ demands, or by the user itself.

But for embedded systems, software and hardware are often integrated and sold as a package.

This trend is shifting for devices that are always connected via the Internet, such as smartphones, Internet of Things (wearables, for example) or game consoles. In these cases, original device manufacturers (ODMs) can do regular software updates, and/or the user itself can download applications.

11

Page 12: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

Integrated Hardware and Software Embedded software is usually built into the hardware ROM or

Flash memory, and runs automatically when the system is started.

Under normal circumstances, the user cannot easily modify or delete the software without the aid of special tools to ensure the integrity of the embedded system.

Due to the tight integration of hardware and software (i.e., software is written FOR a specific hardware), software piracy on embedded systems is less of an issue than in general-purpose computing. This also makes “system software upgrade” more intricate and less

frequent. However, the vendor might want to protect the IP “encoded” in a

piece of software.12

Page 13: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

Generic Hardware Architecture

13

1) Where is the chip boundary?2) How does the processor look like?

Page 14: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

The «System-on-Chip» paradigm At the beginning of the 1990s, electronic systems were built

by assemblying components in board-level assemblies. A processor took up an entire chip Other chips provided memory, control, and I/O.

Moore’s law has changed this style of construction What used to take up a board now fits into a single chip

(named «System-on-Chip», SoC). This trend is common to both general-purpose processors and

embedded processors. The processor chip has changed into a «processor core».

The higher level of integration lowers overall costs, both in construction and in design.

Not everything can be integrated in a cost-effective way (e.g., DRAM memory, analog circuits, power electronics,..)

14

Page 15: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

Processing Engines in Embedded SystemsThere is not a single type of processor core.

Embedded microprocessor: typically scaled-down versions of high-end microprocessors for general-purpose computing. 32-bit or 64-bit datapath Examples: processors from ARM, MIPS, Freescale, Texas Instruments, Infineon,.. They are typically integrated into SoCs, and SoC manufacturers are not

necessarily core vendors, but may buy core IP licenses. The SoC is part of a chipset that accomplishes the mission.

Digital signal processors (DSP): specialized in the execution of arithmeticoperations in loop-oriented processing kernels. Examples: DSPs from Texas Instruments, Motorola, Analog Devices, etc.. Used in cellphones for the «digital signal processing» that takes place «behind

the scene» (e.g., voice processing, modem), not as application processors. Microcontrollers (MCUs): the workehorse of industrial electronics. Typically

designed for standalone operation (i.e., no need for other external circuits to accomplish the mission). Many of them are descendants of 8-bit or 16-bit microprocessor generations. They include memory, I/O and peripherals in addition to a simple processing unit.

15

Page 16: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

Microprocessor vs. Microcontroller

16

Historical difference:

CPU ROM/Flash

Serial Interface

I/O ports

Timers Oscillator

RAM

Microcontroller (MCU): CPU, memory, I/O, peripherals on a single chip

Just flash your code, connect the power supply, and it runs!

It integrates peripherals of different complexity: Timers Counters ADCs DMA engines

Serial ports: UART, SPI, I2C, USB, IS2S, CAN They span the low- to high-end spectrum (e.g.,

from 8 bits to 32 bits)ADC,

Counters,.

The more advanced peripherals a microcontroller has, the more you pay per unit. And the price is also proportional to the CPU performance.

Page 17: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

Microprocessor vs. Microcontroller

17

Historical difference:

CPUOutput

Serial Interface

Timers

Input

RAM ROM

Microprocessor (MPU): CPUand several supporting chips

An MPU is a bare CPU on a chip I/O pins connect to busses (data,

address pins), and to other chips in the board

An MPU on its own can do nothing, like the CPU of your PC (can you run it without the motherboard?) MPUs have not been designed to

work as standalone computers The system-on-chip paradigm causes a

similar integration trend to microcontrollers

But the usage model is different: move flash/disk content into off-chip DRAM, and fetch from there.

NVM DRAMMPU

cache

Page 18: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

Microprocessor vs. Microcontroller

18

Microprocessor (MPU): CPUand several supporting chips

Microcontroller (MCU): CPUon a single chip

Today, if you look at them from the outside it is difficult to say whether it is an MPU or an MCU (because of the SoC trend for MPUs, and for the more complex applications that MCUs run). It mainly depends on the functionality.

What about the CPU? Is it a “Calcolatori-I”-style processor core?

System-on-Chip(with CPU inside)

System-on-Chip(with CPU inside)

CPU CPU

Page 19: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

How does the CPU look like?

19

Modern SoCs integrate multiple processor cores. They can be: Either a single multi-core CPU, matching software parallelism with

hardware parallelism for higher performance.

Or a multi-core CPU + specialized processing engines (e.g., video processing, image processing, graphics,…). The multi-core CPU is called«the host processor», and runs control tasks for the system as a whole, and offloads computation onto the specialized processing engines (called«accelerator cores».

Multi-core CPU(e.g., quad-core ARM A57)

Host core

Accelerator cores(can be parallel, like GPUs)

Multi-core host processor CPU

Page 20: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

Summing up The hardware architecture can be as «simple» as….

20

«System power» also typically performs dynamic voltage and frequency scaling (DVFS) of the MCU.o The voltage and frequency are adapted to the

requirements of the workload to save power.

Analog-to-DigitalConverter

Digital-to-AnalogConverter

Actuator

Page 21: Introduction to Embedded Computing Systems – part IImpsoc.unife.it/~arch-dig/slides/LectureIb.pdf · Introduction to Embedded Computing Systems ... Embedded System Applications

It can be as complex as….

Samsung ExynosSoC

Summing up

Heterogeneous multi-core host processor(«Big-Little ARM architecture)

Embedded GPU

MemoryInterface

Display controller

I/O IFs

MemoryInterface

I/O

Image processing

SYSTEM BUSSES

High-speed IFMemory card IFWiFi PCIe

Security IFThermal mgtTimer

Audioprocessing


Recommended