0% found this document useful (0 votes)
30 views91 pages

CMPE 246 Lecture 2 - (Jan.9)

The document outlines the course CMPE 246, taught by Dr. Ling Bai at the University of British Columbia, focusing on embedded systems and their architecture. It covers various types of embedded processors, including microcontrollers and digital signal processors, as well as the differences between microcontrollers and microprocessors. Additionally, it discusses memory types used in embedded systems, emphasizing the distinctions between RAM and ROM.

Uploaded by

siamibne1512
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)
30 views91 pages

CMPE 246 Lecture 2 - (Jan.9)

The document outlines the course CMPE 246, taught by Dr. Ling Bai at the University of British Columbia, focusing on embedded systems and their architecture. It covers various types of embedded processors, including microcontrollers and digital signal processors, as well as the differences between microcontrollers and microprocessors. Additionally, it discusses memory types used in embedded systems, emphasizing the distinctions between RAM and ROM.

Uploaded by

siamibne1512
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/ 91

CMPE 246 (3) Computer Engineering

Design Studio
Dr. Ling Bai
[email protected]
IEEE Member, ACM Member
Faculty of Applied Science | School of Engineering
The University of British Columbia, Okanagan Campus
1137 Alumni Avenue, Kelowna BC, V1V 1V7 Canada
Instructor Name: Ling Bai

Instructor Contact Information: [email protected]

Office Hours: By appointment


Please click on the link to book a 15-minutes
appointment during office hours ( EME 3280,
Friday, 2:30pm-4:30pm). You may book multiple
time slots if needed. If none of the available times
work for you, please feel free to email me.
[email protected]
Appointment booking link:
https://lingbai.youcanbook.me

2
1- Lecture 2

3
2- Last Lecture
In the previous lecture, we reviewed the course structure, assessments.
We also discussed embedded systems, real-world applications, the
design flow, and design models.

4
1- Review Last Lecture

Software Development Life-Cycle (SDLC) Models:


4 Types
big-bang model
code-and-fix model
waterfall model
spiral model

V-model of design flows

5
2- Embedded System Architecture

The architecture of an embedded system is an abstraction


of the embedded device

6
2- Embedded System Architecture

All structures within an architecture are inherently related to


each other, and it is the sum of all these structures that is
the embedded architecture of a device.

7
2- Embedded System Architecture
The human body is a natural representation of an embedded
architecture. Organs like the brain (processor), heart (power supply),
and muscles (actuators) are interconnected and work together to
perform complex tasks.

8
2- Embedded System Architecture

Just as the nervous system transmits signals, embedded system buses


interconnect components for communication.

9
2- Embedded System Architecture
brain (processor)

Smile

muscles (actuators)
nervous (buses)
10
2- Embedded System Architecture
To group the components within devices as layers in an embedded system
architecture, we can break them down into three main layers: hardware
layer, system software layer, and application software layer.

11
2- Embedded System Architecture

Application Software

System Software

Hardware

The physical foundation of the system. 12


2- Embedded System Architecture

Application Software

System Software

Hardware

The system layer that interacts directly with


13
the hardware, managing its operation.
2- Embedded System Architecture

Application Software

System Software

Hardware

The high-level software that implements the


14
system’s functionality and user interface.
2- Embedded System Architecture

In embedded devices, all the


electronics hardware resides on a
board, also referred to as a printed
wiring board (PW) or printed circuit
board (PCB).

All of the hardware on an embedded board


is located in the hardware layer 15
2- Embedded System Architecture
The electrical path of the circuit is printed in copper, which carries the
electrical signals between the various components connected on the board.

16
2- Embedded System Architecture
All electronic components that make up the circuit are connected to this board,
either by soldering, plugging in to a socket, or some other connection
mechanism.

17
2- Embedded System Architecture

18
2- Embedded System Architecture
At the highest level, the major hardware components of most boards can be
classified into five major categories:

Central Processing Unit (CPU)


the master processor

Data Pathway(s)/Bus(es) Memory


01
interconnects the other components, where the system’s software is
providing a “highway” for data to travel 05 02 stored
on from one component to another

Output Device(s) 04 03 Input Device(s)


output slave processors and relative input slave processors and relative
electrical components electrical components 19
2- Embedded System Architecture

20
3- Embedded Processor
An embedded processor is a micro-processor that is designed
especially for handling the needs of an embedded system. It is a class
of computer chip that is embedded in various machines.

The processor is the “brain” of the computer and is


responsible for carrying out the instructions of a computer 21
3- Embedded Processor
• Processors are the main functional units of an embedded board,
and are primarily responsible for processing instructions and data.

• It reads and interprets the instructions and performs the actions


required by the instructions.
• The processor is an essential component of a computer system, as
it determines the speed and performance of the system. 22
3- Embedded Processor

chee
se
instruction

