0% found this document useful (0 votes)
30 views

Chapter One

This document provides an introduction to real-time and embedded systems. It defines a real-time embedded system as a system that responds to real-world situations within specified time constraints using embedded software and hardware. Real-time systems must have constant response, meet deadlines, and provide accurate outputs. Examples include flight control, traffic light, and medical systems. The document outlines a basic model for real-time systems including sensors, signal conditioning, interfaces, and actuators. It also describes hard, soft, and firm real-time tasks based on their deadline requirements and consequences of missed deadlines. Finally, it covers modeling timing constraints such as delay, deadline, and duration constraints for real-time systems.

Uploaded by

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

Chapter One

This document provides an introduction to real-time and embedded systems. It defines a real-time embedded system as a system that responds to real-world situations within specified time constraints using embedded software and hardware. Real-time systems must have constant response, meet deadlines, and provide accurate outputs. Examples include flight control, traffic light, and medical systems. The document outlines a basic model for real-time systems including sensors, signal conditioning, interfaces, and actuators. It also describes hard, soft, and firm real-time tasks based on their deadline requirements and consequences of missed deadlines. Finally, it covers modeling timing constraints such as delay, deadline, and duration constraints for real-time systems.

Uploaded by

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

Chapter 1

Introduction to Real-time system and Embedded System

About Real-time and Embedded Systems

 System is a group of interacting or interrelated elements, which works, organizes or performs


one or many tasks according to a fixed set of rules, program or plan.
 Real Time is the actual time during which something takes place
 Embedded means something that is attached to another thing (Software with Hardware).

What is a real-time embedded system: A system which responds to real time situation with the help of
its embedded software and hardware, within the specified time constraint. Or Real time embedded
system is a system composed of hardware, application software and real time operating system.

Characteristics of Real-time and Embedded systems:


Real time embedded systems must have the following characteristics:
A. Constant Response: A real-time embedded system always responds in the same manner to a
certain situation, it is not allowed to deviate from its normal designated output. An air-
conditioner is not allowed to throw hot air in summer.
B. Deadline: respond to an event or request within a strictly defined time. It is crucial to the
working of an embedded system, a missed deadline can cost lives and finances.
C. Accuracy: the system should perform exact and accurate tasks. In case of any
malfunctioning, the system failure can cause destruction. What would happen if the heartbeat
regulator machine can't maintain the heartbeat? , patient would eventually die.
D. Quick Response: It is the most important characteristic of all; the real-time embedded
system must be swift enough to respond to the changing external environment with
immediate effect.

Examples of real-time and embedded systems (RTES):

Flight Control Systems


Traffic Light Systems
Missile Guidance Systems
Ultrasound scans
CT scans
ATM Machines .Etc.

1
Model of Real time system:

The basic model of a real-time system presents the overview of all the components involved in a real-
time system. Real-time system includes various hardware and software embedded in a way that the
specific tasks can be performed in the time constraints allowed. The accuracy and correctness involved in
real-time system makes the model complex. There are various models of real-time system which are
more complex and are hard to understand. Here we will discuss a basic model of real-time system which
has some commonly used terms and hardware. Following diagram represents a basic model of Real-time
System:

Sensor: Sensor is used for the conversion of some physical events or characteristics into the electrical
signals. These are hardware devices that take the input from environment and gives to the system by
converting it. For example, a thermometer takes the temperature as physical characteristic and then
converts it into electrical signals for the system.
Actuator: Actuator is the reverse device of sensor. Where sensor converts the physical events into
electrical signals, actuator does the reverse. It converts the electrical signals into the physical events or
characteristics. It takes the input from the output interface of the system. The output from the actuator
may be in any form of physical action. Some of the commonly used actuator are motors and heaters.
Signal Conditioning Unit: When the sensor converts the physical actions into electrical signals, then
computer can’t used them directly. Hence, after the conversion of physical actions into electrical signals,
there is need of conditioning. Similarly while giving the output when electrical signals are sent to the
actuator, then also conditioning is required. Therefore, Signal conditioning is of two types:
 Input Conditioning Unit: It is used for conditioning the electrical signals coming from sensor.
 Output Conditioning Unit: It is used for conditioning the electrical signals coming from the system.
Interface Unit: Interface units are basically used for the conversion of digital to analog and vice-versa.
Signals coming from the input conditioning unit are analog and the system does the operations on digital
signals only, then the interface unit is used to change the analog signals to digital signals. Similarly,
while transmitting the signals to output conditioning unit the interface of signals are changed i.e. from
digital to analog. On this basis, Interface unit is also of two types:
2
 Input Interface: It is used for conversion of analog signals to digital.
 Output Interface: It is used for conversion of digital signals to analog.

Types of real time tasks

