Introduction 2013

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 234

Embedded System

MCS122
17:02 1
Embedded System
Course Unit I
• Introduction to embedded
systems, categories of
Embedded Systems;
• architecture of Embedded
Systems;
• Implementation of Embedded
System, Hardware Evolution;
• Challenges in designing of
Embedded System. Skill
required for an Embedded
System Designer.
17:02 2
Embedded System
• Programmable Processor
Architecture: Instruction set
architecture;
• memory organization, operand
location and memory
addressing.
17:02 3
Embedded System
• 8051 architecture in brief.
Enhancing processor
performance;
• Introduction to advanced
processor, case studies for
selection of processor in
hardware design and memory
for software design
17:02 4
Embedded System
II Programming in assembly language (ALP) vs. High Level Language - Concepts of EMBEDDED
PROGRAMMING in C++ - Objected Oriented Programming – Embedded Programming in C++, ‘C’
Program, compilers, Cross compiler – Optimization of memory codes. Definitions of process, tasks and
threads – Clear cut distinction between functions – ISRs and tasks by their characteristics – Operating
System Services- Goals – Structures- Kernel - Process Management – Memory Management – Device
Management – File System Organization and Implementation – I/O Subsystems – Interrupt Routines
Handling in RTOS, 14 III REAL TIME OPERATING SYSTEMS : Task scheduling models, Inter process
communication and synchronization, ,Priority Inversion Problem and Deadlock Situations, Inter Process
communications. Study of Micro C/OS-II or Vx Works or Any other popular RTOS – RTOS System Level
Functions – Task Service Functions – Time Delay Functions – Memory Allocation Related Functions –
Semaphore Related Functions – Mailbox Related Functions – Queue Related Functions – Case Studies
of Programming with RTOS – Understanding Case Definition – Multiple Tasks and their functions –
Creating a list of tasks – Functions and IPCs – Exemplary Coding Steps 13
References: Rajkamal, Embedded Systems Architecture, Programming and Design, TATA McGraw-Hill,
First reprint Oct. 2003 David E.Simon, An Embedded Software Primer, Pearson Education Asia, First
Indian Reprint 2000. Steve Heath, Embedded Systems Design, Second Edition-2003, Newnes; Wayne
Wolf, Computers as Components; Principles of Embedded Computing System Design – Harcourt India,
Morgan Kaufman Publishers, First Indian Reprint 2001 Frank Vahid and Tony Givargis, Embedded
Systems Design – A unified Hardware /Software Introduction, John Wiley, 2002

