Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following snippet of assembly includes control hazards: BEGIN LSR R 2 , R 3 , # 4 SUB R 1 , R 1 ,

The following snippet of assembly includes control hazards:
BEGIN
LSR R2, R3, #4
SUB R1, R1, R4
B END
LSL R1, R4, #2
ADD R1, R2, R5
END
AND R1, R3, R6
ADD R7, R2, R4
MOV R0, #100
B BEGIN
LDR R9,[R0, #0]
LSL R0, #3
ORR R8, R8, R7
MOV R5, R9
a. Indicate which instructions will need to be flushed for the B END and B BEGIN
instructions, and what the next instruction executed will be. Assume that this code is run
on the 5-stage processor discussed in class. Assume no forwarding, and the register file
is written to on the falling edge. Assume that there is no early branch target resolution.
Assume there is code above and below the provided code. Each part of this question is
independent from the other parts.
b. Repeat part a, but this time, assume we have implemented the logic to support early
branch resolution.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books