0% found this document useful (0 votes)
139 views109 pages

V.Prakash: Asst. Professor, SENSE, VIT Chennai

This document contains lecture slides on embedded systems from a course taught by V. Prakash. It introduces embedded systems, defining them as a combination of computer hardware and software designed for a specific function. Examples of embedded systems in daily life are provided across various contexts like waking up, transportation, home, etc. Key characteristics of embedded systems are also summarized such as being dedicated to specific tasks and having real-time constraints. Embedded systems are then classified based on generation, complexity/performance, and execution behavior.

Uploaded by

kisam78442
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
139 views109 pages

V.Prakash: Asst. Professor, SENSE, VIT Chennai

This document contains lecture slides on embedded systems from a course taught by V. Prakash. It introduces embedded systems, defining them as a combination of computer hardware and software designed for a specific function. Examples of embedded systems in daily life are provided across various contexts like waking up, transportation, home, etc. Key characteristics of embedded systems are also summarized such as being dedicated to specific tasks and having real-time constraints. Embedded systems are then classified based on generation, complexity/performance, and execution behavior.

Uploaded by

kisam78442
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 109

V.

PRAKASH
Asst. Professor, SENSE,
VIT Chennai

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 1


• Embedded system processor,
Introduction hardware unit, software embedded
into a system, Example of an
to Embedded embedded system, Embedded
System Design life cycle, Layers of
Embedded Systems.

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 2


MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 3
WHAT IS EMBEDDED SYSTEM?

Embedded system = Hardware + Software


Designed for specific purpose

An embedded system is a combination of computer hardware and


software, designed for a specific function or functions within a larger system.

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 4


WHAT IS EMBEDDED SYSTEM?

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 5


WHAT IS EMBEDDED SYSTEM?

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 6


Embedded system in daily life….

Wake up… Washing… Breakfast…

Elevator.. Car… Traffic lights…

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 7


Inside a classroom…

Smart watch… Calculator… Projector…

Mobile phone… Smart shoe… Wireless mic…

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 8


Back home…..

Smart TV… Set top box... Headphones…

Digital Camera… Printer… CCTV…

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 9


EMBEDDED SYSTEM – BLOCK DIAGRAM
User Interface
(For optical mouse)

Control Unit
Input Devices Output Devices
(Analog/Digital sensors, (Actuators, Buzzer,
Keypad, switches etc.,) Display devices etc.,)
µp / µC

Communication Devices
(Bluetooth, ZigBee, Wi-Fi module etc.,)

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 10


EMBEDDED SYSTEM - EXAMPLES
PURPOSE OF AN EMBEDDED SYSTEM
 Each embedded system is designed to serve the purpose of
any one or combinations of following task:
 Data collection / storage / representation
 Data communication
 Data (signal) processing
 Monitoring
 Controlling
 Application specific user interface
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 11
EMBEDDED SYSTEM - EXAMPLES

MAJOR APPLICATION DOMAINS OF EMBEDDED SYSTEM

 Home Appliances
 Industrial
 Consumer Electronics
 Business
 Home Automation / Security
 Retail
 Computer components
 Communications
 Automotive
 Avionics
 Health care
 Banking
 Military
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 12
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 13
EMBEDDED SYSTEM - CHARACTERISTICS

 Dedicated to specific tasks.

 Supported by a wide array of processors and processor


architectures.

 Usually cost sensitive.

 Real-time constraints.

 Require specialized tools and methods.

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 14


EMBEDDED SYSTEM - CHARACTERISTICS

 Software failure is much more severe.

 Power & memory constraints.

 Operate under extreme environmental conditions.

 Fewer system resources.

 Real Time Operating System

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 15


WHY IS EMBEDDED SYSTEM DIFFERENT?

 Complex algorithms – (Automotive Engine ECU)

 User interface – (GPS)

 Real time – (ABS)

 Multirate – (Multimedia Application)

 Power and energy – (Data Logger)

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 16


GENERAL PURPOSE vs EMBEDDED SYSTEM

S. NO. GENERAL PURPOSE COMPUTING SYSTEM EMBEDDED SYSTEM


A system which is a combination of generic A system which is a combination of special purpose
1 hardware and general purpose operating system hardware and embedded OS for executing a
for executing verity of applications specific set of application
Contains General Purpose Operating System May or may not contain operating system for
2
(GPOS) function
The firmware of the embedded system is pre-
3 Applications can be modified by user programmed and it is non-modifiable by the end
user
Performance is a key deciding factor in the Application specific requirements (like performance,
4
selection of the system. Always “Faster is better”. power, memory, cost) are key deciding factor
Execution behavior is deterministic for certain type of
Need not to be deterministic in execution
5 system like “hard real time systems”
behavior
(Missile guidance or airbag system)

