You are on page 1of 41

Module 1

EC 308 Embedded Systems


Contents
• Introduction to Embedded Systems
– Components of embedded system hardware
– Software embedded into the system
– Embedded Processors
– CPU architecture of ARM processor (ARM9)
– CPU Bus Organization and Protocol
• Embedded system design
– Design and Development life cycle model
– Embedded system design process
– Challenges in Embedded system design
Introduction to Embedded Systems
• Definition of a system
• Embedded system definition
• Comparison between computer and embedded
system
• Characteristics of Embedded System
• Constraints of Embedded System Design
System Definition
• A way of working, organizing or performing one
or many tasks according to a fixed set of rules,
program or plan.
• Also an arrangement in which all units assemble
and work together according to a program or
plan.
• Examples of Systems
– Time display system – A watch
– Automatic cloth washing system – A washing machine
Embedded System Definitions
1. “An embedded system is a system that has software
embedded into computer-hardware, which makes a
system dedicated for an application (s) or specific
part of an application or product or part of a larger
system.”
2. “An embedded system is one that has a dedicated
purpose software embedded in a computer
hardware.”
3. “It is a dedicated computer based system for an
application(s) or product. It may be an independent
system or a part of large system. Its software usually
embeds into a ROM (Read Only Memory) or flash.”
Embedded System Definitions
3. “It is any device that includes a programmable
computer but is not itself intended to be a
general purpose computer.” – Wayne Wolf,
4. “Embedded Systems are the electronic systems
that contain a microprocessor or a
microcontroller, but we do not think of them as
computers– the computer is hidden or embedded
in the system.” – Todd D. Morton
Consider a computer
• A computer is a system that has the following or
more components.
– A microprocessor
– A large memory comprising the following two kinds:
• Primary memory (semiconductor memories - RAM, ROM and
fast accessible caches)
• Secondary memory using which different user programs can
load into the primary memory and can be run.
– I/O units such as touch screen, modem, fax cum
modem etc.
Consider an Embedded System
• –Three main embedded components
1. Embeds hardware to give computer like functionalities
2. Embeds main application software generally into flash
or ROM and the application software performs
concurrently the number of tasks.
3. Embeds a real time operating system ( RTOS), which
supervises the application software tasks running on
the hardware and organizes the accesses to system
resources according to priorities and timing constraints
of tasks in the system.
Sophisticated Embedded System
Characteristics
1. Dedicated functions
2. Dedicated complex algorithms
3. Dedicated GUIs and other user interfaces for the
application
4. Real time operations
– Defines the ways in which the system works, reacts to the
events and interrupts, schedules the system functioning in real
time and executes by following a plan to control the latencies
and to meet the deadlines.
5. Multi-rate operations
– Different operations may take place at distinct rates.
• For example, the audio, video, network data or stream and events have
the different rates and time constraints to finish associated processes.
Constraints of an Embedded System
Design
• Available system-memory
• Available processor speed
• Limited power dissipation when running the
system continuously in cycles of the system start,
wait for event, wake-up and run, sleep and stop.
• Performance,
• Size,
• Non-recurring design cost, and
• Manufacturing costs.
Components of embedded system
hardware
Processor
• Program Flow and data path Control Unit (CU)
– includes a fetch unit for fetching instructions from the
memory
• Execution Unit (EU)
– Includes circuits for arithmetic and logical unit (ALU),
and for instructions for a program control task, say,
data transfer instructions, halt, interrupt, or jump to
another set of instructions or call to another routine
or sleep or reset
System designer considerations
• Processor Instructions in the Instruction set
• Processor ability to solve the complex algorithms
used in meeting the deadlines for their
processing.
• Maximum bits in operand (8 or 16 or 32) in a
single arithmetic or logical operation.
• Internal and External bus-widths in the data-path
• Clock frequency in MHz and processing speed
• Basic circuit elements- Power source, clock, reset,
timers, memory, glue circuit for the elements
linking and interfaces
(i) Power Source
1. System own supply with separate supply rails for
IOs, clock, basic processor and memory and
analog units, or
2. Supply from a system to which the embedded
system interfaces, for example in a network card,
or
3. Charge pump concept used in a system of little
power needs, for examples, in the mouse or
contact-less smart card.
Power Dissipation Management
• Clever real-time programming by Wait and Stop
instructions
• Clever reduction of the clock rate during specific
set of instructions
• Optimizing the codes and
• Clever enabling and disabling of use of caches or
cache blocks
(ii) Clock Oscillator Circuit and Clocking
Units
1. Appropriate clock oscillator circuit
2. Real Time Clock*( System Clock) and Timers
driving hardware and software
(iii) Reset Circuit
1. Reset on Power-up
2. External and Internal Reset circuit
3. Reset on Timeout of Watchdog timer
(iv) Memory
a) Functions Assigned to the ROM or EPROM or
Flash
– Application programs, Code for OS, Initial data,
pointers for service routines
b) Functions Assigned to the Internal, External and
Buffer RAM
– Buffers, stacks, storage for variables during
processing
c) Functions Assigned to the EEPROM or Flash
– Storing nonvolatile data and processed results
d) Functions Assigned to the Caches
– Temporary storage for instructions and results
(v) Interrupts Handler
• Interrupt Handling element for the external port
interrupts, IO interrupts, timer and RTC interrupts,
software interrupts and exceptions

