computer architecture ii csc/cpe 315 where software and hardware finally meet prof. franklin chapter...
TRANSCRIPT
Computer Architecture II CSC/CPE 315
Where software and hardware finally meet
Prof. Franklin
Chapter 1 – Fabrication
What is Computer Architecture?Program software
Write compilers
Design assembly language
Design processor
Optimize layout, circuits, etc
Design transistortechnology
Architecture
Instruction Set Architecture
• Provides a view of the computer to the compiler/programmer
• Performance– Compiler optimizations– Hardware optimizations
• Price– Implementation difficulty (labor)– Implementation size (manufacturing)
Processor Design
• Where software and hardware meet• Memory system, bus structure, chip
design• High-level ISA implementation (P1 vs P2)• Performance
– Cache size, # of func units, bells & whistles
• Price– Implementation difficulty (labor)– Implementation size (manufacturing)
Hardware Implementation
• Detailed logic design
• Performance– Low-level optimizations
• Price– Packaging technology
CPE 315 Topics
• What do high-level instructions get compiled down to?
• How do you build a basic machine?
• How do architects specialize the hardware to run programs quickly?
• How do programmers optimize programs to run quickly?
How to Speak ComputerHigh Level Language
Program
Assembly Language Program
Machine Language Program
Hardware
Compiler
Assembler
Machine Interpretation
lw $16, 4($2)sw $16, 0($2)sw $15, 4($2)
temp = v[k];v[k] = v[k+1];v[k+1] = temp;
1000110001100010000000000000000100011001111001000000000000010010101100111100100000000000000001010110001100010000000000000100
ALUOP[0:3] <= InstReg[9:11] & MASK
ISA
JavaHigh Level Language
Program
Assembly Language Program
Java Byte Code
Hardware
Compiler
Assembler
Virtual Machine Interpretation
lw $16, 4($2)sw $16, 0($2)sw $15, 4($2)
temp = v[k];v[k] = v[k+1];v[k+1] = temp;
1000110001100010000000000000000100011001111001000000000000010010101100111100100000000000000001010110001100010000000000000100
ALUOP[0:3] <= InstReg[9:11] & MASK
Java ISA
Java Virtual Machine Software translates each instruction
for the current hardware
ISA Machine Interpretation
Architecture
• Where software and hardware meet
• Must understand software– Programs have certain characteristics– Optimize design to take advantage of char.
• Must understand hardware– Hardware design complexity– Ease of programming– Performance– Power
Performance
• Not an absolute• Depends on application characteristics
– Graphics– General-Purpose desktop– Scientific apps– Servers
• Rapidly changing technology– DRAM speed, chip density, etc.
• This is the focus of our class
But I’m CS
• Why do I have to learn about hardware?(I hear you ask)
• Hardware is optimized to take advantage of _________________________
• If your software is different, it can get ___________ performance
• You must _________ general architecture to _________ for it.
• In ideal world, ________ would do this for you.
Which is faster?
R1 = A[5];
B[6] = R1
R3 = R0 + R2
R5 = R4 – R3
R7 = R0 + R6
C[7] = R7
R1 = A[5];
R3 = R0 + R2
R7 = R0 + R6
B[6] = R1
R5 = R4 – R3
C[7] = R7
Which is faster in C/Java?
for(i=0;i<n;i++) for(j=0;j<n;j++) A[j][i] = i*j+7;
for(i=0;i<n;i++) for(j=0;j<n;j++) A[i][j] = i*j+7;
What data structure should I use?
• Array or linked structure?
• Does it change often?
• Does it get searched often?
Growing Silicon
• Silicon is a ______ grown in a vat
• It comes out the shape of a ______
• This is called an ________
Creating Chips
• Sliced into thin discs called ______
• Etch grooves and pour metal, etc
• Cut the wafer into ______ or ______
• A flaw is called a _________
• The percentage of good ones is _______
Price vs Cost
• Price– Selling price– Supply & Demand– Little correlation to fabrication cost
• Cost– Fabrication cost– Design cost
Cost
• Cost per die
• Dies per wafer
• Yield
• Cheapest when Yield and Dies per wafer are (high / low)
Current chip trends
• Shrinking Technology–Reported in ________
–Each generation allows more to fit in same space
–_____________ gradually falls in time with same technology
Current chip trends
• Increasing Area effects:–Yield – (increases / decreases)
chance of a defect on die
–Dies/wafer – (more / fewer) dies, (more / less) wasted space
Example
• Current P4’s are 217mm2 in 0.18-micron technology. A new 0.13-micron fab process should cut the die area in half. If defects occur 1 per cm2, what are the old and new yields?
• Yield = 1 / (1 + (defectrate*area/2)) 2
OldYield:
Technology trends
• Smaller is faster, cheaper– Faster –
– Cheaper –
• Bigger holds more
• Complexity is more accurate, but large & expensive