6 Personal computer, Laptops DVD player, Digital camera

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 17


MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 18
EMBEDDED SYSTEM - CLASSIFICATIONS
EMBEDDED SYSTEM
GENERATION

COMPLEXITY & PERFORMANCE

EXECUTION BEHAVIOUR

TRIGGERING

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 19


EMBEDDED SYSTEM - CLASSIFICATIONS
BASED ON GENERATION
 First Generation:
- build around 4-bit and 8-bit processor like 8085, Z80
- Simple hardware & firmware developed in assembly code
- Ex: Digital telephone keypads, calculator etc.,
 Second Generation:
- build around 8-bit and 16-bit processor
- complex and powerful instruction set
- Ex: Data acquisition system, SCADA system etc.,
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 20
EMBEDDED SYSTEM - CLASSIFICATIONS
BASED ON GENERATION
 Third Generation:
- build around 16-bit and 32-bit processor
- application specific processor DSP & ASIC were introduced
- complex and powerful instruction set with pipelining
- dedicated embedded real-time OS entered into market
- Ex: robotics, industrial process control, networking etc.,

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 21


EMBEDDED SYSTEM - CLASSIFICATIONS
BASED ON GENERATION
 Fourth Generation:
- advent of SOC, reconfigurable & multicore processors
- high performance, tight integration and miniaturization µP
- High performance RTOS for functioning
- Ex: smart phone, PDA etc.,

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 22


EMBEDDED SYSTEM - CLASSIFICATIONS
BASED ON COMPLEXITY AND SYSTEM PERFORMANCE
 Small-scale:
- simple in application needs
- performance requirements are not time critical
- build around low cost & low performance 8 or 16-bit µp /µC
- Ex: Electronic toys, digital multimeters etc.,

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 23


EMBEDDED SYSTEM - CLASSIFICATIONS
BASED ON COMPLEXITY AND SYSTEM PERFORMANCE
 Medium-scale:
- slightly complex in hardware & software requirements
- build on medium performance & low cost 16/32-bit µp /µC
- usually contains embedded operating system
- Ex: DVD players, network routers etc.,

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 24


EMBEDDED SYSTEM - CLASSIFICATIONS
BASED ON COMPLEXITY AND SYSTEM PERFORMANCE
 Large-scale:
- highly complex hardware and software requirement
- employed in mission critical application demanding high
performance
- build around high performance 32 or 64-bit µp /µC or SOC
or PLDs or multi-core processors
- may contain complex high performance RTOS
- Ex: Missile navigation system, MRI scanner, ABS etc.,

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 25


EMBEDDED SYSTEM - CLASSIFICATIONS
BASED ON EXECUTION BEHAVIOUR

 Deterministic:
- Real-time systems
- Non Real-time systems

 Triggering mechanism:
- event triggered
- time triggered

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 26


MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 27
EMBEDDED HARDWARE UNIT

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 28


EMBEDDED HARDWARE UNIT
 Embedded processor: It is the heart of the embedded system.
It has two essential units : control unit and execution unit.
 Control unit:
 Includes Fetch unit - Fetches program instructions from memory
 Controls program flow and data path

 Execution Unit:
 Includes Arithmetic and Logic Unit
 Perform execution of the instructions for a program control task like
interrupt, halt, reset etc.,
 Execute application program instructions

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 29


EMBEDDED HARDWARE UNIT
 Power supply: Most of the systems have their own power
supply. Some embedded systems are powered by external
power supply e.g. USB based embedded system, network
interface card, Graphics Accelerator etc. are powered by PC
power supply.

 Reset: It means that processor begins processing of


instructions from starting address set by default in program
counter on power up.

 Clock: This circuit controls execution time of instructions, CPU


machine cycles.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 30
EMBEDDED HARDWARE UNIT
 Timers: Timer circuit is suitably configured as system clock or RTC
(Real time clock). To schedule various tasks and for real time
programming an RTC, or system clock is needed.

 Program & data memory: In embedded system, secondary


memory like disk is avoided. Most of the embedded processors
have internal memory such as ROM, RAM, flash/EEPROM,
EPROM/PROM for storing program and data.

 Interrupt controller: It is an interrupt handling mechanism which