23
3- Embedded Processor

• The faster your brain processes the "cheese" command, the better
the quality of the photo.

• Similarly, in a computer system, the faster the processor, the higher


the performance of the system.

24
3- Embedded Processor

• An embedded processor is a micro-processor that is used in an


embedded system.

• An embedded system is a computer system that is designed to


perform a specific task within a larger system.

• It is a self-contained system that is embedded within a larger device


or system and is used to control the operation of the device.

25
3- Embedded Processor

• Embedded processors are designed to be small, low-power, and


efficient, as they are typically used in devices where space and
power are at a premium.
• They are also designed to be reliable and to operate for long periods
of time without failure.

26
3- Embedded Processor

Below are the different types of embedded processors:


1. General Purpose Processors (GPPs)
General purpose processors, also known as central processing units
(CPUs), are processors that are designed to be capable of executing a
wide range of tasks.

They are used in computers and other devices that require high-
performance processing capabilities.

27
3- Embedded Processor

Some features of general-purpose processors include:


Instruction set: General purpose processors have a large and
complex instruction set, which allows them to perform a wide range
of tasks.

Multi-core: Many general-purpose processors are multi-core, which


means they have multiple processors on a single chip. This allows
them to perform multiple tasks concurrently, improving performance.

28
3- Embedded Processor
Clock speed: The clock speed of a processor determines how fast it
can execute instructions. General-purpose processors typically have
high clock speeds, which allows them to perform tasks quickly.

The clock speed of a microprocessor, also known as the processor


speed or CPU speed, is the number of cycles it can execute per
second.

It's usually measured in gigahertz (GHz).


For example, a CPU with a clock speed of 3.0 GHz can process 3 billion
29
cycles per second.
3- Embedded Processor

Cache: General-purpose processors have one or more levels of


cache, which is a small amount of high-speed memory that is used
to store frequently accessed data. This helps to improve the
performance of the processor.

Power consumption: General-purpose processors can have high


power consumption, which can be a concern in devices where power
is limited.
30
3- Embedded Processor

2. Microprocessors

A microprocessor is a processor that is contained on a microchip, or


integrated circuit. It is a central processing unit (CPU) that executes the
instructions of a computer program.
Some features of microprocessors include:
Instruction set: Microprocessors have a specific instruction set that
defines the operations that they can perform.

31
3- Embedded Processor

Clock speed: The clock speed of a microprocessor determines how fast


it can execute instructions. Microprocessors typically have high clock
speeds, which allows them to perform tasks quickly.

Cache: Many microprocessors have one or more levels of cache,


which is a small amount of high-speed memory that is used to store
frequently accessed data. This helps to improve the performance of the
microprocessor.
32
3- Embedded Processor

Power consumption: Microprocessors can have relatively high power


consumption, which can be a concern in devices where power is
limited.

Size: Microprocessors are designed to be small, as they are typically


used in devices where space is at a premium.

33
3- Embedded Processor

3. Microcontrollers
A microcontroller is a small, low-power computer that is contained in a
single integrated circuit (IC).
It is a type of embedded processor that is used in a wide range of
devices, including consumer electronics, industrial control systems, and
automotive systems.

34
3- Embedded Processor

3. Microcontrollers

Some features of microcontrollers include:


On-chip peripherals: Many microcontrollers have a variety of on-chip
peripherals.

Peripherals:
which allow them to interface with external devices.

35
3- Embedded Processor
E.G.
Analog-to-Digital Converters(ADC):
a system that converts an analog signal( continuous-time
signal), such as a sound picked up by a microphone or light
entering a digital camera, into a digital signal(0,1...).

36
3- Embedded Processor
3. Microcontrollers

Memory: Microcontrollers have both program memory, which stores


the instructions that are executed by the processor, and data memory,
which is used to store variables and other data.

Input/output (I/O) pins: Microcontrollers have a set of I/O pins that can
be used to interface with external devices.

37
3- Embedded Processor
3. Microcontrollers

Low power consumption: Microcontrollers are designed to be low-power,


which makes them suitable for use in battery-powered devices.

Cost: Microcontrollers are typically less expensive than general-purpose


processors, as they are designed for specific tasks and do not have as
many capabilities.

Size: Microcontrollers are small, which makes them suitable for use in
38

compact devices.
3- Embedded Processor

39
3- Embedded Processor
4. Digital Signal Processor (DSP)
Digital signal processors (DSPs) are specialized microprocessors that are
designed to process digital signals.

They are used in a wide range of applications, including audio and video
processing, telecommunications, and control systems.

40
3- Embedded Processor
4. Digital Signal Processor (DSP)

Some key features of DSPs include:

High-speed processing: DSPs are designed to process large amounts of


data quickly, making them well-suited for real-time applications.

Parallel processing: Many DSPs are designed to perform multiple


