0% found this document useful (0 votes)
81 views121 pages

Module 2 ESD BEC601 Watermark

Module-2 of the Embedded Systems Design Concepts course covers the characteristics, quality attributes, and design approaches of embedded systems. It emphasizes their application-specific nature, operational and non-operational quality attributes, and the importance of hardware-software co-design. The module also discusses various computational models, programming languages, and firmware development processes relevant to embedded systems.

Uploaded by

Kumuda R
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)
81 views121 pages

Module 2 ESD BEC601 Watermark

Module-2 of the Embedded Systems Design Concepts course covers the characteristics, quality attributes, and design approaches of embedded systems. It emphasizes their application-specific nature, operational and non-operational quality attributes, and the importance of hardware-software co-design. The module also discusses various computational models, programming languages, and firmware development processes relevant to embedded systems.

Uploaded by

Kumuda R
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/ 121

Module-2: Embedded Systems Design Concepts

Course Code: BEC601

Prof. Vijaykumar Patil


Assistant Professor, Dept. of ECE

Jain College of Engineering and Research, Belagavi


March 17, 2025

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 1 / 121


Outline
1 Characteristics of Embedded Systems
2 Quality Attributes in Embedded Systems
Operational quality attributes
Non-Operational Quality Attributes
3 Embedded Systems – Application and Domain Specific
Washing Machine – Application-Specific Embedded System
Automotive – Domain-Specific Embedded System
Automotive Communication Buses
Key Players of the Automotive Embedded Market
4 Hardware Software Co-Design
Fundamental Issues in Hardware Software Co-Design
Computational Models in Embedded Design
5 Embedded Firmware Design and Development
Embedded Firmware Design Approaches
Embedded Firmware Development Approaches
6 Programming in Embedded C
Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 2 / 121
Characteristics of Embedded Systems

1 Application and Domain Specific


2 Reactive and Real-Time
3 Operates in Harsh Environments
4 Distributed Systems
5 Small Size and Weight
6 Power Efficiency

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 3 / 121


Application and Domain Specific

Definition:
Embedded systems are custom-built to perform a specific function
within a particular domain.
They are not general-purpose systems and cannot be
reprogrammed or repurposed for different applications.
Examples:
The embedded control unit of a microwave oven cannot be replaced
with that of an air conditioner.
An embedded system designed for telecom networks (e.g., a
network switch controller) cannot be used in automotive
applications (e.g., Engine Control Unit).
A medical imaging embedded system used in MRI scanners cannot
function as a biometric fingerprint scanner.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 4 / 121


Reactive Systems and Real-Time Systems
Reactive Systems
Definition: Embedded systems continuously monitor inputs and react
accordingly.
Always ”awake” and respond to signals without delay.
Examples:
Touchscreen devices: Immediate response to taps and gestures.
Traffic lights: Sensors adjust timings dynamically.
Smart home automation: Lights turn on when motion is detected.
Real-Time Systems
Definition: A system that must complete a task within a strict
time limit.
Deterministic Behavior: Always takes a predictable time to respond.
Failing to meet deadlines leads to system failure.
Examples:
Anti-lock Braking System (ABS)
Flight Control Systems
Pacemakers
Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 5 / 121
Operates in Harsh Environments
Embedded systems often operate in extreme conditions:
Dusty environments: Industrial machinery, mining equipment.
High temperatures: Automotive ECUs, spacecraft electronics.
Vibrations & Shock: Military, aviation, and automotive applications.
Design must ensure system reliability and durability.
Solutions for Harsh Conditions
High-temperature components for extreme heat zones.
Shock absorption techniques for rough terrains.
Sealed enclosures to prevent dust and moisture damage.
Power stabilization to handle voltage fluctuations.
Corrosion-resistant materials to extend lifespan.
Examples:
Automobile ECUs: Work under engine heat and vibrations.
Spacecraft electronics: Function in vacuum and radiation exposure.
Underwater sensors: Operate under extreme pressure.
Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 6 / 121
Distributed Embedded Systems

Distributed system means embedded systems working together in a


larger system.
Several independent embedded units collaborate to achieve a common
goal.
Examples include:
Automatic Vending Machine – Composed of:
Card Reader (for payment processing).
Vending Unit (for product dispensing).
ATM (Automated Teller Machine) – Composed of:
Card Reader (authentication).
Transaction Unit (processing transactions).
Currency Counter (dispensing cash).
Printer Unit (receipt generation).

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 7 / 121


SCADA – A Distributed Embedded System
SCADA (Supervisory Control and Data Acquisition) is a
real-world example.
Used in industrial automation, power grids, and process control.
Structure:
Sensors – Collect real-time data.
Controllers – Process and analyze data.
Supervisory Module – Monitors and controls the entire system.
Ensures efficient and remote monitoring of large-scale systems.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 8 / 121


Small Size and Weight

Product aesthetics is a key factor in consumer choices.


Example: When purchasing a mobile phone, size, weight, and design
play a significant role.
The phrase ”Small is beautiful” is widely accepted.
Compact devices are more convenient, user-friendly, and portable.
Embedded systems often require miniaturization for practical use.
Examples
Wearable Devices: Smartwatches, fitness trackers, etc
Portable Electronics: Mobile phones, tablets, and e-readers.
Automotive Systems: Compact ECUs (Electronic Control Units) in
modern vehicles.
Medical Devices: Implantable pacemakers, hearing aids, and insulin
pumps.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 9 / 121


Power Concerns

Efficient power management is crucial to optimize system


performance.
Heat dissipation must be minimized to avoid excessive cooling
requirements.
High power consumption leads to:
The need for cooling fans, making the system bulky.
Increased energy costs and reduced efficiency.
Example: Mobile devices prioritize power efficiency to enhance battery
life.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 10 / 121


Solutions for Power Optimization

Use low-power components like:


Low-dropout (LDO) voltage regulators.
Microcontrollers/processors with power-saving modes.
Employ dynamic power management techniques:
Switching to low-power states when idle.
Adaptive clock scaling for energy efficiency.
Essential for battery-operated devices (e.g., smartphones, IoT
devices).

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 11 / 121


Quality Attributes in Embedded Systems

Quality attributes are non-functional requirements that define


system performance.
Proper documentation of quality attributes enhances system design
and development.
Well-defined and measurable attributes positively impact the
development process and end product.
Analogy: An embedded system is like a car - functionality gets you
from A to B, but quality attributes define how smooth, safe, and
efficient the ride is!
Quality attributes in embedded system development are broadly
classified into:
1 Operational Quality Attributes
2 Non-Operational Quality Attributes

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 12 / 121


Operational Quality Attributes

Definition: Operational quality attributes define how well an embedded


system performs while in operation (online mode). They directly
impact user experience, efficiency, and system robustness.
Operational Quality Attributes
1 Response – How quickly the system reacts to inputs.
2 Throughput – The amount of work the system handles in a given
time.
3 Reliability – The system’s ability to function correctly over time.
4 Maintainability – Ease of fixing or updating the system.
5 Security – Protection against unauthorized access or attacks.
6 Safety – Ensuring no harm comes to users or the environment.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 13 / 121


CISC & RISC Architecture
Complex Instruction Set Computing
Uses complex instructions that perform multiple operations.
Example: 8051 CJNE instruction:
Reads a register value.
Compares it with a given value.
Jumps to a new address if conditions are met.
Advantages:
Reduces program memory size.
Disadvantages:
Requires microcode decoder in hardware.
Complex datapath.
Reduced Instruction Set Computing (RISC)
Uses simple instructions that execute in a single cycle.
Key Features:
Large register file.
Instructions operate on registers.
Supports extensive pipelining for parallel execution.
Used in modern microprocessors like ARM.
Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 64 / 121
(VLIW) & Parallel Processing Architecture

Very Long Instruction Word


Uses multiple functional units (ALUs, multipliers, etc.).
Each instruction contains multiple operations for parallel execution.
Used in high-performance computing and DSP applications.
Parallel Processing Architectures
Uses multiple Processing Elements (PEs) for concurrent execution.
SIMD (Single Instruction Multiple Data):
A single instruction is executed across multiple PEs.
Used in image processing and vector processors.
MIMD (Multiple Instruction Multiple Data):
Different PEs execute different instructions simultaneously.
Used in multi-core processors and supercomputers.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 65 / 121


Selecting the Language

A programming language captures a ’Computational Model’ and


