Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following RISC V Code ( use this data for both ( a ) and ( b ) subparts: addi s 0 , zero,

Consider the following RISC V Code (use this data for both (a) and (b) subparts:
addi s0, zero, 2
L1:
lw t1,0(s1)
beq t1, s2, FD
addi s1, s1,4
addi s0, s0,-1
bne s0, zero, L1
jal zero, NFD
FD: addi s0, zero, 1
NFD: sw s0,0(s3)
[Assume that s1 contains 0x10010000, which is starting
address of an array which consists of words which are
powers of 2 till 16.
e.g.
0x00000001,0x00000002,0x00000004,...
0x00000010.
Assume s2 contains 0x00000002]
(a) Assume that normal 5-stage pipelined processor (discussed in class), which supports EX-to-EX and
MEM-to-EX forwarding and Hazard detection, is used to execute the above program. Assume the
processor uses predict not-taken static branch predictor. For each instruction, determine the clock cycle
(numbers) in which it enters IF, ID, EX, Mem and WB stage. If any instruction does not enter a particular
pipeline stage, then you can mark NA or in the corresponding column. If any instruction is executed
more than once, all the clock cycle numbers in which the instruction enters the pipeline stage should be
mentioned separated by a semicolon. [For example, if lw t1,0(s1) instruction enters instruction fetch twice
(because of looping) once in 2nd clock cycle and second time in 11th clock cycle then in the column
corresponding to IF you have to write 2; 11]

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_2

Step: 3

blur-text-image_3

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

Advances In Databases And Information Systems Uropean Conference Adbis 2020 Lyon France August 25 27 2020 Proceedings Lncs 12245

Authors: Jerome Darmont ,Boris Novikov ,Robert Wrembel

1st Edition

3030548317, 978-3030548315

More Books

Students also viewed these Databases questions

Question

Write a program to check an input year is leap or not.

Answered: 1 week ago

Question

Write short notes on departmentation.

Answered: 1 week ago

Question

What are the factors affecting organisation structure?

Answered: 1 week ago

Question

What are the features of Management?

Answered: 1 week ago

Question

Briefly explain the advantages of 'Management by Objectives'

Answered: 1 week ago

Question

Explain how cultural differences affect business communication.

Answered: 1 week ago

Question

List and explain the goals of business communication.

Answered: 1 week ago