Chapter3_2017SemIEmbSysvStdRev_4in1
Chapter3_2017SemIEmbSysvStdRev_4in1
User interface input devices usually include Keyboards, push button, switches
etc.
U interface
User i t f output
t t devices
d i i l d LEDs,
include LED LCDs,
LCD Piezoelectric
Pi l t i buzzers
b etc
t
The requirement of type of user interface changes from application to
application based on domain
An embedded system without a control algorithm implemented memory will
nott be
b capable
bl off making
ki any decision
d i i depending
d di on the
th situational
it ti l as wellll as 7 8
real world changes
COMPONENTS OF ES HARDWARE PROCESSOR/CORE
PROCESSOR/CORE GENERAL PURPOSE AND DOMAIN SPECIFIC PROCESSORS
Embedded systems are built around a central General Purpose and Domain Specific Processors could be further
classified into
core Microprocessors
Microcontrollers
The core of the ES falls into any one of the Digital Signal Processors (DSP)
GENERAL PURPOSE AND DOMAIN SPECIFIC PROCESSORS GENERAL PURPOSE AND DOMAIN SPECIFIC PROCESSORS
MICROPROCESSOR MICROCONTROLLER
A silicon chip
p representing
p g a central p
processingg unit ((CPU)) A highly integrated silicon chip containing
CPU, RAM, Special and General purpose Registers
In general the CPU contains the Arithmetic and Logic Unit (ALU),
On Chip ROM/FLASH memory
control unit and working registers Timer and Interrupt control units and dedicated I/O ports
Microprocessor is a dependent unit and requires other
hardware units for proper functioning Contains all the necessary functional blocks for independent working
Can be considered as a super set of microprocessors
Memory, Timer Unit, and Interrupt controller etc
Heavilyy utilized in the embedded domain in p place of microprocessors
p
IIntel
t l claims
l i th
the credit
dit for
f d l i
developing th
the fi t
first Cheap, cost effective and readily available in the market
Microprocessor unit ‐ Intel 4004 Can be
A 4 bit processor which was released in Nov 1971, designed for General purpose (like Intel 8051, designed for generic applications and
calculators domains) OR
Application specific (Like Automotive AVR from Atmel Corporation designed
Key players in the microprocessors market are
specifically for automotive applications)
Intel, AMD, Freescale, GLOBALFOUNDRIES, TI, Cyrix, NVIDIA, Texas Instrument
Instrument’ss TMS 1000 is considered as the world
world’ss first
Qualcomm, MediaTek etc 11 12
microcontroller
GENERAL PURPOSE AND DOMAIN SPECIFIC PROCESSORS GENERAL PURPOSE AND DOMAIN SPECIFIC PROCESSORS
MICROPROCESSOR VS. MICROCONTROLLER MICROPROCESSOR VS. MICROCONTROLLER…
Microprocessor Microcontroller
A silicon chip representing a CPU, which is capable of Highly integrated chip that contains a CPU, scratch
performing arithmetic as well as logical operations pad RAM, special and general purpose register arrays,
according to a pre‐defined set of instructions on chip ROM/FLASH memory for program storage,
timer and interrupt control units and dedicated I/O
ports
A dependent unit. It requires the combination of A self‐contained unit and it doesn’t require external
other chips like timers, program and data interrupt controller, timer, UART, etc. for its
memory chips, interrupt controllers, etc. for functioning
functioning
Most of the time general purpose in design Mostly application‐oriented or domain‐specific
and operation
GENERAL PURPOSE AND DOMAIN SPECIFIC PROCESSORS GENERAL PURPOSE AND DOMAIN SPECIFIC PROCESSORS
DSP DSP…
Powerful special purpose 8/16/32 bit microprocessors designed A typical DSP incorporates the following key units
Program Memory
specifically to meet the computational demands and power For storing the program required by DSP to process the data
constraints of today's embedded audio, video, and Data Memory
Working memory for storing temporary variables and data/signal to be processed
communications applications
pp Computational Engine
2 to 3 times faster than the general purpose microprocessors in Performs the signal processing in accordance with the stored program memory
signal processing applications I/O Unit
Acts as an interface between the outside world and DSP
DSPs implement algorithms in hardware which speeds up the Responsible
espo s b e for
o cap
capturing
u g ssignals
g a s to
o be p
processed
ocessed aand
d de
delivering
e g thee p
processed
ocessed ssignals
g as
execution
Audio video signal processing, telecommunication and multimedia applications
Whereas general purpose processors implement the algorithm in
are typical examples where DSP is employed
software and the speed
p of execution depends
p primarilyy on the clock
p
for the processors Employs a large amount of real‐time calculations with operations involving
DSP can be viewed as a microchip designed for performing high Sum of products (SOP) calculation, convolution, fast Fourier transform (FFT), discrete
speed
p computational
p operations
p for ‘addition’,, ‘subtraction’,, Fourier transform (DFT)
15 16
‘multiplication’ and ‘division’
GENERAL PURPOSE AND DOMAIN SPECIFIC PROCESSORS GENERAL PURPOSE AND DOMAIN SPECIFIC PROCESSORS
APPLICATION SPECIFIC INSTRUCTION SET PROCESSOR (ASIP) ARCHITECTURAL CLASSIFICATION
Processors with architecture and instruction set optimized
p GP Purpose and Domain Specific Processor could be
to specific domain/application requirements like Network classified based on various processor design options
processing, Automotive, Telecom, media applications,
digital signal processing,
processing control applications etc.
etc
Fill the architectural spectrum between General Purpose Based on the Design Philosophy of Instruction Set
Processors and Application Specific Integrated Circuits Architecture
(ASICs) Reduced Instruction Set Computing (RISC)
The need for an ASIP arises when the traditional general
Complex Instruction Set Computing (CISC)
purpose
p p processor are unable to meet the increasingg
p
application needs
ASIPs incorporate a processor and on‐chip peripherals, Based on Memory System architecture
demanded by the application requirement,
requirement program and 17
Harvard 18
data memory Princeton /Von Neumann/
GENERAL PURPOSE AND DOMAIN SPECIFIC PROCESSORS GENERAL PURPOSE AND DOMAIN SPECIFIC PROCESSORS
RISC VS. CISC PROCESSOR/CONTROLLER HARVARD VS. VON NEUMANN ARCHITECTURE
RISC CISC
Von‐Neumann/Princeton Architecture
Lesser number of instructions Greater number of instructions
Shares a single common bus for fetching both instructions and data
Instruction Pipelining and increased execution speed Generally no instruction pipelining feature Program instructions and data are stored in a common main memory
Orthogonal instruction set (Allows each instruction to Non‐orthogonal instruction set (All instructions are not First fetch an instruction and then fetch the data to support the instruction
operate on any register and use any addressing mode) allowed to operate on any register and use any
from code memory
addressing mode. It is instruction‐specific)
Two separate fetches slows down the controller’s operation
Operations are performed on registers only, the only Operations are performed on registers or memory
memory operations are load and store depending on the instruction Harvard Architecture
A large number of registers are available Limited number of general purpose registers Have separate data bus and instruction bus
Programmer needs to write more code to execute a task Instructions are like macros in C language. A Allows the data transfer and program fetching to occur simultaneously on
since the instructions are simpler ones programmer can achieve the desired functionality with both buses
a single instruction which in turn provides the effect of The data memory can be read and written while the program memory is being
using more simpler single instructions in RISC accessed
Single, fixed length instructions Variable length instructions These separated data memory and code memory buses allow one instruction
Less silicon usage and pin count More silicon usage since more additional decoder logic to execute while the next instruction is fetched (“Pre‐fetching”)
is required to implement the complex instruction
decoding.
19 20
With Harvard architecture Can be Harvard or Von Neumann
Example: ARM Family, PIC, MIPS Example: 8086, 8051, Motorola 68k Series
GENERAL PURPOSE AND DOMAIN SPECIFIC PROCESSORS GENERAL PURPOSE AND DOMAIN SPECIFIC PROCESSORS
HARVARD VS. VON NEUMANN ARCHITECTURE HARVARD VS. VON NEUMANN ARCHITECTURE…
Harvard Architecture Von-Neumann Architecture
Separate buses for instruction and data Single shared bus for instruction and data
fetching fetching
Easier to pipeline,
pipeline so high Low performance compared to Harvard
performance can be achieved architecture
Comparatively high cost Cheaper
No memory alignment problems Allows self modifying codes
Since data memory and program Since data memory and program
memory are stored physically in memory are stored physically in the
different locations, no chances for same chip, chances for accidental
accidental corruption of program corruption of program memory
memory
21 S
Separate
t buses
b f
for i t ti
instruction and
d data
d t Si l shared
Single h d bus
b for
f instruction
i t ti and
d data
d t22
fetching fetching
PROCESSOR/CORE PROCESSOR/CORE
ASICS ASICS…
A micro chip designed to perform a specific or unique application Fabrication of ASICs requires a non‐refundable initial investment
Used as replacement to conventional general purpose logic chips (Non Recurring Engineering (NRE) charges) for the process
Integrates several functions into a single chip and thereby technology and configuration expenses
reduces the system
y development
p cost If the Non‐Recurringg Engineering
g g Charges
g ((NRE)) is born byy a third
As a single chip, ASIC consumes very small area in the total party and the Application Specific Integrated Circuit (ASIC) is
system and thereby helps in the design of smaller systems with made openly available in the market,
high capabilities /functionalities The ASIC is referred as Application
pp Specific
p Standard Product(ASSP)
( )
Mostly proprietary The ASSP is marketed to multiple customers just as a general‐
Its fabrication could be either of purpose product, but to a smaller number of customers since it is
Pre‐fabricated for
o a spec
specificc app
application
cat o
For a special application Example
Custom fabricated
The ADE7760 Energy Meter ASIC developed by Analog Devices for
Using the components from a re‐usable “building block” library of components
for a particular customer application Energy metering applications
23 24
PROCESSOR/CORE PROCESSOR/CORE
PROGRAMMABLE LOGIC DEVICES (PLDS) PROGRAMMABLE LOGIC DEVICES (PLDS)…
Logic devices provides specific functions, including device to device With PLDS
interfacing, data communication, signal processing, data display, timing Designers can use inexpensive software tools to quickly develop,
& control operations, and almost every other function a system must simulate, and test their logic designs
perform The design can be quickly programmed into a device, and immediately
testedd in a live
l circuit
Logic devices can be broadly classified into Advantage of PLDs
Fixed logic device No NRE cost
Programmable logic device Final design completed much faster than custom/fixed logic device
During the design phase it is possible to change the circuitry as often
Circuits in fixed logic devices are permanent, they perform one function as needed, until the design operates as expected
or set of functions once manufactured,
manufactured they cannot be changed As it is based on re
re‐writable
writable memory technology
Programmable Logic devices can be re‐configured to perform any Once the design complete, it can go immediately into production
number of functions at any time Two major types of PLDs
Offer customers a wide range g of logic
g capacity,
p y, features,, speed,
p , and Field Programmable Gate Arrays (FPGA)
25 Complex Programmable Logic Device (CPLD) 26
voltage characteristics
PROCESSOR/CORE PROCESSOR/CORE
COMMERCIAL OFF-THE-SHELF COMPONENTS COMMERCIAL OFF-THE-SHELF COMPONENTS
(COTS) (COTS)…
Such products are those which are used “as‐is” The majorj advantage g of usingg COTS
Designed in such a way to provide easy integration and Readily available in the market
interoperability with existing system components Cheap and a developer can cut down his/her development
Mayy be developed
p around GPP or ASIP or ASIC or ASSP or PLD time to a great extent
Example : Control unit of Remote Controlled Toy Car No need to design the module yourself and write the
firmware
Everything will be readily supplied by the COTs manufacturer
Disadvantage of COTS
No operational and manufacturing standards
Components from different manufacturers many not be
i
interoperable
bl
Compatibility issues
Might restricts the end‐user to stick to a particular vendor
29 30
MEMORY MEMORY
PROGRAM STORAGE MEMORY PROGRAM STORAGE MEMORY…
Masked ROM Electrically Erasable Programmable Read Only Memory (EEPROM)
One‐time programmable (OTP) memory/ Can't be reprogrammed Can be erased and reprogrammed in‐circuit
Factory programmed (Mask‐Programmed) Provides greater flexibility for system design
Low cost for high volume production Capacity is limited when compared with the standard ROM (A few kilobytes)
E h cellll is
Each i a single
i l transistor
t it
FLASH
Programmable Read Only Memory (PROM) Takes advantages of both EPROM and EEPROM
Nott pre‐programmed
N d by
b the
th manufacturer
f t Stores information in an array of floating gate MOSFET transistors
End user is responsible for Programming these devices All the contents on large block can be erased
33 34
Embedded system
y is in constant interaction with the real world A transducer
a sduce dedevice
ce that
a de
detects
ec s p
physical,
ys ca , cchemical,
e ca , oor
Controlling/monitoring functions executed by the embedded environmental changes (such as temperature, light,
system is achieved in accordance with the changes happening to motion, or pressure) and converts them into an
the Real World electrical
l i l signal
i l for
f processing
i
The changes in the system environment or variables are detected Convertsenergy from one form to another for any
by the sensors connected to the input port of the embedded measurement or control purpose
system Sensorsacts as input device
If the embedded system is designed for any controlling purpose, Example
the system
y will p
produce some changes g in controllingg variable to Soil moisture sensor,
sensor Ultrasonic sensor,
sensor Temperature sensor
bring the controlled variable to the desired value
Achieved through an actuator connected to the out port of the
embedded system
35 36
COMPONENTS OF ES HARDWARE COMPONENTS OF ES HARDWARE
ACTUATOR THE I/O SUBSYSTEM
A form
o o of transducer
a sduce dedevice
ce ((mechanical
ec a ca o or eelectrical)
ec ca ) Facilitates the interaction of the embedded system with external world
The interaction happens through the sensors and actuators connected
which converts signals to corresponding physical to the Input and output ports, respectively of the embedded system
action (motion)
Acts
A as an output device
d i The
h sensors may not be b directly
d l interfaced
f d to theh Input ports, instead
d
they may be interfaced through signal conditioning and translating
Different types of actuators
systems like Analogue to Digital Converter (ADC), Optocoupler etc.
Electric,, Pneumatic,, Hydraulic,
y , Magnetic
g
Example Sample I/O Devices
DC motor, servo motor, Stepper motor Light Emitting Diode (LED), Seven segment display, Optocoupler, Stepper
Motor, Relay, Piezo Buzzer, Push Button Switch, Keyboard, Programmable
Peripheral Interface (PPI)
37 38
Parallel Interface
41 42
45 46
was the most popular communication interface during the olden days, the
advent of other communication techniques like Bluetooth, USB, Firewire, etc are
pushing down RS
RS‐232
232 from the scenes
51 52
EXTERNAL COMMUNICATION INTERFACE COMPONENTS OF ES HARDWARE
WIRELESS SUPERVISORY AND SUPPORT CIRCUITS
Infrared(IrDA) Refer to the components,
components circuits,
circuits ICs which are
Bluetooth (BT) necessary for the proper functioning of the
Wi‐Fi
embedded system
Zigbee
Example: Watchdog timer, Reset circuit, Brown‐
GPRS, 3G, 4G, 5G
out p
protection circuit,, Clock Oscillator circuit,, RTC
57 58
Th product
The d starts functioning
f i i properlyl once the
h intelligence
i lli i
imparted
d to the
h
When an interrupt is triggered, the CPU gets notified with the product by embedding the firmware in the hardware
interrupt number, which is used to execute the The product will continue serving the assigned task till hardware breakdown
p
occurs or a corruption in embedded firmware
respective interrupt service routine (ISR) on the CPU
In case of hardware breakdown, the damaged component may need to be
replaced and for firmware corruptions the firmware should be re‐loaded, to
Example: Intel PIC ‐ 8259 bring back the embedded product to the normal functioning
65 66
is non alterable by end users
The different approaches available for the design and implementation of the
End of Chapter 3
embedded firmware will be the focus of the upcoming chapter
67 68