A CPU has a 5-stage pipeline. If it takes 1 cycle to fetch, 2 cycles to decode, 2 cycles to execute, 1 cycle to memory access, and 1 cycle to write back, what is the total number of cycles to execute 10 instructions?
Q1. A CPU has a 5-stage pipeline. If it takes 1 cycle to fetch, 2 cycles to decode, 2 cycles to execute, 1 cycle to memory access, and 1 cycle to write back, what is the total number of cycles to execute 10 instructions?
Answer: 14
Explanation: For the first instruction, it takes 1 + 2 + 2 + 1 + 1 = 7 cycles.