Reg ir 26 31 to control fsm causewrite1 out pcsource

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: struction takes one cycle Each one Spring 2014, Feb 14 . . . Spring ELEC 5200-001/6200-001 Lecture 5 6ns 8ns 7ns 5ns 2ns 8ns 8ns 65 Performance Parameters Performance Average cycles per instruction (CPI) Cycle time (clock period, T) Execution time of a program For single-cycle datapath: CPI = 1 T = hardware time for lw instruction Execution time of a program = T × CPI × (Total instructions executed) Spring 2014, Feb 14 . . . ELEC 5200-001/6200-001 Lecture 5 66 Multicycle Datapath Clock cycle time is determined by the Clock longest operation, ALU or memory: longest Clock cycle time = 2ns Cycles per instruction: lw lw sw sw R-type R-type beq beq j Spring 2014, Feb 14 . . . Spring 5 4 4 3 3 ELEC 5200-001/6200-001 Lecture 5 (10ns) (8ns) (8ns) (6ns) (6ns) 67 CPI of a Multicycle Computer = ∑k (Instructions of type k) × CPIk —————————————— ∑k (instructions of type k) CPIk = Cycles for instruction of type k Note: CPI is dependent on the instruction mix of the program being run. Standard benchmark programs are used for specifying the performance of CPUs. CPI where Spring 2014, Feb 14 . . . Spring ELEC 5200-001/6200-001 Lecture 5 68 Example Consider a program containing: loads loads stores stores branches branches jumps jumps Arithmetic CPI CPI Spring 2014, Feb 14 . . . Spring 25% 10% 11% 2% 52% = 0.25×5 + 0.10×4 + 0.11×3 + ×5 0.02×3 + 0.52×4 0.02×3 = 4.12 for multicycle datapath = 1.00 for single-cycle datapath ELEC 5200-001/6200-001 Lecture 5 69 Multicycle vs. Single-Cycle Performance ratio = Single cycle time / Multicycle time = (CPI × cycle time) for single-cycle ——————————————— (CPI × cycle time) for multicycle = 1.00 × 8ns ————— 4.12 × 2ns = 0.97 Single cycle is faster in this case, but is it always so? Spring 2014, Feb 14 . . . Spring ELEC 5200-001/6200-001 Lecture 5 70 Consider Another Example For this program: loads loads stores stores branches branches jumps jumps Arithmetic CPI CPI Spring 2014, Feb 14 . . . Spring 5% 5% 30% 10% 50% = 0.05×5 + 0.05×4 + 0.30×3 + ×5 0.10×3 + 0.50×4 0.10×3 = 3.65 for multicycle datapath = 1.00 for single-cycle datapath ELEC 5200-001/6200-001 Lecture 5 71 Multicycle vs. Single-Cycle Performance ratio = Single cycle time / Multicycle time = (CPI × cycle time) for single-cycle ——————————————— (CPI × cycle time) for multicycle = 1.00 × 8ns ————— 3.65 × 2ns = 1.096 Multicycle is faster in this case, so the performance ratio depends on the instruction mix. Can we do better? Spring 2014, Feb 14 . . . Spring ELEC 5200-001/6200-001 Lecture 5 72 Next: Pipelining Spring 2014, Feb 14 . . . Spring ELEC 5200-001/6200-001 Lecture 5 73...
View Full Document

Ask a homework question - tutors are online