190 likes | 266 Views
CSE 102 Introduction to Computer Engineering. Central Processing Unit. Classes of Computers. Supercomputer $5-20 million Mainframe $0.5-4 million Server $10-200 thousand PC/Workstation $1-10 thousand Game console $300-$1000 Embedded device $1-$100 Future disposable 1-100 cents.
E N D
CSE 102Introduction toComputer Engineering Central Processing Unit
Classes of Computers • Supercomputer $5-20 million • Mainframe $0.5-4 million • Server $10-200 thousand • PC/Workstation $1-10 thousand • Game console $300-$1000 • Embedded device $1-$100 • Future disposable 1-100 cents
Building Computer Chips • Complex multi-step process • Slice ingots into wafers • Process wafers into patterned wafers • Dice patterned wafers into dies • Test dies, select good dies • Bond to package • Test parts • Ship to customers and make money
Microprocessor Performance Factors: What makes one microprocessor perform better than another? Microprocessors and Memory • CPU speed is influenced by several factors: • clock speed – Megahertz, Gigahertz • word size • 8-bit, 16-bit, 32-bit or 64-bit word sizes • Cache – Level 1, Level 2 caches • instruction set size
Performance vs. Design Time • Time to market is critically important • E.g., a new design may take 3 years • It will be 3 times faster • But if technology improves 50%/year • In 3 years 1.53 = 3.38 • So the new design is worse! (unless it also employs new technology)
Moore’s Law • Considering the rate of technological development, the complexity of an integrated circuit, with respect to minimum component cost will double in about 24 months (18-24).
Computer System Components Central Processing Unit Processing Data into Information Input Devices Output Devices Keyboard Mouse Touch Screen Voice... Monitor Printer Disks, Tapes, Optical Disks Secondary Storage Devices
CPU (Central Processing Unit) • The CPU executes computer instructions • Popular CPU’s: Intel-Pentium, AMD, Power PC • It is on a chip called the microprocessor • System clock • Megahertz • Has three parts: • Control Unit • ALU (Arithmetic Logic Unit) • Registers
How Computers WorkCD on CPU simulation The Instruction Cycle The Execution Cycle Fetch the Data Fetch the Instruction 3. Execute 1. Fetch Manipulate the Data Interpret the Instruction 4. Store 2. Decode Prepare Circuitry to Execute Instruction Store the Result
Code Translation(C to Assembly Language) #include<stdio.h> int main( ) { int a=10; int b=20; int c; c=a+b*2; return 0; } MOV R1, #10 MOV R2, #20 MOV R3, #2 MUL R4, R2, R3 ADD R5, R1, R4 BREAK
Code Translation(C to Machine Code) #include<stdio.h> int main( ) { int a=10; int b=20; int c; c=a+b*2; return 0; } MOV R1, #10 MOV R2, #20 MOV R3, #2 MUL R4, R2, R3 ADD R5, R1, R4 BREAK Adress Data ============== 1000 110A 1002 1214 1004 1302 1006 3423 1008 2514 100A 0000 MEMORY
Fetch from PC CPU Control Unit Adress Data ============== 1000 110A 1002 1214 1004 1302 1006 3423 1008 2514 100A 0000 110A DECODE 0001 Opcode MOV 0001 Register 0110 Data1 0100 Data2 Program Counter PC = 1000 MEMORY CPU
Registers and MOV operation 1 1 0 A 0001 0001 0000 1010 MOV 00001010 = 10 in decimal 00001010 PC = 1000 CPU
Registers and MOV operation 1 2 1 4 0001 0010 0001 0100 MOV 00010100 = 20 in decimal 00001010 00010100 PC = 1002 CPU
Registers and MOV operation 1 3 0 2 0001 0011 0000 0010 MOV 00000010 = 2 in decimal 00001010 00010100 00000010 PC = 1004 CPU
20 40 = 00101000 2 Registers and MUL operation 3 4 2 3 0011 0100 0010 0011 MUL ALU 00001010 00010100 Mul 00000010 00101000 PC = 1004 CPU
10 50 = 00110010 40 Registers and ADD operation 2 5 1 4 0010 0101 0001 0100 ADD ALU 00001010 00010100 Add 00000010 00101000 00110010 PC = 1006 CPU