I1| I2| I3| I4| I5| 16 loop: 171 18| 1w t0, 0(al) al, al, 4 addi andi t1, t0, 0x1 beq addi addi addi bne ti, zero, loop

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

I1| I2| I3| I4| I5| 16 loop: 171 18| 1w t0, 0(al) al, al, 4 addi andi t1, t0, 0x1 beq addi addi addi bne ti, zero, loop

Post by answerhappygod »

I1 I2 I3 I4 I5 16 Loop 171 18 1w T0 0 Al Al Al 4 Addi Andi T1 T0 0x1 Beq Addi Addi Addi Bne Ti Zero Loop 1
I1 I2 I3 I4 I5 16 Loop 171 18 1w T0 0 Al Al Al 4 Addi Andi T1 T0 0x1 Beq Addi Addi Addi Bne Ti Zero Loop 1 (22.18 KiB) Viewed 16 times
I1| I2| I3| I4| I5| 16 loop: 171 18| 1w t0, 0(al) al, al, 4 addi andi t1, t0, 0x1 beq addi addi addi bne ti, zero, loop to, to, 1 to, to, -1 a0, a0, 10 to, zero, loop

Part(a) [5 pts] Identify all the RAW, WAR, and WAW dependencies in the above code. You only need to identify dependency within, and including, 3 instructions. e.g., from instruction k, you only need to consider the data hazards between k and instructions k + 1 and k+2. List the dependencies in the following table. You can assume branches and jumps do not incur any delay slot. The first row has been done for you as an example. Register Instruction Instruction To Dependency From al 1 2 WAR

Part (b) [5 pts] In the baseline implementation of the processor, there is no hazard detection and data forwarding circuits. Using instruction I1 to 13 above as an example, show how data hazard violation may occur and lead to incorrect program execution.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply