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

Course: ((computer architecture))

image text in transcribed

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 = 1 = 0+0 = 0 # T1 = address of x[i] + 0 # T2 = address of y[i] + 0 Loop: addi To, zero, zero add2 T1, R1, zero add3 T2, R2, zero add4 T3, zero, 201 lw 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+O]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 with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

State the uses of job description.

Answered: 1 week ago

Question

Explain in detail the different methods of performance appraisal .

Answered: 1 week ago