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

Embedded_Systems_----_(Chapter_4_Layers_of_an_Embedded_System_)

Uploaded by

Fezile
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Embedded_Systems_----_(Chapter_4_Layers_of_an_Embedded_System_)

Uploaded by

Fezile
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

"

Layers of an
Embedded System

Learning Outcomes
o Basic notion about layering
o To get insight about middleware
o To study the basics of all the layers
o Recap
o Quiz

4.1 INTRODUCTION
Those who have studied Computer Networking would be very familiar with the
concept of layering. The famous ISO-OSI layering is the reference model for
most of the networks. Similarly, each and every Embedded System that we
have seen as examples in the first chapter follow a basic structure, whose
pictorial depiction is given in Fig. 4.1.

Application Layer
Application Software Layer
(Optional)

Middleware System Software Layer


(Optional)
Abstraction Layer 1 and 2

Hardware Layer
Copyright © 2011. New Age International Ltd. All rights reserved.

(Optional)

Embedded controller Board

Fig. 4.1: The structure of an embedded system

As one can see from the above diagram, an embedded system will be generally
composed of 3 layers,

Kothari, D., Shriram, K., & Sundaram (2011). Embedded systems. New Age International Ltd.
Created from univerzulu on 2024-12-04 16:37:42.
Layers of an Embedded System 55

1. An optional application software layer.


2. An optional system software layer.
3. A mandatory hardware layer.
Let’s briefly discuss about each of the above layer in the following sections.
4.2 NEED FOR LAYERING
It is just a way of Divide and Conquer! When a big program is divided into
modules, it will be easy to understand and easier to troubleshoot at tough times.
Likewise, we are following the layered approach, which enhances the
understanding on the flow of the working!
This is mainly because the various modules (elements) within this type of
structure are usually functionally independent. These elements also have a higher
degree of interaction, thus separating these types of elements into layers improves
the structural organization of the system without the risk of oversimplifying
complex interactions or overlooking required functionality.
The hardware layer contains all the major physical components located on
an embedded board, whereas the system and application software layers contain
all of the software located on and being processed by the embedded system.
4.2.1 The Hardware Layer
• In embedded devices, all the electronics hardware resides on a board,
also referred to as a printed wiring board (PWB) or printed circuit board
(PCB).
• PCBs are often made of thin sheets of fiberglass.
• The electrical path of the circuit is printed in copper, which carries the
electrical signals between the various components connected on the board.
• All electronic components that make up the circuit are connected to this
board, either by soldering, plugging into a socket, or some other connection
mechanism.
• All of the hardware on an embedded board is located in the hardware
layer of the Embedded Systems Model.
Pictorial representation of an embedded systems model is given in Fig. 4.2.
Copyright © 2011. New Age International Ltd. All rights reserved.

Fig. 4.2: An embedded system model

Kothari, D., Shriram, K., & Sundaram (2011). Embedded systems. New Age International Ltd.
Created from univerzulu on 2024-12-04 16:37:42.
56 Embedded Systems

The major hardware components of most boards can be classified into five
major categories:
1. Central Processing Unit (CPU) – the master processor
2. Memory – where the system’s software is stored
3. Input Device(s) – input slave processors and relative electrical
components
4. Output Device(s) – output slave processors and relative electrical
components
5. Data Pathway/Bus – interconnects the other components, providing
a “highway” for data to travel on from one component to another,
including any wires, bus bridges, and/or bus controllers.
These five categories are based upon the major elements defined by the von
Neumann model , a tool that can be used to understand any electronic device’s
hardware architecture. The von Neumann model is a result of the published
work of John von Neumann in 1945, which defined the requirements of a general-
purpose electronic computer. Since embedded systems are a type of computer
system, this model can be applied as a means of understanding embedded systems
hardware.
The way the buses connect the above mentioned components can be seen
in the following figure.

Embedded System Board

Controls Usages and Manipulation of Data Master Processor

5 System Components Commonly Connected VIA Buses

Data From CPU or Input Devices


Stored in Memory Until a CPU or Memory
Output Device Requests

Brings Data into the


Embedded System Input Output Takes Data out of the
Embedded System
Copyright © 2011. New Age International Ltd. All rights reserved.

Fig. 4.3: Connecting the components with buses

Kothari, D., Shriram, K., & Sundaram (2011). Embedded systems. New Age International Ltd.
Created from univerzulu on 2024-12-04 16:37:42.
Layers of an Embedded System 57

As depicted, the input is fed to the embedded board first, which is then
stored at the memory unit that will be accessed by the processor for performing
manipulations. Then the processor stores the result again in the memory that
will be finally given out to the output device for display!
The specifications of the hardware components such as the processor input
and output devices are given in Fig. 4.4.

Fig. 4.4: Specifications of hardware components

4.2.2 The System Software Layer (or simply, the OS layer)


The OS is a set of software libraries that serves two main purposes in an
embedded system:
1. Providing an abstraction layer for software on top of the OS to be less
dependent on hardware, making the development of middleware and
applications that sit on top of the OS easier.
2. Managing the various system hardware and software resources to ensure
the entire system operates efficiently and reliably.
As shown in the Fig. 4.5, the OS sits over either the hardware, or over the
Copyright © 2011. New Age International Ltd. All rights reserved.

device driver layer or over a BSP (board support package).

Kothari, D., Shriram, K., & Sundaram (2011). Embedded systems. New Age International Ltd.
Created from univerzulu on 2024-12-04 16:37:42.
58 Embedded Systems

Application Software Layer Application Software Layer Application Software Layer

System Software Layer System Software Layer System Software Layer

Operating System Layer Middleware Layer Operating System Layer

Board Support Package Layer Operating System Layer Middleware


Device Drivers
Device Drivers Device Drivers Layer

Hardware Layer Hardware Layer Hardware Layer

Fig. 4.5: Positioning the OS

How does an OS for an embedded system differ from the other systems?
Embedded OSes vary in what components they possess; all OSes have a kernel
at the very least. The kernel is a component that contains the main
functionality of the OS,
• Process Management.
• Interrupt and error detection management.
• The multiple interrupts and/or traps generated by the various
processes need to be managed efficiently so that they are handled
correctly and the processes that triggered them are properly
tracked.
• Memory Management.
• I/O System Management.
Figure 4.6 shows the structure of an embedded OS.

Embedded OS
Middleware (Optional)

KERNEL
Process Management Memory Management

I/O System Management


Copyright © 2011. New Age International Ltd. All rights reserved.

Device Drivers (Optional)

Fig. 4.6: An embedded OS

A special form of OS is an RTOS (Real Time OS) that deals with the tasks
which have stringent time requirements. A part of RTOS called Scheduler keeps

Kothari, D., Shriram, K., & Sundaram (2011). Embedded systems. New Age International Ltd.
Created from univerzulu on 2024-12-04 16:37:42.
Layers of an Embedded System 59

track of state of each task and decides which one should go to the running state.
Unlike UNIX or Windows the scheduler in RTOS are 100% simpleminded about
which task should get the processor. They simply look at the priorities you assign
to the tasks, and among the tasks that are not in the blocked state, the one with
highest priority runs, and rest of them will wait in Ready State. If a high priority
task hogs the microprocessor for a long time while lower priority tasks are
waiting in ready state, the low priority task has to wait. Scheduler assumes that
you knew what you were doing when you set the priorities.

4.2.3 The Middleware


The definition: In the most general terms, middleware software is any system
software that is not the OS kernel, device driver, or application software. (Note
that some OSes may integrate middleware into the OS executable).
In short, in an embedded system middleware is system software that
typically sits on either the device drivers or on top of the OS, and can sometimes
be incorporated within the OS itself. Middleware is software that has been
abstracted out of the application layer for a variety of reasons.
• One reason is that it may already be included as part of the off-the-shelf
OS package.
• Other reasons to remove it from the application layer are: to allow reusability
with other applications, to decrease development costs or time by
purchasing it off-the-shelf-through a third party vendor, or to simplify
application code.
What does a middleware do?
• Middleware is usually the software that mediates between application
software and the kernel or device driver software.
• Middleware is also software that mediates and serves different application
software.
• Specifically, middleware is an abstraction layer generally used on embedded
devices with two or more applications in order to provide flexibility, security,
portability, connectivity, intercommunication, and/or interoperability
mechanisms between applications.
Copyright © 2011. New Age International Ltd. All rights reserved.

• One of the main strengths in using middleware is that it allows for the
reduction of the complexity of the applications by centralizing software
infrastructure that would traditionally be redundantly found in the application
layer.

Kothari, D., Shriram, K., & Sundaram (2011). Embedded systems. New Age International Ltd.
Created from univerzulu on 2024-12-04 16:37:42.
60 Embedded Systems

• However, in introducing middleware to a system, one introduces additional


overhead, which can greatly impact scalability and performance. In short,
middleware impacts the embedded system at all layers.
Types of middleware
Most types of middleware commonly fall under one of two general categories:
1. General-purpose
• Meaning, they are typically implemented in a variety of devices,
such as networking protocols above the device driver layer and below
the application layers of the OSI model, file systems, or some virtual
machines such as the JVM.
2. Market-specific
• Meaning, they are unique to a particular family of embedded
systems, such as digital TV standard-based software that sits on an
OS or JVM.
After having a look at the middleware, let’s explore the Application Layer.

4.2.4 The Application Layer


The final type of software in an embedded system is the application software.
As shown in Fig. 4.7, application software sits on top of the system software
layer, and is dependent on, managed, and run by the system software.

Fig. 4.7: The application layer


Copyright © 2011. New Age International Ltd. All rights reserved.

It is the software within the application layer that inherently defines what type
of device an embedded system is, because the functionality of an application
represents at the highest level the purpose of that embedded system and does
most of the interaction with users or administrators of that device, if any
exists. Embedded applications can be divided according to whether they are
market specific (implemented in only a specific type of device, such as video-

Kothari, D., Shriram, K., & Sundaram (2011). Embedded systems. New Age International Ltd.
Created from univerzulu on 2024-12-04 16:37:42.
Layers of an Embedded System 61

on-demand applications in an interactive digital TV) or general-purpose (can be


implemented across various types of devices, such as a browser).

POINTS TO REMEMBER
1. Any embedded system would be composed of a hardware layer, system
software layer and an application software layer.
2. Hardware components include a processor, I/O devices, and the buses.
3. A system software layer is responsible for process, I/O, memory
management.
4. Middleware layer.
5. Usually the software that mediates between application software and
the kernel or device driver software.
6. Application layer is dependent on the underlying system software layer.

Review Questions
1. Why is layering required and how has layering been done in Embedded
Systems?
2. Refer an immediate example for layering approach in networking. (it’s
simple)

4.3 QUIZ
1. How many layers are there in an embedded system design?
(a) 2 (b) 3
(c) 4 (d) 5
2. Which layer of embedded system accommodates operating system?
(a) Hardware Layer (b) SSL (c) Application Layer.

Answer for Quiz


1. (b)
2. (b)
Copyright © 2011. New Age International Ltd. All rights reserved.

Kothari, D., Shriram, K., & Sundaram (2011). Embedded systems. New Age International Ltd.
Created from univerzulu on 2024-12-04 16:37:42.

You might also like