maps it into architecture.
No strict rule defines which language should be used for which model.
Multiple languages like C, C++, C, Java, etc., can capture software
models.
Languages such as VHDL, System C, Verilog, etc., are suited for
hardware implementations.
Some languages excel in capturing specific models; e.g., C++ is ideal
for object-oriented models.
The chosen language should effectively capture the intended model.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 66 / 121


Partitioning System Requirements into Hardware and
Software

System requirements can often be implemented in either hardware or


software (firmware).
Deciding which to choose involves balancing hardware-software
trade-offs.
Key considerations for partitioning include:
Performance requirements
Power consumption
Cost constraints
Flexibility for future upgrades
Development time and complexity

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 67 / 121


Computational Models in Embedded Design

The commonly used computational models in embedded system design


are:
Data Flow Graph Model
Control Data Flow Graph Model
State Machine Model
Sequential Program Model
Concurrent/Communicating Process Model
Object-Oriented Model

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 68 / 121


Data Flow Graph (DFG) Model

The Data Flow Graph (DFG) model translates the data processing
requirements into a data flow graph.
It is a data-driven model in which the program execution is
determined by data.
This model emphasizes data and operations on the data that
transform the input data to output data.
Embedded applications that are computationally intensive and
data-driven are modeled using the DFG model.
DSP applications are typical examples of it.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 69 / 121


DFG Visual Model

Data Flow Graph (DFG) is a visual model in which:


Operations on the data (process) are represented using a block (circle).
Data flow is represented using arrows.
Inward arrows to the process represent input data, and outward
arrows represent output data.

a
x y
+ -
b c

Figure: DFG Example: = + , =

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 70 / 121


Acyclic DFG (ADFG)

A DFG model is said to be an acyclic DFG (ADFG) if:


It doesn’t contain multiple values for the input variable.
It doesn’t produce multiple output values for a given set of input(s).
Feedback inputs (output fed back to input) and events are examples
of non-acyclic inputs.
A DFG model translates the program as a single sequential process
execution.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 71 / 121


Control Data Flow Graph (CDFG) Model

Key Features:
The DFG model is data-driven and does not involve control
operations (conditionals).
The CDFG model is used for applications involving conditional
program execution.
CDFG models contain both data operations and control operations.
CDFG uses:
Data Flow Graph (DFG) as element.
Conditionals (constructs) as decision makers.
CDFG includes both data flow nodes and decision nodes, while DFG
only includes data flow nodes.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 72 / 121


Example- CDFG

Example Requirement:
If flag = 1, = + ;
Else = ;

Key Representation:
Control nodes are represented
by a diamond shape (decision
block) as in flowcharts.
The decision node determines
which process gets executed.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 73 / 121


State Machine Model

State Machine Model:


Used for modelling reactive or event-driven embedded systems.
Common in control and industrial applications.
Describes system behaviour with:
States - Representation of the current situation.
Events - Inputs that trigger state changes.
Actions - Activities performed by the state machine.
Transitions - Movement from one state to another.
Finite State Machine (FSM) model limits the system to finite states.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 74 / 121


Seat Belt Warning System Example

System Requirements:
Alarm sounds if the seat belt isn’t fastened within 10 seconds after
ignition ON.
Alarm stops when:
Alarm time (5 seconds) expires.
Seat belt is fastened.
Ignition is turned off.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 75 / 121


FSM Model: Seat Belt Warning System

States:
Alarm Off
Waiting
Alarm On
Events:
Ignition Key ON
Ignition Key OFF
Timer Expire
Alarm Time Expire
Seat Belt ON

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 76 / 121


Timer FSM Model
Timer States:
IDLE - When timer is not running.
READY - When the timer is loaded with a count for delay.
RUNNING - When timer starts counting down.
Events:
Start Timer
Stop Timer
Timer Expire

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 77 / 121


Firmware Development Process

Starts with converting firmware requirements into a program model.


Implementation follows by capturing the model in a language suitable
for the target controller.
Firmware Design Approaches
Super Loop Based Approach: Ideal for simple tasks with minimal
control flow.
Embedded OS Based Approach: Suitable for complex tasks
requiring multitasking and scheduling.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 91 / 121


Super Loop Based Approach

Suitable for non-time-critical applications.


Similar to conventional procedural programming.
Tasks are executed sequentially in a loop.
No Operating System required.
Execution Flow in Super Loop Approach
1 Configure parameters and initialize hardware.
2 Start task execution sequentially:
Task 1()
Task 2()
:
Task n()
3 Return to Task 1() and repeat infinitely.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 92 / 121


