341HW4.docx - CECS 341 HW 4(4.22 1-4 4.18 4.27.1 4.29 1-3...

This preview shows page 1 - 2 out of 5 pages.

CECS 341HW 4 (4.22 1-4, 4.18, 4.27.1, 4.29 1-3)4.22.1)Draw a pipeline diagram to show were the code above will stall.STUR X16, [X6, #12] LDUR X16, [X6, #8] SUB X7, X5, X4 CBZ X7, Label ADD X5, X1, X4SUB X5, X15, X4STURIFRFEXEMEMWBLDURIFIDEXEMEMWBSUBIFIDEXEMEMWBSTALLCBZIFIDEXEMEMWBADDIFIDEXEMEMWBSUBIFIDEXEMEMWB4.22.2)In general, is it possible to reduce the number of stalls/NOPs resulting from this structural hazard byreordering code?
4.22.3)Must this structural hazard be handled in hardware? We have seen that data hazards can be eliminated
explain why notThe structural hazard must be handled by hardware. A NOP can be used to resolve the data

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture