Complete the following table using the codes attributed. Provide how many instructions of the given categories are executed while finding the F(6) and calculate the total clock cycles.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

Complete the following table using the codes attributed. Provide how many instructions of the given categories are executed while finding the F(6) and calculate the total clock cycles. 

Category Instructions CPI(Clock Cycle per Instruction) Instruction Count
A: Arithmetic and Comparison add, addu, sub, slt, etc.. 1 ?
B: Memory lw, sw 8 ?
D: Branch and Jump beq, bnq, j, jal 2 ?
45 beqz $a0,zero
46 beg $a0,1,one
47
48
49
sub $ sp,$ sp,4
50
sw $ra,0($ sp)
51
52
sub $a0,$ a0,1
53
jal F
54
add $a0,$ a0,1
55
lw $ra,0($ sp)
56
57
add $sp,$ sp,4
58
59
60
sub $ sp,$ sp,4
61
sw $v0,0($sp)
62
sub $ sp,$ sp,4
sw $ra,0($ sp)
63
64
65
66
sub $a0,$ a0,2
67
jal F
68
add $a0,$ a0,2
69
70
lv $ra,0($ sp)
71
add $sp,$ sp,4
72
lv $s7,0($ sp)
add $ sp,$ sp,4
73
74
75
76
add $v0,$v0,$s7
77
jr $ra
78
79
zero:
80
li $v0,0
81
jr $ra
82
one:
83
li $v0,1
84
jr $ra
85
86
. data
87
prompt: . asciiz "
Program calculates the
Fibonacci sequence using recursive functions. \n Enter a non-negative number: "
88
result:
.asciiz "F "
result2: . asciiz "
asciiz "n".
89
endl:
Transcribed Image Text:45 beqz $a0,zero 46 beg $a0,1,one 47 48 49 sub $ sp,$ sp,4 50 sw $ra,0($ sp) 51 52 sub $a0,$ a0,1 53 jal F 54 add $a0,$ a0,1 55 lw $ra,0($ sp) 56 57 add $sp,$ sp,4 58 59 60 sub $ sp,$ sp,4 61 sw $v0,0($sp) 62 sub $ sp,$ sp,4 sw $ra,0($ sp) 63 64 65 66 sub $a0,$ a0,2 67 jal F 68 add $a0,$ a0,2 69 70 lv $ra,0($ sp) 71 add $sp,$ sp,4 72 lv $s7,0($ sp) add $ sp,$ sp,4 73 74 75 76 add $v0,$v0,$s7 77 jr $ra 78 79 zero: 80 li $v0,0 81 jr $ra 82 one: 83 li $v0,1 84 jr $ra 85 86 . data 87 prompt: . asciiz " Program calculates the Fibonacci sequence using recursive functions. \n Enter a non-negative number: " 88 result: .asciiz "F " result2: . asciiz " asciiz "n". 89 endl:
.text
2
main:
4
la $a0,prompt
li $v0,4
syscall
7
li $v0,5
syscall
10
11
move $t2,$vo
12
13
14
move $a0,$t2
15
move $v0,$t2
16
jal F
17
move $t3,$vo
18
la $a0,result
li $v0,4
19
20
21
syscall
22
23
move $a0,$t2
24
li $v0,1
25
syscall
26
27
la şa0,result2
28
li $v0,4
29
syscall
30
31
move şa0,$t3
32
li $v0,1
33
syscall
34
la $a0,endl
li $v0,4
35
36
37
syscall
38
39
40
li $v0,10
41
syscall
42
43
F:
44
45 begz $a0,zero
Transcribed Image Text:.text 2 main: 4 la $a0,prompt li $v0,4 syscall 7 li $v0,5 syscall 10 11 move $t2,$vo 12 13 14 move $a0,$t2 15 move $v0,$t2 16 jal F 17 move $t3,$vo 18 la $a0,result li $v0,4 19 20 21 syscall 22 23 move $a0,$t2 24 li $v0,1 25 syscall 26 27 la şa0,result2 28 li $v0,4 29 syscall 30 31 move şa0,$t3 32 li $v0,1 33 syscall 34 la $a0,endl li $v0,4 35 36 37 syscall 38 39 40 li $v0,10 41 syscall 42 43 F: 44 45 begz $a0,zero
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY