Assume that the five instructions identified at the top are being executed. Find
ID: 1765965 • Letter: A
Question
Assume that the five instructions identified at the top are being executed. Find the numeric value of each indicated register, and write in the dotted boxes provided (Rd is filled out in each stage as example). See the lower left box for initial conditions.
ADD $8,$10,$12 OR $4, $2, $3 AND $2, $3, $4 BEQ $8, $8, 3 LW $5,15($7) 1100 000 100 PCSrc 0 OR0 Control 4 Branc Result Result Add Sh Left Ad RegWrite1 2 emWrite 2 Read reg num A Read address Read reg data A Read reg num B Registers ata Memory Read data Read address ALUSrc Zero Result Instruction [31-0] nstruction Memory Write address Write reg num Read reg data B rite data Write reg data Initial Conditions (before any instructions are executed) PC 100010 (address of LW instruction) Each register has the value 5+register number For example $5 = 10 Memory locations have the value 200010+byte address of the word. For example Mem[8]-2008 sign 3 extend ALU control MemRead 10 4 2 1ALUOp RegDest 1 Execute stage signal ordering: RegDest, ALUOp1, ALUOp0, ALUSrc Memory stage signal ordering: Branch, MemRead, Memwrite Writeback stage signal ordering: RegWrite, MemToRegExplanation / Answer
While executing the first instruction
$8 = 8+ 5 [ register value +5] = 13
$10 = 10 + 5 [ register value +5] = 15
$12 = 12 + 5 [ register value +5] = 17
after adding this we get 13 + 15 + 17 = 45
While executing the second instruction
$4 = 4+ 5 [ register value +5] = 9
$2 = 2 + 5 [ register value +5] = 7
$3 = 3 + 5 [ register value +5] = 8
when performing OR operation for the above values we get 15
While executing the third instruction
$2 = 2 + 5 [ register value +5] = 7
$3 = 3 + 5 [ register value +5] = 8
$4 = 4+ 5 [ register value +5] = 9
when performing AND operation for the above values we get 0
While executing the forth instruction
$8 = 8 + 5 [ register value +5] = 13
$8 = 8 + 5 [ register value +5] = 13
when performing BEQ operation for the above values we get 13
While executing the fifth instruction
LW = 1000
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.