must exist in embedded system to handle interrupts from various
processes and for handling multiple interrupts simultaneously
pending for service.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 31
EMBEDDED HARDWARE UNIT

 I/O ports: I/O ports are used to interface external. The parallel ports
are used in short distance communication while serial ports are
used in long distance communication.

 Input& output device interfacing/driver circuits: Some I/O devices


like motors, actuators, valves, sensors are not compatible with the
processor. Hence the I/O interface circuits are designed to drive
such I/O devices interfaced to the embedded processor

 System Application specific circuits: These are the circuits that can
control specific target circuits. They consist of ADC, DAC, relays,
sensors etc.

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 32


MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 33
EMBEDDED SYSTEMS SOFTWARE

 Embedded systems software is to control the functioning of a set of


hardware devices without compromising on the purpose or the
efficiency.

 Like how the operating systems control the software applications in


computers, embedded systems software control various devices
and ensure their smooth functioning.

 The complexity of embedded systems software vary according to


the devices they are controlling and also on the basis of the usage
and end goal.

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 34


EMBEDDED SYSTEMS SOFTWARE

 Devices ranging from something as simple as a microwave to the


more complex ones like detonators can all be controlled by
embedded systems software. The software can be adjusted and
calibrated per need and the device can also be connected with
remotely or with other devices.

 Common examples of embedded software-based features


include:
 Image processing systems found in medical imaging equipment
 Fly-by-wire control systems found in aircraft
 Motion detection systems in security cameras
 Traffic control systems found in traffic lights
 Timing and automation systems found in smart home devices
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 35
EMBEDDED SYSTEMS SOFTWARE
 We can further distinguish between two types of software used in
embedded systems: the firmware and the application.

 Firmware consists of software that is written in non-volatile memory


within the embedded system, such that it cannot be easily
modified or erased. Firmware is typically used for running or
booting the device.

 In contrast, embedded software applications allow the system to


perform tasks or functions that are required for the successful
application of the device. An embedded application includes
control or scheduling algorithms that allocate processing power to
tasks, processes, or services based on their assigned priority.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 36
EMBEDDED SYSTEMS SOFTWARE
Embedded System Software Stack
 The software stack for an embedded system can vary in complexity depending
on the intended application for the product. A six-layer software stack for an
embedded system might include the following components:
Embedded software stack Description
typically coded by engineers to meet the unique requirements of the project while
Embedded software
accounting for power consumption, timing, and other constraints imposed by the
application
hardware configuration and additional planned software elements.
provide pre-packaged software for embedded systems which include security features,
Application framework machine-to-machine communication features, connectivity and location functionality,
and other useful features.
Operating environment includes libraries, runtime, and other services needed to deliver the core application
more complex embedded systems may use virtualization to divide processing power
Embedded virtualizations
between several different tasks or functions.
consists of the software components necessary to run the device, such as boot-loaders,
Firmware
secure storage, and threading
includes the microcontroller or microprocessor and other on-chip peripherals on a single
Hardware
or multi-layered board
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 37
EMBEDDED SYSTEMS SOFTWARE

 Embedded system softwares are stored as a ROM IMAGE, and it


has specific location.

• System Space – Exception Vectors


• Code Space – Stores the Instruction
• ROM Data Space – Stores the constants e.g. error messages
• Stack – Context Switching, grows downwards
• Free Memory – All Statically allocated variables
• Heap – All dynamically allocated variables
• I/O Space – Memory mapped I/O devices

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 38


EMBEDDED SYSTEMS SOFTWARE

ROM IMAGE

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 39


EMBEDDED SYSTEMS SOFTWARE

Assembly Language High Level Language

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 40


EMBEDDED SYSTEMS SOFTWARE

How do you get the S/W into the H/W?


IDE ISP

CHIP

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 41


MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 42
WHAT IS THE FIRST MICROPROCESSOR?
History behind first microprocessor?

Intel 4004  1969: The assignment - Nippon Calculating Machine


Corporation approached Intel to design 12 custom
chips for its new Busicom 141-PF* printing calculator.

 The Intel solution - lntel designed a set of four chips


known as the MCS-4. It included CPU(4004), Shift
registers(4003) RAM(4002), ROM(4001)

 1971: Era of integrated electronics - Intel purchased the


rights from Nippon Calculating Machine Corporation
and launched the Intel 4004 processor and its chipset
with an advertisement in the November 15, 1971

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 43


