Introduction to Microprocessors Computing Systems General-purpose - - PowerPoint PPT Presentation
Introduction to Microprocessors Computing Systems General-purpose - - PowerPoint PPT Presentation
Microprocessors, Lecture 1: Introduction to Microprocessors Computing Systems General-purpose standalone systems Embedded systems ( ) 2 General-purpose standalone systems Stand-alone computer systems:
Computing Systems
2
General-purpose standalone systems Embedded systems ( هتفھن یاھ متسيس)
General-purpose standalone systems
3
Stand-alone computer systems: used for processing and data
management purposes
Example: desktop PCs, laptops, tablets, servers,
supercomputers,…
They are general-purpose: can be programmed to perform
any task
A computer is used for: web browsing, gaming, multimedia,
database server, word processing, CAD, scientific applications,…
General-purpose standalone systems
4
Desktop processors
Intel and AMD processors
Server processors
Intel, AMD, IBM, SUN, …
Tablet processors
ARM-based System-on-Chips
5
General-Purpose Processor
General-Purpose Processor Processor designed for a variety of computation tasks
Each processor has an ISA and a microarchitecture
ISA: Instruction Set Architecture
ISA determines the set of instructions that a
processor supports (and registers and addressing modes)
X86 is the dominant ISA for PCs ARM is the dominant ISA for tablets and
smartphones
6
A Simple (Trivial) Instruction Set
- pcode operands
MOV Rn, direct MOV @Rn, Rm ADD Rn, Rm 0000 Rn direct 0010 Rn 0100 Rm Rn Rn = M(direct) Rn = Rn + Rm SUB Rn, Rm 0101 Rm Rn = Rn - Rm MOV Rn, #immed. 0011 Rn immediate Rn = immediate Assembly instruct. First byte Second byte Operation JZ Rn, relative 0110 Rn relative PC = PC+ relative (only if Rn is 0) Rn MOV direct, Rn 0001 Rn direct M(direct) = Rn Rm M(Rn) = Rm
7
Sample Programs
int total = 0; for (int i=10; i!=0; i--) total += i; // next instructions... C program MOV R0, #0; // total = 0 MOV R1, #10; // i = 10 JZ R1, Next; // Done if i=0 ADD R0, R1; // total += i MOV R2, #1; // constant 1 JZ R3, Loop; // Jump always Loop: Next: // next instructions... SUB R1, R2; // i-- Equivalent assembly program MOV R3, #0; // constant 0 1 2 3 5 6 7
Compiler knows the machine instructions and translates the
programs into machine language
Hardware accelerator
8
Implementing time-consuming algorithm on hardware In processors, it is also called Co-processor Not programmable: only a fixed function
Co-Processor (accelerator) Co-Processor (accelerator) Program Memory CPU Data Memory Arbiter Arbiter Data Memory Arbiter Arbiter
Hardware accelerator
9
The most important accelerates in processors are vector
processing units (SIMD unit)
SIMD= single instruction multiple data
To accelerate processing on arrays
Processors
10
In addition to general-purpose processors, there are other
processor types
ASIP ASIC GPU
ASIP and ASIC are used in embedded systems
Application-Specific Instruction set Processor (ASIP)
11
A processor that is programmable
A general purpose processor + specific hardware resource
The instruction-set is optimized for a group of applications
Base instruction set + customized instructions
Specific hardware resource implements the customized
instructions
Examples:
DSPs (Digital Signal Processor) NPs (Network Processor) GPUs (Graphical Processing Unit) …
Application Specific Instruction-set Processor
Program with basic instructions set I
t1 = a * b; t2 = b * 0xf0;; t3 = c * 0x12; t4 = t1 + t2; t5 = t2 + t3; t6 = t5 + t4; Custom Logic
* * * + + +
0xf0 0x12 a b c
Execution time: 9 clock cycles
*: 2 clock cycles +: 1 clock cycles
Application Specific Instruction-set Processor (cont’d)
* * * + + +
0xf0 0x12 a b c
Program with extended instructions
t1 = extop1(a, b, 0xf0); t2 = extop2(b, c, 0xf0, 0x12); t3 = t1 + t2;
Execution time: 5 clock cycles Speedup: 1.8
extops: 2 clock cycles +: 1 clock cycles
Extended Instruction Set: I∪extop1 ∪expop2 extop1 extop2
ASIP example- DSP
A Digital signal Processor (DSP) has instructions that
efficiently executes the common signal processing algorithms
Typical DSP algorithms includes:
Filtering, DFT, DCT Speech and image: Compression, decompression, encryption,
decryption
Modems: Equalization, noise and echo cancellation, better SNR Communication channel: encoding, decoding, equalization
14
ASICs
Application-specific IC Digital circuit designed to execute
- ne program
Features
Contains only the components needed
to execute a single program
No program memory
Benefits
Fast (optimized) Low power Small size
Design spectrum
Excellent tradeoff between efficiency of ASICs and flexibility of
CPUs
GPU
17
Graphic processing unit Used for graphic processing and other parallel algorithms
Embedded System
18
Embedded systems: information processing systems that are
embedded into a larger product and that are normally not directly visible to user
Single or limited purpose: designed to perform a single or a
group of similar tasks
An embedded system may perform
A single task that remains fixed during the system life-time
example: video-projector, printer,…
A group of tasks
Example: a cell phone
Embedded systems
19
More than 90% of computer systems are embedded!
Embedded systems- classification
20
Monitoring and control functions
Vehicle control, power plant control
Information-processing functions
Telecommunication switches, Multimedia (mp3 player), etc.
A simple LCD board controller A complex telecommunication switch
Embedded systems
21
Simple embedded systems are often use microcontrollers Large and complex embedded systems are composed of
many devices such as FPGAs, CPUs, ASIPs, hardware accelerates, memory modules, interfaces, analog devices,….
Embedded systems- general picture
22
Different application type have different requirements and characteristics
Embedded systems-control-based
23
Most peripherals are organized to monitor the outside world
and control it
Do not require large data storage and transfer Reliability, low-cost, and low-power operation is important Microcontrollers are the best choice for this purpose A processor core with many peripheral integrated inside a
single chip
Microcontrollers
24
A smaller computer
On-chip RAM, ROM, I/O ports... Example AVR, Intel’s 8051, Zilog’s Z8, and PIC 16X
General Purpose Micr General Purpose Micropr
- processor
cessors
- vs. Micr
- vs. Microcontr
- controller
- llers
25
Most common microcontrollers
26
8-bit microcontrollers
AVR PIC HCS12 8051
32-bit microcontrollers
ARM PIC32
Introduction
Technological advances Today’s chip can contains 7 billion transistors The consequences Components connected on a board can now be
integrated onto single chip
Hence the development of system-on-chip design
27
SoC
An SoC may contain
Custom hardware blocks
A.K.A. Hardware accelerator
DSP blocks Embedded CPU Embedded Memory Real World Interfaces (USB,
PCI, Ethernet)
Software (both OS and
Applications)
Mixed-signal Blocks
DAC, ADC
FPGAs
28
SoC evolution
29
SoC Example- a handheld device
30
SoC benefits
31