看板 Grad-ProbAsk 關於我們 聯絡資訊
※ 引述《BaaaSwin (codown)》之銘言: : 1.有三種RAW,WAR,WAW : RAW(true dependency): it arises when the next instruction tries to read a : source before the previous instruction writes to it. : so, the next instruction gets the old value incorrectly. 下一個instruction嘗試讀取上一個instruction正在寫入的source 導致下一個instruction讀取到舊的值的情形 稱為RAW : WAR:arises when the next instruction writes to a destination before the : previous instruction reads it. in the case, the previous instruction : gets a new value incorrectly. WAR則是當下一個instruction嘗試在上一個instruction讀取資料之前就在讀取的source 寫入新的資料 導致上個instruction讀取到不正確的值 : WAW:it is situation when the next instruction tries to write to a destination : done in the wrong order. 而WAW則跟WAR很像 只是改成下一個instruction在上一個instruction寫資料前 就在同個位置上先把資料寫進去了 而上一個instruction後來才寫入資料導致的錯誤 : 2.WAW是否是output dependency,WAR是anti dependency?? yes , yes : 都可以用register renaming去解決?? yes : 那什麼又是name dependency呢?? name dependency = anti dependency 指多個instruction用到同樣的register來存資料 但是彼此之間並沒有資料互相流通使用 : 3.Given four instruction, how many unique comparisons(between register sources : and destinations) are necessary to find all of the RAW,WAR,and WAW dependences. : Answer for the case of four instructions, and then derive a general equation : for N instructions. Assume that all instructions have one register destination : and two register sources. 給四個instruction 問最少要比較register source和destination多少次 才能找到所有的RAW WAR WAW dependence 先回答有四個instruction的情況 再導出一個計算這個問題的公式 希望能回答到你的問題~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.229.69.34
BaaaSwin:謝謝你!!!!我研究看看 11/17 19:30