CLASSIFICATION OF EMBEDDED PROCESSORS

BASIC REQUIRMENTS
1. High Performance
2. Low Power Consumption
3. Low Cost

Co-Processor Multi-core processor

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 44


CLASSIFICATION OF EMBEDDED PROCESSORS

GENERAL PURPOSE PROCESSOR (GPP)

 Programmable device used in a variety of Applications


 GPP are designed to perform multiple tasks
 The system designer only needs to program the processor’s
memory to carry out the required functionality
 Biggest advantage of such system is the flexibility

 GPP are lack high performance that a certain task required

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 45


CLASSIFICATION OF EMBEDDED PROCESSORS

GENERAL PURPOSE PROCESSOR (GPP)


 Advantages:
 easy to design and use
 design time & cost is low
 reprogrammability
 Disadvantages:
 performance is not very good
 size is high
 they consume much power
 Intel “Pentium” is the most well-known example

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 46


CLASSIFICATION OF EMBEDDED PROCESSORS

APPLICATION SPECIFIC PROCESSORS (ASP)

 ASPs emerged as a solution for high performance and cost


effective processors.

 This processor is designed to execute exactly one program

 Contains only the components needed to execute a single


program

 An embedded designer creates a single-purpose processor


by designing a custom digital circuit
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 47
CLASSIFICATION OF EMBEDDED PROCESSORS

APPLICATION SPECIFIC PROCESSORS (ASP)

 Advantages:
 performance is very good
 small size (exact to fit one solution)
 they consume little power
 Disadvantages:
 not very easy to design and design time is thus high
 design cost is thus higher
 reprogramming is difficult
 limited flexibility: not easy to make changes,
accommodate features
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 48
CLASSIFICATION OF EMBEDDED PROCESSORS

APPLICATION SPECIFIC PROCESSORS (ASP) - CLASSIFICATIONS

 Digital Signal Processor (DSP): Programmable microprocessor


for extensive real-time mathematical computations.

 Application Specific Instruction Set Processors (ASIP):


Programmable microprocessor where hardware and
instruction set are designed together for one special
application.

 Application Specific Integrated Circuit (ASIC): Algorithm


completely implemented in hardware.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 49
CLASSIFICATION OF EMBEDDED PROCESSORS

DIGITAL SIGNAL PROCESSORS (DSP)

 DSPs are specialized microprocessors optimized for the need


of performing digital signal processing.

 DSP gained their importance with the increased demand on


data intensive applications such as video and internet
browsing on mobile devices.

 The digital signal processors satisfy the need for powerful


processor while maintaining low cost and low power
consumption.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 50
CLASSIFICATION OF EMBEDDED PROCESSORS

DIGITAL SIGNAL PROCESSORS (DSP)

 DSP Architecture Features:


 Memory architecture designed for streaming data, using DMA
extensively
 Deliberate exclusion of a memory management unit (MMU)
 Bit-reversed addressing, a special addressing mode useful for
calculating FFTs
 Special arithmetic operations, such as fast multiply–
accumulates (MACs)
 Separate program and data memories (Harvard architecture)
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 51
CLASSIFICATION OF EMBEDDED PROCESSORS

APPLICATION-SPECIFIC INSTRUCTION SET PROCESSORS (ASIP)

 ASIP is typically a programmable architecture that is designed


in a specific way to perform certain tasks more efficiently

 As the name suggests, the Instruction set seems to be the


core characteristic of any ASIP based platform;

 Considering a whole platform, other very important attributes


like interfaces and micro-architecture do contribute a lot to
the overall system performance.

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 52


CLASSIFICATION OF EMBEDDED PROCESSORS

APPLICATION-SPECIFIC INSTRUCTION SET PROCESSORS (ASIP)

 The term “Application” in ASIP is not necessarily related to


software applications, it actually describe the class of tasks
the ASIP platform was designed to efficiently accomplish

 This extra efficiency is not exclusively associated with faster


performance.

 Other factors like reduced production costs, simplified


manufacturing process and less power consumption can all
be considered efficiency qualities for ASIP.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 53
CLASSIFICATION OF EMBEDDED PROCESSORS

APPLICATION-SPECIFIC INTEGRATED CIRCUITS (ASIC)

 ASIC is basically an integrated circuit designed and used by a


single company in a specific system.
 Example: An IC designed for a specific line of cellular phones
of a company, whereby no other company can use it

 They are incredibly expensive, time-consuming, and


