Back
ExamFull examExam paper only

29 09 15

Full exam for Advanced Computer Architectures in the Computer Engineering degree programme at Politecnico di Milano. The document covers: Course on Advanced Computer Architectures Surname (Cognome) SOLUTION Name (Nome) POLIMI ID Number POLIMI Email Address Signature (Firma) Politecnico di Milano, Sept. 29, 2015 Prof. C. Silvano EX1A ( 3 points) EX1B ( 3 points) EX2 ( 5 points) EX3 ( 5 points) Q4 ( 5 points) Q5 ( 6

Advanced Computer ArchitecturesFull exam

Document information

What's included in this study material

Full exam for Advanced Computer Architectures in the Computer Engineering degree programme at Politecnico di Milano. The document covers: Course on Advanced Computer Architectures Surname (Cognome) SOLUTION Name (Nome) POLIMI ID Number POLIMI Email Address Signature (Firma) Politecnico di Milano, Sept. 29, 2015 Prof. C. Silvano EX1A ( 3 points) EX1B ( 3 points) EX2 ( 5 points) EX3 ( 5 points) Q4 ( 5 points) Q5 ( 6

Import quality: text was extracted directly from the original document.

Extracted content from the document

Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.

Page 1

Course on Advanced Computer Architectures Surname (Cognome) SOLUTION Name (Nome) POLIMI ID Number POLIMI Email Address Signature (Firma) Politecnico di Milano, Sept. 29, 2015 Prof. C. Silvano EX1A ( 3 points) EX1B ( 3 points) EX2 ( 5 points) EX3 ( 5 points) Q4 ( 5 points) Q5 ( 6 points) Q6 ( 6 points) TOTAL (33 points) (33 points) Course on “Advanced Computer Architectures – Prof. C Silvano EXAM 29/09/2015 – Please write in CAPITAL LETTERS Page 1 - SOLUTION EXERCISE 1A – PIPELINE BASIC (3 points) Given the following loop expressed in a high level language: for (i =0; i < N; i ++) ^ vectA[i] = vectA[i] + k ; vectC[i] = vectB[i] + vectC[i]; ` The program has been compiled in MIPS assembly code assuming that registers $t6 and $t7have been initialized with values 0 and N respectively. The symbols VECTA, VECTB and VECTC are 16-bit constant. The processor clock frequency is 1.2 GHz. Let us consider the loop executed by 5-stage pipelined MIPS processor WITHOUT any optimization in the pipeline (PLEASE don’t consider any inter-iteration dependencies) 1. Identify the RAW (Read After Write) Hazards in the pipeline scheme and identify the Hazard Type (Data Hazard or Control Hazard) in the last column 2. Identify in the first column the number of stalls to be inserted before each instruction (or between the stage IF and ID of each instruction) necessary to solve the hazards Num. Stalls INSTRUCTION C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 Hazard Type 3 FOR1:beq $t6,$t7, END IF ID EX ME WB C N T R 3 lw $t2,VECTA($t6) I F I D E X ME WB C N T R lw $t3,VECTB($t6) I F I D EX ME WB lw $t4,VECTC($t6) I F ID EX ME WB 1 addi $t2,$t2,k IF ID EX ME WB R A W $ t 2 3 sw $t2,VECTA($t6) IF ID EX ME WB R A W $ t 2 (*) add $t4,$t3,$t4 I F I D E X M E W B ( R A W $ t 4 ) 3 sw $t4,VECTC($t6) I F…

Preview

First page of the document.

First page: 29 09 15