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

Quiz

[CPSC313 Final] Midterm 1 Quiz

Zim Brightwood 42 questions

Take the quiz

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

Questions in this quiz (42)

  1. 1[blank_start]FETCH[blank_end]: Load instruction from memory, determine its length and format, and separate it into individual
    pieces.
    1. AFETCH
    2. BDECODE
    3. CEXECUTE
    4. DMEMORY
    5. EWRITE BACK
  2. 2[blank_start]WRITE BACK[blank_end]: Write values to register file.
    1. AWRITE BACK
    2. BFETCH
    3. CEXECUTE
    4. DDECODE
    5. EMEMORY
  3. 3[blank_start]DECODE[blank_end]: Determine register numbers that will be read from and written to the register file. Read values
    from register file.
    1. ADECODE
    2. BFETCH
    3. CMEMORY
    4. DWRITE BACK
    5. EEXECUTE
  4. 4[blank_start]MEMORY[blank_end]: Read or write data operands from/to memory.
    1. AMEMORY
    2. BEXECUTE
    3. CDECODE
    4. DFETCH
    5. EWRITE BACK
  5. 5[blank_start]EXECUTE[blank_end]: Do math. Set condition codes. Determine whether conditional jumps are taken or whether
    conditional moves move.
    1. AEXECUTE
    2. BDECODE
    3. CFETCH
    4. DMEMORY
    5. EWRITE BACK
  6. 6Why is the memory stage after the execute stage?
    1. ASo that execute can perform address calculations. If E was before M then mrmovl and rmmovl could not use base plus displacement addressing and pushl would be able to write to esp minus 4.
    2. BSo that we can perform math on register values. If M was before E, none of the ALU instructions (eg., addl) would work.
    3. CSo that we can write a value from memory into a calculation. If M was before E, mrmovl and popl would not work.
  7. 7Why is the execute stage after the decode stage?
    1. ASo that we can perform math on register values. If E was before D, none of the ALU instructions (e.g., addl) would work.
    2. BSo that execute can perform address calculations. If E was before D, then mrmovl and rmmovl could not use base plus displacement addressing and pushl would be able to write to esp minus 4.
    3. CSo that we can write a value from a register into the ALU. If E was before D, mrmovl and popl would not work.
  8. 8Why is the write-back stage after the memory stage?
    1. ASo that we can write a value from memory into a register. If W as before M, mrmovl and popl would not work.
    2. BSo that we can perform math on memory values. If W was before M, none of the ALU instructions (e.g., addl) would work.
    3. CSo that memory can perform address calculations. If W was before M then mrmovl and rmmovl could not use base plus displacement addressing and pushl would be able to write to esp minus 4.
  9. 9RISC instruction sets do not allow an ALU operation (e.g., addl) to read from memory.

    Explain how the structure of the pipeline leads to this restriction.
    1. AThe memory stage comes after the execute stage and so by the time we’ve read a value from memory it is too late to do math on it.
    2. BThe memory stage comes after the write back stage and so by the time we’ve read a value from memory it is too late to write it back.
    3. CThe execute stage comes after the decode stage and so by the time we've done math/logical operations it is too late to retrieve register values.
    4. DThe execute stage comes after the fetch stage and so by the time we've done math/logical operations it is too late to parse the instruction.
  10. 10RISC instruction sets do not allow an ALU operation (e.g., addl) to read from memory.

    Describe how the pipeline could be modified to lift this restriction. You may not change the number
    of pipeline stages or their basic function. Your revised pipeline does not need to be able to implement
    every Y86 instruction (in fact it would not be able to) but it must be able to execute instructions like:

    addl (%eax), %ebx #r[ebx] = r[ebx] + m[r[eax]]
    1. ASwap the order of M and E so that M comes first.
    2. BSwap the order of M and W so that W comes first.
    3. CSwap the order of E and D so that E comes first.
    4. DSwap the order of E and F so that E comes first.

Information

Description
CS313 Quiz on [CPSC313 Final] Midterm 1 Quiz, created by Zim Brightwood on 12/12/2016.
Language
English
Views
0
Tags
cs313
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?