Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
58 views44 pages

Module 1 Embedded System-1

Uploaded by

Tejaswini P
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)
58 views44 pages

Module 1 Embedded System-1

Uploaded by

Tejaswini P
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/ 44

Embedded Systems

syllabus
MODULE I- Embedded System – Introduction

RISC - ARM - Embedded Hardware – Embedded Software- ARM Processor


Fundamentals: Registers, Program Status Registers, Pipeline, ARM Processor Family-
Instruction Set.

M
Introduction to embedded systems

An embedded system is a combination of hardware and software designed for


specific purposes.
Example of embedded system
Mobile phones: Handset

Gui (sw and hw touch screen)

App

Os (software)

Camera (hw) take pic, editing (software)

microphone(hw)

sensors( hw)

Usb I/O module / charges / headphone (hardware)


Characteristics of embedded system
Embedded system is the combination of hardware and
software without internet connection
note:
A microprocessor is a computer processor A microcontroller is a compact integrated
where the data processing logic and control circuit designed to govern a specific
is included on a single integrated circuit (IC), operation in an embedded system.
or a small number of ICs.
Characteristics of embedded systems.
Components of embedded systems
Note:
An actuator is a device that produces a motion by converting energy and signals
going into the system. The motion it produces can be either rotary or linear.
Components of embedded systems
System on chip
Serial COM Port
Embedded Processor
Embedded Processor
Real time system
System that work within strict time constraints
When there is a embedded component in a real system - real time embedded
system
Examples:
● process control in industry
● Robotics
● Air Traffic control
● Telecommunications
● Medical diagnostics
● Automobile control systems
Embedded operating system
n embedded operating system is a specialized operating system designed to
perform a specific task for a device that is not a computer.

The main job of an embedded OS is to run the code that allows the device to do
its job.
An embedded system is a computer that supports a machine. It performs one task in
the bigger machine. Examples include computer systems in cars, traffic lights, digital
televisions, ATMs, airplane controls,, digital cameras, GPS navigation systems,
elevators and Smart meters.
How does embedded os works

An embedded OS enables an embedded device to do its job within a larger system. It communicates
with the hardware of the embedded system to perform a specific function.
For example, an elevator might contain an embedded system, such as a microprocessor or
microcontroller, that lets it understand which buttons the passenger is pressing. The embedded
software that runs on that system is the embedded OS.

In the case of a Raspberry PI system on a chip, an SD card acts as the device's hard drive
and contains the code that runs on the device. The SD card is removable, so its contents
can be modified on demand. Various operating systems can run on Raspberry PI devices.
The embedded OS makes the device's hardware -- such as USB and HDMI ports --
accessible to the application running on top of the OS.
Example
Arduino is an open source platform with a microcontroller that processes simple inputs, such as
temperature or pressure, and turns them into outputs.

These devices have a basic embedded OS that acts like a boot loader and a command
interpreter.

An example of an Arduino-based device is a remote control car. The Arduino reads inputs from the
car's controller and sends output information and commands to other components, such as the
brakes.
Uses of embedded systems
● ATMs. ATMs have basic OS that enable the machine to read a user's debit card and
personal identification number input and perform bank account functions like
withdrawal or checking balances. The OS react to user inputs and communicate with
the ATM hardware.
● Cellphones. Cellphones require an OS like Android or iOS to boot the phone and
enable applications to communicate with other phone hardware.
● Electric vehicles. Microcontrollers host embedded OSes that handle functions like
braking or pressure sensing. For example, a certain amount of pressure on the front
bumper may cause the airbag to go off. This type of function is known as reactive
operation because it reacts to an input.
● Industrial control systems. Sensors are used in industrial control systems to
measure factory conditions and send alerts if they become dangerous. Sensors
contain an embedded OS that enable them to perform these tasks.
● Traffic lights. Embedded OSes enable a traffic light to cycle through different signals
at programmed intervals.
Von-Neumann computer architecture
Von-Neumann computer architecture design was proposed in 1945.
There have been 2 types of Computers:
1. Fixed Program Computers – Their function is very specific and they couldn’t be
reprogrammed, e.g. Calculators.
2. Stored Program Computers – These can be programmed to carry out many
different tasks, applications are stored on them, hence the name.
Modern computers are based on a stored-program concept introduced by John Von
Neumann. In this stored-program concept, programs and data are stored in a
separate storage unit called memories and are treated the same.

