Question: Multi - Cycle Arch. Given the following code. Assume that x and y are arrays of words and the base address of x is stored

Multi-Cycle Arch. Given the following code. Assume that x and y are arrays of words and the base address of x is stored in R1 and the base address of y is stored in R2. Assume that each add operation takes 3 cycles to execute, each lw operation 4 cycles, each store sw takes 3 cycles, and each branch (bne) instruction takes 2 cycles to execute. The"T' represents Temp registers. All numbers are in decimal.Loop:142:144:add TO, zero, zero add T1, R1, zero add T2, R2, zero add T3, zero, 101lw T4,0(T2) add T5, T4, C sw T5,0(T1) add TO, TO,1add T1, T1,4add T2, T2,4bne TO, T3,-7add TO, TO,100# TO = i =0+0=0# T1= address of x[i +0# T2= address of yi +0# Load T4 with M[T2+0] value# C is a constant value# Store T5 to M[T1+0]# Loops if branch is takenWhat is the PC value for the SW instruction?120128

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!