M.Sc.
Electrical Engineering
Spring 2019
Lecture 1
Prof. Dr. Muhammad Iram Baig
1
Grading
Grade Breakdown
Quizzes / Assignments 20%
Presentations / Project 20%
MID Semester Exam 20%
End Semester Exam 40%
Total 100%
Attendance Requirement: 85 %
Class Schedule
Class Time: Thursday
6 PM to 9 PM
Venue: Electrical Department
Class Room # 1
Books: 1. Embedded System Design
by Peter Marwedel (Springer)
2. PIC Microcontroller & Embedded Systems
by Mazidi (Pearson)
What is an Embedded System?
A physical system that is controlled by its own processor,
rather than an external one.
Any device that includes a computer but is not itself a
general-purpose computer
Hardware and Software, part of some larger systems and
expected to work without human intervention.
Often the user of the device is not even aware that a
computer is present.
Responds, monitors and controls external environment
using sensors & actuators.
4
A “short list” of embedded systems
Anti-lock brakes Modems
Auto-focus cameras MPEG decoders
Automatic teller machines Network cards
Network switches/routers
Automatic toll systems
On-board navigation
Automatic transmission Pagers
Avionic systems Photocopiers
Battery chargers Point-of-sale systems
Camcorders Portable video games
Printers
Cell phones
Satellite phones
Cell-phone base stations Scanners
Cordless phones Smart ovens/dishwashers
Cruise control Speech recognizers
Curbside check-in systems Stereo systems
Teleconferencing systems
Digital cameras
Televisions
Disk drives Temperature controllers
Electronic card readers Theft tracking systems
Electronic instruments TV set-top boxes
Electronic toys/games VCR’s, DVD players
Video game consoles
Factory control
Video phones
Fax machines Washers and dryers
Fingerprint identifiers Life-support systems
Home security systems Medical testing systems
And the list goes on and on
5
Embedded System Applications
Aerospace Navigation systems, automatic landing systems, flight
attitude controls, engine controls, space exploration
(e.g., the Mars Pathfinder).
Fuel injection control, passenger environmental controls,
Automotive anti-lock braking systems, air bag controls, GPS
mapping.
Nintendo's "Game Boy", Mattel's "My Interactive Pooh",
Children's Toys
Tiger Electronic's "Furby".
Communications Satellites; network routers, switches, hubs.
Dishwashers, microwave ovens, VCRs, televisions,
stereos, fire/security alarm systems, lawn sprinkler
Home
controls, thermostats, cameras, clock radios, answering
machines.
6
Embedded System Applications
Industrial Elevator controls, surveillance systems, robots.
Office FAX machines, copiers, telephones, cash registers.
Automation
Medical Imaging systems (e.g., XRAY, MRI, and ultrasound),
patient monitors, heart pacers.
Personal Personal Digital Assistants (PDAs), pagers, cell phones,
wrist watches, video games, portable MP3 players, GPS.
Instrumentation Data collection, oscilloscopes, signal generators, signal
analyzers, power supplies
Computer Printers, scanners, keyboards, displays, modems, hard
Peripherals disk drives, CD-ROM drives.
7
Embedded Automotive
More than 30% of the cost of a car is now in Electronics
90% of all innovations will be based on electronic systems 8
9
Embedded Systems Hardware
Embedded systems hardware is used for processing input to
provide output in task specific fashion
Input Processing Output
Interface Systems Interface
10
Processors
Micro-Processors and Microcontrollers
Key Requirements:
Energy Efficient
High Code Density
Combined Size of all instructions needed to perform a
particular task
Characteristics of a particular instruction set
11
Microprocessors
CPU for computers
External RAM, ROM and I/Os
Example: Intel x86, Motorola 680x0
DataBus
CPU I/O Serial
RAM ROM Timers
Ports Port
Address Bus
12
Microcontrollers
Microcontroller contains some amounts of
memories and I/Os along with CPU, making it a
Microcomputer system on a single chip.
Examples:
Intel’s 8051 CPU RAM ROM
PIC series by Microchip
ARM microcontrollers
and many more I/O Timers Serial Port
13
Few Components of a Microcontroller
A Timer module to allow the micro-controller
to perform tasks for certain time periods
A serial I/O port to allow data to flow between
the micro-controller and other devices such as
a PC or another micro-controller
An ADC to allow the micro-controller to accept
analogue input data for processing
And many others
14
Micro-controller
15
Why Micro-controller ?
Low cost, small packaging
Low power consumption
Programmable/ re-programmable
Lots of I/O capabilities
Easy integration with circuits
Single-purpose
Good for applications in which cost, power and space
are critical
16
Architectures
Von Neuman
Harvard
CISC
RISC
Super Scalar
VLIW
17
Architectures
Von Neuman (Princeton)
Only one Memory holds (data + instructions)
18
Architectures
Von Neuman
Data and Program share the same bus and the
same memory, and so must have the same width.
CPU Registers:
Program Counter (PC), Instruction Register (IR) and
other general purpose registers, etc.
Bottleneck: Getting instructions interferes with
accessing RAM
Self-correcting programs
19
Architectures contd…
Harvard
Separate program bus and data bus (can be of different widths!)
20
Architectures contd…
Harvard
Instruction Pipelining Easy
Can’t use self modifying codes
Allows 2 simultaneous memory Fetches
Most DSPs use Harvard Architecture for
streaming data.
Greater memory Band-width
More predictable Band-width
21
22
Architectures contd…
CISC - (Complex Instruction Set Computer)
Huge instruction set
Carrying out a different permutation of the same operation
Instructions for complex operations
Different instructions of different format
Different instructions of different length
Many Addressing modes
Requires multiple cycles for execution
23
Architectures contd…
RISC- (Reduced Instruction Set Computer)
Reduced set of Instructions for simple operations
Pipeline Friendly
Each instruction of fixed length
Can be executed in a single cycle
Large general purpose Register set
Can contain data or addresses
Load-store Architecture
No Memory Access for data processing instructions
24
Architectures contd…
RISC vs CISC
25
Architectures contd…
Super Scalar
Multiple CPUs in a single Processor
Processor decides at runtime about the instructions that
can be executed parallel. (Complex HW)
Instructions will be executed in an order different from the
strictly sequential one with the restriction that the result
must be correct.
Execution policies:
1. In-order issue with in-order completion
2. In-order issue with out-of-order completion
3. Out-of-order issue with out-of-order completion
Examples:
Intel’s Pentium, IBM Power2, AMD K5, MIPS R10K, HP PA8500,
Cyrix 6x86 26
Architectures contd…
VLIW (Very Large Instruction Word)
Multiple CPUs in a single Processor
Compiler decides about the instructions that can
be executed parallel and can be grouped in one
bundle (ILP, Instruction Level Parallelism)
Examples:
i860 (dual mode: RISC and VLIW), TriMedia, SHARC,
Itanium, EPIC, ST200, StarCore, Transmeta Crusoe,
Xtensa
27
CISC vs RISC vs SS vs VLIW
CISC RISC Superscalar VLIW
Instruction fixed size (but
variable size fixed size fixed size
size large)
Instruction variable
fixed format fixed format fixed format
format format
few, some GP and rename many, many
Registers many GP
special (RUU) GP
Memory embedded in
load/store load/store load/store
reference many instr’s
data hardware code
decode
Key Issues forwarding, dependency scheduling,
complexity
hazards resolution (compiler)
Instruction IF ID EX M WB
IF ID EX M WB IF ID EX M WB
EX M WB
flow IF ID EX M WB
IF ID EX M WB
IF ID EX M WB IF ID EX M WB
IF ID EX M WB IF ID EX M WB EX M WB
Performance Comparison
Performance Comparison contd…
Traditional Embedded Systems
31
Components of Embedded Systems
32
Concluding Remarks
Embedded computers are all around us.
Many systems have complex embedded
hardware and software
Embedded systems have pose many design
challenges: design time, deadlines, power, etc
Design methodologies help us manage the
design process
33
Assignment # 1
a) CPUs (Salient info)
i860 (dual mode: RISC and VLIW), TriMedia, SHARC,
Itanium, EPIC, ST200, StarCore, Transmeta Crusoe,
Xtensa, Infeneon
b) Daily life examples of embedded systems around us
c) Microcontroller/microprocessor working voltages ?
d) HDD and RAM speeds, data transfer rate?
Due on next class (28.03.2019) 34