100%(4)4 out of 4 people found this document helpful
This preview shows page 1 - 3 out of 10 pages.
CS251 S16 Assignment 04 Due Monday July 04 10pm 60 Total Marks Q1. (10 marks) This question refers to the pipelined datapath without forwarding and branching is determined in the MEM stage. Consider the instructions 100 lw $3, 10($1) 104 sw $2, 10($6) 108 add $3, $4, $5 112 beq $4, $5, -6 In this figure, the instructions have been drawn above the appropriate stage that they are in. In the figure below, label all of the control signals listed in each stage with their appropriate values for the given instruction in that stage. (0, 1 or X)
Q2. (15 marks) This question uses the pipelined datapath without forwarding. Branching is determined in the MEM stage. Consider the following MIPS code sequence 104 lw $3, 16($4) 108 subi $3, $2, 100 112 sw $3, 4($8) 116 addi $8, $9, 32 120 beq $3, $4, -6 Consider the situation when the lw instruction is in the WB stage, the subi instruction is in the MEM stage, the sw instruction is in the EX stage, the addi instruction is in the ID stage and the final beq struction is in the IF stage(line 120). Below, there is a figure of the pipelined datapath without forward- ing. In the figure, a total of ten dark lines are drawn. Note: All the marked dark wires are horizontal. a)(5 marks) Five of dark lines have been placed on control signal wires of the pipeline. Considering the control signal names next to the dark lines (on the left hand side of the equal sign), write for each the binary value that travels along for that label, given the instructions present in that stage of the pipeline. in-