Given 3 different instruction types, A, B and C. Each type-A, B and C instructio
ID: 3682562 • Letter: G
Question
Given 3 different instruction types, A, B and C. Each type-A, B and C instruction takes 30ns, 20ns and 50ns to complete, respectively. An assembly program is written with 20 type-A, 30 type-B and 40 type-C instructions. Assume a single-issue not pipelined processor, how much time (in nano-seconds) is required to complete the execution of this program? Now let us pipeline these instructions based on a cycle time of 10ns. To pipeline these instructions equally and ideally using this cycle time (all instructions take the same number of pipeline stages to complete). what is the latency of each instruction (in cycles)? how much time (in nano-seconds) is required for this pipelined machine to complete execution of the program? (Assume the program does not encounter whatsoever pipeline hazards during the execution.) what is the speedup over the processor in 2.1Explanation / Answer
2.1 20*30 + 30*20 + 50*40 = 3200ns (with a cycle time of 10ns)
2.2
1. Max ( 30ns, 20ns, 50ns) = 50ns
50ns/10ns = 5 cycles = the latency of each instruction
2 . Total number of instructions = 20+30+40 = 90
cc1 cc2 cc3 cc4 cc5 cc6 .........
I1 +----+----+----+----+---+
I2 +----+----+----+----+---+
I3 +----+----+----+----+---+
... .. .. .. ..
... .. .. .. ..
I89 +----+----+----+----+---+
I90 +----+----+----+----+---+
cc 90 91 92 93 94
It takes 94*10ns = 940ns to finish for the pipelined version
3 Speedup = 3200 / 940 = 3.404x
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.