Department of Computer Science
Real-time and embedded systems
Chapter 1
Introduction
 Definitions
 What is 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 at which something takes place.
 Embedded: means something that is attached to another thing (Software with Hardware).
What is real-time and embedded systems:
 RTES is A system which respond to real time situation with the help of its
embedded software and hardware, within the specified time constraints. Or
 It is a system composed of hardware, application software and real time
operating system.
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.
B. Deadline: respond to an event or request within a strictly defined time.
C. Accuracy: the system should perform exact and accurate tasks.
D. Quick Response: the real-time embedded system must be swift enough to
respond to the changing external environment with immediate effect
Characteristics of real-time and embedded systems
Flight Control Systems
Traffic Light Systems
Missile Guidance Systems
Ultrasound scans
CT scans
ATM Machines . Etc.
Examples of real-time and embedded systems (RTES)
Model of real time system
 Real-time system includes various hardware and software embedded in a such 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.
Sensor: Sensor is used for the conversion of some physical events or
characteristics into the electrical signals.
 These are hardware devices that takes the input from environment and gives
to the system by converting it.
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.
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.
Signal Conditioning Unit: When the sensor converts the physical actions into electrical
signals, then computer can’t used them directly
Interface Unit: Interface units are basically used for the conversion of digital to analog and
vice-versa.
On this basis, Interface unit is also of two types:
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
1. Hard Real Time Tasks:
 In HRT 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 misses the deadline.
2. 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.
3. 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 misses the deadline commonly or on regular basis the System Failure
occur.
 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.
 Modeling timing constraints
 Classification of Timing Constraints:
Performance Constraints: how quickly and accurately responses
Behavioral Constraint: how it behaves with the environment changes.
 both performance and behavioral constraints are classified into three categories
Delay Constraint: minimum time interval b/n occurrence of two consecutive events.
Deadline Constraint : describes the maximum time interval between occurrence of two
consecutive events.
Duration Constraint
1. Minimum Duration Constraint: after initiated , Event can not stop before a certain
minimum duration.
2. Maximum Duration Constraint: after the starting of an event, it must end before a
certain maximum duration.
Types of memory in embedded systems
 Types of memory in embedded systems
1. Volatile : RAM 2. Non-volatile: ROM
1. Volatile Memory : RAM ( SRAM, DRAM, SDRAM )
A. SRAM (Static Random-Access Memory ):
 The fastest volatile memory,
 It also requires less power than DRAM, but it is also more expensive.
 Engineers use it in more limited ways in embedded systems.
B. DRAM ( Dynamic Random-Access Memory ):
 This memory stores the information on capacitors and transistors.
 It loses all data unless it is continuously refreshed.
 DRAM is slower than SRAM but also costs much less.
C. SDRAM ( Synchronous Dynamic Random Access Memory ):
 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.
Types of memory in embedded systems….
2. Non- Volatile Memory : ROM
A. 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.
B. Programmable Read-Only Memory (PROM):
These are programmable chips that you purchase un programmed and program only one time.
Companies use them to store firmware and constants in source code.
Types of memory in embedded systems
C. Electrically Erasable Programmable Read-Only Memory (EEPROM):
 We can erase these chips and reprogram them through an electrical operation.
 EEPROM is used in a product’s firmware or for storing firmware as they develop a product.
 It can be useful for products that may need to update their firmware.
D. Flash:
 It can be used 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 and for stores large files.
E. 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.
How to use the right embedded memory
 Speed
 Data storage size:
 Latency
 Power consumption
 Cost
 Ease of development and debugging
 When we choose memories for ES, the following should be considered:
Embedded system design
 Processor
Control Unit (CU) – It fetches instructions from the memory.
Execution Unit (EU) _ implement instructions for data transfer and conversion instructions.
 Interfaces USB , Networks like Wi-Fi , Field buses
 Peripherals Displays, e.g: Graphic LCD , Output devices, e.g: LED
 Firmware Bridge between hardware and software applications.
 Embedded Software
Embedded RTOS software
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
Real Time and Embedded Systems Chapter 1 Handout.pptx

