CS501 Advance Computer Architecture Assignment 2 Solution Fall 2013

Question 1:                                                                                     Marks 15

Suppose you have eight general purpose registers ( ra, rb, rc, rd, re, rf, rg and rh). You are required to complete the instruction fetch-execute cycle of register-to-register sub (subtract) and add (addition) instructions. Also specify the corresponding type of structural RTL.

You are required to solve:

1.1.   Type of structural RTL (Register Transfer Language)                               1 Mark

1.2.   Fetch-execute cycle of the register-to-register Add instruction                    7 Marks

1.3.   Fetch-execute cycle of the register-to-register Sub instruction             7 Marks

 

 

Step

RTL

T0-T2

A<–R[rb];

T3

C<–A-R[rc];

T4

D<–C-R[rd];

T5

E<–D-R[re];

T6

F<–E-R[rf];

T7

G<–F-R[rg];

T8

H<–G-R[rh];

T9

R[ra]<–h;

 

Question  2:                                                                 Marks 1+1+1+1+1=5

.                        Briefly explain the following RTL (Register Transfer Language) notations

Briefly explain the following RTL (Register Transfer Language) notations:

    i.        R [4] ß  R [3] + (-32)
The contents of the registers r3 are added with -32 and the result is stored in the register r4.

     ii.        R[2] ←R[0] ©R[5]/R[7]
Contents of register r5 are divided by the value stored in r7, result is concatenated with 0s, and stored in r2.

          iii.        R [1] ß  R [2] ~ R [5]
Logical OR of the contents of the registers r2 and r5 is obtained and the result is stored in register r1

iv.        IO[R [2]+1]ß  R[1]]
An output of the register r1 is sent to an output device (where the address of the output device is specified by the sum of the constant 1 and the value stored in the register r2

     v.        M[R [2] +14]    ß   R [4]
The contents of the register r4 are being stored to the memory location that corresponds to the sum of the constant 14 and the value stored in the register r2

 

DOWNLOAD SOLUTION HERE
loading...