Beruflich Dokumente
Kultur Dokumente
CKO
Harness systems - Bangalore
Embedded systems
Computing systems are everywhere
Most of us think of desktop computers
PCs
Laptops
Mainframes
Servers
Embedded systems
electronic devices
automobile
Embedded System
An embedded system
is combination of hardware
components
and software components to perform a specific
application
The hardware part is usually:
Processor/Controller
Peripherals
Memory
Bus
And the software part would be:
Application programs
Operating systems
Drivers
Characteristics of embedded
systems
Single-functioned
Executes a single program, repeatedly
Tightly-constrained
Low cost, low power, small, fast, etc.
environment
Must compute certain results in real-time without delay
Gateways
Home Media Servers
Interactive Digital TV
Cable, Satellite and Terrestrial
STBs
HDTVs
Digital Imaging
Digital Cameras,
Printers, MFPs, Scanners, Fax
Mobile & Handheld
Mobile phones
PDAs
Digital Audio/Video
Web-Tablets
Screenphones
Robocleaner
Aibo
Ashimo
In Automobiles
Classification of Embedded
Systems
General Purpose
Embedded
End-user programmable
Developer programmable
GUI
GUI or non-GUI
Multi-purpose to end-user
Design Challenges
Faced
Evolution of Processors
of memory
Operating frequency have moved up to 3 GHz
Advances possible due to
VLSI Technology
Evolution of
In 1970 the first 4 bit microprocessor 4004 was
microprocessors
introduced by Intel.
Then came: 8008, 8080 and 8085 all 8 bit processors
8086, 80186, 80286 16 bit processors
80386, 80486, Pentium, Pentium II, Pentium III and
processors
Intel and AMD biggest players in processor field.
Address/Data
Bus
Memory
Special
function
registers
(PC, SP)
Decode &
Control
Unit
General
purpose
registers
Bus
Controller
Peripheral
bus
controller
ALU
Cloc
k
Microprocessor
General-purpose microprocessor
CPU for Computers
No RAM, ROM, I/O on CPU chip itself
Example Intels x86, Motorolas 680x0
CPU
GeneralPurpose
Microprocessor
Data
Bus
RAM
ROM
I/O
Port
Address Bus
General-Purpose Microprocessor System
Time
r
Seria
l
COM
Port
Classification of
Based on Memory connection:
microprocessor
Van Neumann
Harvard
Harvard architecture
Harvard Architecture
-Developed at Harvard university.
-Uses two different bus systems to transport
-Instructions fetched from the program memory
-Program memory has its own address, data and control bus.
-Data to CPU from peripherals or memory to CPU.
-Data bus has its own address, data and control bus.
-Program and data memories physically/logically separated
(accessed using different buses)
-Simultaneous fetch of instructions from program memory
and data from data memory.
Connection of Peripherals
The peripherals devices also need address and
Memory Mapped IO
IO Mapped IO
IO mapped I/O uses a special class of CPU instructions
memory.
IO mapped IO is accomplished by an extra "I/O" pin on the
Processor Classification
Processor Classification based on Instruction
set architecture
Complex Instruction Set Computer (CISC)
Reduced Instruction Set Computer (RISC)
CISC Architecture
Complex Instruction Set Computer (CISC)
Too many instructions and Addressing modes (>100)
Variable length instructions
execute
CISC
focus.ti.com/lit/ml/slap105a/slap105a.pdf
+ http://ffden-2.phys.uaf.edu/212_fall2003.web.dir/David_Giessel/trans.html
Disadvantages of CISC
Highly complicated control unit
Slower processing time (using microcodes & complex
instructions)
Longer design cycle
CISC Effects
Moved complexity from s/w to h/w
Compact code
Ease of compiler design (HLLCA)
Easier to debug
Lengthened design times
Increased design errors
Intel
AMD
2200+
in execution time.
RISC
Provide only basic instructions & addressing
RISC
Reduced Instruction Set Computer (RISC)
RISC Effect
Move complexity from H/W to S/W
Provided a single-chip solution
Better use of chip area
Better Speed
Feasibility of pipelining
Single cycle execution stages
Uniform Instruction Format
RISC
Two groups of RISC architectures
Digital Alpha
Hewlett-Packard PA-RISC
RISC
Embedded RISCs:
MSP430
Hitachi SuperH
Mitsubishi M32R
RISC
purpose registers
while the desktop/server RISCs have 32
load/store
Instructions are few in number and the instructions widths
are same
A simple RISC instruction set contains:
ALU instructions
Load/Store
Branches and jumps
Disadvantages of RISC
Complicated subroutines
- Used in RISC
Two classes
Register-Memory
Memory addressing modes
Register-register (Load-Store)
Registers are faster than memory.
Registers are more efficient for a compiler to
use
Register-Register
LOAD A, <addr1>
LOAD B, <addr2>
MUL
A, B
STORE <addr1>
RISC is dependent on optimizing compilers
Register-Memory
Memory addressing
Addressing modes
Register
Add R4, R3
Immediate Add R2, #3
Register indirect Add R4, (R3)
Indexed
Add R4, (R3+R5)
Direct or Absolute Add R4, (1000)
Autoincrement
Add R1, (R2)+
Autodecrement
Add R1, -(R2)
devices at 100 MHz, the CPU will have to reduce its speed
from 1GHz to 100 MHz.
This slowing of the CPU will reduce the performance.
Pipelining
Ability to break down a complex operation into
Pipleline Stages
Fetch
Decode
Execute
Fetch
Decode
Execute
Fetch
Decode
Execute
Cache Memory
Local high speed memory to provide a primary pool of reusable
memory.
Benefits of cache improves with cache size.
Memory
CPU
Cache
Superscalar Operation
Execute 1
Fetch
Decode
Execute 2
Execute 3
Availability of
Microprocessors
Currently we dont get microprocessors of size: 4, 8, 16
bit for commercial usage.
So for a simple application like: controlling a toy car or
Micro controllers
A self-contained system in which the processor, support
Microcontrollers
By-product of microprocessor development was micro
controller.
Micro controller is responsible for all the video games,
External Bus
controller
Clock
ROM
General and
Special
Function
registers
ALU
On chip
peripheral
Interrupt
Controller
On-Chip
Peripheral
Benefits of microcontrollers
Following are the reasons why microcontrollers are
incorporated in control systems:
Applications of
TransportationMicrocontrollers
Buildings
access control, smoke sensors, CCTV
Microcontroller
CPU, RAM, ROM, I/O
and timer are all on a
single chip
fix amount of on-chip
ROM, RAM, I/O ports
for applications in which
cost, power and space are
critical
single-purpose
2.
easy to upgrade
3.
MEMORY
Characteristics
Types
Memory wiring
Address Space
Memory Types
MEMO
RY
HYBRI
D
RAM
DRAM
SRAM
NVRAM
ROM
EEPROM
FLASH
EPROM
MASKED
PROM
Memory Systems
There are many types of memory devices - each with a range
of application areas
Issues include
Access speed
Density (how many locations can be crammed into a
certain space on silicon)
Cost
Chip size
Programmability (PROM, EPROM, EEPROM...)
Volatility
Volatile
?
Writeable
?
SRAM
Yes
Yes
Eras
e
Size
Byte
Erase
Cycles
Relative
Cost
Relative
Speed
Expensiv
e
Moderate
Fast
N/A
Unlimi
ted
Unlimi
ted
N/A
DRAM
Yes
Yes
Byte
Masked
ROM
PROM
No
No
No
N/A
N/A
Entir
e
chip
Byte
Limite
d
Limite
d
Moderate
Fast
No
Once,with
program
mer
Yes,with
program
mer
Yes
EPROM
No
EEPRO
M
Expensiv
e
Flash
No
Yes
Secto
r
Limite
d
Moderate
NVRAM
No
Yes
Byte
Unlimi
ted
Expensiv
e
Fast to
read,
slow to
Fast to
write
read,
slow to
Fast
write
Inexpensi
ve
Moderate
Modera
te
Fast
Fast
Addressing memory
When 8-bit microprocessors appeared in the 1970s, memory was
- Expensive
- Only available in small sizes (256 bytes up to 1K)
Applications were small and were written in assembly before
specialised compilers were available for the processors.
The address lines were increased to 16 enabling access for up to
64K address. This space offered by the processors seemed huge and
would never be used up!
Advent of high-level-languages (HLLs) and operating systems
increased memory requirements memory started to become a
limitation.
Memory Space
If there are 8 bits in the data bus, then a 32-bit data write or read
requires 4 bus cycle.
If there are 20 bits in the address, the total addressable memory
space is 1MB (2^20).
Of course there may be multiple memory chips within the
addressable range
Even different types (RAM, ROM, EPROM, Flash)
And unfilled holes in the address range.
Memory Map
Processor-Memory interface
Address bus
Higher
address
lines
Address
decoder
Read/notWrite
RAM
RAM
RAM
Data bus
Individual chip selects
Clock line
Processor
Peripherals
Memory is just storage and is not the only device connected to a given
processor.
I/O devices (peripherals) are connected to processor enabling interaction
with the surrounding environment.
I/O devices used for read are Input devices and I/O devices used for write
are Output devices.
Example peripherals:outputs:
One or more LEDs
A digital-to-analog converter
Input:
Switches, buttons, and knobs, etc`
Peripherals
interfaces for analogue peripheral devices
sensors
Input
conditioning
Conversion/buffering
processing
Motors,
actuators,
pumps,
temperature
control,
positioncontrol, audio,
video etc
Output
conditioning
analogue
Conversion/storage
digital
Peripherals
Example : a PWM motor controller:
inputs are:
demanded speed - user input
actual speed - sensor output
output is:
pulse-width modulated (PWM) waveform to control
power-switching to the motor
PWM Waveform
Counter/timer
Power amplifier
Speed Sensor (tachometer) output
V
+
t
start
stop
A/D converter
Parallel interface
microcontroller
Software to
implement
motor control
Types of Peripherals
Main types of peripherals :
binary outputs - simple external pins which can output a 1 or a 0 (5V
or 0V approx.) Often grouped together to form parallel ports where a
group of bits can be input or output simultaneously. Once a bit is set, the
value remains because it uses a latching flip-flop implementation
serial outputs - send and receive data using a transmit(tx) pin and a
receive(rx) pin on a chip. Parallel data is written to a register and the
serial port logic automatically sends it serially, bit by bit, out on the tx pin
at a program selectable rate. Status register information is available to be
read by a program and error information is also available.
Peripherals
Analogue interfaces: the real world often provides continuous
analogue information whereas the digital world works with discrete
values. Conversion circuits are required
Displays : simple seven-segment light-emitting-diode (LED)
displays, individual LEDs, liquid-crystal-displays (LCD) of various
forms including graphic and alpha-numeric, monitors and other
display technologies
Time related values: counter-timer devices allow rate-generation,
PWM, single-shot pulse (one pulse of deterministic length) and also
allow measurement of time and rate from externally generated pulse
sources.
Summary
Embedded Systems
Components of Embedded systems
Microprocessor
Classification of microprocessors
Microcontrollers
Criteria for choosing the microcontroller
Memory
Peripherals