Question
CSE/EEE 230 Assignment 6 Due April 25, 2016 11:59PM Submit your work online. You can scan, take a picture, etc. to capture your work to
CSE/EEE 230 Assignment 6
Due April 25, 2016 11:59PM
Submit your work online. You can scan, take a picture, etc. to capture your work to turn in. Be sure that your name and class ID are on your work.
Use this bit of code for questions 1 and 2.
add $5, $7, $2
sw $9, 4($6)
lw $4, 8($12)
or $6, $5, $3
Assume that the code is stored starting at 0x00600000, the values in the memory are all initially -1, and the register values are the same as the number (so $5 holds the value 5). Using the pipelined diagram, give the contents of each internal register at the end of the 4th clock cycle. Be specific and give the actual values placed into the register. The gray area indicates that there is no value at that point.
|
|
|
| |
Read data 1 |
|
|
|
|
Read data 2 |
|
|
|
|
Sign Extend |
|
|
|
|
|
|
|
| |
ALU Result |
|
|
|
|
Read data |
|
|
|
|
For the code, complete the control as it would be stored into the ID/EX, EX/MEM and MEM/WB registers at the end of clock cycle 4. If the control is not in that register, leave the control blank.
Instr | RegDest | ALUSrc | Mem to Reg | Reg Write | Mem Read | Mem Write | Branch | ALU Op1 | ALU Op0 |
ID/EX |
|
|
|
|
|
|
|
|
|
EX/MEM |
|
|
|
|
|
|
|
|
|
MEM/WB |
|
|
|
|
|
|
|
|
|
You will find two files posted: MIPS Pipeline Template.docx and MIPS Pipeline Template.pdf. These files are a blank version of the resource diagram. You will need to make/print 2 copies of either format. Not all clock cycles may be needed to complete the following problems.
Complete the resource diagram for the following. Assume forwarding is done. Show shading and stalls (nops).
add $6, $1, $1
lw $7, 4($6)
sub $1, $7, $7
lw $8, 4($1)
lw $7, 0($8)
The following code is to be executed using stalls and forwarding (if needed). Assume jumps and branching is determined in the ID stage and the branch is taken. Complete the resource diagram
j end
add $1, $2, $3
sub $2, $2, $1
end:
beq $1, $2, end2
add $1, $2, $3
end2:
or $1, $2, $3
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started