作者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