This novel idea meant that a computer built with this architecture would be much
easier to reprogram.
Von-Neumann computer architecture
● It is also known as ISA
(Instruction set architecture)
computer and is having three
basic units:
● The Central Processing Unit
(CPU)

● The Main Memory Unit

● The Input/Output Device


1. Central Processing Unit-
it is an electric circuit used for the executing the instruction of computer
program.
It has following major components:
1.Control Unit(CU)
2.Arithmetic and Logic Unit(ALU)
3. Registers
Control Unit –
A control unit (CU) handles all processor control signals. It directs all input and
output flow, fetches code for instructions, and controls how data moves around
the system.
● Arithmetic and Logic Unit (ALU) –
The arithmetic logic unit is that part of the CPU that handles all the calculations the
CPU may need, e.g. Addition, Subtraction, Comparisons. It performs Logical
Operations, Bit Shifting Operations, and Arithmetic operations.

● Registers – Registers refer to high-speed storage areas in the CPU. The data processed
by the CPU are fetched from the registers.
There are different types of registers used in architecture :-
○ Accumulator: Stores the results of calculations made by ALU. It holds the intermediate of arithmetic and
logical operatoins.it act as a temporary storage location or device.

○ Program Counter (PC): Keeps track of the memory location of the next instructions to be dealt with. The
PC then passes this next address to the Memory Address Register (MAR).

○ Memory Address Register (MAR): It stores the memory locations of instructions that need to be fetched
from memory or stored in memory.

○ Memory Data Register (MDR): It stores instructions fetched from memory or any data that is to be
transferred to, and stored in, memory.

○ Current Instruction Register (CIR): It stores the most recently fetched instructions while it is waiting to
be coded and executed.

○ Instruction Buffer Register (IBR): The instruction that is not to be executed immediately is placed in the
instruction buffer register IBR.
● Input/Output Devices – Program or data is read into main memory from
the input device or secondary storage under the control of CPU input
instruction. Output devices are used to output information from a
computer.
Von Neumann bottleneck –
● Whatever we do to enhance performance, we cannot get away from the
fact that instructions can only be done one at a time and can only be
carried out sequentially.
● Both of these factors hold back the competence of the CPU. This is
commonly referred to as the ‘Von Neumann bottleneck’.
● This architecture is very important and is used in our PCs and even in
Super Computers.
Harvard Architecture
● In a normal computer that follows von Neumann architecture,
instructions, and data both are stored in the same memory. So same
buses are used to fetch instructions and data.
● This means the CPU cannot do both things together (read the instruction
and read/write data).
● Harvard Architecture is the computer architecture that contains
separate storage and separate buses (signal path) for instruction and
data.
● It was basically developed to overcome the bottleneck of Von Neumann’s
Architecture. The main advantage of having separate buses for instruction
and data is that the CPU can access instructions and read/write data at
the same time.
Harvard
Architecture
There are separate buses for both instruction and data.
Data Bus: It carries data among the main memory
system, processor, and I/O devices.

Data Address Bus: It carries the address of data from


the processor to the main memory system.

Instruction Bus: It carries instructions among the main


memory system, processor, and I/O devices.

Instruction Address Bus: It carries the address of


instructions from the processor to the main memory
system.
Operational Registers

● The Memory Address Register and Memory Data Register are operational registers.

● Program Counter: It has the location of the next instruction to be executed. The program
counter then passes this next address to the memory address register.

● Arithmetic and Logic Unit: The arithmetic logic unit is part of the CPU that operates all
the calculations needed. It performs addition, subtraction, comparison, logical Operations,
bit Shifting Operations, and various arithmetic operations.

● Control Unit: The Control Unit is the part of the CPU that operates all processor control
signals. It controls the input and output devices and also controls the movement of
instructions and data within the system.