resource-intensive to develop

 But extremely high performance coupled with low power


consumption.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 54
CLASSIFICATION OF EMBEDDED PROCESSORS

APPLICATION-SPECIFIC INTEGRATED CIRCUITS (ASIC)

 Full-custom: entirely tailor-fitted to a particular application


from the very start
 Semi-custom: designed to allow a certain degree of
modification during the manufacturing process.
 Structured: built from a group of 'platform slices', with a
'platform slice' being defined as a pre-manufactured device,
system, or logic for that platform.
 Gate-array: ASIC are transistors which are predefined on the
silicon wafer.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 55
CLASSIFICATION OF EMBEDDED PROCESSORS

APPLICATION-SPECIFIC INTEGRATED CIRCUITS (ASIC)

 Applications of ASIC:
 An IC that encodes and decodes digital data using a
proprietary encoding/decoding algorithm.
 A medical IC designed to monitor a specific human
biometric parameter.
 An amplifier IC designed to meet certain specifications not
available in standard amplifier products.
 An IC that's custom-made for a particular automated test
equipment.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 56
CLASSIFICATION OF EMBEDDED PROCESSORS

APPLICATION-SPECIFIC INTEGRATED CIRCUITS (ASIC) - EXAMPLE

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 57


CLASSIFICATION OF EMBEDDED PROCESSORS

Compares the Processors Performance vs. Their Flexibility

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 58


CLASSIFICATION OF EMBEDDED PROCESSORS

Different Approaches for Building Embedded System

GPP ASIP ASIC


Performance Low High Very High
Flexibility Excellent Good Poor
HW Design None Large Very Large
SW Design Small Large None
Power Large Medium Small
Reuse Excellent Good Poor
Market Very Large Relatively Large Small
Cost Mainly on SW SOC Volume sensitive

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 59


CLASSIFICATION OF EMBEDDED PROCESSORS

SYSTEM ON CHIP (SoC)

 SoC is an integrated circuit (IC) that takes a single platform


and integrates an entire electronic system onto it. It is, exactly
as its name suggests, an entire system on a single chip.

 SoC contains one or more processor cores — microprocessors


(MPUs) and/or microcontrollers (MCUs) and/or digital signal
processors (DSPs) — along with on-chip memory, hardware
accelerator functions, peripheral functions etc.,

 SoC can perform a variety of functions including signal


processing, wireless communication, artificial intelligence etc.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 60
CLASSIFICATION OF EMBEDDED PROCESSORS

SYSTEM ON CHIP (SoC) – EXAMPLE

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 61


CLASSIFICATION OF EMBEDDED PROCESSORS

SYSTEM ON CHIP (SoC) – EXAMPLE REDMI NOTE 4 (CPU-Z APP)

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 62


WHAT IS MICROCONTROLLER?
 A microcontroller is a compact integrated circuit designed to govern a
specific operation in an embedded system.
 A typical microcontroller includes a processor, memory and
input/output (I/O) peripherals on a single chip.

Examples: Intel 8051, PIC 16F877, AVR32, ARM LPC2148


MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 63
COMMONLY USED MICROCONTROLLER

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 64


MP vs MC

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 65


WHY MICROCONTROLLERS IN ES?
Most of the embedded system uses Microcontrollers than Microprocessor !!!

Less
Small size design
time

Low cost Highly


reliable

Easy to Low
program power

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 66


MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 67
LAYERS OF EMBEDDED SYSTEM

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 68


LAYERS OF EMBEDDED SYSTEM

 The lower layer is the embedded hardware. Embedded hardware


consists of:
 The processor, which is the main system controller.
 The memory devices, where instructions and data are stored.
 I/O devices through which communication between the processor
and the external world is enabled.

 The upper layer is the embedded software. This layer changes according
to the design of the system being built.

 In some systems, some layers may be combined or totally ignored.

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 69


LAYERS OF EMBEDDED SYSTEM
 Hardware Abstraction Layer (HAL):
 It includes the bootloader, board support package (BSP), device
drivers, and other components.

 Similar to the BIOS in PCs, the bootloader in ES perform the


initialization of the hardware, establishes the image of memory space,
and consequently enables the hardware and software environment to
reach an appropriate state for the final scheduling of the system
kernel.

 The BSP achieves the abstraction of the hardware operation,


empowering the OS to be independent from the hardware and
enabling the OS to run on different hardware architectures.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 70
LAYERS OF EMBEDDED SYSTEM

 The BSP is a unique software module in embedded systems.

 For example, Wind River VxWorks BSP and Microsoft Windows CE


