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 ?
1
data
promptl: . asciiz "Enter the sequence number:\n"
prompt2: . asciiz "F(num) : \n"
2
3
4
. text
6.
li $v0, 4
la $a0, promptl
7
syscall
10
11
li $v0, 5
syscall
12
13
14
move $a0, v0
jal fibonacci
15
16
17
move $al, v0
18
19
20
li $v0, 4
21
la $a0, prompt2
22
syscall
23
Transcribed Image Text:1 data promptl: . asciiz "Enter the sequence number:\n" prompt2: . asciiz "F(num) : \n" 2 3 4 . text 6. li $v0, 4 la $a0, promptl 7 syscall 10 11 li $v0, 5 syscall 12 13 14 move $a0, v0 jal fibonacci 15 16 17 move $al, v0 18 19 20 li $v0, 4 21 la $a0, prompt2 22 syscall 23
23
24
li $v0, 1
25
26
move a0, $al
27
syscall
28
29
30
li $v0, 10
31
syscall
32
33
34
35
36
fibonacci:
37
addi $sp, $sp, -12
38
sw $ra, 8($ sp)
39
sw $$0, 4($ sp)
40
sw $sl, 0($ sp)
move $s0, $a0
42
li $v0, 1
43
ble $s0, 0x2, fibonacciExit
addi şa0, $ s0, -1
41
44
45
jal fibonacci
46
move $sl, v0
addi $a0, $s0, -2
47
48
jal fibonacci
49
add $v0, $sl, $vo
50
fibonacciExit:
51
52
lw $ra, 8($ sp)
lw $s0, 4($ sp)
53
lw $sl, 0($ sp)
54
55
addi $sp, $sp, 12
56
jr $ra
57
Transcribed Image Text:23 24 li $v0, 1 25 26 move a0, $al 27 syscall 28 29 30 li $v0, 10 31 syscall 32 33 34 35 36 fibonacci: 37 addi $sp, $sp, -12 38 sw $ra, 8($ sp) 39 sw $$0, 4($ sp) 40 sw $sl, 0($ sp) move $s0, $a0 42 li $v0, 1 43 ble $s0, 0x2, fibonacciExit addi şa0, $ s0, -1 41 44 45 jal fibonacci 46 move $sl, v0 addi $a0, $s0, -2 47 48 jal fibonacci 49 add $v0, $sl, $vo 50 fibonacciExit: 51 52 lw $ra, 8($ sp) lw $s0, 4($ sp) 53 lw $sl, 0($ sp) 54 55 addi $sp, $sp, 12 56 jr $ra 57
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