17:02 5
Embedded System
Programming in assembly language
(ALP) vs. High Level Language -
Concepts of EMBEDDED
PROGRAMMING in C++ - Objected
Oriented Programming – Embedded
Programming in C++, ‘C’ Program,
compilers, Cross compiler – Optimization
of memory codes. Definitions of process,
tasks and threads – Clear cut distinction
between functions – ISRs and tasks by
their characteristics – Operating System
Services- Goals – Structures- Kernel -
Process Management – Memory
Management – Device Management –
File System Organization and
Implementation – I/O Subsystems –
Interrupt Routines Handling in RTOS,
17:02 6
References
1. Rajkamal, Embedded
Systems
Architecture, Programming and
Design, TATA McGraw-Hill, First
reprint Oct. 2003 2. David
E.Simon, An Embedded
Software Primer, Pearson
Education Asia, First Indian
Reprint 2000. 3. Steve Heath,
Embedded Systems
Design, Second Edition-2003,
Newnes;
17:02 7
References
4. Wayne Wolf, Computers as
Components; Principles of
Embedded Computing System
Design – Harcourt India, Morgan
Kaufman Publishers, First Indian
Reprint 2001 5. Frank Vahid and
Tony Givargis,
Embedded Systems Design –
A unified Hardware /Software
Introduction, John Wiley, 2002
17:02 8
Definition
An embedded system is a
system that has embedded
software and computer-
hardware, which makes it (a) a
system dedicated for an
application(s)
or (b) specific part of an
application, or (c) product , or (d)
a part of a larger system
17:02 9
Main Components
1. hardware similar to a
computer;
secondary memory not required
as software embeds in ROM or
Flash memory
17:02 10
Main Components
2. main application software, that
may concurrently perform a
series of i. tasks or ii. processes
or iii. threads.
17:02 11
Main Components
3. a real-time operating system
(RTOS) for
(a) supervising the application
software
running on hardware and (b)
organizing access to a resource
according to the priorities of
tasks in the system.
17:02 12
Components of
embedded system
Hardware
Input Devices Interfacing/Driver Circuits
Processor
Program
Power Supply, Reset and
Timers Oscillator
Interrupt Controller
Memory
System Serial Comn
Application Ports
Specific
Circuits
Parallel
Circuits
Ports
Outputs Interfacing/Driver Circuits
17:02 13
Processor
a. In the form a chip b. Core
form in an Application Specific
Integrated Circuit (ASIC) or c.
System on Chip (SoC)
17:02 14
Processor
1. General Purpose Processor
(GPP): not
application specific a.
Microprocessor b. Embedded
Processor
17:02 15
Processor
2. Application Specific
Instruction-set
Processor (ASIP): designed for
specific applications a.
Microcontroller b. Embedded
microcontroller c. Digital Signal
Processor (DSP) d. Network
Processor, IO Processor or
domain specific programmable
processor
17:02 16
Processor
3. Single Purpose Processors as
additional
processors, examples, a.
Coprocessors, e.g., graphic
processors,
floating point processor, TCP/IP
protocol stacking and network
connectors b. Accelerators, namely,
Java codes
accelerator c. Controllers, like,
DMA, bus controllers
17:02 17
Processor
4. GPP or ASIP core integrated
into either
an ASIC or a VLSI circuit or a
Field Programmable Gate Array
(FPGA) core integrated with
processor units in a VLSI (ASIC)
chip. 5. Application Specific
System Processor
(ASSP) 6. Multicore
processors or multiprocessor
17:02 18
Functional Circuits in a
Core Microcontroller
Processor Internal
Flash/ROM Internal RAM
I/O Ports Control & Interfaces/Drivers External Memories
Timers &
Interface
Serial UART Communication Watchdog
Interface Timers
Interrupt Controller
Serial Synchronous comn. Port
17:02 19
Application Specific units
in a specific version of a
microcontroller
DMA Controller
A/D Convertor
Network Driver Stack and Interfaces
PWM Circuit for D/A
CAN Controller
Interrupt Controller
Printer Controller
Modem
Controller Area Network (CAN) – a serial bus system used
in networking of intelligent devices, sensors and actuators
17:02 20
Commonly used
microcontrollers
A. Small Scale Embedded
System 8/16-bit
Microcontroller
• 8051 family
• PIC 16F8X
• Hitachi H8
• 68HC 11xx
17:02 21
Commonly used
microcontrollers
B. Medium Scale Embedded
System 16-bit
Microcontroller
• 8051 MX
• PIC 16F876, PIC 18
• Hitachi D64F2623FA
• 68HC 12xx, 68HC16xx
17:02 22
Commonly used
microcontrollers
C. Large Scale Embedded
System 32-bit
Microcontroller
• ARM family Cortex-M3, Atmel
AT91 series,
• C16x/ST10 series
• Philips LPC 2000 series
• Texas Instruments, TI
TMS470R1B1M,
17:02 23
When to use a
microcontroller?
A microcontroller is used (a)
when a small or part of the
embedded
software has to be located in the
internal memory and (b) when
on-chip functional units such as
the interrupt-handler, port, timer,
ADC, PWM and CAN controllers
are required.
17:02 24
Single Purpose
Processors
1. Coprocessor, e.g., for floating
point
processing 2. Graphics
processor: It is required for
functions such as, for example,
gaming, display from graphics
memory buffers and to move
(translate on screen) and rotate
an image or its segments.
17:02 25
Single Purpose
Processors
Pixels required in some image
formats:
Quarter Common Intermediate
Format (Quarter-CIF) – 144x176
(x-axis, y-axis) pixels, Video
frames –525x625, Video Graphic
Adapter (VGA) – 640x480 pixels
17:02 26
Single Purpose
Processors
3. Pixel coprocessor: required in
digital
cameras for displaying images
directly or after operations such
as rotate right, rotate-left,
rotate-up, rotate-down, shift to
next, shift to previous. Examples
of high-resolution pictures –
2595x1944 pixels
17:02 27
Single Purpose
Processors
4. Encryption Engine: A suitable
algorithm runs in this processor
to encrypt data fro secure
transmission. 5. Decryption
Engine: A suitable algorithm
runs to decrypt the encrypted
data at receiver’s end.
17:02 28
Single Purpose
Processors
6. A Discrete Cosine
Transformation (DCT)
and Inverse Transformation
(DCIT) processor is required in
speech and video processing. 7.
Protocol stack processor: A
protocol
stack, which has a number of
header words, is prepared
before an application data is
sent to a network.
17:02 29
Single Purpose
Processors
At the receiver’s end, the
protocol stack is
received and application data is
accepted accordingly. A TCP/IP
protocol stack processor
processes TCP/IP network data.
17:02 30
Single Purpose
Processors
8. Network processor: functions
– to
establish a connection, finish,
send and receive
acknowledgements, send and
receive retransmission requests
and to check and correct
received frame errors.
17:02 31
Single Purpose
Processors
9. Accelerator (Java codes
accelerator): A
coprocessor that accelerates
computations by taking advance
actions that are just-in-time
compilations of the next object
data in Java programs.
17:02 32
Single Purpose
Processors
10.CODEC (Coder and Decoder):
a processor
that encodes input and decodes
the encoded information or bits or
signals into a complete set of bits
or original signal. Voice, speech,
image, video signals and bits
are encoded for storing or
transmission and decoded from
the stored or received bits or signal
for display or playing.
17:02 33
Single Purpose
Processors
The CODEC functions as a
compression and
decompression unit for voice,
speech, image or video signals.
11. JPEG CODEC: a processor
for jpg compression and
decompression
17:02 34
Single Purpose
Processors
12. MPEG CODEC: The
processor
compresses audio/video data
streams before storing or
transmitting. Decompression is
done before playing. 13.
Controller: for peripheral, direct
memory access or bus. SPPs
are used for specific applications
or computations or as controllers
for peripherals.
17:02 35
Embedded Software in
a System
Final Machine Implementable
Software
for a System:
• An embedded system
processor executes system
application software.
• The instruction codes and data
reside in the ROM or flash
memory.
• The software due to unique
sequence of instruction and
data, like pixels, is also called
ROM image.
17:02 36
Embedded Software in
a System
• The ROM image for the
targeted hardware is a machine
implementable file.
• The ROM image is a table
having in each rows the address
and bytes.
• The bytes are saved at each
address of the system memory.
17:02 37
Typical ROM image in a
system memory
The image consists of
• The boot up program
• Stacks address pointers
• PC address pointers
• Application programs
• ISRs
• Input data and vector
addresses
17:02 38
System ROM memory
embedding the software,
RTO, data and vector
addresses
2 BYTES FOR ADDRESS OF
PC-ADDR STACK ON
RESET
SP-ADDR
2 BYTES FOR ADDRESS FROM WHERE SYSTEM
STARTS EXECUTION ON POWER UP. (not needed in
80x86, 8051,
ISR VECTOR ADDRESSES
80196,..)
OF 2 BYTES EACH
ADDR-1 ADDR-2 BOOTUP PROGRAM CODES
ADDR-3
ADDR-10
17:02 39

BYTES FOR DATA AS INPUTS FOR EACH ISR


MACHINE SPECIFIC CODES FOR
MACHINE CODES
EACH PROGRAM, ISR AND TASK
FOR RTOS
The process of converting
an ALP into machine code
and ROM image
1. Translate assembly into
machine code
using assembler 2. Linker
links other codes. 3. Loader
program reallocates the codes
after finding physical memory
addresses available at a given
instant. (In a computer, after the
loader loads into a section of
RAM, the program is ready to
run.)
17:02 40
The process of converting
an ALP into machine code
and ROM image
4. The codes are placed at the
addresses
actually available in the ROM.
5. Locating these codes as a
ROM image –
the final step of the design
process. In embedded systems,
the next step is the use of a
locator (not loader). 6. The
locator locates the IO tasks and
hardware device driver codes at
fixed addresses decided by the
interface.
17:02 41
The process of converting
an ALP into machine code
and ROM image
The locator program reallocates
the linked
file and creates a file for a
permanent location, defined by
the designer, of the codes in a
standard format. 7. (a) A
laboratory system, called device
programmer, burns the image
into the PROM or flash or (b) at
a foundry, a mask is created for
the ROM of the embedded
system from the image file.
17:02 42
The process of converting
an ALP into machine code
and ROM image
Machine specific Assembly language Program
Machine
Assembler
Machine Codes for the Programs
codes ready for
1
at various addresses
3
Locating at various addresses
R
needed From Library
machine
Linker
codes
2
Bytes for linked programs
Device (ROM) Programmer
Data Bytes
Embedded system ROM memory
17:02 43