BSP have similar functions for an embedded hardware
development board, but they feature completely different
architectures and interfaces.

 Device drivers enable the OS to shield the differences between


hardware components and peripherals and provide a unified
software interface for operating hardware.

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 71


LAYERS OF EMBEDDED SYSTEM
 Operating System Layer:
 An OS is a software system for uniformly managing hardware
resources. It abstracts many hardware functions and provides them to
applications in the form of services.
 Scheduling, files synchronization, and networking are the most
common services provided by the OS.

 In embedded systems, the OS has its own unique characteristics:


stability, customization, modularity, and real-time processing.

 The common embedded OS contains embedded Linux, Windows CE,


VxWorks, Lynx, Integrity, Android, and some operating systems used
in specific fields.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 72
LAYERS OF EMBEDDED SYSTEM
 System Service Layer:
 The system service layer is the service interface that the OS provides
to the application.

 Using this interface, applications can access various services


provided by the OS.

 This layer generally includes the file system, graphical user interface
(GUI), task manager, and so on.

 A GUI library provides the application with various GUI programming


interfaces, which enables the application to interact with users
through application windows, menus, dialog boxes, and other
graphic forms instead of a command line.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 73
LAYERS OF EMBEDDED SYSTEM
 Application Layer:

 The application, located at the top level of the software hierarchy,


implements the system functionality and business logic.

 From a functional perspective, all levels of modules in the application


aim to perform system functions.

 From a system perspective, each application is a separate OS


process.

 Typically, applications run in the less-privileged processor mode and


use the API system schedule provided by the OS to interact with the
OS.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 74
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 75
EMBEDDED SYSTEM DESIGN LIFE CYCLE

Ref. “Embedded Systems Design: An Introduction to Processes, Tools, and Techniques”


by Arnold S. Berger
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 76
EMBEDDED SYSTEM DESIGN LIFE CYCLE
PHASE-1: PRODUCT SPECIFICATION

 Objective: capture a formal description of the complete


system

 Transforming the customer’s wishes into the final product

 Costumer Research Tour

 Sales and Marketing Department take the lead.

 R&D are not allowed(in general)

 Help to arrive a common Vision of the Product


MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 77
EMBEDDED SYSTEM DESIGN LIFE CYCLE
PHASE-2: HARDWARE & SOFTWARE PARTITIONING

 Objective: To decide which Portion in H/W and which in S/W.

 Example, FPU (H/W) faster, Floating Point (S/W) slower.

 partitioning decision is a complex optimization problem

 Choice of CPU impacts the partitioning decision

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 78


EMBEDDED SYSTEM DESIGN LIFE CYCLE
PHASE-3: ITERATION AND IMPLEMENTATION
 Objective: Perform initial design before the detailed
implementation

 Final stage before H/W and S/W team stop communication

 Hardware designers might be using simulation tools

 Software designers running code on single-board computers


that use the target micro processor
 The Design can be extended in H/W or S/W according to
convenience.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 79
EMBEDDED SYSTEM DESIGN LIFE CYCLE
PHASE-4: DETAILED HARDWARE AND SOFTWARE DESIGN

 Objective: Getting the hardware and software done for the


next phase

 S/W embedded developer must understand about execution


environment, development tools, and run-time package.

 H/W embedded systems developer must understand about,


 Memory usage.
 System startup
 Interrupts and exceptions

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 80


EMBEDDED SYSTEM DESIGN LIFE CYCLE
PHASE-5: HARDWARE/SOFTWARE INTEGRATION

 Objective: To integrate both H/W and S/W to carryout testing

 This stage require special tools and methods to manage the


complexity.

 Helps perform debugging and identify errors, Also discover


whether S/W team understood the H/W description.

 Example, Big Endian/Little Endian problem

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 81


EMBEDDED SYSTEM DESIGN LIFE CYCLE
PHASE-6: PRODUCT TESTING AND RELEASE

 Objective : Verify designed system meet its requirement or not


also ensure software doesn’t crash at a critical moment

 Testing & reliability requirements-more stringent in embedded

 Testing must determine whether the system is performing close


to its optimal capabilities

 Who does the testing? Not the designer

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 82


EMBEDDED SYSTEM DESIGN LIFE CYCLE
PHASE-7: MAINTAINING AND UPGRADING EXISTING PRODUCTS

 Objective: To maintain and add additional features on the