A task whose performance is judged based on deadlines is termed as real time tasks. And the System that
handles the real time tasks are called “Real Time Systems”.
There are three types of Real Time Tasks
1. Hard Real Time Tasks
2. Soft Real Time Tasks
3. Firm Real Time Tasks
Hard Real Time Tasks: In Hard Real Time tasks it is compulsory for a task to be completed within the
deadline. Failing to do so results in disastrous effect most of the time and might lead to loss of human
lives. If the Hard Real Time tasks misses the deadline that is if C > D where “C” refers to completion
time of a task and “D” refers to deadline then the output generated is completely useless. In other words
value of outcome is zero and the output is rejected completely. The System fails if Hard Real Time tasks
miss the deadline.
Required Condition for Hard Real Time tasks: C <= D then Q=1 where C is completion time, D is
Deadline and Q is Quality or Significance. And is C > D then Q=0
Examples Air Traffic Control System, Air Bags Controls in Car, Anti Missile System
Soft Real Time Tasks: In Soft Real time tasks the deadline is followed but it is not mandatory. This
means that even if the deadline is missed the output is not rejected completely. The task that misses the
deadline is affected with some penalty or fine in the form of reduced quality of service. As the
completion time crosses the deadline the value of the output reduces until it reaches zero that is output is
of no use.
Required Condition for Soft Real Time tasks: C <= D then Q=1 and if C > D then Q lowers and move till
Q=0.ExamplesOnline Gaming.

Firm Real Time Tasks: Firm Real Time tasks are treated as a combination of Hard Real Time Tasks
and Soft Real Time Tasks. In Firm Real Time Tasks if the deadline is missed the value of output is
dropped to zero (as done in Hard Real Time Tasks) but still the system is working without any
catastrophic effects (as done in Soft Real time Tasks).
The System allows the task to miss the deadline, but not regularly. If tasks miss the deadline commonly
or on regular basis the System Failure occur.

3
Examples: Video Processor – Consider a System that processes the video frame by frame and shows
continuous video playback. Missing two or three frames in between the complete processing doesn’t
cause any disruption in the video playback but missing too many frames leads to interrupted video.

Modeling timing constraints:

Timing constraints is a vital attribute in real-time systems. Timing constraints decides the total
correctness of the result in real-time systems. The correctness of results in real-time system does not
depends only on logical correctness but also the result should be obtained within the time constraint.
There might be several events happening in real time system and these events are scheduled by
schedulers using timing constraints.
 Classification of Timing Constraints:
Timing constraints associated with the real-time system is classified as
1. Performance Constraints:
The constraints enforced on the response of the system are known as Performance Constraints. This
basically describes the overall performance of the system. This shows how quickly and accurately the
system is responding. It ensures that the real-time system performs satisfactorily.
2. Behavioral Constraint:
The constraints enforced on the stimuli generated by the environment are known as Behavioral
Constraints. This basically describes the behavior of the environment. It ensures that the environment of
a system is well behaved.
Further, both performance and behavioral constraints are classified into three categories: Delay
Constraint, Deadline Constraint, and Duration Constraint. These are explained as following below.

1. Delay Constraint
A delay constraint describes the minimum time interval between occurrences of two consecutive events
in the real-time system. If an event occurs before the delay constraint, then it is called a delay violation.
The time interval between occurrences of two events should be greater than or equal to delay
constraint.
If D is the actual time interval between occurrence of two events and d is the delay constraint, then

D >= d

4
2. Deadline Constraint
A deadline constraint describes the maximum time interval between occurrence of two consecutive
events in the real-time system. If an event occurs after the deadline constraint, then the result of event is
considered incorrect. The time interval between occurrence of two events should be less than or equal to
deadline constraint.
If D is the actual time interval between occurrence of two events and d is the deadline constraint, then

D <= d

3. Duration Constraint
Duration constraint describes the duration of an event in real-time system. It describes the minimum and
maximum time period of an event. On this basis it is further classified into two types:
4. Minimum Duration Constraint: It describes that after the initiation of an event, it cannot stop
before a certain minimum duration.
5. Maximum Duration Constraint: It describes that after the starting of an event, it must end
before a certain maximum duration elapses.

Types of Memory in Embedded Systems


Types of memory in embedded systems generally fall into two categories:1 Volatile and 2.Non-volatile.
Within those categories are various types of RAM and ROM memories. Here are details on various types
of memory within those categories.

1. Volatile: RAM (SRAM, DRAM, SDRAM) are the types of RAM that an embedded system can use:

5
SRAM: The fastest volatile memory, SRAM, is fast enough to operate close to the processor speed. It also
requires less power than DRAM, but it is also more expensive. Engineers use it in more limited ways in
embedded systems.

DRAM: This memory stores the information on capacitors and transistors. The setup inherently leaks info,
though the device loses all data unless it is continuously refreshed. DRAM is slower than SRAM but also
costs much less.

SDRAM: This type of DRAM is synchronous with the embedded system's bus. SDRAM uses much less
space on the chip than SRAM. But it uses more power, in part because it must continually refresh.

2. Non-Volatile: ROM (Masked ROM, PROM, Flash, NVRAM):

Masked ROM: With this memory, the manufacturers write data onto the memory chip, which is then
impossible to change. Masked ROM is extremely low cost. Companies often use masked ROM in mass-
produced devices that last for years. The disadvantage of masked ROM is that no one can change the data on
the chip.
Programmable Read-Only Memory (PROM): These are programmable chips that you purchase
unprogrammed and program only one time. Companies use to store firmware and constants in source code.

Flash: Developers use flash memory in embedded systems more often than any other non-volatile or
hybrid memory. The memory is fast for a device to read and low-cost. Devices use it for storing large files.

NVRAM (Non Volatile Random Access Memory): This type of RAM doesn't lose data when power is
lost but can store it permanently. It is expensive but fast. Engineers use this when startup time is crucial.

Factors to be considering for embedded memory configuration:

Speed: Some embedded systems and devices must start-up fast or have other functions that must
execute quickly. Be sure the memory you choose for those operations is appropriately fast. Different
types of memory have different capacities for speed. SRAM, for example, is much faster than DRAM.
Data storage size: Embedded systems often have limited capacity for storing data. Various memory
options offer different ways of storing, maintaining, and accessing data.
Latency: it is the time delay in data transmission as data moves between RAM and a device's. The
memory or combination of memory you choose will affect your embedded system.

6
Power consumption: Power is often limited in embedded systems and devices. You'll want to choose
options that allow the device to perform well while still using limited power
Cost: The cost of different types of memory can vary widely. Embedded systems manufacturers must
choose memory combinations that allow them to use more expensive memory only where necessary for
the system to work as well as possible.
Ease of development and debugging: you should think about development and debugging of your
embedded system when you choose memory. Flash memory that is slow to write can lead to extra costs
and difficulty in running tests. Not having enough non-volatile memory can make it difficult to debug
issues. It should be taken into account when it is important to get the product to market in time.

Embedded System Design Process:

As discussed,
An Embedded System = Hardware (to perform the task) + Software (to process the task).
Depending on the needs, several interfaces and peripherals are interconnected to the system.
1. Processor
It is the heart of an embedded system that takes an input and produces an output after processing data. It
consists of two units:
1. Control Unit (CU) – It fetches instructions from the memory.
2. Execution Unit (EU) : It has circuits that implement instructions for data transfer and conversion
instructions.
There are different types of processors-
1. General Purpose Processors (GPP) like Microprocessors, Microcontrollers, Embedded Processors,
Digital Signal Processors, and Media Processors
2. Application Specific System Processors (ASSP)
3. Application Specific Instruction Processors (ASIPs)
4. GPP core(s) or ASIP core(s) on either an Application Specific Integrated Circuit (ASIC) or a Very
Large Scale Integration (VLSI) circuit.
2. Interfaces
Every physical device uses an interface to connect with the outside world. It selects two important boundaries:
1. Between CPU software and digital interface logic.
2. Between digital and analog sides of the interface.
This communication is established with peripherals and other microcontrollers as a part of the whole ES
There are many interfaces like
1. Serial communication interfaces
7
2. Synchronous serial communication interface
3. USB
4. Networks like Wi-Fi
5. debugging like JTAG
6. Field buses like CAN
3. Peripherals
The different peripheral devices establish communication between the embedded system and the outside
environment in combination with the microcontroller. The choice of peripherals depends on:
1. Operational speed of the microcontroller4 .Space and prototyping of end-product
2. Memory storage for data and programs5 .A number of input and output devices connected
3. Power consumption of the embedded system
There are various interfaces like-
1. Displays, e.g: Graphic LCD 4. Multimedia cards, e.g: SD Card 6. Timers, Counters
2. Analog to Digital Converters 5. Input devices, e.g: keypad7. Output devices, e.g: LED
3. Serial Communication Interface
4. Firmware
The flash memory chip in an embedded device is where the special software that controls the device’s
functions is stored or Firmware is a type of software that lives in hardware. It acts as a-
1. Bridge between hardware and software applications.
2. Channel of communication between human and machine
The services associated with firmware are-
1. System Architecture
2. Design and Development
3. RTOS/ OS/ Bare Metal Applications
4. Porting & Optimization
5. System Integration & Security
It enables direct control of circuits and hardware components that include the above services to make
execution seamless.

8
5. Embedded Software
This software is embedded inside the system that runs on top of firmware to provide unique features. They
control different parts of the mechanical system.
There are different types of embedded software like-
1. Embedded bare-metal software
2. Embedded Linux software
3. Embedded RTOS software
4. Embedded networking software

Designing Embedded Systems


All the parts mentioned above are integrated together in the following steps.
1. Defining system specifications
2. Defining system hardware and software requirements
3. Selecting mainframe and associated technologies
4. Defining the resources required and analyzing the budget
5. Selecting hardware and software components
6. Designing hardware, i.e., schematics, layout, PCB, and board
7. Developing firmware and testing
8. Entire system integration and testing

You might also like