Question
Bonus problem. Installed PathSim (http://www.cs.sbu.edu/PathSim5/) and execute the following program on PathSim. Take two screen shots: one before the execution (after register and memory data
Bonus problem. Installed PathSim (http://www.cs.sbu.edu/PathSim5/) and execute the following program on PathSim. Take two screen shots: one before the execution (after register and memory data loaded) and the other at the end of all instruction execution. Also, answer the question: how many instructions executed?
Assembly code: (note: offset/immediate data are in hex format.)
lw $t0, 48($zero)
lw $t1,48($zero)
beq $t0, $t1, 2
sw $t1, 80($zero)
add $t2, $t1, $t0
addi $t3, $zero, 46
beq $t3, $zero, 1
sw $t2, 28($t1)
sw $t3,32($t1)
DM: (Data Memory)
Location Contents
048 00000028
060 00000220
080 00000046
Register:
7: 00000122
8: 00000025
9: 00000046
10: 00000241
Step-by-step Instruction
(1) Load the above program to instruction memory
(1) Load the above register data to register file
(2) Load the above memory data to data memory
(3) Step through the instruction execution cycle by cycle by clicking on PC until the end of execution.
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