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

Real-Time and Embedded Systems - Lecture Slide Chp-2-3

Uploaded by

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

Real-Time and Embedded Systems - Lecture Slide Chp-2-3

Uploaded by

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

4/29/2024

Dagmawi Lemma - 2024


Real-Time and
Embedded
Systems
CoSc 4412
CoSc 6326
Dagmawi Lemma (PhD)

Real-TIme and Embedded Systems


Assistant Professor
[email protected]
Department of Computer Science,
Addis Ababa University

t.me/EmbeddedSystemsCourse

Dagmawi Lemma - 2024


Outline

Architecture ES-
Introduction and Development
Components Life Cycle
Real-TIme and Embedded Systems

Real-Time Embedded Application


Operating System Area and
System Platform Case Studies

46

1
4/29/2024

Dagmawi Lemma - 2024


Architecture and Components
• Basics of Architecture
• The block diagram and computers working
principles
 Registers and Instruction Set (+OP Code)

Real-TIme and Embedded Systems


 Storage (why do we need it?)
• Von Neumann and Harvard Architecture
• Embedded System Platforms and Components

47

Dagmawi Lemma - 2024


Basic Architectures
Von Neumann Architecture Harvard Architecture

Memory Memor
Data Bus
y
Data
Code
Data Bus Segmen Data Bus
Address Memory
t Bus
CPU
Real-TIme and Embedded Systems

CPU
Address Data Address
Data Bus
Bus Segmen Bus Program
t Memory
Address
Bus

48

2
4/29/2024

Dagmawi Lemma - 2024


Basic Architectures …
Von Neumann Architecture Harvard Architecture

follows the concept of a stored-program computer. follows the concept of the relay-based model

one single physical address for accessing and storing both two separate physical addresses for storing and accessing
data and instructions. both instructions and data.
Common signal path (bus) for both instruction and data. Separate buses for data and instructions.

Requires two clock cycles for executing a single Executes any instruction using only one single cycle.
instruction.

Real-TIme and Embedded Systems


CPU is not able to read/write data and access instructions The CPU can read/write data as well as access the
at the same time. instructions at any given time.
Used in the design of small computers and personal Most preferred or signal processing as well as
computers. microcontrollers.
This architecture does not waste any space. It is because This type of architecture can result in space wastage. It is
the instruction memory can utilize the left space of the because the instruction memory cannot utilize the leftover
data memory. It can also happen vice-versa. space in the data memory. It also cannot happen vice-
versa.
Since it is not capable of fetching the instructions and data Its ability to fetching both instructions and data at the
both at the same time, relatively it is slower than Harvard very same time makes it faster than Von Neumann
Architecture Architecture.

49

Dagmawi Lemma - 2024


ARM Architecture
• ARM (Advanced RISC Machine) processors are
based on a reduced instruction set computer (RISC)
architecture.
• Though it is family of CPUs, it follows a different
approach to how the hardware for a system is
Real-TIme and Embedded Systems

designed when compared to more familiar server


architectures like x86.
• The ARM is a “Harvard Architecture” based
processor

50

3
4/29/2024

Dagmawi Lemma - 2024


Arduino Architecture
• Arduino’sprocessor as well uses the Harvard
architecture, thus separate physical memory
spaces are used for the program code and
program data.
 The code is stored in the flash program memory,

Real-TIme and Embedded Systems


 Atmega328 has 32 KB of flash memory for storing code (of
which 0.5 KB is used for the bootloader),
 The data is stored in the data memory.
 2 KB of SRAM and 1 KB of EEPROM
• Operates with a clock speed of 16MHz.
51

Dagmawi Lemma - 2024


Arduino (Uno) Architecture Real-TIme and Embedded Systems

Source:
https://www.elprocus.co
m

52

4
4/29/2024

Dagmawi Lemma - 2024


Arduino (Nano) Architecture

Real-TIme and Embedded Systems


53

Dagmawi Lemma - 2024


Embedded System Platform
• Anysystem (software), be it embedded or not,
needs a platform over which it can run
• The platform (the computing platform in our
case) is basically the environment where the
Real-TIme and Embedded Systems

set of instructions (program) is executed


