Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The MOVN instruction is an r-type instruction that copies one register to another if a third register is negative. Figure A.19 (referenced in question) Variation
The MOVN instruction is an r-type instruction that copies one register to another if a third register is negative.
Figure A.19 (referenced in question)
Variation 1 MIPS (referenced in question)
Question 1. MOVN (Conditional Move if Negative) on the MIPS The MOVN instruction is an r-type instruction that copies one register to another if a third register is negative (according to the book, it has a slightly different function in the EDUMIPS simulator). MOVN rd, rs, rt ; Regs[rd] Regs [it] if Regs [rs] is a negative number. Come up with working steps for the MOVN instruction by: (a) Showing the RTL transfers needed in the EX, MEM and WB pipeline stages. (Using the same kind of notation that is in Figure A. 19; think of this as an extra column in Figure A. 19. Note that ALL instructions do the same RTL transfers in the IF and ID stages.) (b) Following the examples we did in lecture, use color to annotate a printout of the MIPS variation 1 diagram to show the components and wires used by this instruction. Draw the hardware changes that would be needed to implement the MOVN. (Focus on the datapath; you do not need to design control logic, although describing control in words at a high level will help.) Try to design the steps to require as few changes to the variation 1 MIPS as possible. Stage Any instruction IF/ID.IR + Mem(PC): IF/ID.NPC,PC (if ((EX/MEM.opcode -- branch) & EX/MEM.cond) (EX/MEM. ALUOutput) else {PC+4)); ID/EX.A Regs (1F/10. IR[rs)]; ID/EX.B + Regs[IF/ID. IR[rt)]: ID/EX.NPC IF/ID.NPC; ID/EX.IR IF/ID.IR; ID/EX.Im sign-extend(IF/ID. TR[immediate field]); ALU instruction Load or store instruction Branch instruction EX/MEM. IR = ID/EX.IR; EX/MEM. IR 1D/EX, IR EX/MEM.ALUOutput EX/MEM. ALVOutput + EX/KEM.ALUOutput 1D/EX.A func 10/EX.B; ID/EX.A + ID/EX. Imm; ID/EX.NPC + (ID/EX.immStep 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