embedded systems introduction. embedded systems design what is an “embedded system”? easiest...

15
Embedded Systems Introduction

Upload: dwight-tucker

Post on 26-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Embedded Systems Introduction. Embedded Systems Design What is an “Embedded System”? Easiest answer is to compare them to a something that you’re familiar

Embedded Systems

Introduction

Page 2: Embedded Systems Introduction. Embedded Systems Design What is an “Embedded System”? Easiest answer is to compare them to a something that you’re familiar

Embedded Systems Design• What is an “Embedded System”?

• Easiest answer is to compare them to a something that you’re familiar with – a PC

Page 3: Embedded Systems Introduction. Embedded Systems Design What is an “Embedded System”? Easiest answer is to compare them to a something that you’re familiar

Tasks Performed

• PC– A general purpose

computer designed to perform an infinite number of tasks

– Can do many of these “simultaneously”

– If you can program it, a PC can perform it

– Software-centric system– Easily reconfigured

(reprogrammed) to perform various tasks

• Embedded System– Designed to perform a

specific task

– Does only one [or a few] thing(s)

– Task-centric system

– Hardware/Software system– Changing the task

generally means scrapping the entire system

Page 4: Embedded Systems Introduction. Embedded Systems Design What is an “Embedded System”? Easiest answer is to compare them to a something that you’re familiar

Availability of Processors• PC

– Built around a couple of architectures

• Intel• Motorola• Sun

– General purpose Complex Instruction Set Computer (CISC)

– Many special features– Large instruction word

• Embedded System– Hundreds of architectures

available• Quite often the developer

will buy “the design” and build their own chips as part of their system

– FPGA– ASIC

– Limited, Reduced Instruction Set Computer (RISC)

– Microcontroller– Small instruction word

Page 5: Embedded Systems Introduction. Embedded Systems Design What is an “Embedded System”? Easiest answer is to compare them to a something that you’re familiar

Cost

• PC– The consumer/user

is willing to pay for useful features

• Speed• Memory• Device support

– “Cost is no object” [almost]

• Embedded System– Consumer/user only

sees [and pays for] the end product

– Saving pennies per system can lead to millions of dollars in the developer’s pocket

• Consumer/user does not want to pay for the embedded processor

Page 6: Embedded Systems Introduction. Embedded Systems Design What is an “Embedded System”? Easiest answer is to compare them to a something that you’re familiar

Timing Constraints

• PC– Time is relative– Pre-emptive system

• Sure I’d like my job done now but if you have something more important to do then I can wait

– Non-Real-Time System

• Embedded System– Time is of the essence– Time-critical

• Task must complete in the allotted time or something really bad may happen

– Time-sensitive• Now would be good but

real soon is OK too…but not too long

– Real-Time System

Page 7: Embedded Systems Introduction. Embedded Systems Design What is an “Embedded System”? Easiest answer is to compare them to a something that you’re familiar

Operating System

• PC– Full featured OS

• Multi-tasking• Pre-emptive scheduler• File management• Device management

– Basically 3 (now 2?)• Windows• Linux• Mac OS

• Embedded System– Minimal features

• Multi-tasking• Priority based scheduling• Interrupt driven• If you’re lucky and can

afford it you can have a Real Time Operating System (RTOS)

– Various RTOSs available• VxWorks (WindRiver)• MicroC/OS (mucous)• BREW (Qualcomm)

– Often there is no OS at all!

Page 8: Embedded Systems Introduction. Embedded Systems Design What is an “Embedded System”? Easiest answer is to compare them to a something that you’re familiar

Implications of Failure• PC

– Software failures, while annoying, are generally not catastrophic

– That’s why the reset button is on the front

• Embedded System– Software failures may

doom the entire system

• Think “Mars rover”• The reset button is

anything but conveniently placed

– Many systems must be designed to bring themselves back out of a “coma”

Page 9: Embedded Systems Introduction. Embedded Systems Design What is an “Embedded System”? Easiest answer is to compare them to a something that you’re familiar

Power Usage

• PC– In general, we don’t ever

think about it (except perhaps when we get our electricity bill)

– Power means heat• Ever see the heat sink

on a Pentium? – We leave it turned on all

the time

• Embedded System– Batteries

• Get expensive• Recharging can be

inconvenient• Thus, we worry about

power consumption• All features use power,

including software– Heat dissipation is often

impossible– System must “sleep”

whenever possible to conserve power

Page 10: Embedded Systems Introduction. Embedded Systems Design What is an “Embedded System”? Easiest answer is to compare them to a something that you’re familiar

Environmental Conditions• PC

– Sits in the comfort of our office

• Harshest environmental issue is spilt coffee

• Embedded System– Application specific

• Dust• Smoke• Heat• Cold• Humidity • Altitude• Gravity – or lack thereof• Vibration

– This is the stuff that can make embedded systems very expensive

Page 11: Embedded Systems Introduction. Embedded Systems Design What is an “Embedded System”? Easiest answer is to compare them to a something that you’re familiar

Resources

• PC– Multiple I/O devices

• Keyboard• Mouse• Monitor• RW CD/DVD• Speakers• Printer• Disc drives• etc.

– There’s lots of stuff attached to the processor via various buses

• Embedded System– A couple of buttons that

handle multiple features• Press once to set time• Press twice to display

month• etc.

– Very few resources to manage

• Handled via a small number of I/O pins on the microcontroller

Page 12: Embedded Systems Introduction. Embedded Systems Design What is an “Embedded System”? Easiest answer is to compare them to a something that you’re familiar

Code Space

• PC– Programs reside on a disc

until summoned into RAM by the OS

– Programs can be BIG– Once there, the OS can

swap them in and out as necessary

– Boots from ROM BIOS then hands off to disc-based OS

– Code can be changed at any time (with the exception of the boot ROM which is quasi-permanent)

• Embedded System– There is no disc!

• Code resides in ROM and may even run from there

• RAM is generally limited and used for data

– Size is a limiting factor– Interrupt based system

(maybe)– Boot code must initialize the

system as well as perform POST (Power On Self Test) to ensure system integrity

– Code modification is difficult

Page 13: Embedded Systems Introduction. Embedded Systems Design What is an “Embedded System”? Easiest answer is to compare them to a something that you’re familiar

Development Tools

• PC– Rich set of tools

• Editors• Compilers• Debuggers• Profilers• Memory managers• Device drivers• etc.

• Embedded Systems– Limited tools– Often the microcontroller is

selected based on available toolsets

– Since the system is primarily hardware, debugging is difficult

• ROM emulator acts as a hardware IDE [of sorts]

– Debugging circuitry is often built into the hardware

• Costs money in production but saves money in development/life cycle

Page 14: Embedded Systems Introduction. Embedded Systems Design What is an “Embedded System”? Easiest answer is to compare them to a something that you’re familiar

Required Skills

• PC– Software

development– “Algorithm level”

programming– Limited hardware

understanding• Underlying

architecture (assembly language)

• Embedded Systems– Software

development– “Bit twiddling”

programming– Extensive hardware

understanding• ASIC interfaces• Communication

protocols

Page 15: Embedded Systems Introduction. Embedded Systems Design What is an “Embedded System”? Easiest answer is to compare them to a something that you’re familiar

Where To?

• Class will be in two parts (interleaved)– “theory” utilizing the text book and other

assigned readings– “practice” utilizing the Parallax Basic

Stamp development kits