Real Time and Embedded Systems Chapter 1 Handout.pptx

  • 1.
    Department of ComputerScience Real-time and embedded systems
  • 2.
  • 3.
     Definitions  Whatis 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 at which something takes place.  Embedded: means something that is attached to another thing (Software with Hardware). What is real-time and embedded systems:  RTES is A system which respond to real time situation with the help of its embedded software and hardware, within the specified time constraints. Or  It is a system composed of hardware, application software and real time operating system.
  • 5.
    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. B. Deadline: respond to an event or request within a strictly defined time. C. Accuracy: the system should perform exact and accurate tasks. D. Quick Response: the real-time embedded system must be swift enough to respond to the changing external environment with immediate effect Characteristics of real-time and embedded systems
  • 6.
    Flight Control Systems TrafficLight Systems Missile Guidance Systems Ultrasound scans CT scans ATM Machines . Etc. Examples of real-time and embedded systems (RTES)
  • 7.
    Model of realtime system  Real-time system includes various hardware and software embedded in a such 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.
  • 8.
    Sensor: Sensor isused for the conversion of some physical events or characteristics into the electrical signals.  These are hardware devices that takes the input from environment and gives to the system by converting it. 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.
  • 9.
    Signal conditioning isof 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. Signal Conditioning Unit: When the sensor converts the physical actions into electrical signals, then computer can’t used them directly Interface Unit: Interface units are basically used for the conversion of digital to analog and vice-versa. On this basis, Interface unit is also of two types: Input Interface: It is used for conversion of analog signals to digital. Output Interface: It is used for conversion of digital signals to analog
  • 10.
     Types ofreal 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
  • 11.
    1. Hard RealTime Tasks:  In HRT 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 misses the deadline.
  • 12.
    2. Soft RealTime 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.
  • 13.
    3. Firm RealTime 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 misses the deadline commonly or on regular basis the System Failure occur.
  • 14.
     Timing constraintsis 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.  Modeling timing constraints
  • 15.
     Classification ofTiming Constraints: Performance Constraints: how quickly and accurately responses Behavioral Constraint: how it behaves with the environment changes.  both performance and behavioral constraints are classified into three categories Delay Constraint: minimum time interval b/n occurrence of two consecutive events. Deadline Constraint : describes the maximum time interval between occurrence of two consecutive events. Duration Constraint 1. Minimum Duration Constraint: after initiated , Event can not stop before a certain minimum duration. 2. Maximum Duration Constraint: after the starting of an event, it must end before a certain maximum duration.
  • 16.
    Types of memoryin embedded systems  Types of memory in embedded systems 1. Volatile : RAM 2. Non-volatile: ROM 1. Volatile Memory : RAM ( SRAM, DRAM, SDRAM ) A. SRAM (Static Random-Access Memory ):  The fastest volatile memory,  It also requires less power than DRAM, but it is also more expensive.  Engineers use it in more limited ways in embedded systems. B. DRAM ( Dynamic Random-Access Memory ):  This memory stores the information on capacitors and transistors.  It loses all data unless it is continuously refreshed.  DRAM is slower than SRAM but also costs much less.
  • 17.
    C. SDRAM (Synchronous Dynamic Random Access Memory ):  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. Types of memory in embedded systems….
  • 18.
    2. Non- VolatileMemory : ROM A. 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. B. Programmable Read-Only Memory (PROM): These are programmable chips that you purchase un programmed and program only one time. Companies use them to store firmware and constants in source code. Types of memory in embedded systems
  • 19.
    C. Electrically ErasableProgrammable Read-Only Memory (EEPROM):  We can erase these chips and reprogram them through an electrical operation.  EEPROM is used in a product’s firmware or for storing firmware as they develop a product.  It can be useful for products that may need to update their firmware. D. Flash:  It can be used 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 and for stores large files. E. 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.
  • 20.
    How to usethe right embedded memory  Speed  Data storage size:  Latency  Power consumption  Cost  Ease of development and debugging  When we choose memories for ES, the following should be considered:
  • 21.
    Embedded system design Processor Control Unit (CU) – It fetches instructions from the memory. Execution Unit (EU) _ implement instructions for data transfer and conversion instructions.  Interfaces USB , Networks like Wi-Fi , Field buses  Peripherals Displays, e.g: Graphic LCD , Output devices, e.g: LED  Firmware Bridge between hardware and software applications.  Embedded Software Embedded RTOS software Embedded networking software
  • 22.
    Designing Embedded Systems Allthe 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