e
-
a
l
l
o
c
a
t
i
n
g
A
d
d
r
e
s
s
e
s
4 Loader
The process of converting
an C-LP into machine
code and ROM image
C Program
1
Machine codes Functions
Compiler
in Object files
2
C
From Library needed codes
machine
Linker
17:02 44

Bytes for Linked Programs


Embedded System ROM Memory
o
d
e
O
p
t
i
m
i
z
e
r
Program Models for
Software Designing
Design Processes of the
embedded
software: 1. Sequential
Program Model 2. Object
Oriented Program Model 3.
Control and Data flow graph or
Synchronous Data Flow (SDF)
Graph or Multi thread Graph
(MTG) Model
17:02 45
Program Models for
Software Designing
4. Finite State Machine for data
path 5. Multithread Model for
concurrent
processing of processes or
threads or tasks
17:02 46
Embedded
System-on-Chip (SoC)
SoC is a system on VLSI chip. It
has analog, digital circuits,
processors and software.
Following components may be
embedded
in SoC: 1. GPP or ASIP core
2. Single purpose processing
cores or
multiple processors
17:02 47
Embedded
System-on-Chip (SoC)
3. A network bus protocol core 4.
An encryption function unit 5.
Discrete cosine transforms for
signal
processing applications 6.
Memories 7. Multiple standard
source solutions,
called IP (Intellectual Property)
cores
17:02 48
Embedded
System-on-Chip (SoC)
8. Programmable logic device
(PLD) with
FPGA (Field Programmable
Gate Arrays) 9. Other logic and
analog units Exemplary
application: mobile phone;
single purpose processors,
ASIPs, and IPs on an SoC are
configured to process encoding,
and deciphering, dialing,
modulating, demodulating,
interfacing
17:02 49
Embedded
System-on-Chip (SoC)
the key pad and multiple line
LCD matrix
display or touch screen, storing
data input and recalling data
from memory.
17:02 50
Embedded
System-on-Chip (SoC)
Single Purpose Processors
Digital Circuits, Timer, MUXs ASIPs
IPs
Data Address Generator
B Program Address Generator
Multi-processor DSP
GPP
17:02 51

Program Data and Port Memory