existing product design

 Carried out by non-members of the original design team for a


particular product

 Experience, skills, the existing documentation, and the old


product to understand the original design well enough to
maintain and improve it.

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 83


MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 84
EMBEDDED SYSTEM DESIGN PROCESS

Top–down - From
bottom–up - Start
description of the
with components
system to concrete
to build a system.
details.

Ref. “Computers as components: principles of embedded computing system design”


by Wayne Wolf
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 85
EMBEDDED SYSTEM DESIGN PROCESS
 The major goals of the design to be considered are :
 Manufacturing cost
 Performance
 Power consumption
 Tasks which need to be performed at each step,
 analyze the design at each step - meet specification
 refine the design - add details
 verify the design - system goals

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 86


EMBEDDED SYSTEM DESIGN PROCESS
REQUIREMENTS

 Informal descriptions gathered from the customer are known


as requirements

 Requirements are refined into a specification to begin the


designing of the system architecture

 Can be functional or non-functional requirements


 Functional: Needed output as a function of input
 Non-functional: performance, cost, physical size, weight,
and power consumption
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 87
EMBEDDED SYSTEM DESIGN PROCESS
REQUIREMENTS – EXAMPLE (GPS Navigation System)

Product Name GPS Navigation System


Purpose Consumer grade moving map for driving use
Inputs Power button two control button
Outputs Back-lit LCD Display 400x600
Functions Uses 5-receiver GPS system; three user-selectable
resolutions; always displays current latitude and longitude
Performance Updates screen within 0.25 seconds upon movement
Power 100mW
Cost 30 USD
Size And Weight 2” x 6” and 250 grams
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 88
EMBEDDED SYSTEM DESIGN PROCESS
SPECIFICATION

 Requirements gathered is refined into a specification.

 Specification serves as the contract between the customers


and the architects.

 Specification is essential to create working systems with a


minimum of designer effort.

 Specific, understandable and accurately reflect the


customer’s requirements.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 89
EMBEDDED SYSTEM DESIGN PROCESS
SPECIFICATION - EXAMPLE (GPS Navigation System)

 Specification would include details for several components:


 Data received from the GPS satellite
 Map data
 User interface
 Operations that must be performed to satisfy customer
requests
 Background actions

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 90


EMBEDDED SYSTEM DESIGN PROCESS
ARCHITECTURE
 The specification describes only the functions of the system

 Implementation of the system is described by the


Architecture

 The architecture is a plan for the overall structure of the


system.

 It will be used later to design the components

 The system block diagram may be refined into two block


diagrams - hardware and software
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 91
EMBEDDED SYSTEM DESIGN PROCESS
ARCHITECTURE - EXAMPLE (GPS Navigation System)

CPU
FRAME
BUFFER
GPS
DISPLAY
RECEIVER
MEMORY
PANEL I/O
BUS

SYSTEM DESIGN - HARDWARE


MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 92
EMBEDDED SYSTEM DESIGN PROCESS
ARCHITECTURE - EXAMPLE (GPS Navigation System)

DATABASE RENDERER PIXELS


SEARCH

USER
POSITION TIMER
INTERFACE

SYSTEM DESIGN - SOFTWARE


MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 93
EMBEDDED SYSTEM DESIGN PROCESS
HARDWARE AND SOFTWARE COMPONENTS

 The architectural description specify what components we


need

 The component design effort builds those components in


conformance to the architecture and specification

 Includes both hardware and software modules

 Some of the components will be ready-made (example :CPU,


memory chips)

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 94


EMBEDDED SYSTEM DESIGN PROCESS
HARDWARE AND SOFTWARE COMPONENTS - EXAMPLE

 In the moving map, GPS receiver is a predesigned standard


hardware component.
 Topographic software is a standard software module which
uses standard routines to access the database.
 Printed circuit board are the components which needs to be
designed.
 When creating these embedded software modules, ensure the
system runs properly in real time and that it does not take up
more memory space than allowed.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 95
EMBEDDED SYSTEM DESIGN PROCESS
SYSTEM INTEGRATION
 After the components are built, they are integrated

 Bugs are typically found during the system integration

 By debugging a few modules at a time, simple bugs can be


discovered

 By fixing the simple bugs early, more complex bugs can be


discovered

 Appropriate debugging facilities during design which can


help to ease system integration problems.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 96
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 97
AUTOMATIC CHOCOLATE VENDING MACHINE

