Sie sind auf Seite 1von 2

Roll Number:

Thapar University, Patiala


Department of Electronics and Communication Engineering
B. E. (Third year): Semester-5 Course Code: UEC509
ECE(MST September 2017) Course Name: Computer Architecture
September 20, 2017 Wednesday, 8:00 — 10.00 Hrs
Time: 2 Hours, M. Marks: 30 Name Of Faculty: SUK, SV,RK,KS

Note: Attempt all questions in order


Assume missing data, if any, suitably
All Notations carry their usual meanings

Q1 . a) Given a program
LW R3, 28(R1) (5)
LH R2, 32(R1)
ADD R4, R3, R2
ADDI R5, R3, #5
SW R4, 36(R1)
SW R5, 36(R1)
Identify the category of these DLX instructions and mention the format/fields that would
be generated/Decoded by the compiler.
b) Given
LW R3, 28(R1)
LW R2, 32(R1)
ADD R4, R3, R2
SW R4, 36(R1) (2.5)
This code is executed on DLX architecture. Calculate the average CPI and total
execution time if the clock rate is 900 MHz. Suppose the processor is replaced by a new
processor resulting in 10 times faster execution of ALU operations. Calculate the new
execution time and speedup overall.

Q2. a) A program for Calculating GCD of 3 numbers contains four routines. The following table
shows the execution parameters of the program (GCD), consisting of four routines, when (5)
running on different processors having clock frequencies as given in the table.
(IC = instruction Count.)
Suppose, Routine B, C and D in processor # I are improved by 10% and routine B and A
are also improved by 10% in processor # 2. Which processor is faster in calculating GCD
Program Name: Proc # Rtn #A Rtn #B Rtn #C Rtn #D
Processor 1 CPI = 3 CPI =10 CPI = 4 CPI = 2
GCD Calculation Freq 500 GHz IC = 30 IC = 10 IC = 20 IC = 30
Processor 2 CPI = 4 CPI = 11 CPI = 2 CPI = 6
Freq 400 GHz IC = 40 IC = 8 IC = 25 IC = 20
of 3 numbers and by how much %?
b) What are the differences between RISC and CISC architecture? Assume two values 10
(2 5)
and 20 are stored in memory locations 0x22 and 0x33, respectively. Show how a
multiplication operation of those two numbers can be performed on both the RISC and
CISC architectures? (Note: OxAA means memory address AA in HEX)

PTO
Q3. a) Briefly discuss the classifications of instruction set architectures, using suitable examples
(Stack, Accumulator, Register-Memory, Load-Store). Draw the formats Li & R type of (5)
DLX instruction and explain the implementation of pipelining in each of these with
examples.
b) For the purpose of solving a given application problem, you benchmark a program on
two computer systems. On system A, the object code executed 80 million Arithmetic
Logic Unit operations (ALU ops), 40 million load instructions, and 25 million branch
instructions. On system B, the object code executed 50 million ALU ops, 50 million (2.5)
loads, and 40 million branch instructions. In both systems, each ALU op takes I clock
cycles, each load takes 3 clock cycles, and each branch takes 5 clock cycles.

i. Compute the relative frequency of occurrence of each type of instruction executed


in both systems.
ii. Find the CPI for each system.

Q4. a) Consider the five-stage pipelined data path of DLX processor that consists of IF (4)
(instruction fetch), ID (instruction decode and register file read), EX (execution or
address calculation), MEM (data memory access) and WB (write back) stages.
(i) Draw the Complete pipeline schedule using the pipeline dataflow diagram and Explain
the structural hazard.
(ii) What are the solutions available to avoid stalls due to this hazard?(indicate in data
flow diagram)
b) Two different compilers are .being tested for a 100 MHz machine with three different
classes of instructions: Class A, Class B, and Class C, which require one, two, and three (15)
cycles (respectively). Both compilers are used to produce code for a large piece of
software. The first compiler's code uses 5 million Class A instructions, 1 million Class B
instructions, and 1 million Class C instructions. The second compiler's code uses 10
million Class A instructions, I million Class B instructions, and 1 million Class C
instructions.
(I) Which sequence will be faster according to MIPS?
(ii) Which sequence will be faster according to execution time?

*********************************BEST OF

Das könnte Ihnen auch gefallen