Port Interfaces
DMAC
Interrupt Controller
Analog Circuits, ADC
~60% Area
Flash or E2PROM
~20-2
5% Area ~15-20% Area
u
s
e
s
B
u
s
e
s
IP Core
High-level components are
integrated on a
VLSI in addition to counters,
registers, FP operation unit,
ALU, etc. A standard source
solution for synthesizing a high-
level component by configuring
an FPGA core or a core of VLSI
may be available as an
Intellectual Property (IP).
17:02 52
IP Core
Following may be provided as
IP:
• Hardwired implementable
design of a transform, an
encryption algorithm or
deciphering algorithm
• Design for adaptive filtering of
a signal.
• Design for implementing Hyper
Text Transfer Protocol (HTTP) or
FTP or Blue tooth protocol to
transmit a web page
17:02 53
IP Core
• Design for bus controller
17:02 54
FPGA Core
• FPGA consists of a large
number of programmable gates
on a VLSI chip.
• Example – Xilinx Virtex-II Pro
FPGA X2VP125 having 125136
logic cells in the FPGA core with
four IBM Power PCs. It has been
used as a data security solution
with encryption engine and data
rate of 1.5 Gbps.
17:02 55
FPGA Core
• Other examples:
• DSP enabled, (i) real-time
video processing systems and
(ii) line echo eliminators for the
Public Switched
Telecommunication Networks
(PSTN); and (iii) packet switched
networks.
17:02 56
Embedded Processor
An embedded processor term
is used for
processors with
• fast processing,
• fast context-switching and
• atomic ALU operations.
17:02 57
Embedded
Microcontroller
An embedded microcontroller
is the term
used for a microcontroller
• that has internal RAM, large
flash or ROM, timer, interrupt
handler, internal devices and
internal peripherals and
• there is no external memory or
device or peripheral require d for
the given application.
17:02 58
Design Process in
Embedded System
1. Abstraction Each problem
component – first abstracted.
• For example, Display picture
and text as an abstract class
• Robotic system problem
abstraction in terms of control of
motors in different degrees of
freedoms.
17:02 59
Design Process in
Embedded System
1. Abstraction
• Application software abstracted
as concurrently running multiple
threads and interrupt service
threads.
17:02 60
Design Process in
Embedded System
2. Hardware and Software
architecture
• Assumed to consist of multiple
layers
• Thorough understanding of
each architectural layer before a
design.
17:02 61
Design Process in
Embedded System
3. Extra functional Properties
Understanding of extra
functionalities required in the
system being developed from
the design.
17:02 62
Design Process in
Embedded System
4. System Related Family
designs Families of related
systems developed earlier taken
into consideration during
designing .
17:02 63
Design Process in
Embedded System 5.
Modular Design
• Decomposition of software into
modules that are to be
implemented.
• Modules should be such that
they can be composed (coupled
or integrated) later.
• Effective Modular design
should ensure effective (i)
function independence, (ii)
cohesion and (iii) coupling.
17:02 64
Design Process in
Embedded System
5. Modular Design
• Modules should be clearly
understood and should maintain
continuity.
• Appropriate protection
strategies are necessary for
each module. A module is not
permitted to change or modify
another module functionality.
17:02 65
Design Process in
Embedded System
5. Modular Design
• For example, protection from a
device driver modifying the
configuration of another device
17:02 66
Design Process in
Embedded System
6. Mapping: Mapping into
various representations is done
considering the software
requirements. For example, data
flow in the same path during the
program flow can be mapped
together as a single entity.
17:02 67
Design Process in
Embedded System
Transform and transaction
Mapping For example, an image
is input data to a system; it can
have a different number of pixels
and colors of each pixel. The
system has to store or process
each pixel and color.
17:02 68
Design Process in
Embedded System
Transform and transaction
Mapping Transform mapping of
image is done by appropriate
compression and storage
algorithms. Transaction mapping
is done to define the sequence
of the images .
17:02 69
Design Process in
Embedded System
7. User Interface Design
Designed as per user
requirements, analysis of the
environment and system
functions. For example, in an
automatic chocolate vending
machine system (ACVM), the
user interface is a LCD matrix
display.
17:02 70
Design Process in Embedded
System 7. User Interface Design
It can display a welcome
message as well as specify the
coins needed to be inserted into
the machine for each type of
chocolate.
• Option I: Same ACVM may be
designed with touch screen GUI.
• Option II: Same ACVM may be
designed with Voice User
Interface (VUIs).
17:02 71
Design Process in Embedded
System 7. User Interface Design
Validation A GUI or VUI or user
interface or LCD matrix display
must be validated by the customer.
For example, the customer must
validate message’s language,
screen logo, screen icons and
background color, wall paper,
menus and dialogs before an
interface design can proceed to
the implementation stage.
17:02 72
Design Process in
Embedded System
8. Refinements: Each
component and module design
needs to be refined iteratively till
it becomes the most appropriate
for implementation by the
software team.
17:02 73
Software Design Cycle
Software Design Process may
require use of Architecture
Description Language (ADL). It
is used for representing the
following: (i) Control Hierarchy
(ii) Structural Partitioning (iii)
Data Structure and hierarchy (iv)
Software Procedures
17:02 74
Activities for
Software-Design Cycle
during embedded
software-development
process
Model/Analysis Requirements of System
1
Design Data Structure, Software
One Life
Architecture, Interfaces and Algorithm
2
Linear
Cycle
Sequence Implementation of
Design
3
Internal Logic and External Functions
4
17:02 75
Five levels of abstraction
from top level to bottom
level in the design
process A. Bottom-to-top
design : the design
builds by starting from the
components. B. Top-to-bottom
Design: starts with
abstraction followed by creation
of details. This is the most
favoured design approach.
17:02 76
Five levels of abstraction from
top level to bottom level in the
design process 1. Requirements
2. Specifications 3. Architecture
4. Components 5. System
Integration
17:03 77
Requirements
Complete clarity of
• required purpose,
• inputs,
• outputs,
• functioning,
• design metrics and
17:03 78
Requirements
• Validation requirements for
finally developed systems
specifications.
• Consistency in the
requirements.
17:03 79
Specifications
Clear specifications of
• Customer expectations from
the product. Needs
specifications for
• hardware, for example,
peripherals, devices, processor
and memory specifications
• data types and processing
specifications
17:03 80
Needed Specifications
• Expected system behavior
specifications,
• constraints of design,
• expected life cycle
specifications of the product.
• Process specifications
analysed by making lists of
inputs on events list, outputs on
events, processes activated on
each event.
17:03 81
Architecture
• data flow graphs
• program models
• software architecture layers
and
• hardware architecture
• interfaces design
• system integration
17:03 82
Software architectural
layers Layer 1
The first layer is an architectural
design: How the different
elements –data structures,
databases, algorithms, control
functions, state transition
functions, process, data and
program flow are to be
organized?
17:03 83
Software architectural layers
Layer 2 The second layer
consists of data-design: What
shall be the design of data
structures and databases that
would be most appropriate for
the given problem? Whether
data organised as a tree-like
structure will be appropriate?
What will be the design of the
components in the data? For
example, video information will
have two components, image
and sound.
17:03 84
Software architectural
layers Layer 3
The third layer consists of
interface design: What shall
be the interfaces to integrate
the components? What is the
design for system integration?
What shall be design of
interfaces used for taking
inputs from the data objects,
structures and data bases and
for delivering outputs?
17:03 85
Software architectural
layers Layer 3
What will the port structure for
receiving inputs and
transmitting outputs?
17:03 86
Hardware Components
Layer 4
The fourth layer is a
component level design: 1.
Processor, ASIP and single
purpose
processors in the system 2.
Memory RAM, ROM or internal
and
external flash or secondary
memory in the system
17:03 87
Hardware Components
Layer 4
3. Peripherals and devices
internal and
external to the system 4.
Ports and buses in the system 5.
Power source or battery in the
system
17:03 88
Hardware Components
Layer 4
Additional requirement in
embedded
system design: each
component should be optimized
for
memory usage and power
dissipation.
17:03 89
System Integration
Built components are integrated
in the
system. Components may
work independently, but
when integrated may not fulfill
design metrics.
17:03 90
Testing and debugging
Appropriate tests are chosen.
Debugging tools are used to
correct
erroneous functioning.
17:03 91
Testing and debugging
No
Edit Test Debug Is it as
per
Yes
Specific
End
actions
17:03 92
Challenges in
Embedded System
Design
1. Amount and type of hardware
needed:
• Optimizing the
microprocessors, ASIPs and
single purpose processors in the
system.
• Optimizing according to the
performance, power dissipation,
cost and other design metrics in
the system.
17:03 93
Challenges in
Embedded System
Design
1. Amount and type of hardware
needed:
• Optimizing hardware (memory
RAM, ROM or internal and
external flash or secondary
memory in the system,
peripherals and devices internal
and external to the system, ports
and buses in the system and
power source or battery in the
system).
17:03 94
Challenges in
Embedded System
Design
1. Amount and type of hardware
needed:
• Taking into account the design
metrics
• Design metrics examples
–power dissipation, physical
size, number of gates and
engineering, prototype
development and manufacturing
costs.
17:03 95
Challenges in
Embedded System
Design
2. Optimizing the Power
Dissipation i. Clock Rate
Reduction: Power dissipation
typically reduces 2.5 μW
per 100kHz of reduced clock
rate. Total power dissipated
(energy required) may not
reduce, as on reducing the clock
rate, the computations take a
longer time.
17:03 96
Challenges in Embedded
System Design 2. Optimizing the
Power Dissipation ii. Operating
Voltage Reduction: In portable or
hand-held devices such as a
cellular phone, compared to 5V
operation, a CMOS circuit power
dissipation reduces by one sixth,
~(2V/5V)2, in 2V operation. Thus
the time intervals needed for
recharging the battery (at 5V)
increase by a factor of six.
17:03 97
Challenges in
Embedded System
Design
2. Optimizing the Power
Dissipation iii. Wait, Stop and
Cache Disable Instructions
–Clever real-time programming.
It is by use of 'Wait' and 'Stop'
instructions and disabling or
controlling certain units when not
needed is one method of saving
power during program execution.
17:03 98
Challenges in
Embedded System
Design
2. Optimizing the Power
Dissipation iv. Disable use of
certain structural units
of the processor to reduce power
dissipation:
• Caches—when not necessary
17:03 99
Challenges in
Embedded System
Design 2. Optimizing
the Power Dissipation
• Keep in disconnected state
those structure units that are not
needed during a particular
software-portion execution, for
example, display screen, timers
or IO units
• Control of power requirement,
for example, by screen
auto-brightness control
17:03 100
Challenges in
Embedded System
Design
2. Optimizing the Power
Dissipation v. Process
Deadlines: Meeting the deadline
of all processes in the system
while keeping the memory,
power dissipation, processor
clock rate and cost at minimum
is a challenge.
17:03 101
Challenges in
Embedded System
Design
2. Optimizing the Power
Dissipation vi. Flexibility and
Upgradeability: Ability to offer
different versions of a product for
marketing and offering the
product in advanced versions
later on.
17:03 102
Challenges in
Embedded System
Design
2. Optimizing the Power
Dissipation vii. Reliability:
Designing reliable product by
appropriate design and thorough
testing, verification and
validation is a challenge.
17:03 103
Classification of
Embedded System
Basis of classification: level of
microcontroller complexities 1.
Small Scale Embedded Systems
2. Medium Scale Embedded
Systems 3. Sophisticated
Embedded Systems
17:03 104
Small Scale Embedded
Systems
• Designed with a single 8-or
16-bit microcontroller;
• Little hardware and software
complexities and
• involve board-level design.
• May be battery operated.
17:03 105
Small Scale Embedded
Systems
• Tools for development of
embedded software –Editor,
assembler and cross assembler,
integrated development
environment (ISE) specific to the
microcontroller or processor
used
17:03 106
Small Scale Embedded
Systems
• C or Java used for developing
• C program compilation is done
into the assembly, and
executable codes are then
appropriately located in the
system memory.
• Software fits within the memory
available and keeps in view of
the need to limit power
dissipation when system is
running continuously.
17:03 107
Medium Scale
Embedded Systems
• Designed with a single or few
16-or 32- bit microcontrollers or
DSPs or Reduced Instruction
Set Computers (RISCs).
• Employs the readily available
single purpose processors.
• Employs the readily available
IPs for the various functions—for
example, for the bus interfacing,
17:03 108
Medium Scale
Embedded Systems
• Both hardware and software
complexities
17:03 109
Medium Scale
Embedded Systems
• Programming tools:
C/C++/Visual C++/Java, RTOS,
and Source code engineering
tool, Simulator, Debugger and
Integrated Development
Environment (IDE). Software
tools provide the solutions to the
hardware complexities.
17:03 110
Sophisticated
Embedded Systems
• Enormous hardware and
software complexities and may
need scalable processors or
configurable processors and
programmable logic arrays
(PLAs).
• Used for cutting edge
applications that need hardware
and software co-design and
components integration in the
final system.
17:03 111
Sophisticated
Embedded Systems
• Constrained by the processing
speeds available in their
hardware units.
17:03 112
Sophisticated
Embedded Systems
• Certain software functions such
as encryption and deciphering
algorithms, discrete cosine
transformation and inverse
transformation algorithms,
TCP/IP protocol stacking and
network driver functions
implemented in the hardware to
obtain additional speeds by
saving time.
17:03 113
Sophisticated
Embedded Systems
• Software implements some of
the functions of the hardware
resources in the system.
• Development tools for these
systems may not be readily
available at a reasonable cost or
may not be available at all.
17:03 114
Sophisticated
Embedded Systems
• In some cases, a compiler or
retargetable compiler might have
to be developed for these. [A
retargetable compiler is one that
configures according to the
given target configuration in a
system]
17:03 115
Skills for Small Scale
System
• Full understanding of a
microcontroller with a basic
knowledge of computer
architecture, digital electronic
design, software engineering,
data communication, control
engineering, motors and
actuators, sensors and
measurements, analog
electronic design and IC design
and manufacture–Tim
Wilmshurst
17:03 116
Skills for Small Scale
System
• Specific skills will be needed in
specific situations. For example,
control engineering knowledge
will be needed for design of
control systems and analog
electronic design knowledge will
be needed when designing the
system interfaces.
17:03 117
Skills for Small Scale
System
• Computer architecture and
organization.
• Interfacing the memories.
• Burning the executable
machine codes in PROM or
ROM.
• Use of decoders and
demultiplexers.
• Use of Direct memory
accesses.
• Use of Ports and
device-drivers.
17:03 118
Skills for Small Scale
System
• Device drivers in assembly.
• Simple and sophisticated
buses.
• Timers.
• Interrupt servicing mechanism.
• C programming elements.
• Memory optimization.
• Selection of hardware and
microcontroller.
17:03 119
Skills for Small Scale
System
• Use of ICE
(In-Circuit-Emulators), cross-
assemblers and testing
equipment.
• Debugging the software and
hardware bugs by using test
vectors.
17:03 120
Skills for Small Scale
System
• Basic knowledge in the other
areas— software engineering,
data communication, control
engineering, motors and
actuators, sensors and
measurements, analog
electronic design and IC design
and manufacture
17:03 121
Skills for Medium Scale
Embedded System
• 'C'/C++/Java programming and
RTOS programming and
program modeling skills
• Programming the Tasks or
threads and their scheduling by
RTOS.
• Programming priorities and
Cooperative and preemptive
scheduling.
17:03 122
Skills for Medium Scale
Embedded System
• Use of Inter processor
communication functions.
• Use of shared data, and
programming the critical sections
and re-entrant functions.
• Use of semaphores,
mailboxes, queues, sockets and
pipes.
17:03 123
Skills for Medium Scale
Embedded System
• Handling of interrupt-latencies
and meeting task deadlines.
• Use of various RTOS functions.
• Use of physical and virtual
device drivers.
17:03 124
Skills for Medium Scale
Embedded System
• Designer must have access to
an RTOS programming tool with
Application Programming
Interfaces (APIs) for the specific
microcontroller to be used
17:03 125
Skills for Sophisticated
Scale Embedded
Systems
• Team is needed to co-design
and solve the high level
complexities of the hardware
and software design.
• An embedded system
hardware engineer should have
full skills in hardware units and
basic knowledge of 'C'/C++ and
Java, RTOS and other
programming tools.
17:03 126
Skills for Sophisticated
Scale Embedded
Systems
• Software engineer should have
basic knowledge in hardware
and a thorough knowledge of 'C',
RTOS and other programming
tools. A final optimum design
solution is then obtained by
system integration.
17:03 127
8051 Architecture
17:03 128

You might also like