GoConqr has a new look! Let us know what you think.

Quiz

CPSC313 Midterm Sample

Zim Brightwood 31 questions

Take the quiz

This quiz has question types that open in the usual player.

Questions in this quiz (31)

  1. 11a) The classic RISC pipeline consists of 5 stages, what are they?
    1. AFetch, Decode, Execute, Memory, Write back
    2. BFetch, Register, Execute, Memory, Write back
    3. CLoad, Register, Execute, Memory, Write-read
    4. DFetch, Register, Execute, Memory, Load-use
    5. ELoad, Register, Execute, Memory, Control
  2. 21b) Fetch is responsible for which actions? Check all that apply.
    1. AUse pc to read next instruction from memory into instruction register
    2. BDetermine instruction length and extract pieces of instruction
    3. CAdvance the pc to the address of next instruction in sequence
    4. DRead values from register file
    5. EUpdate the pc for taken jump instructions
  3. 31c) Which of the following is a decode action?
    1. Aread values from register
    2. Bdetermine instruction length and extract pieces of instruction
    3. Caccess main memory
    4. Ddecode the difficulty of this course into a binary representation of tears and not tears
  4. 41d) Which of the following is an execute stage action?
    1. Aperform ALU operations and determine whether jumps are taken
    2. Bset the pc for taken jumps
    3. Caccess main memory
    4. Dcry profusely into a bowl of alphabits hoping they'll arrange themselves into the proper values for the next stage
  5. 51e) Which of the following is a memory stage action?
    1. Aaccess main memory, duhhhhhhhhhh
    2. Baccess main memory and write the values back to the register file, duhhhhhhhhhhh
    3. Cwhen in doubt choose c
    4. Dadvance the pc to the next memory address in the sequence
  6. 61f) Which of the following is a write back stage action?
    1. Awrite values back to register file
    2. Bwrite values back to main memory
    3. Cwrite values back to the pc
    4. Dforge your computer science degree when failing this course leads you into months of crippling depression
  7. 72a) Why is the memory stage after the execute stage? Include a Y86 instruction that could not be implemented if you reversed the order.
    1. AExecute needs to perform address calculations. mrmovl could not use base plus displacement addressing
    2. BExecute needs to perform math on register values. None of the op instructions would work (i.e. addl)
    3. CMemory needs to write a value from memory into a register. mrmovl would not work if the order was reversed.
    4. DMemory needs to read from memory in order for execute to work properly. ret would not work if the order was reversed.
  8. 82b) Why is the execute stage after the decode stage? Include a Y86 instruction that could not be implemented if you reversed the order.
    1. AExecute needs to be able to perform math on register values. If the order were reversed, none of the op instructions would work (i.e. addl)
    2. BExecute needs to perform address calculations. If the order were reversed, mrmovl would not work.
    3. CDecode needs to write a value from memory into a register. mrmovl would no longer work if the order was reversed.
    4. DDecode needs to read the values before execute stage to avoid stalling. popl would no longer work if the order was reversed.
  9. 92c) Why is the write-back stage after the memory stage? Include a Y86 instruction that could not be implemented if you reversed the order.
    1. AMemory needs to perform math on memory values. In the reverse order, none of the op instructions would work (i.e. addl)
    2. BMemory needs to perform address calculations. In the reverse order, mrmovl and rmmovl would not work.
    3. CWrite back needs to be able to write a value from memory into a register. In the reverse order, mrmovl would not work.
  10. 103a) RISC instruction sets do not allow ALU operations to read from memory. Explain how the structure of the pipeline leads this restriction.
    1. ASince M comes after E, by the time we read the value from memory, it's too late.
    2. BSince M comes before E, by the time we read the value from memory, it's too late.
    3. CSince E comes after M, by the time we read the value from memory, it's too late.

Information

Description
For when life gives you all the lemons
Language
English
Views
56
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?