Unformatted text preview:

CS152 Computer Architecture and Engineering Lecture 4 Performance and The Design Process February 4 2004 John Kubiatowicz www cs berkeley edu kubitron lecture slides http www inst eecs berkeley edu cs152 Review Combinational Elements DeMorgan Equivalence Wire Inverter In Out 0 0 1 1 Out In NAND Gate A Out B A 0 0 1 1 A B 2 4 04 Out NOR Gate A Out B DeMorgan s Theorem A 1 1 0 0 Out Out In B Out 0 1 1 1 0 1 1 0 Out A B A B A B 0 0 0 1 1 0 1 1 In B Out 1 1 0 1 1 1 0 0 A B UCB Spring 2004 In Out 0 1 1 0 A B Out 0 0 1 0 1 0 1 0 0 1 1 0 Out A B A B Out A B 0 0 0 1 1 0 1 1 A 1 1 0 0 B Out 1 1 0 0 1 0 0 0 CS152 Kubiatowicz Review recall General C L Cell Delay Model A B X Vout Combinational Logic Cell Delay Va Vout X Cout X X X X X delay per unit load Internal Delay Ccritical Cout Combinational Cell symbol is fully specified by functional input output behavior truth table logic equation VHDL load factor of each input critical propagation delay from each input to each output for each transition THL A o Fixed Internal Delay Load dependent delay x load Linear model composes UCB Spring 2004 2 4 04 CS152 Kubiatowicz Storage Element s Timing Model Clk D Q Setup D Hold Don t Care Don t Care Clock to Q Q Unknown Setup Time Input must be stable BEFORE trigger clock edge Hold Time Input must REMAIN stable after trigger clock edge Clock to Q time Output cannot change instantaneously at the trigger clock edge Similar to delay in logic gates two components 2 4 04 Internal Clock to Q Load dependent Clock to Q UCB Spring 2004 CS152 Kubiatowicz Critical Path Cycle Time Clk Critical path the slowest path between any two storage devices Cycle time is a function of the critical path must be greater than Clock to Q Longest Path through Combination Logic Setup 2 4 04 UCB Spring 2004 CS152 Kubiatowicz The Design Process To Design Is To Represent Design activity yields description representation of an object Traditional craftsman does not distinguish between the conceptualization and the artifact Separation comes about because of complexity The concept is captured in one or more representation languages This process IS design Design Begins With Requirements Functional Capabilities what it will do Performance Characteristics Speed Power Area Cost 2 4 04 UCB Spring 2004 CS152 Kubiatowicz Design Process cont CPU Design Finishes As Assembly Design understood in terms of components and how they have been assembled Datapath ALU Top Down decomposition of complex functions behaviors into more primitive functions Regs Control Shifter Nand Gate bottom up composition of primitive building blocks into more complex assemblies Design is a creative process not a simple method 2 4 04 UCB Spring 2004 CS152 Kubiatowicz Design Refinement Informal System Requirement Initial Specification Intermediate Specification refinement increasing level of detail Final Architectural Description Intermediate Specification of Implementation Final Internal Specification Physical Implementation 2 4 04 UCB Spring 2004 CS152 Kubiatowicz Design as Search Problem A Strategy 1 SubProb 1 BB1 BB2 Strategy 2 SubProb2 SubProb3 BB3 BBn Design involves educated guesses and verification Given the goals how should these be prioritized Given alternative design pieces which should be selected Given design space of components assemblies which part will yield the best solution Feasible good choices vs Optimal choices 2 4 04 UCB Spring 2004 CS152 Kubiatowicz Measurement and Evaluation Design Architecture is an iterative process searching the space of possible designs at all levels of computer systems Analysis Creativity Cost Performance Analysis Good Ideas Bad Ideas 2 4 04 Mediocre Ideas UCB Spring 2004 CS152 Kubiatowicz Performance Two notions of performance Plane DC to Paris Speed Passengers Throughput pmph Boeing 747 6 5 hours 610 mph 470 286 700 BAD Sud Concorde 3 hours 1350 mph 132 178 200 Which has higher performance Time to do the task Execution Time execution time response time latency Tasks per day hour week sec ns Performance throughput bandwidth Response time and throughput often are in opposition 2 4 04 UCB Spring 2004 CS152 Kubiatowicz What is Time Straightforward definition of time Total time to complete a task including disk accesses memory accesses I O activities operating system overhead real time response time or elapsed time Alternative just time processor CPU is working only on your program since multiple processes running at same time CPU execution time or CPU time Often divided into system CPU time in OS and user CPU time in user program 2 4 04 UCB Spring 2004 CS152 Kubiatowicz How to Measure Time User Time seconds CPU Time Computers constructed using a clock that runs at constant rate These discrete time intervals called clock cycles or informally clocks or cycles Length of clock period clock cycle time e g 250 picoseconds or 250 ps and clock rate e g 4 gigahertz or 4 GHz which is the inverse of the clock period use these 2 4 04 UCB Spring 2004 CS152 Kubiatowicz Measuring Time using Clock Cycles CPU execution time for program Clock Cycles for a program x Clock Cycle Time One way to define clock cycles Clock Cycles for program Instructions for a program called Instruction Count x Average Clock cycles Per Instruction called CPI 2 4 04 UCB Spring 2004 CS152 Kubiatowicz Performance Calculation CPU execution time for program Clock Cycles for program x Clock Cycle Time Substituting for clock cycles CPU execution time for program Instruction Count x CPI x Clock Cycle Time Instruction Count x CPI x Clock Cycle Time CPU time Instructions x Cycles x Seconds Program Instruction Cycle CPU time Instructions x Cycles x Seconds Program Instruction Cycle CPU time Seconds 2 4 04 Program UCB Spring 2004 CS152 Kubiatowicz How Calculate the 3 Components Clock Cycle Time in specification of computer Clock Rate in advertisements Instruction Count Count instructions in loop of small program Use simulator to count instructions Hardware counter in spec register most CPUs CPI Calculate Execution Time Clock cycle time Instruction Count Hardware counter in special register most CPUs 2 4 04 UCB Spring 2004 CS152 Kubiatowicz Example Calculating CPI by averaging separately Op Freqi CPIi ALU Load Store Branch 50 20 10 20 1 2 2 2 Prod Instruction Mix Time 5 33 4 27 2 13 4 27 1 5 Where time spent What if Branch instructions twice as fast 2 4 04 UCB Spring 2004 CS152 Kubiatowicz What Programs Measure for Comparison Ideally run typical programs with typical input before


View Full Document

Berkeley COMPSCI 152 - Lecture 4 Performance and The Design Process

Documents in this Course
Quiz 5

Quiz 5

9 pages

Memory

Memory

29 pages

Quiz 5

Quiz 5

15 pages

Memory

Memory

29 pages

Memory

Memory

35 pages

Memory

Memory

15 pages

Quiz

Quiz

6 pages

Midterm 1

Midterm 1

20 pages

Quiz

Quiz

12 pages

Memory

Memory

33 pages

Quiz

Quiz

6 pages

Homework

Homework

19 pages

Quiz

Quiz

5 pages

Memory

Memory

15 pages

Load more
Loading Unlocking...
Login

Join to view Lecture 4 Performance and The Design Process and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 4 Performance and The Design Process and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?