Prof. Dr. Muhammad Iram Baig: M.Sc. Electrical Engineering Spring 2019
Prof. Dr. Muhammad Iram Baig: M.Sc. Electrical Engineering Spring 2019
Electrical Engineering
Spring 2019
Lecture 1
1
Grading
Grade Breakdown
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
7
Embedded Automotive
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
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…
23
Architectures contd…
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…
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