practicemidterm2

practicemidterm2 - ECEn 324 Practice Exam: Midterm #2 1. a....

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Rev 3.0 1 ECEn 324 Practice Exam: Midterm #2 1. In which of the following ways does the Y86 ISA differ from the x86 ISA? a. The Y86 has no condition codes. b. The Y86 has no stack-based instructions. c. No Y86 instruction accesses data memory twice. d. The Y86 has an increased number of registers. 2. The HCL code below is a correct implementation of which of the following? int Unknown = [ A <= B && B <= C : B; B <= A && A <= C : A; 1 : C; ] ; a. a 3-way word-level MUX b. a circuit to find the minimum value among a set of 3 words c. a circuit to find the median value among a set of 3 words d. a circuit to find the maximum value among a set of 3 words e. none of the above 3. Which of the Y86 instructions below matches this sequence of operations in its sequential implementation? Fetch icode:ifun M 1 [PC] rA:rB M 1 [PC+1] valC M 4 [PC+2] valP PC + 6 Decode Execute valE 0 + valC Memory Writeback R[rB] valE PC update PC valP a. irmovl b. addl c. rmmovl d. mrmovl e. rrmovl 4. Increasing the number of stages in the pipeline (say, from 5 to 6) tends to a. increase the latency and increase the throughput. b. decrease the latency and increase the throughput. c. increase the latency and decrease the throughput. d. decrease the latency and decrease the throughput.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Rev 3.0 2 5. How many data dependences on register values exist in the code below? (Remember, not all dependencies in the Y86 ISA are explicit.) irmovl $50,%eax irmovl $2,%ebx pushl %eax call sub1 a. 0 b. 1 c. 2 d. 3 6. In which stage of the Y86 pipeline is the branch outcome determined? a. fetch b. decode c. execute d. memory e. write-back 7. If the function below were to execute on PIPE, the pipelined Y86 processor with forwarding, how many instructions will obtain at least one register value through forwarding? fun: pushl %ebp rrmovl %esp,%ebp mrmovl 8(%ebp),%ecx mrmovl 12(%ebp),%eax addl %ecx,%eax popl %ebp ret a. 0 b. 1 c. 2 d. 3 e. 4 f. 5 or more 8. In optimizing a loop that includes a call to strlen with a constant return value, a typical compiler will a. leave the function call intact without analyzing the function. b. recognize the function as a library routine and thus be able to move it outside the loop.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

practicemidterm2 - ECEn 324 Practice Exam: Midterm #2 1. a....

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online