Embedded 1
Embedded 1
Embedded 1
Assessment II ( CT II ) -- 60 Minutes 20
2
Assignment -- 60 Minutes 10
3
or
• The operating system runs above the hardware, and the application
software runs above the operating system. The same architecture is
applicable to any computer including a desktop computer. However,
there are significant differences. It is not compulsory to have an
operating system in every embedded system.
• In such a case, you need to integrate the application software with the
operating system and then transfer the entire software on to the
memory chip. Once the software is transferred to the memory chip, the
software will continue to run for a long time and you don’t need to
reload new software .
Various building blocks of the hardware of an embedded system
i. Response
ii. Throughput
iii. Reliability
iv. Maintainability
v. Security
vi. Safety
13
i. Response
❑ Response is a measure of quickness of the system.
❑ It gives you an idea about how fast your system is tracking
the input variables.
❑ Most of the embedded system demand fast response which
should be real-time.
❑ Ex. An embedded system deployed in flight control
application should respond in a Real Time manner.
❑ Any response delay in the system will create potential
damages to the safety of the flight as well as the
passengers.
❑ It is not necessary that all embedded systems should be Real
Time in response.
❑ For example, the response time requirement for an
electronic toy is not at all time-critical.
❑ 15
ii. Throughput
❑ Throughput deals with the efficiency of system.
❑ It can be defined as rate of production or process of a
defined process over a stated period of time.
❑ The rates can be expressed in terms of units of products,
batches produced, or any other meaningful
measurements.
❑ In case of card reader like the ones used in buses,
throughput means how much transactions the Reader can
perform in a minute or hour or day.
❑ Throughput is generally measured in terms of
‘Benchmark’. A ‘Benchmark’ is a reference point by which
something can be measured.
❑ Benchmark can be a set of performance criteria that a
product is expected to meet or a standard product that can
be used for comparing other products of the same product
line.
iii. Reliability
❑Reliability is a measure of how much percentage you rely
upon the proper functioning of the system or what is the %
susceptibility of the system to failure.
❑ Mean Time Between Failures (MTBF) and Mean Time
To Repair (MTTR) are the terms used in defining system
reliability.
❑ MTBF gives the frequency of failures in
hours/weeks/months.
❑ MTTR specifies how long the system is allowed to be out
of order following a failure.
❑ For an embedded system with critical application need, it
should be of the order of minutes.
17
iv. Maintainability
❑Maintainability deals with support and maintenance to the
end user or client in case of technical issues and product
failures or on the basis of a routine system checkup.
𝑨𝒊 = 𝑴𝑻𝑩𝑭/(𝑴𝑻𝑩𝑭 + 𝑴𝑻𝑻𝑹)
❑Safety deals with the possible damages that can happen to the
operators, public and the environment due to the breakdown
of an embedded system or due to the emission of radioactive
or hazardous materials from the embedded products.
❑ Small Scale: The embedded systems built around low performance and
low cost 8 or 16 bit microprocessors/ microcontrollers. It is suitable for
simple applications and where performance is not time critical. It may
or may not contain OS.
Soft
real-time systems (e.g., Video on
demand).
46
DEADLINE
47
A TYPICAL REAL-TIME EMBEDDED SYSTEM
48
CAR EXAMPLE
Mission: Reaching the destination safely.
Controlling System
- Human driver: Sensors - Eyes and Ears of the driver.
- Computer: Sensors - Cameras, Infrared receiver, and
Laser telemeter.
50
EMBEDDED SYSTEM DESIGN PROCESS
• A design methodology is important for three reasons-
• Performance
• Cost
• Physical size and weight
• Power consumption
• We must of course capture the basic functions of the embedded
system, but functional description is often not sufficient.
Typical nonfunctional requirements include:
• Performance
• Cost
• Physical size and weight
• Power consumption
Performance:
• The speed of the system is often a major consideration both for the
usability of the system and for its ultimate cost.
• Performance
• Cost
• Physical size and weight
• Power consumption
Cost:
• The target cost or purchase price for the system is almost always a
consideration.
• Performance
• Cost
• Physical size and weight
• Power consumption
• Performance
• Cost
• Physical size and weight
• Power consumption
Power consumption:
• Power, of course, is important in battery-powered systems and is often
important in other applications as well.
• Name
• Purpose
• Inputs and Outputs
• Functions
• Performance
• Manufacturing Cost
• Power
• Physical Size and weight
A sample
requirements form
that can be filled out We can use the form as a
at the start of the checklist in considering
project. the basic characteristics
of the system.
This is simple but helpful. Giving a name to the project not only
simplifies talking about it to other people but can also crystallize
the purpose of the machine.
A sample
requirements form
that can be filled out We can use the form as a
at the start of the checklist in considering
project. the basic characteristics
of the system.
• These two entries are more complex than they seem. The inputs and outputs to the system
encompass a wealth of detail:
• This is a more detailed description of what the system does. A good way to approach this is
to work from the inputs to the outputs:
• How do user interface inputs affect these functions? How do different functions interact?
A sample
requirements form
that can be filled out We can use the form as a
at the start of the checklist in considering
project. the basic characteristics
of the system.
• Many embedded computing systems spend at least some time in controlling physical
devices or processing data coming from the physical world.
• In most of these cases, the computations must be performed within a certain time frame.
• It is essential that the performance requirements be identified early since they must be
carefully measured during implementation to ensure that the system works properly.
A sample
requirements form
that can be filled out We can use the form as a
at the start of the checklist in considering
project. the basic characteristics
of the system.
• Similarly, you may have only a rough idea of how much power the system can consume,
but a little information can go a long way.
• Typically, the most important decision is whether the machine will be battery powered or
plugged into the wall.
• Battery-powered machines must be much more careful about how they spend energy.
A sample
requirements form
that can be filled out We can use the form as a
at the start of the checklist in considering
project. the basic characteristics
of the system.
• You should give some indication of the physical size of the system to help guide certain
architectural decisions.
• A desktop machine has much more flexibility in the components used than, for example, a
lapel mounted voice recorder.
Specification
• The specification is more precise—it serves as
the contract between the customer and the
architects.
-We cannot only select the type of microprocessor used, but also
select the amount of memory, the peripheral devices, and more.
-If too little hardware and the system fails to meet its
deadlines, too much hardware and it becomes too expensive.
CHALLENGES IN EMBEDDED COMPUTING
SYSTEM DESIGN
• How do we meet deadlines?
It is entirely possible that increasing the CPU clock rate may not
make enough difference to execution time, since the program’s speed may
be limited by the memory system.
One way to make a digital system consume less power is to make it run
more slowly, but naively slowing down the system can obviously lead to
missed deadlines.
CHALLENGES IN EMBEDDED COMPUTING
SYSTEM DESIGN
• How do we design for upgradability?
-This makes it more difficult to see what is going on and to affect the
system’s operation.
-The most important feature of this architecture is that the software and data
use the same memory: that is, “The program is data, and the data is the
program” as shown in Figure.
In the Von Neumann architecture, an instruction and data share the same
bus.
• Most systems designed for digital signal processing (DSP) adopt the
Harvard architecture.
Single memory to be shared by both code Separate memories for code and data.
and data.
Higher speed, thus less time consuming. Slower in speed, thus more time-consuming.
-By installing a microprocessor into a special circuit board and adding the
necessary peripheral circuits and expansion circuits, a practical embedded
system can be created.
-There are a wide range of microprocessors: 4-, 8-, 16-, 32-, and 64-bit,
with performance from MHz to GHz, and ranging from a few pins to
thousands of pins.
• Each instruction uses a standard word length and has a short execution
time, which facilitates the optimization of the instruction pipeline.
CISC
• The CISC processor features a powerful instruction set and different
instruction lengths, which facilitates the pipelined execution of
instructions.
Big endian systems are simply those systems whose memories are organized
with the most significant digits or bytes of a number or series of numbers in
the upper left corner of a memory page and the least significant in the
lower right, just as in a normal spreadsheet.
Little endian systems are simply those system whose memories are
organized with the least significant digits or bytes of a number or series of
numbers in the upper left corner of a memory page and the most
significant in the lower right.
Addresses
In the earlier functional diagram as well as in the block diagram for a
microprocessor, we learned that information is stored in memory. Each
location in memory has an associated address much like an index in the
array. If an array has 16 locations to hold information, it will have 16
indices. if a memory has 16 locations to store information ,it will have 16
addresses. Information is accessed in memory by giving its address.
Instruction Set Architecture
• From the earlier functional model, we see that the objectives of such
operations are-
• Data transfer
• Flow control
• Arithmetic and logic
Data transfer Instructions
• Data transfer instructions are responsible for moving data around inside
the processor as well as for bringing data in from the outside world or
sending data out.
• A register
• Memory
• An input or output
Addressing modes
There are five addressing modes in 8085.
In this mode, the address of the operand is In this mode, 8 or 16 bit data can be specified
given in the instruction itself. as part of the instruction.
The execution
flow or control
flow captures
the order of
evaluation of
each instruction
comprising the
firmware in an
embedded
application, we
can identify
these as
Processor control
The control of the microprocessor data path comprises four fundamental
operations defined as the instruction cycle . The steps are identified in
figure
Overview
Advantages
• Eliminates Instruction Reordering Logic
• Reduces Power Consumption
• Reduces Die Space
Disadvantages
• Lower Performance
• Data dependencies are more critical
• Memory Accesses and slow floating point
• operations stall the pipeline for longer time
• Inefficiency in CPU hardware usage
• Safe Instruction Recognition
• Start the execution of a low latency integer
• operation when a floating point operation is
• waiting for resources
• Intel x86 compatible instruction Set
Instruction • Just like any desktop computer
Set
Architecture • Instruction length are variable (CISC)
• Support for SIMD instructions
Sleep Scheduling
Frequency Scaling
• 8 different operating •6 sleep states C1 through C6
frequency. •Sleep states mainly drains or
• Can reduce the frequency to up shuts down the cache
to 13 of maximum (1.6 GHz). •Also shuts down the core clock
• Reducing frequency reduces •However, there is time penalty to
power consumption wake up from the sleep states
• May increase execution time •Computation can only take place
and hence energy consumption in C1 state
• Will definitely control operating
temperature
Software Control
• Configuration and Power Interface (ACPI)
• Linux based set of commands
• Sleep scheduling
• echo NUM gt /proc/acpi/sleep, NUM 1 6
• For waking up alarm can be set in the real time
clock
• Frequency scaling
• echo NUMgt/proc/acpi/processor/CPU0/performance,
• NUM 07
Assignment