Pacific-Design.com

    
Home Index

1. Embedded Systems

2. Processor

Embedded Systems / Processor /

+--------------------------------------------------------------------------------------------------+
| Question 1.3.1 Which processor has the highest performance expressed in instructions per second? |
+--------------------------------------------------------------------------------------------------+

  
Processor Clock Rate CPI
P1 3.0 GHz 1.5
P2 2.5 GHz 1.0
P3 4.0 GHz 2.2
P1 2.0 GHz 1.2
P2 3.0 GHz 0.8
P3 4.0 GHz 2.0
Instruction Count * CPI CPU Time = -------------------------------- Clock Rate CPU time * Clock Rate CPI = -------------------------------- Instruction Count 1 IPC = -------------------------------- CPI Instruction Count IPC = -------------------------------- CPU Time * Clock Rate Part A.) 1.) IC * 1.5 --------------- = IC * 0.5* 10^-9 3 * 10^9 2.) IC * 1 --------------- = IC * 0.4* 10^-9 2.5 * 10^9 3.) IC * 2.2 --------------- = IC * 0.55 * 10^-9 4 * 10^9 P2 Processor is the fastest Part B .) 1.) IC * 1.2 ---------------- = IC * 0.6^10-9 2 * 10^9 2.) IC * 1.8 1.8 ---------------- = IC * ----- * 10^-9 = IC * 0.27 * 10^-9 3 * 10^9 3 3.) IC * 2 2 ---------------- = IC * ----- * 10^-9 = IC * 0.5 * 10^-9 4 * 10^9 4 P3 Processor is again faster +-------------------------------------------------------------------------+ | Question 1.3.2 If the processors each execute a program in 10 seconds, | | find the number of cycles and the number of instructions. | +-------------------------------------------------------------------------+ Number of cycles for a program CPU Clock Cycles = CPU execution time * Clock Rate Part A) 1.) 10 * 3 * 10^9 = 30 * 10^9 2.) 10 * 2.5 10^9 = 25 * 10^9 3.) 10 * 4 * 10^9 = 40 * 10^9 Part B) 1.) 10 * 2 * 10^9 = 20 * 10^9 2.) 10 * 3 * 10^9 = 30 * 10^9 3.) 10 * 4 * 10^9 = 40 * 10^9 Number of Instruction per second Part A) CPU Time * Clock Rate (GHz) Instruction Count = ------------------------------- CPI 1.) 10 * 3 * 10^9 30 * 10^9 -------------------- = -------------- = 20 * 10^9 instructions / second 1.5 1.5 2.) 10 * 2.5 * 10^9 25 * 10^9 -------------------- = ------------- = 25 * 10^9 instructions / second 1 1 3.) 10 * 4 * 10^9 40 * 10^9 ------------------- = ------------ = 18.1818 * 10^9 instructions / second 2.2 2.2 Part B) 1.) 10 * 2 * 10^9 20 * 10^-9 ------------------- = -------------- = 16.66 * 10^9 instructions / second 1.2 1.2 2.) 10 * 3 * 10^9 30 * 10^9 ------------------- = -------------- = 37.5 * 10^9 instructions / second 0.8 0.8 3.) 10 * 4 * 10^9 40 * 10^9 ------------------ = ------------ = 20 * 10^9 instructions / second 2 +-----------------------------------------------------------------------------------------+ | Question 1.3.3 We are trying to reduce the time by 30% but this leads to an increase | | of 20% in the CPI. What clock rate should we have to get this time reduction? | +-----------------------------------------------------------------------------------------+ New CPI = Old CPI + Old CPI * 20% CPU Time = 10 - 10 * 30% = 10-3 = 7 second Instruction Count * CPI Clock Rate = ---------------------------- CPU Time 1.) CPI = 1.5 + 1.5 * 20% = 1.5 + 0.3 = 1.8 20 * 10^9 * 1.8 36 ----------------- = ----- GHz = 5.14 GHz 7 7 2.) CPI = 1.0 * 1.0 * 20% = 1.2 25 * 10^9 * 1.2 30 ----------------- = ------ GHz = 4.29 GHz 7 7 3.) CPI = 2.2 * 2.2 * 20% = 2.64 18.18 * 10^9 * 2.64 --------------------- = 6.85 GHz 7 Part B) 1.) CPI = 1.2 * 1.2 * 20% = 1.44 16.66 * 10^9 * 1.44 -------------------------- = 3.4272 GHz 7 CPI = 0.8 * 0.8 * 20% = 0.96 37.5 * 10^9 * 0.96 --------------------- = 5.14 GHz 7 +--------------------------------------------------------------------------+ | Question 1.3.4 Find the IPC (instructions per cycle) for each processor. | +--------------------------------------------------------------------------+ IC = 20 * 10^9 CPU_Time = 7 Clock_Rate = 3 * 10^9 IPC1 = IC / (CPU_Time * Clock_Rate) Answer: 0.95 IC = 30 * 10^9 CPU_Time = 10 Clock_Rate = 2.5 * 10^9 IPC2 = IC / (CPU_Time * Clock_Rate) Answer: 1.2 IC = 90 * 10^9 CPU_Time = 9 Clock_Rate = 4 * 10^9 IPC3 = IC / (CPU_Time * Clock_Rate) Answer: 2.5 IC = 20 * 10^9 CPU_Time = 5 Clock_Rate = 2 * 10^9 IPC4 = IC / (CPU_Time * Clock_Rate) Answer: 2 IC = 30 * 10^9 CPU_Time = 8 Clock_Rate = 3 * 10^9 IPC5 = IC / (CPU_Time * Clock_Rate) Answer: 1.25 IC = 25 * 10^9 CPU_Time = 7 Clock_Rate = 4 * 10^9 IPC6 = IC / (CPU_Time * Clock_Rate) Answer: 0.89 +------------------------------------------------------------------------------------------+ | Question 1.3.5 Find the clock rate for P2 that reduces its execution time to that of P1. | +------------------------------------------------------------------------------------------+ Answer a.) The clock frequency is increased by P2 10 sec/ P1 7 sec to reduce the CPU time. The resultant frequency is 2.5GHz * (10/7) = 3.571 GHz Answer b.) The clock frequency is increased by P2 8 sec/P1 5 sec to reduce the CPU time. The resultant frequency is 3 GHz * (10/7) = 4.8 GHz +-----------------------------------------------------------------------------------------------------+ | Question 1.3.6 Find the number of instructions for P2 that reduces its execution time to that of P3.| +-----------------------------------------------------------------------------------------------------+ Answer a) Number of instructions can be reduced by P3=9 sec / P2=10 sec = 0.9 to reduce the CPU time. Number of instructions is 30 * 10^9 * 0.9 = 27.0 * 10^9 Answer b) Number of instructions can be reduced by P3=7 sec / P2=8 sec = 0.875 to reduce the CPU time. Number of instructions is 30 * 10^9 * 0.875 = 26.25 * 10^9