Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... ·...

31
What is Embedded System? Lecture 1 1

Transcript of Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... ·...

Page 1: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

What is Embedded System?

Lecture 1

1

Page 2: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

Embedded System

Embedded System is a special-purpose

computer system designed to perform one

or a few dedicated functions.

In general, it does not provide

programmability to users, as opposed to

general purpose computer systems like PC

2

Page 3: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

• General-purpose computer systems

• Embedded Systems

Computer Systems

3

Page 4: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

Embedded systems are virtually everywhere inyour daily life

A combination of hardware and software whichtogether form a component of a larger machine.

An embedded system is designed to run on itsown without human intervention, and may berequired to respond to events in real time.

Embedded System

4

Page 5: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

The

Embedded

Computer

An Embedded

System

Compressor Control

Actual Temperature

Human

Interaction

Alarm

Display

Required Temperature

Networked

Interaction

(Maybe!)

Example 1: Fridge

5

Page 6: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

Dash

Board

AirBag

Radio

Climate

& CD

Door

Door

SteeringDriver's

Seat

CentralControl

CAN Bus

Control

Left

Right

open door sensor

window control buttons

lock controllock actuator

window motor

window stall sensor

Example 2: Car Door Control, within a Larger Network

6

Page 7: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

Embedded Systems (Cont)• Even though embedded systems cover a wide range

of special-purpose systems, there are commoncharacteristics

Low cost

• Should be cheap to be competitive

Memory is typically very small compared to a general purpose computer system

Lightweight processors are used in embedded systems

Low power

• Should consume low power especially in case of portable devices

7

Page 8: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

Embedded Systems (Cont)

High performance• Should meet the computing requirements of

applications

Users want to watch video on portable devices

Real-time property• Job should be done within a time limit

Aerospace applications, Car controlsystems, Medical gadgets are critical interms of time constraint – Otherwise, itcould lead to catastrophe such as loss oflife.

8

Page 9: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

HW/SW Stack of Embedded Systems

Identical to the general computer systems

Application Software

OS / Device Drivers

Hardware

9

Page 10: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

Components of Embedded Systems

1. Hardware

It is mainly composed of processor (1 or more), memory,

I/O devices including network devices, timers, sensors etc.

10

Page 11: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

Components of Embedded Systems

2. Software - System software

Operating systems

• Many times, a multitasking (multithreaded) OS is required, as embedded applications become complicated

Networking, GUI, Audio, Video

CPU is context-switched to process multiple jobs

• Operating system footprint should be small enough to fit into memory of an embedded system

In the past and even now, real-time operating systems (RTOS) such as VxWorks and uC/OS-II have been used because they are light-weighted in terms of memory requirement

Nowadays, heavy-weighted OSs such as iOS (iPhone OS), Android,

Windows Mobile, and embedded Linux (uClinux) are used, as embedded processors support computing power and advanced capabilities such as MMU (Memory Management Unit)

Device drivers for I/O devices

11

Page 12: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

Components of Embedded Systems (Cont)

3. Software (cont.) - Application software

Run on top of operating system

Execute tasks that users wish to perform

• Web surfing, Social Network Service, Audio,

Video playback

12

Page 13: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

Input Variables

Output

(User Interface)

Variables

(Link to other Systems)

Embedded Computer

Software

Hardware

Sig

nal

Co

ndit

ion

ing

Dat

a

Co

nve

rsio

n

Out

put

Dri

ve

(display, keypad etc.)

The Embedded System – Generic Block Diagram

13

Page 14: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

Real-Time Systems

• Real-time operating system (RTOS): Multitaskingoperating system for real-time applications

RTOS is valued for how quickly and/or predictably respond to a particular event

• Hard real-time systems are required to complete a critical task within a guaranteed amount of time

• Soft real-time systems are less restrictive

Implementing real-time system requires a careful design of scheduler

• System must have the priority-based scheduling

Real-time processes must have the highest priority

14

Page 15: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

Operating Systems for Embedded Systems

• RTOSs VxWorks

VRTX (Versatile Real-Time Executive)

uC/OS-II

• Palm OS • Palm OS: Embedded operating system initially developed by U.S. Robotics-

owned Palm Computing, Inc. for personal digital assistants (PDAs) in 1996

• Android Based on modified version of Linux 2.6 kernel

Currently supporting ARM, MIPS, and x86

15

Page 16: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

General-Purpose (GP) Computer Systems

16

Page 17: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

CPU

North Bridge

South Bridge

Main Memory(DDR2)

FSB(Front-Side Bus)

DMI (Direct Media I/F)

Hard disk

USB

PCIe card

Peripheral devices

Graphics card

A Computer System (till 2008)

17

DDR2 SDRAM: is a double data rate synchronous dynamic random-access memory

interface.

Page 18: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

Keep in mind that CPU and computer systems are evolving at a fast pace!

CPU

North Bridge

South Bridge

Main Memory(DDR2)

FSB(Front-Side Bus)

DMI (Direct Media I/F)

Core 2 Duo – based Systems• Core i7 (Ivy Bridge) – based Systems

FDI: Flexible Display Interface

SPI: Serial Peripheral Interface

SMBus: System Management Bus

Past, Present and More…

18

Page 19: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

CPU

North Bridge

