Professional Documents
Culture Documents
1 MP Based Systems
1 MP Based Systems
Energy efficiency
08/23/21 1
Smart Dust vs MEMs
08/23/21 2
Introduction
Embedded Systems perform dedicated tasks, and put particular
requirements on the processors controlling them
These functionality wise differences even become more diverse
within the embedded systems as clear from the following some of
the applications
Portable Devices:
PDA’s, Digital Cameras, MP3 players, Mobile phones
Automotive:
Automobile engine control systems, Tracking systems,
Functionality check systems
Networking:
Ethernet switches, routers
Medical Equipment:
Medical Imaging and video of inside of body / Ultrasound
Industrial Controls:
Nuclear Reactor Control, Lathe Machine Controls etc
08/23/21 3
Digital Camera Functional Block Diagram
08/23/21 4
GPP vs Embedded Processors
Functionality wise differences in the embedded
applications/processors results in several architectural
differences between the embedded processors and general
purpose processors.
Control Unit
On-Chip Caches
On-Chip peripherals
Pipeline Requirements
Arithmetic Computation
08/23/21 5
Embedded Processing Areas
Ubiquitous Computing
System On Chip
Network on Chip
08/23/21 6
Comparison of GPP and Embedded
Processor
08/23/21 8
Embedded Processor Architecture
The real-time processing can further be divided into two categories:
Hard real-time system:
08/23/21 9
Embedded Processor Architecture
signal processing
DSPs are used for filtering, transformation etc using
08/23/21 10
Embedded Processor Architecture
Power consumption:
(i) These are mostly battery operated systems so long
operation life before recharging.
(ii) virtually no special cooling arrangement required decreasing
cost as well as size
(iii) least instruction + more work = least power
consumption
Limited memory:
The memory size is always less in an embedded application as
only few or only one program would be required to run on it. This
factor is determined by many things.
(i) size would become smaller
(ii) Overall system cost would be reduced
(iii) System would consume much less power
08/23/21 11
System on chip (SoC)
08/23/21 12
General Purpose Processors
13
Single-purpose processors
Digital circuit designed to execute exactly
one program e.g. coprocessor, accelerator
or peripheral
Features
Contains only the components needed to
Benefits
Fast
Low power
Small size
Small Datapath
08/23/21 14
Digital Signal Processor
08/23/21 15
Application-specific processors
Programmable processor optimized for a particular
class of applications having common characteristics
Compromise between general-purpose and single-
purpose processors
Features
Program memory
Optimized datapath
Benefits
Some flexibility
08/23/21 16
Full-custom IC
Sizing transistors
Routing wires
Benefits
Excellent performance, smallest size, low power
Drawbacks
08/23/21 17
Gate Array
Features
Lower layers are fully or partially built
blocks
Benefits
Good performance, good size, less NRE cost than a
full-custom implementation (perhaps $10k to $100k)
Drawbacks
Still require weeks to months to develop
08/23/21 18
Standard Cell
Features
Instead of designing the actual silicon, the designer
uses pre-built “blocks” that have already been tested
and proven.
Benefits
Good performance, good size, less NRE cost than a
full-custom implementation (perhaps $10k to $100k)
Drawbacks
Still require weeks to months to develop
08/23/21 19
PLD (Programmable Logic Device)
08/23/21 20
PLD (Programmable Logic Device)
Drawbacks
Bigger, expensive (perhaps $30 per unit), power
hungry, slower
08/23/21 21
Independence of processor & IC technologies
Basic tradeoff
General vs. custom
08/23/21 22
Software Development
Design
Implementation
Maintenance
08/23/21 23
User Interface
08/23/21 24
Challenges and Opportunities
08/23/21 25
Implementation Issues
Computing performance
In a real time embedded control environment is not simply an
instructions- per-second rating.
While raw computational performance is important, other
08/23/21 27
Implementation Issues:
Working conditions, such as priority, allocated time and
memory or signals availability may change.
Thus, complexity, structure and basic properties of
anymore.
Validation and certification.
Any embedded control system should be proved to be
08/23/21 28
ES development methodology
08/23/21 29
Unified View of Design Process
Co Design Ladder
08/23/21 30
Embedded Systems
Instructor: Engr. Muhammad Musa
Lecture # 2
Chapter # 6
Embedded System Design
Vahid / Givargis
Bus Interfacing Techniques
Interfacing basics
Microprocessor interfacing
I/O Addressing
Interrupts
Arbitration
Hierarchical buses
Protocols
Serial
Parallel
Wireless
08/23/21 32
Introduction
08/23/21 33
What is a Bus
addr[0-11]
data[0-7]
bus
bus structure
08/23/21 34
Timing Diagrams
enable enable
addr addr
data data
tsetup twrite
tsetup tread
read protocol write protocol
data data
req 1 3
req 1 3
data 2 4 ack 2 4
data
taccess
1. Master asserts req to receive data 1. Master asserts req to receive data
2. Servant puts data on bus within time taccess 2. Servant puts data on bus and asserts ack
3. Master receives data and deasserts req 3. Master receives data and deasserts req
4. Servant ready for next request 4. Servant ready for next request
Strobe
StrobeProtocol
protocol Hand Shake
HandshakeProtocol
protocol
wait
data
req 1 3 req 1 4
wait wait 2 3
data 2 4 data 5
taccess taccess
1. Master asserts req to receive data 1. Master asserts req to receive data
2. Servant puts data on bus within time taccess 2. Servant can't put data within taccess, asserts wait ack
(wait line is unused) 3. Servant puts data on bus and deasserts wait
3. Master receives data and deasserts req 4. Master receives data and deasserts req
4. Servant ready for next request 5. Servant ready for next request
Fast Response
Fast-response case Slow Response
Slow-response case
register
Example: P0 = 0xFF; var = P1.2; P0 and P1 are 8-bit ports
Bus-based I/O
Processor has address, data and control ports that form a
single bus
Communication protocol is built into the processor
A single instruction carries out the read or write protocol
on the bus
Hence Address Decoder is required to set port addresses
of peripherals on the bus
Memory-mapped I/O
Bus has 16-bit address
lower 32K addresses may correspond to memory
upper 32k addresses may correspond to peripherals
Standard I/O (mapped I/O)
Additional pin (M/IO) on bus indicates whether a memory or
peripheral access
e.g., Bus has 16-bit address
all 64K addresses correspond to memory when M/IO set to 0
all 64K addresses correspond to peripherals when M/IO set to 1
table
Fewer bits are sent by the peripheral
ignore interrupt
Important when in the middle of time-critical code
Non-maskable: a separate interrupt pin that can’t be masked
Typically reserved for drastic situations, like power failure requiring
immediate backup of data to non-volatile memory
Jump to ISR
Some microprocessors treat jump same as call of any subroutine
Advantage:
Complete state saved (PC, registers) – may take hundreds
of cycles
Others only save partial state, like PC only
Thus, ISR must not modify registers, or else must save them first
Assembly-language programmer must be aware of which registers
stored
08/23/21 47
Chapter 1: Introduction
Memory Management
Storage Management
Distributed Systems
Special-Purpose Systems
Computing Environments
08/23/21 48
What is an Operating System?
08/23/21 49
Computer System Structure
Computer system can be divided into four components
Hardware
Operating system
users.
Application programs The way how system programs
08/23/21 50
Four Components of a Computer System
08/23/21 51
Computer Startup
08/23/21 52
Computer System Organization
Computer-system operation
One or more CPUs, device controllers connect through
memory cycles
08/23/21 53
Computer-System Operation
08/23/21 54
Common Functions of Interrupts
08/23/21 55
Interrupt Handling
08/23/21 56
I/O Structure
Option # 1 Synchronous
when I/O starts, control returns to user program only upon
I/O completion.
Wait instruction idles the CPU until the next interrupt
At most one I/O request is outstanding at a time, no
simultaneous I/O processing.
Option # 2 Asynchronous
After I/O starts, control returns to user program without
waiting for I/O completion.
System call – allow user to wait for I/O completion.
Device-status table contains entry for each I/O device
indicating its type, address, and state.
Operating system indexes into I/O device table to determine
device status and to modify table entry to include interrupt.
08/23/21 57
Two I/O Methods
Synchronous Asynchronous
08/23/21 58
Device-Status Table
08/23/21 59
Direct Memory Access Structure
08/23/21 60
Storage Structure
08/23/21 61
Storage Hierarchy
Cost
Volatility
08/23/21 62
Storage-Device Hierarchy
Size
Speed
Cost
Accessibi
lity
Volatility
08/23/21 63
Caching
08/23/21 64
Operating System Types
08/23/21 65
Requirements
08/23/21 66
Operating-System Operations
Operations Required are:
Interrupt driven by hardware / software
Software service request creates exception or trap e.g.
Opening a file is a service request
08/23/21 68
Role of Timers in Operating System
Timers are used to prevent infinite periods. it is set to interrupt
the OS after specific period
Operating system decrements counter
process concerned
Set up before scheduling process to regain control or
08/23/21 69
Process Management
A process is a program in execution. It is a unit of work within the
system.
Program is a passive entity, process is an active entity.
Process needs resources to accomplish its task
CPU, memory, I/O, files
Initialization data
completion
Multi-threaded process has one program counter per thread
Typically system has many processes running concurrently on one
or more CPUs
Concurrency is achieved by multiplexing the CPUs among the
processes / threads
08/23/21 70
Process Management Activities
Preemption vs Collaboration
The operating system is responsible for the following
activities in connection with process management:
Creating and deleting both user and system processes
Suspending and resuming processes
Providing mechanisms for process synchronization
Providing mechanisms for process communication
Providing mechanisms for deadlock handling
08/23/21 71
Memory Management
Data is in memory before and after processing
All instructions in memory in order to execute
Memory management determines what is in memory when
Optimizing CPU utilization and computer response to
users
Memory management activities
Keeping track of which parts of memory are currently
08/23/21 72
Storage Management
OS provides uniform, logical view of information storage
Abstracts physical properties to logical storage unit - file
what
OS activities include
08/23/21 73
Mass-Storage Management
Usually disks used to store data that does not fit in main memory
or data that must be kept for a “long” period of time.
Proper management is of central importance
Entire speed of computer operation hinges on disk subsystem
and its algorithms
OS activities
Free-space management
Storage allocation
Disk scheduling
(read-write)
08/23/21 74
I/O Subsystem
08/23/21 75
Protection and Security
Protection – Mechanism for controlled access of OS resources by
processes or users
Security – Defense of the system against internal and external
attacks
Authentication
Systems generally first distinguish among users, to determine
08/23/21 76
Computing Environments
08/23/21 77