You are on page 1of 40

EE16604 - EMBEDDED

SYSTEMS

Handled by
V.Mohanraj AP/EEE

1
UNIT 1
INTRODUCTION TO
EMBEDDED SYSTEMS

2
Introduction

• A embedded system is an electronic system which is


designed to perform one or limited set of functions ,
using hardware and software
• Having hardware and software makes an embedded
system a computer , but this computer performs only
limited set of functions
• It will have a processor and associated software
• Software is burned into the ROM of the processor

3
Application domain of embedded
systems
• Consumer electronics : camera , music players , TVs ,
DVD players.
• Household appliances : Air conditioners and fire alarm
systems
• Handheld devices : Mobile phones , MP3 players etc
• Banking : ATMs , Currency counters etc
• Computer peripherals : printers , scanners , webcams ,
etc
• Networking : Routers
• Robotics : Used in factories , household etc
• Toys

4
Desirable features and general
characteristics of embedded
systems
• It should have one or small set of functions which it
is expected to perform efficiently
• It should be designed for low power dissipation
• It has limited memory and limited number of
peripherals
• Applications are not meant to be alterable by user
• They need to be highly reliable
• Many of them need to operate with time constraints

5
Model of a embedded system ( simple
model )

A
S C
E PROCESSOR T
N U
S A
O T
R O
S R
S
MEMORY

6
Example of a simple embedded
system(temperature monitor )

SENSOR DISPLAY
M
C
U
MOTOR
KEYBOARD

ALARM

7
Figures of merit for an embedded
system objectives
• Low power dissipation
• Small physical size
• Small code size
• High speed of response
• Real time response

8
History of embedded systems

• With microcontroller creation , embedded system


world cherished
• 1978 - TMS 1000 - Texas instruments
• 1977 - 8048 - Intel
• 1980 - 8051 - Intel

9
Current Trends

• Multi-core processor
• Embedded and real time operating systems

10
Structural units in Embedded processor
( advanced architecture )
IQ

IR

INST. BT.
ID DATA
CACHE CACHE PFCU
CACHE

MMU

CU

PC
ADDRESS
BUS
ADVANCED ALU AOU
FLPU
PROCESSING MAR B
UNITS I DATA BUS
SP U

SRS ARS FRS CONTROL BUS


MDR

11
Structural units in Embedded processor
( advanced architecture )
STRUCTURAL UNIT FUNCTIONS

MAR Memory address register It holds the address of the


byte or word to be fetched
from external memories

MDR Memory data register It holds a byte or word


fetched from an external
memory

SYSTEM BUSES Internal bus It connects all the


structural units inside the
Address , data and control bus processor

BIU Bus interface unit An interface unit between


processor’s internal units and
external buses

12
Structural units in Embedded processor
( advanced architecture )
STRUCTURAL UNIT FUNCTIONS

IR Instruction register It sequentially takes


instruction codes to execution
unit of processor

ID Instruction decoder It decodes the instruction


received at the IR and passes
it to processor CU

CU Control unit It controls all the bus


activities and unit functions
needed for processing

ARS Application register set A set of on chip registers


used during processing of
instructions of an application
program

13
Structural units in Embedded processor
( advanced architecture )
STRUCTURAL UNIT FUNCTIONS

ALU Arithmetic logical unit A unit to execute arithmetic


or logical instructions
according to the current
instructions present at IR
PC Program counter Stores the address of the
next instruction to be
executed

SP Stack pointer A pointer for an address ,


Which corresponds to a stack
top in memory

14
Structural units in Embedded processor
( advanced architecture )
STRUCTURAL UNIT FUNCTIONS

IQ Instruction queue A queue of instructions so


that the IR does not have to
wait for the new instruction
after one has been processed
PFCU Prefetch control unit A unit that controls the
fetching of data into I and D
caches in advance from the
memory units
I cache Instruction cache It sequentially stores , like an
instruction queue , the
instructions in FIFO mode
BT cache Branch target cache It facilitates ready availability
of the next instruction set
when a branch instruction like
jump or call is encountered

15
Structural units in Embedded processor
( advanced architecture )
STRUCTURAL UNIT FUNCTIONS

D cache Data cache It stores the prefetched data


from the external memory
MMU Memory management unit It manages the memories such
that the instruction and data
are readily available
SRS System register set It is a set of registers used
while processing the
instructions of the system
program
FLPU Floating point processing unit A unit separate from ALU for
floating point processing

FRS Floating point register set A register set dedicated for


storing floating point numbers
in standard format

16
USE OF MONITOR FOR TARGET
HARDWARE DEBUGGING
• Monitor codes can be downloaded in ICE ROM
• It may run a “power on self test” program
bootstrapping
• Monitor is a debugging tool for the target
microprocessor or microcontroller in ICE ROM
emulator , or in target development board

17
USE OF MONITOR FOR TARGET
HARDWARE DEBUGGING
• Monitor from different source differ in their
functioning . One typical monitor does the following
1. Monitor loads the application codes , is also used for
corrections in codes , and then test the system
2. Monitor controls break points as per command from
the debugger
3. Monitor can be run in single step mode also
4. A part of monitor runs as host
5. Facilitates controlled execution of application and
controlled display of executing program status

18
TARGET BOARD SUB UNITS
INCLUDING MONITOR
• Socket
• RAM and interfaces
• Display
• Monitor segments in ROM
• Twenty key pad
• Connectors

19
DIRECT MEMORY ACCESS (DMA)

• A device that facilities DMA transfer is called DMA


controller ( DMAC )
• DMAC has a processing element
• The data transfers occurs efficiently between I/O
devices and system memory with the least processor
intervention using DMAC

20
DMA CONTROLLER

CS
RD/WR
processor RAM
A0-A15 and D0-D7