Super Loop Based Approach

Code Example
void main()

Configurations();
Initializations();
while(1)

Task1();
Task2();
...
TaskN();

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 93 / 121


Advantages, Drawbacks and Applications of Superloop
Approach
Advantages
No Operating System required.
Simple implementation with fixed task order.
Suitable for low-cost, non-time-critical products.
Drawbacks
Task failure affects the whole system.
Not ideal for real-time applications with time-sensitive tasks.
Potential risk of missing events if the loop cycle is too long.
Applications
Low-cost embedded products.
Products where response time is not crucial.
Example: Electronic video game toy with keypad and display.
Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 94 / 121
OS-Based Approach

Embedded OS can be:


General Purpose Operating System (GPOS)
Real Time Operating System (RTOS)
GPOS Based Design
Similar to PC-based application development
Merges embedded systems with general computing systems
Examples of GPOS: Android OS, Embedded Linux, Raspberry Pi OS,
ubuntu Core
Used in devices like Smartphones, Smart TVs, Smart Home
Automation

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 95 / 121


RTOS Based Design

Designed for systems requiring real-time response


Ensures predictable timing behavior for tasks
Examples: FreeRTOS, ChibiOS, Windows Embedded Compact,
VxWorks, ThreadX
Used in Automotive ECUs (Electronic Control Units), UAV Flight
Controllers, SpaceX Falcon 9

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 96 / 121


Embedded Firmware Development Approaches

For embedded firmware development, we can use either:


Assembly Language (Low-Level Language) —
Processor/Controller specific.
High-Level Language (e.g., C, C++, JAVA) —
Processor/Controller independent.
Combination of Assembly and High-Level Language — Balances
control and abstraction.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 97 / 121


Embedded Firmware Development Approaches

Assembly Language (Low-Level Language)


Directly interacts with hardware using mnemonics like MOV, ADD, etc.
Highly efficient but complex to write and debug.
Example: Writing optimized routines for time-critical tasks.
High-Level Language
Easier to write, understand, and maintain.
Offers portability across multiple hardware platforms.
Example: Writing user interface code or complex algorithms.
Combination Approach
Combines the efficiency of Assembly with the simplicity of High-Level
Languages.
Example: Writing performance-critical code in Assembly (e.g., ISR
routines) and the rest in C.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 98 / 121


Assembly Language

Assembly language is the human-readable form of machine language.


Machine language is a binary representation consisting of 1s and 0s.
Assembly language uses mnemonics to simplify machine code.
Example
MOV A, #30
In Machine Language: 01110100 00011110
Structure of an Assembly Language Program Each line is split into
four fields:
LABEL : Identifies a point in the program.
OPCODE : Specifies the operation.
OPERAND : Specifies data for the operation.
COMMENTS : Provides additional information.
Example:DELAY: MOV R0, #255 ; Load Register R0 with 255
Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 99 / 121
Modular Programming in Assembly

Complex programs are divided into submodules for simplicity.


Each module is saved as ‘.asm‘ or ‘.src‘ file.
Modular programming improves reusability, debugging, and
maintenance.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 100 / 121


Source File to Hex File Conversion Process

Steps involved:
1 Source File written in ‘.asm‘ or ‘.src‘.
2 Assembler translates source code to ‘.obj‘ file.
3 Linker/Locator assigns absolute addresses to code and creates an
absolute object file.
4 Object to Hex File Converter generates the final ‘.hex‘ file for
memory dumping.
Key Tools in Assembly Development
A51 Macro Assembler (Keil Software) - 8051 Assembler.
BL51 Linker/Locator (Keil Software) - Linking and assigning
addresses.
OH51 Object to Hex Converter - Generates ‘.hex‘ file for flashing.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 101 / 121


Assembly language to machine language conversion
process

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 102 / 121


Advantages of Assembly Language

Efficient Memory Usage – Optimized code minimizes memory


utilization.
High Performance – Direct hardware access improves speed.
Low-Level Hardware Access – Essential for device drivers and
hardware routines.
Reverse Engineering – Disassemblers can reveal original code logic.

Prof. Vijaykumar Patil (JCER, Belagavi) Module-2:ESD Concepts 103 / 121

You might also like