CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Consider a pipelined processor with the following four stages

IF: Instruction Fetch

ID: Instruction Decode and Operand Fetch

EX: Execute

WB: Write Back

The IF, ID and WB stages take one clock cycle each to complete the operation. The number of clock cycle for the EX stage depends on the instruction. The ADD and SUB instructions need 1 clock cycle and the MUL instructions need 3 clock cycles in the EX stage. Operands forwarding is used in the pipelined processor. What is the number of clock cycles taken to complete the following sequence of instructions?

ADD R2, R1, R0 R2 R1 + R0
MUL R4, R3, R2 R4 R3 * R2
SUB R6, R5, R4 R6 R5 - R4

A
14
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
10
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
7
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
8
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
Open in App
Solution

The correct option is D 8
Pipelined processor has 4 stages IF, ID, EX, WB

Clock Cycles Instruction

1 ADD

1 SUB

3 MUL

Consider the following diagram



So total required clocks cycle is 8.

flag
Suggest Corrections
thumbs-up
2
similar_icon
Similar questions
View More
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
The Permanent Executive
CIVICS
Watch in App
Join BYJU'S Learning Program
CrossIcon