Practice Problems

Practice Problems - Fall 2004 NAME _ 1. Execution Time (15...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Fall 2004 NAME ___________________________________ 1. Execution Time (15 points): You are asked to choose between two approaches to reducing the impact of loads on processor performance on the multicycle datapath . For this problem, assume that R-type instructions ( add , sub , and , or , and slt ) account for 45% of all executed instructions, stores account for 15%, loads account for 20%, and branches account for 20%. Further assume that the application we are considering executes one million instructions and that the processor uses a 4 GHz clock. a. What is the execution time for the application we are considering on the machine described above? ET a is ______________ b. One architect proposes a technique that increases load execution to 6 cycles (from 5 in the original datapath). However, this technique increases the clock rate of the processor by 15%. Calculate the execution time for the given workload with this change. ET b is ________________
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Fall 2004 NAME ___________________________________ c. Another architect observes that many load instructions do not use their offset field (i.e. the offset is zero) and are closely followed by an add instruction that increments the result of the load by some other register. For example: lw r5, 0 (r8) add r5, r5, r7 This architect proposes to replace such instances with a single new instruction, law , that will perform the load and add together: law r5, r8, r7 This instruction will have the following functionality: R[r5] = M[R[r8]] + R[r7] The law instruction takes 5 cycles, and has no impact on the cycle time of the processor. Assume that 50% of loads can make use of this optimization. Calculate the execution time when using this approach. ET c is _______________
Background image of page 2
3 Fall 2004 NAME ___________________________________ 2. Impacting Performance (12 points): For the following, circle how the proposed change will impact CPI, # of instructions executed, and cycle time (i.e. an answer might be that CPI will increase, # of instructions executed will remain the same, and cycle time MAY decrease). Consider the multicycle datapath . Provide a brief justification of each answer and make sure you address each of the three components by clearly circling ONE option from each group. Loads can only use the base addressing mode – the base+offset addressing mode is completely removed from the ISA. Any load that requires base+offset addressing will need to use an add instruction before the load to perform the addition. CPI will / may increase / decrease / stay the same # instructions will / may increase / decrease / stay the same executed cycle time will / may increase / decrease / stay the same 3. Cycle Counting (6 points): For the following code: add $s1, $s2, $s3 add $s4, $s5, $s6 lw $s7, 0 ($t8) How many cycles will this take to execute on: a) the single cycle datapath we explored in class b) the multicycle datapath we explored in class c) the pipelined datapath we explored in class (assume NO hazards of any kind)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Fall 2004 NAME ___________________________________ 4. Carry Select Adder (20 points): A 1-bit carry select adder is shown below – a 1-bit adder is replicated to compute both possibilities for CarryIn (1 and 0). The CarryIn signal is then used to choose which of the Result and CarryOut signals to output for that bit of the computation.
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/18/2010 for the course CS 151B taught by Professor N/a during the Spring '10 term at UCLA.

Page1 / 25

Practice Problems - Fall 2004 NAME _ 1. Execution Time (15...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online