Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS?...

19
Introduction to Embedded Systems Alexander Nelson August 28, 2019 University of Arkansas - Department of Computer Science and Computer Engineering

Transcript of Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS?...

Page 1: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

Introduction to Embedded Systems

Alexander Nelson

August 28, 2019

University of Arkansas - Department of Computer Science and Computer Engineering

Page 2: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

The most profound technologies are those

that disappear. They weave themselves into

the fabric of everyday life until they are

indistinguishable from it.

0

Page 3: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

Group Exercise

1. Define Embedded Systems in your own words

2. Pair up and come up with 5 examples of embedded systems

3. Come up with 2 examples of computer systems that are not

embedded

1

Page 4: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

What is different?

What makes programming Embedded Systems Different?

• Embedded in a system

• Real-time constraints

• Resource Constraints

• Application Specific

2

Page 5: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

Application Specific

How is the functionality different than PCs?

• Implements specific functions

• PCs are general purpose

Performance?

• Must meet real time constraints (e.g. brakes need to activate)

• PC – can handle delay or crash

Operation?

• Processing in response to input stimuli

• PC – processing in response to human/batching

3

Page 6: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

Resource Constraints

What are some resource constraints?

• Size/Form Factor

• Memory Capacity

• Disk Capacity

• Display

• Energy

• Environment (vibration, temperature, radiation)

• Cost!

4

Page 7: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

Group Exercise

For each of the 5 systems you listed, what are some resource

constraints that you can identify?

5

Page 8: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

Time Constraints

Many embedded systems have time constraints that must be met:

• Real-Time Operation – Time constraint for system/software.

Meet predetermined time constraints, not just executing fast

• Soft Real-Time – Failure to meet time constraint = Degraded

performance

• Hard Real-Time – Failure to meet time constraint = Failure

• Firm Real-Time – Mix of soft and hard constraints

6

Page 9: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

Group Exercise

Pick one of the 5 embedded examples

Does that system have any real-time constraints?

Are they soft? hard? firm? Why?

7

Page 10: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

Developing for Embedded Systems

Page 11: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

What does an embedded system look like?

1

1Top: Ryan Robucci, UMBC, Bottom: David Andrews, Arkansas

8

Page 12: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

Processors for Embedded Systems

Processor Types:

• Microcontrollers (e.g. MSP430, PIC, Atmel)

• Digital Signal Processor Controllers

• Microcomputers

• FPGAs

• ASICs

9

Page 13: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

{Micro} Processor, Computer, Controller

CPU – Unit that fetches, processes a set of general-purpose

instructions Microprocessor

• A CPU on a single chip. It may also have other units (e.g.

caches, floating point processing)

Microcomputer

• A microprocessor + I/O + memory+ etc are put together to

form a small computer for applications like data collection, or

control application.

Microcontroller

• A microcomputer on a single chip. It brings together the

microprocessor core and a rich collection of peripherals and

I/O capability10

Page 14: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

Microcontroller (MCU)

Common peripherals include:

• Serial Communications Devices

• Timers, Counters, PWM

• Analog to Digital (A/D) Digital to Analog (D/A) Converters

Particularly suited for use in embedded systems

• Real-time control applications

• On-Chip program memory and devices

Enables single-chip system implementation (System on chip)

• Smaller, lower-cost products

11

Page 15: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

Why Microcontrollers?

Peripheral Loaded

• ADCs, DACs, GPIOs, Serial, Timers, etc...

Cheap

• ∼ $1 for 8-bit processor

Low Power

• ∼ 300µA operation (AA battery for 275 days)

• < 300µA sleep (AA battery for 225 years)

Programmable – Usually Assembly, C, C++

12

Page 16: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

What language for embedded?

2

2Credit to David Andrews Embedded Systems Course

13

Page 17: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

What language for embedded?

C/C++ are still the dominant languages

C/C++ are built into development environments and compilers,

industry standard, not likely to go away!

New languages have started to gain foothold

• Rust

• Python for Embedded

Hardware Description Languages for FPGA

• Verilog

• VHDL

VLSI & ASIC – Build system into specific ICs

14

Page 18: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

Full OS?

Alternatively, an embedded system could run a full OS

Microcomputers (i.e. Raspberry Pi, Beaglebone) run fill Linux

distributions

Can support some embedded solutions that have reduced

cost/resource penalties

15

Page 19: Introduction to Embedded Systemscsce.uark.edu/~ahnelson/CSCE4114/lectures/lecture2.pdf · Full OS? Alternatively, an embedded system could run a full OS Microcomputers (i.e. Raspberry

Group Activity

Pick one of your example systems:

• Does it contain a single embedded processor? multiple?

• What kind of processor is needed? MCU? DSP? FPGA?

MPU?

16