REQUIREMENTS
 Purpose:
 To sell chocolate through an ACVM from which children can
automatically purchase the chocolates.
 The payment is by inserting the coins into a coin-slot.
 Inputs:
 Coins of different denominations through a coin slot.
 User commands.
 Outputs:
 Chocolate and signal to the system that subtracts the cost from the
value of amount collected.
 Display of the menus for GUIs, time and date, advertisements,
welcome and thank messages.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 98
AUTOMATIC CHOCOLATE VENDING MACHINE

REQUIREMENTS
 Functions of the system:
 A child sends commands to the system using a GUI. It must
consists of the LCD display and keypad units.
 The child inserts the coins for cost of chocolate and the machine
delivers the chocolate.
 If the coins are not inserted as per the cost of chocolate in
reasonable times then all coins are refunded. If the coin amount
more, the excess amount is refunded along with chocolate.
 The coins for the chocolates purchased collect inside the machine
in a collector channel, so that owner can get the money, again
through appropriate commands using the GUI.
 USB wireless modem enables communication through Internet to
the ACVM owner.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 99
AUTOMATIC CHOCOLATE VENDING MACHINE

REQUIREMENTS
 Design metrics:
 Power Dissipation: As required by mechanical units, display units and
computer system
 Performance: One chocolate in two minutes and 256 chocolates
before next filling of chocolates into the machine.[Assumed]
 Process Deadlines: Machine waits for maximum 30 s for the coins and
machine should deliver the chocolate within 60 s.
 User Interfaces: Graphic at LCD or touch screen display on LCD and
commands by children or machine owner through fingers on keypad
or touch screen
 Engineering Cost: US$ 50000 (assumed)
 Manufacturing Cost: US$ 1000 (assumed)
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 100
AUTOMATIC CHOCOLATE VENDING MACHINE

SPECIFICATIONS

 Alphanumeric keypad on the top of the machine. A child interaction


with it when buying a chocolate. Owner commands and interaction with
the machine.

 Three line LCD display unit on the top of the machine. Displays menus,
entered text, pictograms, and welcome, thank and other messages, and
time and date. Child as well as the ACVM owner GUIs with the machine
using keypad and display.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 101
AUTOMATIC CHOCOLATE VENDING MACHINE

SPECIFICATIONS

 Coin insertion slot so that the child can insert the coins to buy a
chocolate.

 Delivery slot to collect the chocolate, and coins if refunded.

 Internet connection port so that owner can interact with ACVM from
remote.

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 102


AUTOMATIC CHOCOLATE VENDING MACHINE

ARCHITECTURE – OVERALL SYSTEM DIAGRAM

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 103


AUTOMATIC CHOCOLATE VENDING MACHINE

ARCHITECTURE – HARDWARE DIAGRAM

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 104


AUTOMATIC CHOCOLATE VENDING MACHINE

ARCHITECTURE – SOFTWARE DIAGRAM

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 105


AUTOMATIC CHOCOLATE VENDING MACHINE

COMPONENTS - HARDWARE
 ACVM specific hardware to sort the coins of different denomination and
each denomination.
 Main Power supply 220 V 50 Hz or 110 V 60 Hz. Internal circuits drive by
supply of 5 V 50mA for electronic and 12 V 2 A for mechanical systems.
 A TCP/IP port.
 A 1s resolution timer is obtained by programming 8051 timer.
 Flash memory part of ROM and RAM for storing temporary variables and
stack.
 Microcontroller 8051 MX and 8 MB ROM for application codes.
MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 106
AUTOMATIC CHOCOLATE VENDING MACHINE

COMPONENTS - SOFTWARE

 Task_ReadPorts: Waits for the coins and action as per coins collected.
 Task_Collect: Waits for coins = or > cost till timeout and act accordingly.
 Task_Deliver: Waits for Task_Readports, delivers chocolate, and
decreases coins’ amount after delivery.
 Task_Refund: Waits for refund event and calculate refund amount.
 Task_Excess Refund: Refunds the Excess amount
 Task_Display: Waits for the message and display as per message.

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 107


AUTOMATIC CHOCOLATE VENDING MACHINE

SYSTEM INTEGRATION

 Test and validation conditions:


 All user commands must function correctly.
 All graphic displays and menus should appear as per the
program.
 Each task should be tested with test inputs.
 Tested for 60 users per hour.

MODULE - 1 ECE5041 – EMBEDDED SYSTEM DESIGN 108

You might also like