Recall that branches take 3 cycles in the new CPU Calculating the CPI as before

Recall that branches take 3 cycles in the new cpu

This preview shows page 2 - 3 out of 3 pages.

2
Image of page 2
Table 2: The new instruction mix, frequencies, and CPIs of individual instruc- tions Operation Frequency CPI ALU Operations . 43 - . 25 × . 43 1 - . 25 × . 43 1 Loads . 21 - . 25 × . 43 1 - . 25 × . 43 2 Stores . 12 1 - . 25 × . 43 2 branches . 24 1 - . 25 × . 43 3 Register-memory . 25 × . 43 1 - . 25 × . 43 2 The performance of the new CPU is then given by: CPU time new = Instruction count new × 1 . 908 × Clock cycle time old = ( . 893 × Instruction count old ) × 1 . 908 × Clock cycle time old = 1 . 703 × Instruction count old × Clock cycle time old So, the answer to the question is no; it is a bad idea to add register-memory instructions, because they do not offset the increased execution time of slower branches. 3
Image of page 3

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture