0% found this document useful (0 votes)
2 views10 pages

Final CA2021 Print

The document outlines the final exam for the Computer Architecture course (2021-2 semester) at Konkuk University, scheduled for December 13, 2021. It includes a series of questions with correct answers and explanations related to computer architecture concepts such as instruction execution, data handling, and cache memory. Each question is worth 5 points, and the exam duration is 60 minutes.

Uploaded by

jonghyuk111765
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views10 pages

Final CA2021 Print

The document outlines the final exam for the Computer Architecture course (2021-2 semester) at Konkuk University, scheduled for December 13, 2021. It includes a series of questions with correct answers and explanations related to computer architecture concepts such as instruction execution, data handling, and cache memory. Each question is worth 5 points, and the exam duration is 60 minutes.

Uploaded by

jonghyuk111765
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

23. 8. 24. 오후 12:24 ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.

acl

2021-2학기 컴퓨터구조(01) 기말시험 - 기말고사


응시기간 : 2021.12.13 오후 12:10 ~ 2021.12.13 오후 1:10 시험시간 : 60분

1.

(5점)

정답 : 0x1001_0000

해설 : x: 0x1001_0000 (4097), y: 0x0000_0000 (0), Add’Sub: 0 (+), LogicFn: DC, FnClass: 2

2.

(5점)

정답 : 0x0040_0038

해설 : PCSrc: 0, BrType: 0, {IncrPC,00}: DC, {NextPC,00}: 0x0040_0038

3.

ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl 1/10
23. 8. 24. 오후 12:24 ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl

정답 : 13
(5점)
해설 : Find maximum value Amax of an array A[N] and put it on $t0
where $s1: A, $s2: N, $t0: Amax, $t1: i, $t2: &A[i], $t3: A[i], $t4: Amax<A[i]
The number of executions of each instruction is executed as follows:
lw: 2
beq: 3
ALU: 8
The total number of cycles is given as 1*2+1*3+1*8=13

4.

(5점)

정답 : 51

해설 : Find maximum value Amax of an array A[N] and put it on $t0


where $s1: A, $s2: N, $t0: Amax, $t1: i, $t2: &A[i], $t3: A[i], $t4: Amax<A[i]
The number of executions of each instruction is executed as follows:
lw: 2
beq: 3
ALU: 8
The total number of cycles is given as 5*2+3*3+4*8=51

ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl 2/10
23. 8. 24. 오후 12:24 ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl

5.

(5점)

정답 : 11

해설 : RegInSrc: 1 (read from ALU)


RegWrite: 1 (write to &t0)

6.

(5점)

정답 : 10

해설 : DataRead: 1 (lw, thus data cache read)


DataWrite: 0 (no data cache write)
RetAddr: DC (lw, thus RegInSrc = 0 in Stage 5)

ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl 3/10
23. 8. 24. 오후 12:24 ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl

7.

(5점)

정답 : 010

해설 : Add’Sub: 0 (add)
LogicFn: DC (add)
FnClass: 10 (add)

8.

(5점)

정답 : x3

해설 : L14, L13, L12, and L11 are being executed in Stage 2, 3, 4, and 5, respectively. Therefore forwarding from x3 ($t2) in
Stage 4 is needed.

ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl 4/10
23. 8. 24. 오후 12:24 ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl

9.

(5점)

정답 : y2

해설 : L14, L13, L12, and L11 are being executed in Stage 2, 3, 4, and 5, respectively. Therefore y2 holds the up-to-date
imm (0), i.e., forwarding is not needed.

10.

(5점)

정답 : 0

해설 : bta: T1, L8 (taken) -> T2, L8 (taken) -> T3, L8 (taken) -> T4, L8 (taken)
Prediction: T1, O -> T2, O -> T3, O -> T4, O

ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl 5/10
23. 8. 24. 오후 12:24 ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl

11.

(5점)

정답 : 0

해설 : bta: T1, L8 (taken) -> T2, L8 (taken) -> T3, L8 (taken) -> T4, L8 (taken)
State: T0, taken (initial) -> T1, taken -> T2, taken -> T3, taken -> T4, taken
Prediction: T1, O -> T2, O -> T3, O -> T4, O

12.

(5점)

정답 : 0

해설 : bta: T1, L8 (taken) -> T2, L8 (taken) -> T3, L8 (taken) -> T4, L8 (taken)
State: T0, taken (initial) -> T1, taken -> T2, taken -> T3, taken -> T4, taken
Prediction: T1, O -> T2, O -> T3, O -> T4, O

ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl 6/10
23. 8. 24. 오후 12:24 ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl

13.

(5점)

정답 : 0x0040_0040

해설 : 0x24-0x28-0x2c(lw)-0x0c(ptr2)-0x30( jal)-0x3c(lw)-0x00(ptr1)-0x40
-0x44-0x48(beq)-0x4c-0x50-0x54-0x58(lw)-0x04(ptr1+4)-0x5c-0x60-0x64-0x68( j)
-0x44-0x48(beq)-0x4c-0x50-0x54-0x58(lw)-0x08(ptr1+8)-0x5c-0x60-0x64-0x68( j)
-0x44-0x48(beq)-0x6c( jr)
-0x34-0x38(syscall)
Therefore cache line 0 lastly filled with 0x0040_0040 and 0x0040_0044

14.

(5점)

정답 : 0x0040_0068

해설 : 0x24-0x28-0x2c(lw)-0x0c(ptr2)-0x30( jal)-0x3c(lw)-0x00(ptr1)-0x40
-0x44-0x48(beq)-0x4c-0x50-0x54-0x58(lw)-0x04(ptr1+4)-0x5c-0x60-0x64-0x68( j)
-0x44-0x48(beq)-0x4c-0x50-0x54-0x58(lw)-0x08(ptr1+8)-0x5c-0x60-0x64-0x68( j)
-0x44-0x48(beq)-0x6c( jr)
-0x34-0x38(syscall)
Therefore cache line 1 lastly filled with 0x0040_0068 and 0x0040_006c

ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl 7/10
23. 8. 24. 오후 12:24 ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl

15.

(5점)

정답 : 0x0040_0038

해설 : 0x24-0x28-0x2c(lw)-0x0c(ptr2)-0x30( jal)-0x3c(lw)-0x00(ptr1)-0x40
-0x44-0x48(beq)-0x4c-0x50-0x54-0x58(lw)-0x04(ptr1+4)-0x5c-0x60-0x64-0x68( j)
-0x44-0x48(beq)-0x4c-0x50-0x54-0x58(lw)-0x08(ptr1+8)-0x5c-0x60-0x64-0x68( j)
-0x44-0x48(beq)-0x6c( jr)
-0x34-0x38(syscall)
Therefore cache line 3 lastly filled with 0x0040_0038 and 0x0040_003c

16.

(5점)

정답 : 0x0000_0001

해설 : Swap ptr1[ptr2]@t1 and ptr1[ptr2+1]@t2, i.e., ptr1[2] = 3 and ptr1[3] = 4

ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl 8/10
23. 8. 24. 오후 12:24 ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl

17.

(5점)

정답 : 0x0000_0002

해설 : Swap ptr1[ptr2]@t1 and ptr1[ptr2+1]@t2, i.e., ptr1[2] = 3 and ptr1[3] = 4

18.

(5점)

정답 : 0x0000_0004

해설 : Swap ptr1[ptr2]@t1 and ptr1[ptr2+1]@t2, i.e., ptr1[2] = 3 and ptr1[3] = 4

ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl 9/10
23. 8. 24. 오후 12:24 ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl

19.

(5점)

정답 : 0x0000_0003

해설 : Swap ptr1[ptr2]@t1 and ptr1[ptr2+1]@t2, i.e., ptr1[2] = 3 and ptr1[3] = 4

20.

(5점)

정답 : 0x0000_0004

해설 : Swap ptr1[ptr2]@t1 and ptr1[ptr2+1]@t2, i.e., ptr1[2] = 3 and ptr1[3] = 4

ecampus.konkuk.ac.kr/ilos/pf/course/test_question_print.acl 10/10

You might also like