(Computer structure)For the MIPS datapath shown below, several lines are marked with "X".
(a) If the line is cut at place 1. Which of the following two instructions will not work? Briefly explain why.
Add $1, $2,$3
SW $1,100($2)
(b)If the line is cut at place 2, which code snippet will not work? Briefly explain. Code snippet 1:
Add $1, $2, $3
Add $4, $1, $1
Code snippet 2:
Add $1, $2,$3
Add $4, $5,$6
(C) If the line is cut at place 3, which code snippet will not work? Briefly explain.
Code snippet 1:
Addi $1, $0,2
Addi $2, $0,2
Beq $1, $2, exit
Code Snippet 2:
Addi $1, $0,20
Addi $2. $0,10
LW $1,100($2)
Thanks for your help!
(a)
If the line is cut at place 1
the instruction that will not work is: ADD $1,$2,$3
the instruction that will work is: SW $1,100($2)
reason:
The line is cut at place 1 means cannot write to register file i.e, R-typed and any instruction with writing back to register file will not work.
in the instruction ADD $1,$2,$3 the value in register $2 and $3 is added and written into $1 but here the writing to register doesn't work so the instruction will not work.
(b)
If the line is cut at place 2
the instruction that will not work is:
ADD $1,$2,$3
ADD $4,$1,$1
the instruction that will work is:
ADD $1,$2,$3
ADD $4,$5,$6
reason:
The line is cut at place 2 means forwarding of the first operand fails i.e, the operand output from one instruction cannot become the first operand of other instruction.
ADD $1,$2,$3
ADD $4,$1,$1
In these instructions, $1 is calculated in the first instruction and is forwarded as the first operand in the next instruction so it will not work.
ADD $1,$2,$3
ADD $4,$5,$6
In these instructions, no operand is forwarded as the first operand from instruction 1 so this will work.
(c)
If the line is cut at the place 3
the instruction that will not work is:
ADDI $1,$0,2
ADDI $2,$0,2
BEQ $1,$2, exit
If the line is cut at place 2
the instruction that will work is:
ADDI $1,$0,20
ADDI $2,$0,10
BEQ $1,$2, exit
reason:
The line is cut at place 3 means jumping to branch target does not work i.e, jump to specific branch from instruction is not possible.
ADDI $1,$0,2
ADDI $2,$0,2
BEQ $1,$2, exit
In this segment of code the value of $1 is 2 and of $2 is also 2
now comparing using branch equal $1=$2 so code flow should jump to exit instruction but that does not work when line 3 is cut
ADDI $1,$0,20
ADDI $2,$0,10
BEQ $1,$2, exit
In this segment of code the value of $1 is 20 and of $2 is also 10
now comparing using branch equal $1!=$2 so there is no problem because there is no need to jump to branch.
(Computer structure)For the MIPS datapath shown below, several lines are marked with "X". (a) If the line is cut...
For the MIPS datapath shown below, several lines are marked with X. For each one: For the MIPS datapath shown below, several lines are marked with X. For each one: Describe in words the negative consequence of cutting this line relative to the working, unmodified processor. Provide a snippet of code that will fail Provide a snippet of code that will still work
Please comment the MIPS code to help me understand. Here is what the code accomplishes. Here is the code, partially commented. .data Matrix: .word 41,45,5, 34,8, 15,16,23,44,48,12,32,18,47,22,8,22 .word 46,40,42,33,13,38,27,6, 29,25,18,40,47,22,26,14,3 .word 7, 48,35,9, 43,38,9, 49,28,25,42,5, 44,10,5, 38,14 .word 46,33,16,6, 13,20,31,1, 8, 17,1, 47,28,46,14,28,7 .word 32,2, 48,25,41,29,14,39,43,46,3, 39,32,49,41,28,46 .word 5, 43,2, 48,13,4, 33,41,32,19,9, 25,30,22,2, 9, 40 .word 14,47,22,18,47,3, 35,44,18,6, 33,22,11,6, 47,50,4 .word 28,34,20,30,18,27,38,5, 26,40,37,23,16,13,37,8,7 .word 48,38,39,12,10,39,23,20,21,20,33,16,24,21,25,3,46 .word 49,38,40,38,13,47,5, 13,4, 13,23,26,12,30,29,29, 3 .word 8, 20,10,13,31,7, 12,41,12,21,28,26,43,14,35,10,19 .word 49,33,25,26,24,29,46,22,7, 5, 15,41,10,31,19,41,27 .word 48,9,...
.text main: ori $s7,$0,4097 # put a memory location in $s7 sll $s7,$s7,16 # ori $s0,$0,0x2 # put 2 into $s0 and $s0,$s0,$zero # clear $s0 ori $s0,$zero,0x2 # put 2 back into $s0 nor $s0,$s0, $zero # complement $s0 ori $s0,$zero,0x2 # put 2 back into $s0 ori $s1,$0,0x3 # put 3 into $s1 add $s2,$s0,$s1 # add beq $s2,$zero, exit sw $s2, 4($s7) # store the result...
There is an example below Now that everything is working you can try the following exercises. To complete them you will need to refer to the documentation in Appendix A The MiteASM Assembler and Appendix B The MiteFPGA Processor. Write an assembly language program for an over counter for a cricket umpire. This should 1. display a count on the 7-segment display. The count should increase by 1 when button 0 is pressed. It should reset to 0 when button...
5. Consider the SPIM code below. globl main .text main: ori $t1, $0, 10 ori $t2, $0, 11 add $t3, $t1,$t2 move $t4, $t3 The following image shows a screen shot of QtSPIM page when this program is loaded, and executed in step-by step fashion. Current instruction is highlighted. Data Text x Text Regs Int Regs [16] Int Regs [16] PC = 400028 EPC 0 Cause = 0 BadAddr = 0 Status = 3000ff10 HI LO = 0 = 0...
BUSINESS LAW Please analyze the case "Bozzio v. EMI Group, Ltd." shown below. Write a personal analysis and discussion on case that includes the following: brief intro and relate case to life, explain issue, provide ruling, and elaborate on analysis. Below is an example of response structure as well. Downey v. Bob's Discount Furniture Holdings, Inc._Case in Point 3.4 Text Page 63 by Student 1 - Sunday, August 31, 7:26 AM This case intrigued me because it raised the question...
First, read the article on "The Delphi Method for Graduate Research." ------ Article is posted below Include each of the following in your answer (if applicable – explain in a paragraph) Research problem: what do you want to solve using Delphi? Sample: who will participate and why? (answer in 5 -10 sentences) Round one questionnaire: include 5 hypothetical questions you would like to ask Discuss: what are possible outcomes of the findings from your study? Hint: this is the conclusion....
For the preparation and standardization of NaOH with KHP im supposed to boil water for 1hr and 30 min to remove CO2....the problem is that if I don't boil it for that long and (30 min) b/c of not enough time but I put the water I boiled for 1/2 hr aproximately into a NaOH bottle with a CO2 absorber and stored it there for a few days. I would assume that I would have to boil the water again...but...