[理工] 計組-data dependency
Given 4 instructions , how many unique comparions
(between register source and destinations) are
necessary to find all of the RAW,WAR,WAW data dependences,
Answer for the case of 4 instructions , and then
derive a general equations for N instructions .
Assume that all instructions have one register
destination and two register source.
(answer)
For four instructions , the number of unique comparions:
(2(3) + 2(2) + 2(1)) + (2(3) + 2(2) + 2(1)) + (3 + 2 + 1 ) = 30
^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^
↑RAW ↑WAR ↑WAW
n-1
The general equation for N instructions = 5 * Σ i = (5*(n -1)*n) / 2
i=1
想請問的是4道指令答案是怎麼推導的呢?
還有一般式如何推導出來?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.41.129.247
推
11/13 01:26, , 1F
11/13 01:26, 1F
→
11/13 01:26, , 2F
11/13 01:26, 2F
→
11/13 01:26, , 3F
11/13 01:26, 3F
→
11/13 01:26, , 4F
11/13 01:26, 4F
→
11/13 01:28, , 5F
11/13 01:28, 5F
→
11/13 01:29, , 6F
11/13 01:29, 6F
→
11/13 01:31, , 7F
11/13 01:31, 7F
推
11/13 17:20, , 8F
11/13 17:20, 8F
→
11/13 19:37, , 9F
11/13 19:37, 9F
推
11/13 22:06, , 10F
11/13 22:06, 10F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):