Microprocessors, Lecture 1: Introduction to Microprocessors
Computing Systems � General-purpose standalone systems � Embedded systems ( هتفھن یاھ متسيس ) 2
General-purpose standalone systems � 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,… 3
General-purpose standalone systems � Desktop processors � Intel and AMD processors � Server processors � Intel, AMD, IBM, SUN, … � Tablet processors � ARM-based System-on-Chips 4
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 5
A Simple (Trivial) Instruction Set Assembly instruct. First byte Second byte Operation MOV Rn, direct 0000 Rn direct Rn = M(direct) MOV direct, Rn 0001 Rn direct M(direct) = Rn Rm MOV @Rn, Rm 0010 Rn M(Rn) = Rm MOV Rn, #immed. 0011 Rn immediate Rn = immediate ADD Rn, Rm 0100 Rn Rm Rn = Rn + Rm SUB Rn, Rm 0101 Rn Rm Rn = Rn - Rm JZ Rn, relative 0110 Rn relative PC = PC+ relative (only if Rn is 0) opcode operands 6
Sample Programs C program Equivalent assembly program 0 MOV R0, #0; // total = 0 1 MOV R1, #10; // i = 10 2 MOV R2, #1; // constant 1 3 MOV R3, #0; // constant 0 Loop: JZ R1, Next; // Done if i=0 int total = 0; 5 ADD R0, R1; // total += i for (int i=10; i!=0; i--) 6 SUB R1, R2; // i-- total += i; 7 JZ R3, Loop; // Jump always // next instructions... Next: // next instructions... � Compiler knows the machine instructions and translates the programs into machine language 7
Hardware accelerator � Implementing time-consuming algorithm on hardware � In processors, it is also called Co-processor � Not programmable: only a fixed function Co-Processor Co-Processor CPU (accelerator) (accelerator) Arbiter Arbiter Arbiter Arbiter Program Data Data Memory Memory Memory 8
Hardware accelerator � The most important accelerates in processors are vector processing units (SIMD unit) � SIMD= single instruction multiple data � To accelerate processing on arrays 9
Processors � In addition to general-purpose processors, there are other processor types � ASIP � ASIC � GPU � ASIP and ASIC are used in embedded systems 10
Application-Specific Instruction set Processor (ASIP) � 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) � … 11
Application Specific Instruction-set Processor Program with basic instructions set I t 1 = a * b; t 2 = b * 0xf0; ; Custom t 3 = c * 0x12; Logic t 4 = t 1 + t 2 ; t 5 = t 2 + t 3 ; t 6 = t 5 + t 4 ; a b c 0xf0 0x12 * * * + + *: 2 clock cycles +: 1 clock cycles + Execution time: 9 clock cycles
Application Specific Instruction-set Processor (cont ’ d) Program with extended instructions t 1 = extop1(a, b, 0xf0); t 2 = extop2(b, c, 0xf0, 0x12); t 3 = t 1 + t 2 ; a b c 0xf0 0x12 * * * + + extop1 + extop2 Extended Instruction Set: I ∪ extop1 extops: 2 clock cycles +: 1 clock cycles ∪ expop2 Execution time: 5 clock cycles Speedup: 1.8
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 one 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 � Graphic processing unit � Used for graphic processing and other parallel algorithms 17
Embedded System � 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 18
Embedded systems � More than 90% of computer systems are embedded! 19
Embedded systems- classification � 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 20
Embedded systems � 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,…. 21
Embedded systems- general picture Different application type have different requirements and characteristics 22
Embedded systems-control-based � 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 23
Microcontrollers � A smaller computer � On-chip RAM, ROM, I/O ports... � Example AVR, Intel’s 8051, Zilog’s Z8, and PIC 16X 24
General Purpose Micr General Purpose Micropr oprocessor cessors vs. Micr vs. Microcontr ocontroller ollers 25
Most common microcontrollers � 8-bit microcontrollers � AVR � PIC � HCS12 � 8051 � 32-bit microcontrollers � ARM � PIC32 26
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 � Reduce size � Low cost � Reuse � Low power � High performance � High reliability 31
Recommend
More recommend