作者muta22 (回归)
看板Grad-ProbAsk
标题Re: [问题] 2题计算机概论
时间Wed Apr 8 11:29:19 2009
2.
Traditional method: execution time = 40ns*100 = 4000ns
Pipeline: clock cycle = Max{10ns,5ns,10ns,10ns,5ns} = 10ns
execution time = (100 + 5 - 1)*10ns = 1040ns
Speed up = 4000ns/1040ns = 3.846
ps. 100+5-1为100个指令所需要的cycle数,(n+k-1),n为指令数,k为stage数
以3个指令为例:
cycle 1 2 3 4 5 6 7
指令1. IF ID EXE MEM WB
指令2. IF ID EXE MEM WB
指令3. IF ID EXE MEM WB
^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^ 共需7个cycle (3+5-1)
※ 引述《pipibabe (pipi)》之铭言:
: 1.
: The execution time for one program is 100 ns,
: and multiplication instruction takes 80% of the
: execution time.If the new execution time is 25 ns,
: how to improve the speed of multiplication instruction?
: (A)2times (B)4times (C)8times (D)16 times (E)none of the above
: 2.One instruction cycle takes 40ns.Among them,
: IF(10ns),DE(5ns),EXE(10ns),MEM(10ns),WB(5ns).
: Assume 100 instruction,hoe many times is the speed of
: pipelining method over traditional method?
: (A)4.85 (B)2.85 (C)3.85 (D)3.95 (E)none of the above
: 请帮忙解题拜托了!
: 不知道要从何下手的两题...
: 谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.169.82.5
※ 编辑: muta22 来自: 218.169.82.5 (04/08 11:49)
※ 编辑: muta22 来自: 218.169.82.5 (04/08 12:08)
1F:推 pipibabe:感谢解答~ 04/08 12:13