D0-D7
Hold A0-A15
acknowledge Hold request
A I/O
Port device
with
DMA set
controller of
I/O BUS
Addresses
DMA request

DMAC acknowledge

From Decoder port select

21
DMAC

• The DMAC sends a hold request to CPU


• CPU acknowledges that in case the system memory
buses are free to use
• The DMA operations can be in one of three modes
i) Single transfer at a time
ii) Burst transfer at a time ( few KB)
iii) Bulk transfer
then release of the hold on the system bus after
the transfer is completed

22
DMAC

• Whenever a DMA request is made to the DMAC for


I/Os , the DMAC is first initialized . Its programmed
for
i) Read or write
ii) Mode of DMA transfer
iii) Number of bytes to be transferred in its data
transfer counter register
iv) Starting memory address

23
BUILD PROCESS FOR EMBEDDED
SYSTEMS
• An embedded system develops using process of designing the
hardware, target platform and software followed by integration
of both
• The first step in the build process for an embedded system
hardware consists of selecting a processor(s)
• A processor is selected from the considerations of the following:
1.Instruction set
2.Maximum bits in an operand (8, 16 or 32) in a
single
3.arithmetic or logical operation
4.Clock frequency in MHz or Gift and processing
speed in Million Instructions Per Second (MIPS)
processor ability to solve the complex algorithms
used in meeting deadlines for their processing
24
BUILD PROCESS FOR EMBEDDED
SYSTEMS
• The build process for embedding software consists of
the following steps:
1. Project file consisting of source file and library
files
2. Compilation of the project files
3. Linking all object files and locating onto a single re-
locatable object file
4. Converting the object file in a form called hex-file
to binary image (ROM image)

25
BUILD PROCESS FOR EMBEDDED
SYSTEMS
• The build processes for the embedded systems when
microprocessors or ASIPs or multiple processors are
used Build process process

Embedding Microprocessor Each microprocessor has an


instruction set.
Programs written in high-level
language or framework for
embedding are compiled
Embedding Microcontroller Each microcontroller has an
instruction set which includes
instructions, which enable use of
the devices and peripherals in the
microcontroller. Programs written
in high-level language or
framework using Integrated
Development Environment (IDE)
are compiled

26
COMPONENTS OF EMBEDDED SYSTEM
HARDWARE

27
EMBEDDED HARDWARE UNITS AND
DEVICES IN A EMBEDDED
SYSTEM
• Power source
• Clock oscillator
• System timer
• Real time clock
• Reset circuit , power up reset and watch dog timer
• Memory
• Input , output and i/o ports
• Bus
• Digital to analog conversion
• Analog to digital conversion
• LED , LCD and Touch screen displays
• Keyboard , keypad and virtual keypad at touch screen
• Interrupt handler
28
CLASSIFICATION OF EMBEDDED
SYSTEM
• Small scale embedded system
• Medium scale embedded system
• Sophisticated scale embedded system

29
SMALL SCALE EMBEDDED
SYSTEM
• Designed with a single 8- or 16-bit microcontroller or
DSP
• May have little hardware and software complexities
and involve board-level design
• May be battery operated
• May use an integrated development environment (IDE)
specific to the microcontroller or processor family
used is the main programming tool
• Uses generally 'C' or MATLAB
• May or may not use an RTOS

30
MEDIUM SCALE EMBEDDED
SYSTEM
• Designed with a single or few 16- or 32-bit microcontroller
or DSP or Reduced Instruction Set Computer (RISC)
• May also be designed with available single purpose
processors
• Uses real-time operating system (RTOS) for multitasking
• Uses software tools for providing the solutions to the
hardware complexities
• Uses complex software design using programming tools:
C/C OH/lava, RTOS, and Source code engineering tool,
Simulator, Debugger and Integrated Development
Environment
• The systems have both hardware and software
complexities
31
SOPHISTICATED SCALE
EMBEDDED SYSTEM
• Designed on 32- or 64-bit RISCs
• Needs hardware and software co-design
• Needs component-integration in the final system
• May need implemented in the hardware in the form of
IP cores for complex software functions
• May need new development tools
• May be an SoC (system-on-chip)
• These systems are used for cutting-edge applications
that need hardware and software co-design and
components integration in the final system

32
IN CIRCUIT EMULATOR (ICE)

• Emulate – stands for copy


• Emulator differ from ICE
• Emulator is the copy / model of the embedded system
which is to be tested (debugged)
• The tested emulator is made an one-on-one mapping
and ‘n’ number of embedded systems are
manufactured after it passes the test ( debugging
stage )

33
EMULATOR

• An emulator consist of all the circuits and blocks of


embedded system with some extra memory for
edit/test/debug purpose .
• Emulator can test itself.
• It is a self-test system
• It is technically called a target system

34
EMULATOR

• Host system – Generally a personal computer is used


as a host system
• Host system transfers the system software /
application software to target system (Emulator)
• An emulator is done specific to an application
• ICE is generic
• ICE doesn't contain the MP/MCU

35
EMULATOR

36
ICE

• ICE = Target system circuit – system MP/MCU

37
ICE

• In case of an ICE the MP/MCU is fixed / connected


in the socket through cable
• Thus, ICE is used to test various target systems used
for different applications.
• It gives the ability to place various versions of
processor/micro controller family

38
SUB UNITS OF ICE

• Interfacing circuits
• Twenty keypad
• ROM emulator
• Socket
• External memory
• Emulator board display
• System registers
• Interfacing driver circuit
• Monitor codes

39
ICE

• Some of the processors like ARM 7 and ARM 9 have


internal ICE in the core
• It debugs the targeted hardware in the system
• Cables used to interface target system emulating
circuit and socket should be short to minimize
coupling capacitive effect

40