Professional Documents
Culture Documents
Confidential EE/TEST 2/MAR-JULY 2021/ELE654: This Test Paper Consists of 3 Printed Pages
Confidential EE/TEST 2/MAR-JULY 2021/ELE654: This Test Paper Consists of 3 Printed Pages
Confidential EE/TEST 2/MAR-JULY 2021/ELE654: This Test Paper Consists of 3 Printed Pages
INSTRUCTIONS TO CANDIDATES:
1. This test paper consists of 3 questions with a maximum total of 40 marks. Answer ALL
questions.
2. The Estimation Student Answering Time (E-SAT) is also shown for each question.
3. Start answering each question on a new page.
4. Please attach this cover page with your answer script.
Detach this section and submit to DMU, Level 9, FKE
----------------------------------------------------------------------------------------------------------------------------------------------------------
FILL IN THE FOLLOWING PARTICULARS:
1. Name : ____________________________________________
2. I/D UiTM :
4. Group : EE_______
5. LECTURER : ____________________________________________
Q1 1 PO1 5
Q2 2 PO2 10
Q3 1 PO1 15
Q4 1 PO1 10
TOTAL 40
QUESTION 1 (5 Marks)
Consider the following two code snippets. Assume R1 holds i and that R0 holds the
base address of the vals array.
int i; int i;
int vals[200]; int vals[200];
for (i=0; i < 200; i=i+1) for (i=199; i >= 0; i = i-1)
vals[i] = i; vals[i] = i;
(a) (b)
In this problem , you will modify the single-cycle datapath we build in Lab4 to support LDRB.
The datapath that we will start with is provided in Figure Q2. Your job is to implement the
necessary data and control signals to support LDRB instruction, which we define to have the
following semantics:
Mark up a copy of Figure Q2 to indicate the changes to the datapath. Name any new
control signals.
Figure Q2
Suppose a CPU with 32-bit instructions has an instruction cache with block size of 16-
bytes.Addresses refer to bytes in memory. The cache is initially empty. Instructions are then
fetched from the following addresses in order:
a)For each fetch, determine whether the cache hits or misses. Assume no lines are replaced
during execution of the sequence.
b)If you use a direct mapped cache with a cache size of 1 KB and a block size of 8 bytes (2
words), how many sets are in the cache?
End of Questions