0% found this document useful (0 votes)
25 views46 pages

Chapter 1

This document provides an introduction to real-time and embedded systems. It discusses key concepts such as the definition of embedded and real-time systems, their characteristics, examples, and components. The document is divided into chapters that cover modeling timing constraints, computer organization concepts, memory, and the design process for embedded and real-time systems.

Uploaded by

kiramelaku1
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)
25 views46 pages

Chapter 1

This document provides an introduction to real-time and embedded systems. It discusses key concepts such as the definition of embedded and real-time systems, their characteristics, examples, and components. The document is divided into chapters that cover modeling timing constraints, computer organization concepts, memory, and the design process for embedded and real-time systems.

Uploaded by

kiramelaku1
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/ 46

Kassawmar M.

(MSC)
Subject and code: Real Time and Embedded Systems CoSc-3024
3rd Year, B.Sc in Computer Science
Bensa Daye Campus

CHAPTER-1 INTRODUCTION
Learningobjectives:
After studying this unit, you will be able to:
Explain the definition of embedded system and real time system
Describe the characteristic of embedded system and real time system
Discussthe model of real time system
Discuss some examples of real time system and types of real time
system
Explain the advantages and disadvantages of embedded and real time
system.
 Know about modeling timing constraints
DiscussAbout computer organization concepts and memory
Explain about design process
1
CHAPTER-1
INTRODUCTION
⚫ System: A system is collection of interdependent subcomponents
that work together according to a set of rules.

• A system is also an arrangement in which all its units assemble and


work together according to the plan or program.

• System examples:
o Watch: It is a time display SYSTEM
• Parts: Hardware, Needles, Battery,
Dial, Chassis and Strap

2
INTRODUCTION……CONTD

Rules
1. All needles move clockwise only
2. A thin needle rotates every second
3. A long needle rotates every minute
4. A short needle rotates every hour
5. All needles return to the original position after 12 hours
⚫ Embedded means something that is attached/ integrated to another thing.
⚫ Embedded System is a special-purpose computer system designed to
perform acertain task or set of tasks as part of alarger system.
⚫ An embedded system can be an independent system or it can be a part of a large
system.
⚫ An embedded system is a microcontroller or microprocessor based
system which is designed to perform a specific task.
o For ex., a fire alarm is an embedded system; it is responsible for monitoring
the environment for signs of fire, such as smoke or excessive heat, and 3
triggering an alarm to alert occupants of the building.
INTRODUCTION….CONTD(EXAMPLE)

Coffee pots
Example of Real time embedded systems
4
INTRODUCTION….CONTD(EXAMPLE)

Example of Embedded systems


⚫ Home ⚫ Business
• a digital alarm clock, • Printers and scanners
• T.V., • Routers and switches
• digitally controlled audio systems, • Machine control and monitoring
• a router for Internet access, devices in industrial plants which
• a wireless access point, and controllers for keeps assembly lines moving
video gaming consoles. • Point of Sale systems at restaurants
• coffee pots, • Elevator that gets you to your office
• microwaves, • Even the tools that are used to help
• ovens and stovetops with digital control enhance and debug embedded
panels, and refrigerators with digital systems
5
capabilities.
• Automobiles
5
INTRODUCTION….CONTD

• An ATM is an embedded system which utilizes a crowded


computer to set up a network between a bank computer and an
ATM itself. It also has a microcontroller to bear both input and
output operations.

• An embedded system is a combination of hardware and software


with some attached peripherals to perform a specific task or a
narrow range of tasks with restricted resources.

• An embedded system can be thought of as a computer hardware


system having software embedded in it.

• An embedded system has specific requirements and performs pre-


defined tasks, unlike a general-purpose personal computer.
6
BLOCK DIAGRAM OF GENERIC EMBEDDED SYSTEM

• The generic block diagram of an embedded system is shown in


Figure 1.1.
• Every embedded system consists of certain input devices such as:
keyboards, switches, sensors, actuators;
• output devices such as: displays, buzzers(used to notify various events
such as interrupt generation), sensors processor along with a control
program embedded in the off-chip or on-chip memory, and a real time
operating system (RTOS).

7
COMPONENT OF EMBEDDED SYSTEM

An embedded system has three components


• It has hardware
• It has application software
• It has Real Time Operating system (RTOS)
o That supervises the application software and
o Provide mechanism to let the processor run a process as per
scheduling by following a plan to control the latencies.
o RTOS defines the way the system works.
o It sets the rules during the execution of application program.
o A small scale embedded system may not have RTOS.

• So we can define an embedded system as a Microcontroller based,


software driven, reliable, real-time control system.
8
CHARACTERISTICS OF AN EMBEDDED SYSTEM

The important characteristics of an embedded system are:


⚫ Speed (bytes/sec) : Should be high speed

⚫ Power (watts) : Low power dissipation

⚫ Size and weight : As far as possible small in size and low weight

⚫ Accuracy (% error) : Must be very accurate

⚫ Adaptability: High adaptability and accessibility.

⚫ Reliability: Must be reliable over a long period of time

⚫ Designed for one specific task, application specific

9
CHARACTERISTICS OF AN EMBEDDED SYSTEM ….CONTD

⚫ So, an embedded system must


perform the operations at a high speed
so that it can be readily used for real
time applications and its power
consumption must be very low and the
size of the system should be as for as
possible small and the readings must
be accurate with minimum error. The
system must be easily adaptable for
different situations.

10
Embedded Vs General Computing Systems

Criteria General purpose computer Embedded system


Purpose Multipurpose Single function
Constraint Low or no resource constraint Size, power, cost, memory, Realtime
Performance Faster and better Fixed runtime requirement
Can have keyboard, display, Integrated into the real world with
User Interface
mouse, touch screen buttons, sensors, Leads, LCDs,
Bluetooth system

Operating System General Purpose


OS(GPOS) May or may not contain an OS
(OS)
Programmability Programmable Not programable or fixed functionality
Application specific
Performance is the key
Best Selection criteria requirements (like performance,
deciding factor. Always
power requirements, memory
„Faster is Better‟
usage etc. )
Response
Not critical highly critical
Requirement
Cost to user High Low 11
Size Bigger Smaller
Real time systems

⚫ Acomputer system which responds on the time


⚫ System subjected to real-time, i.e., the response
should be guaranteed within a specified timing
constraint or the system should meet the specified
deadline.
⚫ It responds to inputs stimuli immediately within a
finite and specified period of time
⚫ Incorporate a real-time operating system
⚫ Failure to respond in time is as bad as the wrong
response!
⚫ correct value delivered too late is incorrect
⚫ For exampleTraffic light systems, real-time monitors,
car airbags deploying during collision etc.

12
Characteristics of a Real-Time Embedded System

⚫Constant Response
o 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 summers.
⚫Deadline
o Missed deadline can cost lives and finances.
⚫Accuracy
o In case of any malfunctioning, the system failure can cause havoc, what would
happen if the pacemaker can't maintain the heartbeat, patient would eventually die!
⚫Quick Response
17
o 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.
13
CATEGORIES OF EMBEDDED SYSTEMS

• Embedded systems can be classified into the following 4 categories


based on their functional and performance requirements.

14
CATEGORIES OF EMBEDDED SYSTEMS….cont

A. Real-time embedded systems:


• An embedded system which gives the required output in a specified
time or which strictly follows the time deadlines for completion of
a task is known as a Real time system
• i.e. a Real Time system, in addition to functional correctness, also
satisfies the time constraints .
• There are two types of Real time systems. (i) Soft real time system
and (ii) Hard real time system.
i. Soft Real-Time system:
• A Real time system in which, the violation of time constraints will
cause only the degraded quality, but the system can continue to
operate is known as a Soft real time system.
• In soft real-time systems, the design focus is to offer a guaranteed
bandwidth to each real-time task and to distribute the resources to the
tasks.
15
• Ex: A Microwave Oven, washing machine, and TV remote etc.
CATEGORIES OF EMBEDDED SYSTEMS….cont

ii. Hard Real-Time system:


• A Real time system in which, the violation of time constraints
will cause critical failure and loss of life or property damage
is known as a Hard Real time system.
• These systems usually interact directly with physical hardware
instead of through a human being.
• Can never miss its deadline,
• Ex: Deadline in a missile control embedded system , Delayed
alarm during a Gas leakage ,car airbag control system , A
delayed response in pacemakers ,Failure in RADAR 16
functioning etc.
CATEGORIES OF EMBEDDED SYSTEMS….cont

B. Stand-alone systems
⚫ Process digital/analog input signals into digital output
⚫ Less complex and Independent of any system(don’t require a host system to handle data
communication )
⚫ Ex: doorbell, calculator, MP3 player, Digital cameras, refrigerators, Digital
wristwatches, ovens, Thermometers,
C. Network systems
⚫ Operate through a network interface( May be wired or wireless and through
LAN,WAN, or other protocols)
⚫ Ex:ATM machines, weather monitoring systems, Domestic security systems, POS
machines, IP cameras
D. Mobile systems
⚫ Small, portable and easy-to-carry andWork on restricted memory space
⚫ Constantly evolving to get into a miniature model
⚫ Ex: mobile phones, digital camera 17
Types of Embedded System (Cont’d)
2. Based on the Performance of the Microcontroller
Small Scale System Medium Scale System Sophisticated Systems
• Entry-level ES with no design • Hardware and software complexity • Hardware and software
complexity involves is present complexities are enormous
• Uses 8-bit (8051) or • 16-bit/32-bit micro controller • 32/64-bit microcontroller
16-bit (80196) • more memory power than small and multi-core processors
scale • highest memory power
microcontroller
• Offers better speed than small
• battery operated, requires small • Speed is a major concern
scale ES • Some applications, like
memory, since deals small • Run through Microcontrollers satellite systems, also
amount of data and digital signal processors involve real-time operating
• Easy to program using • Along with microcontrollers, you system (RTOS
assembly need application-specific • Ex: mobile systems,
language or C-programing operating systems
• Very low HW and SW washing machines, digital
• Ex: Routers,ATMs, music watches, LAN
complexity due to the small
size of systems, pagers cards, multimedia systems
microcontrollers
• Ex: robotic arm controller,
electronic toys, automatic
coffee vending machines, 18
thermometer
A BASIC MODEL OF A REAL TIME EMBEDED 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.

19
BASIC MODEL OF RTOS
A BASIC MODEL OF A REAL TIME EMBEDED
SYSTEM (Cont’d)

Sensor:
⚫is a hardware device which Senses and measures any change in the physical
environment.
⚫It collects data input from its environment, converts it into electrical
signals, and then gives it to the device/system
⚫It can convert physical parameters such as temperature, heat, motion,
humidity, pressure, etc. into electrical signals.
⚫It is connected at the input of a system.
⚫For instance, thermometers take our body temperatures in the form
of physical characteristics, convert the temperatures into electrical
signals, and convey them to their systems.

20
A BASIC MODEL OF A REAL TIME EMBEDED
SYSTEM (Cont’d)

Actuator
⚫Actuator is the reverse device of sensor.
⚫An actuator would receive inputs from any system in the form of electrical
signals and then generate an output for its environment
⚫It converts the electrical signals into the physical events or characteristics.
⚫It takes the input from the output interface of the system.
⚫Actuators are connected at the output of a system
⚫ actuator depends on the data provided by the sensor, e.g.Temperature
control system (where sensor sense change in temperature and when it
exceeds certain limit the system sends command to fan (actuator) to
increases speed.
⚫Some of the commonly used actuator are motors and heaters.
21
A BASIC MODEL OF A REAL TIME
EMBEDED SYSTEM (Cont’d)

Signal Conditioning Unit


⚫Is the technique of making a signal from a sensor or transducer suitable for
processing by data acquisition equipment.
⚫Proper signal conditioning is essential in getting an accurate measurement of
your signal.
⚫It is the first step of computerized data acquisition.
⚫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.
22
A BASIC MODEL OF A REAL TIME EMBEDED
SYSTEM (Cont’d)

INPUT CONDITIONING UNIT OUTPUT CONDITIONING UNIT

• It is used for conversion of • It is used for conversion of


characteristics of incoming signals. characteristics of outgoing signals.
• It takes input from sensor. • It takes input from output interface
unit.
• It gives output to the input interface • It gives output to the actuator.
unit.
• It is a mediator between sensor • It is a also mediator between output
and input interface so that signals interface and actuator so that signals
can be scaled. can be scaled.
• It converts low range frequency • It converts high range frequency
signals to high range frequency signals to low range frequency
signals. signals.
• Example: Conversion of signals from • Example: Conversion of frequency of 23
photo- voltaic cell from mV toV. signals to user convenience.
A BASIC MODEL OF A REAL TIME EMBEDED
SYSTEM (Cont’d)

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:
⚫Input Interface: It is used for conversion of analog signals to digital.
⚫Output Interface: It is used for conversion of digital signals to analog.

24
A BASIC MODEL OF A REAL TIME EMBEDED
SYSTEM (Cont’d)

INPUT INTERFACEUNIT OUTPUT INTERFACEUNIT


• It is used for conversion of analog
• It is used for conversion of digital
signals into digital signals.
signals into analog signals.
• It takes input from input
• It takes input from the system after
conditioning unit.
computation.
• It gives output to the system for
• It gives output to the output
computation.
conditioning unit.
• In some systems, it is directly
• In some systems, it is directly
associated with sensor.
associated with actuators.
• Input here is analog signals.
• Input here is digital signals. Output
Output here is digital signals.
here is analog signals.
• It is a mediator between user and
• It is a also mediator between user and
system so that system can
system that helps user to understand
understand user signals.
system signals.
25
Modelling timing constraints

Before going to Modelling time constraints, first let us understand about timing
constraints,
 Constraints imposed on the timing behaviour of a job
 Each unit of work that is schedule and execute by system is job
 Set of related job which jointly provide some system function is a task

Release time (when job is available for execution)


Deadline (it should be get executed within that respective time)
Completion time(Early or late with respect to the deadline)
Response time (time between release time and completion time)
Relative deadline(It is nothing but the maximum allowable response time of a job)
Absolute deadline(It is nothing but a deadline only and is equal to RT+RD)

26
Modelling timing constraints

⚫ Timing constraints is a vital attribute in real-time systems.


⚫ Timing constraints decides the total correctness of the results 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.
⚫ The timing constraints apply to certain events in the system which can be
generated by the system itself or the environment of the system. For example,
Activation of Motor can be an event.
⚫ Event in the system can be:
⚫ Stimulus Events: are generated by the environment and act on the system. It can be
aperiodically or periodically. e.g. a user pressing a button on a telephone generate a
stimulus event &it is aperiodical event.
⚫ Response Events: produced by the system in response to some stimulus event, which
act on the environment. For example, consider a chemical plant where as soon as the
temperature exceeds 100oc (stimulus), the system responds by switching off the heater
(response). 27
Modelling timing constraints

• Modelling time constraints is very important since once a model of the time
constraints in a system is constructed, it can serve as a formal specification
of the system.
Use of timing constraints?
• Timing constraints are used to specify the timing characteristics of the design.
• Timing constraints may affect all internal timing interconnections, delays
through logic and LUTs(Look-Up Tables) and between flip-flops or registers.
• Area constraints are used to map specific circuitry to a range of resources
within the FPGA ( Field-Programmable Gate Arrays).

Type of timing constraints in every real time system?


• The two general types of timing constraints are global and path-specific.
• Global timing constraints cover all paths within the logic design.
• Path-specific constraints cover specific paths.

28
COMPUTER ORGANIZATION CONCEPTS AND
MEMORY
• The computer organization is concerned with the structure and
behavior of digital computers.
• It acts as the interface between hardware and software.
• It deals with the components of a connection in a system.
• Computer Architecture helps us to understand the functionalities of a
system.
• Examples of organization attributes include those hardware details
transparent to the programmer, such as control signals, interfaces
between the computer and peripherals, and the memory technology
used.
• As an example, it is an architectural design issue whether a computer
will have a multiply instruction.

• A Computer has five functional independent units like Input Unit,


Memory Unit, Arithmetic & Logic Unit, Output Unit, Control Unit. 29
COMPUTER ORGANIZATION CONCEPTS AND MEMORY

Computer Organization: Van Neumann architecture 30


MEMORY ….contd

Basic Operational Concepts:


• Instructions take a vital role for the proper working of the computer.
• An appropriate program consisting of a list of instructions is stored in the
memory so that the tasks can be started.
• The memory brings the individual instructions into the processor, which
executes the specified operations.
• Data which is to be used as operands are moreover also stored in the
memory. Example: Add LOCA, R0
• This instruction adds the operand at memory location LOCA to the operand
which will be present in the Register R0.
• The above mentioned example can be written as follows:
Load LOCA, R1
Add R1, R0
• First instruction sends the contents of the memory location LOCA into
processor Register R0, and meanwhile the second instruction adds the contents
of Register R1 and R0 and places the output in the Register R1. 31
MEMORY ….contd

Performance :-
• Performance means how quickly a
program can be executed.
• In order to get the best performance it is
required to design the compiler, machine
instruction set & hardware in a
coordinated manner.

Connection B / W Processor & Memory


• The above mentioned block diagram consists
of the following components

32
MEMORY ….contd

• RAM is a direct access memory, meaning we can access the desired memory
location directly without the need for traversing through the entire memory
locations to reach the desired memory position (i.e. Random Access of memory
location).

1. Static RAM (SRAM):


Static RAM stores data in the form of Voltage.
They are made up of flip-flops
SRAM cell (bit) is realized using 6 transistors (or 6 MOSFETs).
 Four of the transistors are used for building the flip-flop part of the memory cell
and 2 for controlling the access.
 Static RAM is the fastest form of RAM available. 33
MEMORY ….contd

2. Dynamic RAM (DRAM)


 Dynamic RAM stores data in the form of charge.
The advantages of DRAM are its high density and low cost compared to SRAM
 The disadvantage is that since the information is stored as charge it gets leaked off
with time and to prevent this they need to be refreshed periodically
 Special circuits called DRAM controllers are used for the refreshing operation.
 The refresh operation is done periodically in milliseconds interval

34
Memory selection for Embedded Systems

• Selection of suitable memory is very much essential step in high


performance applications, because the challenges and limitations of the
system performance are often decided upon the type of memory
architecture.
• Systems memory requirement depend primarily on the nature of the
application that is planned to run on the system.
• Memory performance and capacity requirement for low cost systems are
small, whereas memory throughput can be the most critical requirement
in a complex, high performance system.
• Following are the factors that are to be considered while selecting the
memory devices,
Speed
Data storage size and capacity
Bus width
Power consumption
Cost 35
DESIGN PROCESS OF EMBEDDED SYSTEM

 The traditional design approach has been traverse the two sides
of the accompanying diagram separately, that is,
 Design the hardware components
 Design the software components
 Bring the two together
 Spend time testing and
 Debugging the system

The major areas of the design process are


 Requirement analysis to design process of embedded system
 Ensuring a sound software and hardware specification.
 Formulating the architecture for the system to be designed.
 Partitioning the hardware and software.
 System integration.
 Providing an iterative approach to the design of HW and SW 36
DESIGN PROCESS OF EMBEDDED SYSTEM….contd

The embedded system design process aimed at two objectives.


A. First, it will give us an introduction to the various steps in embedded
system design
B. Second, it will allow us to consider the design methodology itself.

• A design methodology is important for three reasons.


o First, it allows us to keep a scorecard or performance on a design to ensure
that we have done everything we need to do, such as optimizing
performance or performing functional tests.
o Second, it allows us to develop computer-aided design tools.
o Third, a design methodology makes it much easier for members of a design
team to communicate.
• The below Figure summarizes the major steps in the embedded system
design process. In this top–down view, we start with the system
requirements.
37
Embedded System Design Process….Cont

Major levels of abstraction in the design process 38


DESIGN PROCESS OF EMBEDDED SYSTEM….contd

The embedded system design process involves several stages


1. Requirements Analysis:
• In this stage, the system requirements are defined by understanding
the purpose, functionality, and constraints of the embedded system.
• This involves gathering information from stakeholders, identifying
user needs, and understanding the operating environment.
• The requirements should be clear, unambiguous, and measurable,
laying the foundation for the subsequent design stages.
2. Specification:
• Once the requirements are established, the system specification is
created.
• This includes documenting the functional and non-functional
requirements, interfaces, performance criteria, power constraints, and
any specific standards or regulations that need to be met.
• The specification serves as a reference document for the design and
39
development phases.
DESIGN PROCESS OF EMBEDDED SYSTEM….contd

3. Architecture Design:
• The architecture design stage involves defining the high-level structure
and organization of the embedded system.
• This includes identifying the key functional modules, their interactions,
and the communication mechanisms between them.
• The architecture design also considers factors such as system
scalability, reliability, power consumption, and real-time constraints.
• It helps in determining the overall system behavior and partitioning the
system into manageable components.
4. Component Selection:
• In this stage, the specific components, such as microcontrollers,
sensors, actuators, communication modules, and memory devices, are
selected based on the system requirements and architecture design.
• Component selection may involve evaluating different options,
researching datasheets, and considering any specific hardware or
40
software dependencies.
DESIGN PROCESS OF EMBEDDED SYSTEM….contd

5. System Integration:
• The system integration phase involves bringing together the
selected components and developing the necessary hardware and
software interfaces to create the complete embedded system.
• This includes designing the circuit boards, interconnecting the
components, and developing the software that runs on the system.
• Integration also involves testing and debugging to ensure that the
components work together as intended and meet the specified
requirements.
 Throughout the design process, it is important to consider factors
such as system reliability, safety, security, and maintainability.
 Iterative design cycles may be employed to refine the system design
based on feedback, testing, and verification.
41
Application Areas of Embedded System

Robotic science Medical


• Ground Vehicles • Dialysis Machine
• Drones • Infusion Pumps
• Underwater Vehicles • Cardiac Monitor
• Industrial Robots • Prosthetic Device
Automotive
• Engine Control
• Ignition System
• Brake System
42
Application Areas of Embedded System( cont…)

Home Devices Automobiles


• TVs • Fuel Injection
• Digital Alarm • Lighting System
• Air Conditioner • Door Locks
• DVD Video Player • Air Bags
• Cameras • Windows
• Parking Assistant System
• Anti-stealing Alarms Whippers
Motion

43
Application Areas of Embedded System( cont…)

Industrial Control
Networking
• Robotics
• Router
• Control System
• Hubs
• Missiles
• Nuclear Reactors • Gateways
• Space Stations • Electronics Instruments

44
Advantages and Disadvantages of Embedded System

Advantage Disadvantage
• Lower power consumption • Limited processing resources
• Less noise and lower failure rate, high • It needs a long time to market.
reliability • Can’t be programmed to do different
• Ahigh degree of fault tolerance tasks
• More resistant to dust, debris, and other • It doesn’t offer any
particulates technological improvement.
• Less maintenance overall • It is difficult to backup of embedded files
• Smaller size
• Lower weight
• Lower cost
• Little to no human involvement
• Dedicated task completion
• Uninterrupted operation
45
46

You might also like