operations simultaneously, which can increase their processing speed and
efficiency. 41
3- Embedded Processor
4. Digital Signal Processor (DSP)

Some key features of DSPs include:

Low power consumption: DSPs are often designed to be energy-efficient,


making them well-suited for battery-powered applications.

42
3- Embedded Processor
4. Digital Signal Processor (DSP)

Analog-to-Digital converters (ADC)


Digital-to-Analog converts (DAC)

43
3- Embedded Processor
5. Single-Purpose Embedded Processor

Single-purpose embedded processors, also known as application-specific


embedded processors, are microprocessors that are designed to perform a
specific task or set of tasks.

44
3- Embedded Processor
5. Single-Purpose Embedded Processor

Some key features of single-purpose embedded processors include:

• Specialized functionality: Single-purpose embedded processors are


designed to perform a specific task or set of tasks, making them well-
suited for applications that require highly specialized functionality.

45
3- Embedded Processor
5. Single-Purpose Embedded Processor

Some key features of single-purpose embedded processors include:

• Low power consumption: Single-purpose embedded processors are often


designed to be energy-efficient, making them well-suited for battery-
powered applications.
• Compact size: Single-purpose embedded processors are often designed
to be small and lightweight, making them well-suited for applications
where space is limited. 46
3- Embedded Processor
5. Single-Purpose Embedded Processor

Some key features of single-purpose embedded processors include:

• High reliability: Single-purpose embedded processors are often designed


to be highly reliable, as they are typically used in mission-critical
applications where downtime is not an option.
• Low cost: Single-purpose embedded processors are often less
expensive than general-purpose processors, as they are designed to
perform a specific set of tasks and do not require the same level of
47
flexibility and programmability.
3- Embedded Processor
6. System-on-Chip (SoC)
System-on-Chip (SoC) is an integrated circuit that integrates all
components of a computer or other electronic system onto a single chip.
Some key features of SoCs include:
• Integration: SoCs integrate all or most of the components of a system
onto a single chip, which can reduce the size and complexity of the
system.
• Low power consumption: SoCs can be designed to be highly power
efficient, which can be useful in battery-powered or energy-sensitive
applications.
• High performance: SoCs can be designed for high performance, making
them suitable for applications that require a lot of processing power. 48
3- Embedded Processor

The Raspberry Pi 4 is a single-board computer (SBC)


that uses a microprocessor rather than a
microcontroller.

49
3- Embedded Processor

How microcontrollers Work?

https://youtu.be/i_g1dD5fFLo

50
3- Embedded Processor

Why is Raspberry Pi 4 Not a Microcontroller?

Microcontroller:
• Combines a CPU, memory, and I/O peripherals on a single chip.
• Designed for specific control-oriented tasks in embedded systems.

Microprocessor:
• Focuses on high-speed processing but lacks integrated peripherals like GPIO, memory, or
storage.
• Requires external components to function.

51
3- Embedded Processor
Key Differences Between Microcontroller and Microprocessor in
Raspberry Pi 4

52
3- Embedded Processor
The Raspberry Pi 4 is powered by a microprocessor (Broadcom
BCM2711), making it a small yet powerful computer capable of running a
full operating system and handling demanding applications.

53
3- Embedded Processor ARM stands for Advanced RISC Machine.
It is a family of processors based on the
RISC (Reduced Instruction Set Computer)
architecture.
• Highly power-efficient
• Lightweight and scalable

x86 is a family of instruction set


architectures based on the CISC
(Complex Instruction Set Computer)
architecture.
• Less power-efficient
• High-performance for demanding tasks
54
https://youtu.be/pNtqccJsQcg
4- Memory

Central Processing Unit (CPU)


the master processor

Data Pathway(s)/Bus(es) Memory


01
interconnects the other components, where the system’s software
providing a “highway” for data to travel 05 02 is stored
on from one component to another

Output Device(s) 04 03 Input Device(s)


output slave processors and input slave processors and
relative electrical components relative electrical
components 55
4- Memory
Types of Memory in Embedded Systems

RAM ROM
Random Access Memory Read-Only Memory

Temporary Permanent
Desk Bookshelf

56
4- Memory
Types of Memory in Embedded Systems

RAM ROM
Random Access Memory Read-Only Memory

The primary difference between them is the lifetime of the


data they store.
• Static RAM (SRAM)
 SRAM retains its contents as long as electrical power
• Dynamic RAM (DRAM)
is applied to the chip
 DRAM, on the other hand, has an extremely short
data lifetime-typically about four milliseconds.
57
4- Memory
Types of Memory in Embedded Systems
RAM
ROM
Random Access Memory
Read-Only Memory

Permanent

• The contents of the memory are specified • Masked ROM