(vi) Linking Embedded System Hardware


• Linking and interfacing circuit* for the Buses by
using the appropriate multiplexers, and decoders,
demultiplexers Interface the various system units
(vi) IO Communication Unit
a) Communication Driver(s)
– Network Ethernet or serial driver to communicate with host
embedded system Expansion Facility. [Serial Bus(es),Parallel
Bus(es)
b) Media IO Control Element
c) Keypad or Keyboard IO Interface
d) LCD Display System Interface
e) ADC – Single or Multi channel
f) DAC
g) GPIB Interface Element
h) Pulse Dialing Element
i) Modem
j) Bluetooth, 802.11, IrDA, ..
Software embedded into the system
• The software is like the brain of an Embedded
System
• Embedded Software will be specific to the given
application of the system
• The instruction code and data in final stage will be
kept in a ROM or Flash.
• The software is also called ROM Image
– Just like an image is a unique arrangement of pixels
Final machine software
• Bytes at each address defined for creating the ROM
image.
– By changing this image, the same hardware platform work
differently and can be used for entirely different
applications or for new upgrades of the same system.
• Distinct ROM image in a distinct Embedded System
– Hardware elements between the distinct systems can be
identical but it is the software that makes a system unique
and distinct from the other.
• Compressed Codes and Data
– ROM image may alternatively be compressed software (for
example, the zip format) and data (for example, the
pictures in jpg or gif format) along with the software
required for decompression algorithm
Programming Languages
• Coding can be in
– Machine Codes
– Processor Specific Assembly Language Programming
– High Level Language
1. Machine Language Coding
• Programmer defines the addresses and the
corresponding bytes or bits at each address.
• Used in configuring some specific physical device
or subsystem like transceiver, the machine code-
based coding is used
• Machine-code based coding is done only in
specific situations because it is time consuming
and the programmer must have to understand
the processor instructions set and their
corresponding machine codes
2. Assembly Language Coding
• Needed for Invoking Processor Specific
Instructions
– Requires understanding of the processor and
instruction set.
• A program or a small specific part coded in the
assembly language using an Assembler (software
used for developing codes in assembly).
• Three steps when using assembly language
– 'Assembler‘,
– 'Linker' and
– 'Locator‘ before finally burned at the ROM
• Assembly language coding is extremely useful for
configuring devices like ports, ADC, DAC etc.
• But, Assembly language based programming is
also very time consuming while making larger
programs/ codes
• Full coding in assembly may be done only for a
few simple, small-scale embedded systems
• Figure shows the process of converting an
assembly language program into machine
implementable software file and then finally
obtaining a ROM image file
1. “Assembling” in which an assembler software translates the
assembly software into the machine codes
2. “linking”; a linker links these codes (if necessary) with the
other codes taken from the library
• The linked file in binary is known as executable file (a file with ‘.EXE’
extension)
3. “Locator” software which locates the already fixed ROM
addresses
• The locator software “re-allocates” the memory addresses in a linked
file & creates a file with permanent memory allocation for each of the
code bytes in a standard format
4. “Loader” software performs the task of placing/ loading the
code bytes as an “image to be placed in ROM” by finding the
exact available ROM memory addresses
• The “loader” finds the appropriate “start address” for the final
program codes
5. “Programmer Device/ Equipment” takes as input the ROM
image file & “writes” the image as byte by byte into the
memory
3. Coding in High Level Language
• For large software programs development, high-
level language like C, C++, visual C++, Java etc. are
used
– ‘C’ is usually the preferred language
• The programmer needs to understand only the
hardware organization of the whole embedded
system when coding in high level language
• Compiler: Generates an object file. Using linker
and locator, the file for ROM image is created for
the targeted hardware. C++ and Java are other
languages used for software coding.
• Program various layers–
– processor commands,
– main function,
– task functions and
– library functions,
– interrupt service routines
– and kernel (scheduler).
Program Models
• Sequential Programming Model
• Object Oriented Programming Model
• Control and Data flow graphs or Synchronous
Data Flow (SDF) Graph or Multi Thread Graph
(MTG) Model
• Finite State Machine for data path
• Multithreaded Model
• Concurrent Processing of processes or thread or
tasks
Embedded Processors
CPU architecture of ARM processor
(ARM9)
CPU Bus Organization and Protocol
Embedded system design
Design and Development life cycle model
Embedded system design process
Challenges in Embedded system design

You might also like