● Input/Output System: Input devices are used to read data into main memory with the
help of CPU input instruction. The information from a computer as output is given through
Output devices. The computer gives the results of computation with the help of output
devices.
Features:
● Separate memory spaces: In Harvard architecture, there are separate memory spaces for
instructions and data. This separation ensures that the processor can access both the
instruction and data memories simultaneously, allowing for faster and more efficient data
retrieval.
● Fixed instruction length: In Harvard architecture, instructions are typically of fixed length,
which simplifies the instruction fetch process and allows for faster instruction processing.
● Parallel instruction and data access: Since Harvard architecture separates the memory
spaces for instructions and data, the processor can access both memory spaces
simultaneously, allowing for parallel instruction and data processing.
● More efficient memory usage: Harvard architecture allows for more efficient use of memory
as the data and instruction memories can be optimized independently, which can lead to better
performance.
● Suitable for embedded systems: Harvard architecture is commonly used in embedded
systems because it provides fast and efficient access to both instructions and data, which is
critical in real-time applications.
● Limited flexibility: The separate memory spaces in Harvard architecture limit the flexibility of
the processor to perform certain tasks, such as modifying instructions at runtime. This is
because modifying instructions requires access to the instruction memory, which is separate
from the data memory.
Advantages
● Fast and efficient data access: Since Harvard architecture has separate
memory spaces for instructions and data, it allows for parallel and
simultaneous access to both memory spaces, which leads to faster and
more efficient data access.
● Better performance: The use of fixed instruction length, parallel
processing, and optimized memory usage in Harvard architecture can
lead to improved performance and faster execution of instructions.
● Suitable for real-time applications: Harvard architecture is commonly
used in embedded systems and other real-time applications where speed
and efficiency are critical.
● Security: The separation of instruction and data memory spaces can also
provide a degree of security against certain types of attacks, such as
buffer overflow attacks.
Disadvantages
● Complexity: The use of separate memory spaces for instructions and data in
Harvard architecture adds to the complexity of the processor design and can
increase the cost of manufacturing.
● Limited flexibility: Harvard architecture has limited flexibility in terms of
modifying instructions at runtime because instructions and data are stored in
separate memory spaces. This can make certain types of programming more
difficult or impossible to implement.
● Higher memory requirements: Harvard architecture requires more memory
than Von Neumann architecture, which can lead to higher costs and power
consumption.
● Code size limitations: Fixed instruction length in Harvard architecture can limit
the size of code that can be executed, making it unsuitable for some
applications with larger code bases.
CISC and RISC
● Family of CPUs
● Acts as engine in a system – Processors fetch the instructions and
executes
● CISC is a Complex Instruction Set Computer. It is a computer that can
address a large number of instructions.
● In the early 1980s, computer designers recommended that computers
should use fewer instructions with simple constructs so that they can be
executed much faster within the CPU without having to use memory. Such
computers are classified as Reduced Instruction Set Computer or RISC.
RISC Machines
● RISC (reduced instruction set computer) is a microprocessor that is designed to
perform a smaller number of computer instruction types, so it can operate at a
higher speed, performing more millions of instructions per second, or MIPS

● RISC is considered the most efficient CPU architecture technology available today.

● With RISC, a central processing unit (CPU) implements the processor design principle of
simplified instructions that can do less but can execute more rapidly. The result is
improved performance.

● A key RISC feature is that it allows developers to increase the register set and increase
internal parallelism by increasing the number of parallel threads executed by the CPU
and increasing the speed of the CPU's executing instructions.

● ARM, or “Advanced RISC Machine” is a specific family of instruction set architecture


that’s based on reduced instruction set architecture developed by Arm Ltd. Processors
based on this architecture are common in smartphones, tablets, laptops, gaming
consoles and desktops, as well as a growing number of other intelligent devices.
ARM processor
● Advanced RISC Machine (ARM) Processor is considered to be a family of
Central Processing Units that are used in music players, smartphones,
wearables, tablets, and other consumer electronic devices.

● Advanced RISC Machines create the ARM processor architecture, hence