before chip production • Programmable ROM (PROM)
• can be programmed • Erasable and Programmable
• can be erased and reprogrammed multiple
ROM (EPROM) 58
times
4- Memory
Types of Memory in Embedded Systems
As memory technology has matured in recent years, the line
between RAM and ROM has blurred.
Hybrid Memory

• Electrically Erasable Programmable ROM (EEPROM): Used for small,


frequently read/written data
• Flash Memory: Used for larger, bulk data storage
• Non-Volatile RAM (NVRAM): Used for fast, persistent data storage
where speed is critical 59
4- Memory
Raspberry Pi 4: RAM-2GB, 4GB, 8GB

60
4- Memory

Central Processing Unit (CPU)


the master processor

Bus(es) Memory
01
interconnects the other components, where the system’s software
providing a “highway” for data to travel 05 02 is stored
on from one component to another

Output Device(s) 04 03 Input Device(s)


output slave processors and input slave processors and
relative electrical components relative electrical
components 61
5- Architecure Types
TO START--Processor Units (In other courses(Optional knowledge))
The control unit is like a conductor at a concert, directing performers to play. Similarly, it
directs which code instruction to execute.
The program counter is like having a list of songs to perform.
The address register is like knowing where each performer is seated.
The arithmetic/logic unit is like the instruments used in the performance.

62
5- Architecure Types
Two types of the embedded systems
Computer scientist John von Neumann was the one who proposed
the Von Neumann architecture. One data path, or bus, serves as both
an instruction and a data path in this architecture.

63
5- Architecure Types
Two types of the embedded systems
The Harvard architecture provides separate signal and storage buses
for instructions and data. These types of architecture in embedded
system prevent access to the instruction storage as data.

64
5- Architecure Types

Let’s Have a Look with the Architecure!

https://youtu.be/IEYFlGLAhyo

65
5- Architecure Types
Basic structure of the embedded systems

66
5- Architecure Types
Basic structure of the embedded systems

67
5- Architecure Types
Basic structure of the embedded systems

68
5- Architecure Types
Basic structure of the embedded systems

Analog-to-Digital converters (ADC)


Digital-to-Analog converts (DAC) 69
5- Architecure Types
Basic structure of the embedded systems

70
6- Advantages of Embedded Systems

• Size of the embedded system

In comparison to other computational products like computer systems, the


size of an embedded system is quite small. The embedded system was
created expressly for a certain use case. Therefore, its overall size was
reduced by using compact components.

71
6- Advantages of Embedded Systems

• Low power consumption

When compared to computer systems, embedded systems' power


consumption is also lower. This is due to the architecture of embedded
system that fits in a compact size.

72
6- Advantages of Embedded Systems

• Accuracy

When compared to other computational products, the embedded


system has high performance and accuracy. Moreover, accuracy
is a crucial component that one must take care of. We cannot
overlook it since the system is built for a specific operation.

73
6- Advantages of Embedded Systems

• Price

The price of embedded systems in the market is extremely low.


Thus, when compared to other computing devices, they are far
less expensive. The embedded systems also use very few
components in their hardware architecture. Therefore, it impacts
the system's cost and makes it easy to use.

74
6- Advantages of Embedded Systems

• Portability

The system mobility of embedded systems is another key benefit. Due


to its compact size, embedded systems are portable from one place to
another. This benefit makes the system very useful because one can
move it from one place to another.

75
7- Raspberry Pi 4
Your credit card-sized microcomputer!

A wide range of practical applications, from basic computing tasks to advanced embedded systems and IoT projects. 76
7- Raspberry Pi 4
Your credit card-sized microcomputer!

Raspberry Pi

https://youtu.be/eZ74x6dVYes

Python, a programming language,

mathematical constant,
symbolizing innovation and 77
computing
7- Raspberry Pi 4

78
7- Raspberry Pi 4

Raspberry Pi Zero

79
7- Raspberry Pi 4

80
7- Raspberry Pi 4

81
7- Raspberry Pi 4

82
7- Raspberry Pi 4

Let’s read the Datasheet of Rasberry Pi 4!

83
7- Raspberry Pi 4

https://www.raspberrypi.com/pro
ducts/raspberry-pi-4-model-b/

84
7- Raspberry Pi 4

85
7- Raspberry Pi 4

kits

86
7- Raspberry Pi 4
Lab:
20 stations

87
7- Raspberry Pi 4

Individual Projects Advanced Projects


Week 3 - 6 from Week 6:

88
7- Raspberry Pi 4

02 03
01
Advanced Labs
Intermediate Labs
Introduction Labs Involve complex problem-solving tasks,
Focus on interfacing with
integrating multiple components, and developing
Focus on setting up hardware components and
applications that use any kink of machine
the environment and managing data input/output.
learning and IoT technologies.
simple coding
exercises.

Individual Projects Advance Projects


89
Conclude

90
Dr. Ling Bai
(email: [email protected])

You might also like