South Bridge

Main Memory(DDR2)

FSB(Front-Side Bus)

DMI (Direct Media I/F)

CPU

North Bridge

South Bridge

Main Memory(DDR3)

Quickpath (Intel) orHypertransport (AMD)

DMI (Direct Media I/F)

Core 2 Duo – based Systems • Core i7– based Systems

Keep in mind that CPU and computer systems are evolving at a fast pace

Present, Near Future and More…

19

Page 20: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

32-bit (i586) 64-bit (x86_64)32-bit (i686)

20091st Gen. Core i7

(Nehalem)

2012

3rd Gen. Core i7(Ivy Bridge)

2013

4th Gen. Core i7(Haswell)

2nd Gen. Core i7(Sandy Bridge)

2011

4-bit 8-bit 16-bit 32-bit (i386)

x86 History (Cont.)

20

Page 21: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

• What is x86?

Generic term referring to processors from Intel, AMD and

VIA

Derived from the model numbers of the first few generations

of processors:

• 8086, 80286, 80386, 80486 x86

Now it generally refers to processors from Intel, AMD, and

VIA

• x86-16: 16-bit processor

• x86-32 (aka IA32): 32-bit processor * IA: Intel

Architecture

• x86-64: 64-bit processor

• Intel takes about 80% of the PC market and AMD takes about

20%

Apple also have been introducing Intel-based Mac from Nov.

2006

x86?

21

Page 22: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

• We call North and South Bridges as Chipset

• Chipset has many PCIe devices inside

• North Bridge

Memory controller

PCI express ports to connect Graphics card

• South Bridge

HDD (Hard-disk) controller

USB controller

Various peripherals connected

• Keyboard, mouse, timer etc

PCI express ports

Chipset

22

Page 23: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

• Backplane (backbone) bus Industry standard

• e.g., PCIexpress

Allow processor, memory and I/O

devices to coexist on a single bus

Used as an intermediary bus connecting

I/O busses to the processor-memory

bus

• I/O bus Industry standard

• e.g., SATA, USB, Firewire

Usually is lengthy and slower

Needs to accommodate a wide range of

I/O devices.

* SATA: Serial Advanced Technology Attachment,

CPU

North Bridge

South Bridge

Main Memory(DDR2)

FSB(Front-Side Bus)

DMI

(Direct Media I/F)

Hard disk

USB

Graphics card

Backplane bus

I/O bus

Types of Buses

23

Page 24: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

PCI, PCI Express Devices

• PCI (Peripheral Component Interconnect)

Computer bus connecting all the peripheral

devices to the computer motherboard

• PCIe (PCI Express)

Replaced PCI in 2004

Point-to-point connection

PCIe 2.0

Introduced in 2007

PCIe 3.0

Introduced in 2010

PCI slot

PCI express slots

PCI express slot x16

24

Page 25: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

25

Serial Advanced Technology Attachment

Designed for transfering data to and from a hard disk

SATA

Page 26: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

26

Pin #Signal Name

Signal Description

1 GND Ground

2 A+ Transmit +

3 A- Transmit -

4 GND Ground

5 B- Receive -

6 B+ Receive +

7 GND Ground

SATA PinOut, Data

Pin # Signal Name Signal Description

1 V33 3.3v Power

2 V33 3.3v Power

3 V333.3v Power, Pre-charge, 2nd mate

4 Ground 1st Mate

5 Ground 2nd Mate

6 Ground 3rd Mate

7 V55v Power, pre-charge, 2nd mate

8 V5 5v Power

9 V5 5v Power

10 Ground 2nd Mate

11 Reserved -

12 Ground 1st Mate

13 V1212v Power, Pre-charge, 2nd mate

14 V12 12v Power

15 V12 12v Power

SATA PinOut, Power

SATA

Page 27: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

An Old GP Computer System Example

27

Page 28: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

PCI Express Slots in GP Systems

PCI express slot

28

Page 29: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

Software Stack

Computer Hardware(CPU, Chipset, PCIe cards ...)

BIOS (AMI, Phoenix Technologies …)

Operating System(Linux, Vista, Mac OS …)

Applications(MS-office, Google Earth…)

29

Page 30: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

How the GP Computer System Works?

• x86-based system starts to execute from the reset address 0xFFFF_FFF0

The first instruction is “jmp xxx” off from BIOS ROM

• BIOS (Basic Input/Output System)

Detect and initialize all the devices (including PCI devices via PCI enumeration) on the system

Provide common interfaces to OS

Hand over the control to OS

• OS

Manage the system resources such as main memory

• Control and coordinate the use of the hardware among various application programs for the various users

Provide APIs for system and application programming

30

Page 31: Lecture 1 What is Embedded System?abdnoor80.weebly.com/uploads/1/2/2/8/12282674/es... · 2018-09-07 · Embedded systems are virtually everywhere in your daily life A combination

So… What?• How is it different from embedded systems?

General-purpose computer systems provide

programmability to end-users

• You can do any kinds of programming on your PC

C, C++, C#, Java etc

General-purpose systems should provide backward

compatibility

• A new system should be able to run legacy software,

which could be in the form of binaries with no source

codes written 30 years ago

So, general purpose computer system becomes

messy and complicated, still containing all legacy

hardware functionalities

31