• For
embedded system, the main platform is
where the instructions set is embedded – mainly
composed of various Hardware Components
54

5
4/29/2024

Dagmawi Lemma - 2024


Hardware Components
• Processors
 The processors we use in embedded system has the
responsibility to execute the instruction sets
 The type and processing power depends on the system
requirement

Real-TIme and Embedded Systems


 Broadly classified as:
 General-purpose processors (Microprocessors)
 Special-purpose processors
 Microcontrollers
 Application Specific Integrated Circuits (ASIC)
55

Dagmawi Lemma - 2024


Microprocessor and Microcontroller
• Microcontrollers are widely used in embedded systems
development, but microprocessors are also useful enough to
meet some purposes of larger systems
Real-TIme and Embedded Systems

56

6
4/29/2024

Dagmawi Lemma - 2024


Microprocessor
• Microprocessor has only a CPU inside them in one or few
Integrated Circuits
• Unlike microcontrollers it has the RAM, ROM and other
peripherals are independent on external circuits of
peripherals
• Microprocessors are not made for specific task but they

Real-TIme and Embedded Systems


are required where tasks are complex and tricky like
development of software’s, games and other applications
that require high memory and where input and output
are not defined
 While microcontrollers are referred as the heart of embedded
systems, microprocessors are called heart of a computer system

57

Dagmawi Lemma - 2024


Microprocessor (continued)
• A microprocessor is designed to perform
arithmetic and logic operations that make use
of small storage called registers

• control unit is responsible for directing the


processor to carry out stored program
instructions (which are stored in the register)
Real-TIme and Embedded Systems

• When a program starts executing, first the


set of instructions are loaded in to memory
(external from the CPU) thus the CU need to JiacunWang (2017) Real-
communicate with the memory and
arithmetic logic unit (ALU) to synchronize the Time Embedded Systems
transfer of instructions between the memory
and the storage in the microprocessor; as all
the instructions that are fetched from
memory are stored in the instruction register
as binary values

58

7
4/29/2024

Dagmawi Lemma - 2024


Microprocessor (continued)
• The instruction decoder reads that values and tells the ALU which
computational circuits to energize in order to perform the function

• The ALU performs integer arithmetic and bitwise logic operations. These
operations are the result of instructions that are part of the microprocessor
design

Real-TIme and Embedded Systems


• Modern microprocessors are 32-bit or 64-bit, 128-bit microprocessors are also
available
 The number of bits in a processor refers to the size of the data types that it handles
and the size of its registry

• Examples of general-purpose microprocessors include Intel 80x86, SPARC,


and Motorola 68HCxxx.

59

Dagmawi Lemma - 2024


Microprocessor (continued) Real-TIme and Embedded Systems

60

8
4/29/2024

Dagmawi Lemma - 2024


Microcontroller
• Microcontroller is like a small computer on a single IC
containing
 a processor core,
 ROM,
 RAM and
 I/O pins

Real-TIme and Embedded Systems


• As it has all the components needed in its single chip, it
does not need any external circuits to do its task so
microcontrollers are heavily used in embedded systems so
called the heart of embedded system
• Microcontroller is a programmable circuit board

61

Dagmawi Lemma - 2024


Microcontroller (continued) Real-TIme and Embedded Systems

Set of typical embedded system hardware units


JiacunWang (2017) Real-Time Embedded Systems

62

9
4/29/2024

Dagmawi Lemma - 2024


Microcontroller (continued)
• Examples of commonly used
16-bit microcontrollers for
medium-scale embedded
systems are
 PIC24 series,
 Z16F series, and IA188 series

Real-TIme and Embedded Systems


• The most common sizes for
RAM are 1.5, 2, 4, 8, 16, and
8051 microcontroller. More information is found at
32 kb https://circuitdigest.com/8051-microcontroller-
projects

63

Dagmawi Lemma - 2024


ASIC
• Application-Specific Integrated Circuit (ASIC) is a highly specialized device and constructed for one
specific-purpose application only

• It integrates several functions into a single chip and thus reduces the number of overall circuits needed

• ASICs are very expensive to manufacture, and once it is made, there is no way to modify or improve, as
the metal interconnect mask set and its development are the most expensive and of fixed cost
Real-TIme and Embedded Systems

• The lack of programmability and high cost make ASICs not suitable for use in the prototyping stage of
system design cycle

• ASICs are widely used in communication, medical, network, and multimedia systems, including cellular
phones, network routers, and game consoles

64

10
4/29/2024

Dagmawi Lemma - 2024


ASIC (continued)
Specific applications of FPGAs include
• Field-Programmable Gate several areas

Arrays (FPGAs) digital signal


processing,
software-
defined radio,
ASIC
prototyping,
 An FPGA is a programmable
ASIC
 It contains a regular grid of logic medical computer speech
imaging, vision, recognition,
cells that can be rapidly

Real-TIme and Embedded Systems


reconfigured, which facilitates
fast prototyping of embedded computer
systems cryptography, bioinformatics, hardware
emulation,

• An FPGA can be used to


solve any problem that is radio metal
etc.
astronomy, detection,
computable

65

Dagmawi Lemma - 2024


Digital Signal Processors (DSP)
• DSPs are designed for high-data-rate computations
• DSPs implement algorithms in hardware and offer high
performance in repetitive and numerically intensive tasks
• DSPs are two to three times faster than the general-
purpose microprocessors in signal processing applications,
Real-TIme and Embedded Systems

including audio, video, and communication applications


• But, DSPs are expensive
 A recent study also indicates that many commercially available
DSPs lack adequate compiler support

66

11
4/29/2024

Dagmawi Lemma - 2024


Application-Specific Instruction Set
Processors (ASIPs)
• ASIPs are an emerging design paradigm that offers an intermediary solution
between ASICs and programmable processors

• Typically, ASIPs consist of custom integrated circuitry that is integrated with


an instruction set tailored to benefit a specific application

Real-TIme and Embedded Systems


• This specialization of the core provides a trade-off between the flexibility of a
general-purpose processor and the performance of an ASIC

• Advantages of ASIPs include high performance and increased design


flexibility because later design changes can be accommodated by updating the
application software running on the ASIP

67

Dagmawi Lemma - 2024


Instruction Set
• An instruction set is a group of instructions that can be input to the processor
• These instructions direct the processor in terms of data manipulation
• An instruction typically includes an opcode that specifies the operation to
perform, such as add contents of memory to register, and zero or more
operand specifiers, which may specify registers, memory locations, or literal
data
Real-TIme and Embedded Systems

• An instruction set architecture serves as an interface to allow easy


communication between the programmer and the hardware
• It prepares the processor to respond to all the user commands.
• There are two prevalent instruction set architectures: complex instruction set
computing (CISC) and reduced instruction set computing (RISC).

68

12
4/29/2024

Dagmawi Lemma - 2024


CISC Vs RISC
• CISC processors run complex instructions where a single instruction may
execute several low-level operations
• The primary goal of CISC architecture is to complete a task in as few lines of
assembly instructions as possible
• For example if we want to multiply two numbers
 A CISC processor would come prepared with a specific instruction, say MULT. When
executed, this instruction will load the two numbers from the main memory into two

Real-TIme and Embedded Systems


separated registers, multiply them in the execution unit, and then store the product
in an appropriate register or back to memory
 Thus, the entire task of multiplying two numbers is completed with a single instruction such as

MULT A, B
 Therefore MULT is a complex instruction as it operates directly on the computer’s
memory banks and does not require the programmer to explicitly call any loading or
storing functions
• Executing a complex instruction may need multiple clock cycles

69

Dagmawi Lemma - 2024


CISC Vs RISC (continued)
• On the contrary, RISC processors only use simple instructions
that can be executed within one clock cycle
• To perform a multiplication operation, for example, the
following simple instructions are required:
LOAD R1, A ; load A into register R1
LOAD R2, B ; load B into register R2
Real-TIme and Embedded Systems

PROD R1, R2 ; multiply A and B, product saved in R1


STOR R1, A ; store A*B into a memory location

• Examples of CISC processors includes


 Intel x86 and SHARC
• Examples of RISC processors includes
 processors are ARM 7 and ARM 9.

70

13

You might also like