Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(((Course: computer architecture))) a. What is the size of the memory word used to store the instructions and data? b. What happens when T0 is

image text in transcribed

(((Course: computer architecture)))

a. What is the size of the memory word used to store the instructions and data? b. What happens when T0 is equal to T3? c. How many instructions are fully executed when running the above code? d. How many cycles are needed to execute the code (including all iterations)? e. Calculate the average CPI (cycles per instruction)? f. Calculate the Branch Target Address when branch is taken?

Problem-5: Assume that x and y are arrays of words and the base address of x is in R1 and the base address of y is in R2. If ALU instruction (add) takes 1 cycle to execute, load and store (lw and sw) take 5 cycles to execute, and the branch (bne) instruction takes 3 cycles to execute. The "T" represents Temp registers. All numbers are in decimal; # TO = i = 0+0 = 0 # T1 = address of x[i] + 0 # T2 = address of y[i] + 0 Loop: add1 To, zero, zero add2 T1, R1, zero add3 T2, R2, zero add4 T3, zero, 201 Iw T4, 0(T2) add5 T5, T4, C sw T5, 0(T1) add6 TO, TO, 1 add7 T1, T1,4 add8 T2, T2,4 bne TO, T3, -7 add9 TO, TO, 200 # Load T4 with M[T2+0]value # C is a constant value # Store T5 to M[T1+0] 140: 144: # Loops if branch is taken

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David M. Kroenke, David Auer

11th Edition

B003Y7CIBU, 978-0132302678

More Books

Students also viewed these Databases questions