• Home
  • Blog
  • RISC-V Pipelines computer arcitecrure

RISC-V Pipelines computer arcitecrure

0 comments

Learning Goal: I’m working on a computer science report and need an explanation and answer to help me learn.

RISC-V Pipelines
(5pts) 1. For the following questions consider the code segment below.
1
2
3
4
5
6
7
a d d i
a d d i
Loop : l d
a d d i
b l t
s d
x19 , x0 , 0 ;
x20 , x0 , 3 2 ;
x21 , 0 ( x19 ) ;
x19 , x19 , 8 ;
x19 , x20 , Loop ;
x21 , 0 ( x19 )
(1 pts) 1.a Write what the contents of each of the registers (i.e. x19, x20, x21) will be after the
first iteration.
(1 pts) 1.b Write what the contents of each of the registers (i.e. x19, x20, x21) will be after the
second iteration.
University of South Florida 1 Computer Architecture Lab

CDA 4205L Page 2 of 5
(1 pts) 1.c Write what the contents of each of the registers (i.e. x19, x20, x21) will be after the
third iteration.
(1 pts) 1.d Write what the contents of each of the registers (i.e. x19, x20, x21) will be after the
fourth iteration.
(1 pts) 1.e After the fourth iteration, line 6 will be executed. What memory address will the
contents of register x21 be stored at? What will be the contents of x21?
University of South Florida 2 Computer Architecture Lab

CDA 4205L
Modern Branch Predictions
Page 3 of 5
For this section we will consider both the 1-bit and 2-bit branch predictor. For the following
questions use the finite state machines below.
Figure 1. 1-Bit Predictor
Figure 2. 2-Bit Predictor
University of South Florida 3 Computer Architecture Lab

CDA 4205L
(2pts) 2. For the following questions consider the branch outcomes given below.
Branch Outcome 1-Bit Predictor
T
T
N
T
N
T
T
T
N
N
T
N
N
N
T
N
T
N
T
T
Page 4 of 5
(1 pts) 2.a Assume that the initial state of the 1-bit predictor is Not Taken. What is the branch
prediction rate?
(1 pts) 2.b Assume that the initial state of the 1-bit predictor is Taken. What is the branch pre-
diction rate?
University of South Florida 4 Computer Architecture Lab

CDA 4205L
(3pts) 3. For the following questions consider the branch outcomes given below.
Branch Outcome 2-Bit Predictor
T
T
N
T
N
T
T
T
N
N
T
N
N
N
T
N
T
N
T
T
Page 5 of 5
(1 pts) 3.a Assume that the initial state of the 2-bit predictor is 11. What is the branch prediction
rate?
(1 pts) 3.b Assume that the initial state of the 2-bit predictor is 00. What is the branch prediction
rate?
(1 pts) 3.c Assume that the initial state of the 2-bit predictor is 10. What is the branch prediction
rate?v

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}