the name ARM. This needs very few instruction sets and transistors. It has
very small in size. It has less power consumption along with reduced
complexity in its circuits.

● They can be applied to various designs such as 32-bit devices and


embedded systems. They can even be upgraded according to user needs.
Features of ARM Processor
1. Multiprocessing Systems: ARM processors are designed to be used in cases of
multiprocessing systems where more than one processor is used to process
information. The First AMP processor introduced by the name of ARMv6K could
support 4 CPUs along with its hardware.

2. Tightly Coupled Memory:. It has low latency (quick response) that can also be used in
cases of cache memory being unpredictable.

3. Memory Management: ARM processor has a management section. This includes


Memory Management Unit and Memory Protection Unit. These management systems
become very important in managing memory efficiently.

4. Thumb-2 Technology: Thumb-2 Technology was introduced in 2003 and was used to
create variable-length instruction sets. It extends the 16-bit instructions of initial
Thumb technology to 32-bit instructions. It has better performance than previously
used Thumb technology.
ARM architecture
● Advanced RISC Machine or Acorn RISC Machine is the architecture with different
computing architectures set to be used in different environments.
● 32-bit and 64-bit can be used here in different computer processors. It was
developed by Arm Holdings and the architecture is updated in between.
● This architecture is specified to be used with CPU, different chips in the system,
and in different registers.
● Reduced Instruction Set Computing helps in creating instructions for the
system to be used for several purposes. Smartphones, microcomputers, and
embedded devices also use ARM architecture for the instruction set in the
registers.
5. One-Cycle Execution Time: ARM processor is optimized for each instruction on
the CPU. Each instruction is of a fixed length that allows time for fetching future
instructions before executing the present instructions. ARM has CPI (Clock Per
Instruction) of one cycle.
6. Pipelining: Processing of instructions is done in parallel using pipelines.
Instructions are broken down and decoded in one pipeline stage. The channel
advances one step at a time to increase throughput (rate of processing).
7. A large number of Registers: A large number of registers are used in ARM
processors to prevent large amounts of memory interactions. Records contain
data and addresses. These act as a local memory store for all operations.
ARM Processor
● Advanced RISC machine
● Developed at Acorn computers limited (1983-85)
● CISC needed 1 clock cycle, so slow
○ RISC- easy to develop, future propectus – But had large uniform registers are present , load.
Store architecture, simple addressing modes, uniform and fixed length instructions fields are
present.
○ In Adv RISC – enhancement -> instruction controls Alu. Auto increment and auto decreent
addressing modes, multiple load/store condition execution
● It is a microcontroller
● High performance, low code size, low power consumption, low silicon area
● Used for commercial processor
● Used in video game, modems, mobile phone, handy cams..
● Simplicity- Allows small implementation which results in low power
consumption
● Family of CPUs
● Acts as engine in a system – Processors fetch the instructions and
executes
● Size is small – less transisters
● Arm core+add. components
ARM Architecture
● Fixed length instruction
● Pipeline
● Load/store architecture using registers
● Register file: 32 bit architecture
○ Store data
○ Register size is 32 bit - data is of size 32 bit length r0 to r15
○ Byte=8 bits
○ Word-32 bits/4bytees
○ Half word – 16 bits( 2bytes)
● ARM implements 2 types of instruction set.
○ 32 bit ARM instruction set
○ 16 bit thumb instruction set
● Follows Von-neumann architecture
● Barrel shifter – preprocessor. Shifts
the data left, right or circularly before
moving to ALU
● ALU and MAC- read operands
● A bus sends data directly to ALU,
operands Rm
● B bus does processing and send to
ALU , Operands Rn. Two source
register are there for operations and
one register for the result
● Results from ALU goes back to
register bank again
● Final output goes to data out register
by B bus
● Multiply register🡪 Multiplexer/
multiply accumulate unit(MAC)
● Sign extend: handles signed data by
extending 16 bit to 32 bit.
● PC-program counter fetches the next
instruction or address of register Load:
instruction are copies the data from
memory to registers. Store: copies
from registers to memory

You might also like