Assume that the following instruction sequence executes on a CPU with a 5 stage pipeline. The CPU does not have operand

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: 899604
Joined: Mon Aug 02, 2021 8:13 am

Assume that the following instruction sequence executes on a CPU with a 5 stage pipeline. The CPU does not have operand

Post by answerhappygod »

Assume that the following instruction sequence executes on a CPU
with a 5 stage pipeline. The CPU does not have operand forwarding
or branch prediction. Identify any hazards in the code and suggest
at least one way that hazards can be resolved.
MOV R4,#0
MOV R3,#9
STR
R2,[R1],#4
loop: ADD R4,R4,R5
SUBS
R3,R3,#1
BNE loop
STR R4,[R1]
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply