Quiz1 Answer 1 - PowerPoint PPT Presentation

1 / 2
About This Presentation
Title:

Quiz1 Answer 1

Description:

The CPI (Cycles Per Instruction) for the first program is the ... The opcode of the instruction. The value of the ALU zero line (if a branch is being performed) ... – PowerPoint PPT presentation

Number of Views:35
Avg rating:3.0/5.0
Slides: 3
Provided by: CIT81
Category:
Tags: answer | opcode | quiz1

less

Transcript and Presenter's Notes

Title: Quiz1 Answer 1


1
Quiz1 - Answer 1
  • The CPI (Cycles Per Instruction) for the first
    program is the sum of the frequency of each
    instruction type multiplied by the instruction
    type0.177 0.634 0.1012 0.103 5.21
  • For the second program the CPI is 1 as each and
    every instruction takes 1 cycle.
  • The 1st instructions completes in 8ns, the 2nd in
    10ns, the 3rd in 12ns, and the 4th in 14ns. So
    the speedup is28ns/14ns 2.0
  • 1000 instructions complete in 8ns 9992ns
    2006nsThe speedup is 7000ns/2006ns 3.5

Quiz1 - Answer 2
2
Quiz1 - Answer 3
  • The instruction after beq cant be fetched until
    the result of the comparison is known. It might
    be add or it might be subi. This is called a
    control hazard.
  • A solution is to stall the pipeline (not fetch
    more instructions) until the branch is resolved.
    Another solution is to predict the branch is
    taken and fetch the subi instruction. If the
    prediction is wrong ...
  • The control line PCsrc, which controls which is
    the next instruction to fetch is dependent on
  • The opcode of the instruction.
  • The value of the ALU zero line (if a branch is
    being performed)
  • The value of the Interrupt line.

Quiz1 - Answer 4
Write a Comment
User Comments (0)
About PowerShow.com