Question: Write a simple MIPS program (or programs) that experiences a data hazard and a control hazard. (I would work with the code in the pic

Write a simple MIPS program (or programs) that experiences a data hazard and a control hazard. (I would work with the code in the pic below for the data hazard, and a simple control hazard is just a branch instruction where it depends on the result of the line before it). Then show a corrected program in the data hazard case.

Write a simple MIPS program (or programs) that experiences a data hazard

Program execution order (in instructions) 200 400 600 800 1000 1200 1400 Time add $4, $5, S6 Instruction Reg ALUData access Reg fetch Instruction beq $1, $2,40 Reg ALUData Reg 200 ps fetch ubble bubble Cbubble Cbubble Cbubble or $7, $8, $9 Instruction fetch ReqALUData 400 ps accessS Program execution order (in instructions) 200 400 600 800 1000 1200 1400 Time add $4, $5, S6 Instruction Reg ALUData access Reg fetch Instruction beq $1, $2,40 Reg ALUData Reg 200 ps fetch ubble bubble Cbubble Cbubble Cbubble or $7, $8, $9 Instruction fetch ReqALUData 400 ps accessS

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!