看板 Grad-ProbAsk 關於我們 聯絡資訊
想問16 17題 https://i.imgur.com/ufJTG9m.jpg a選項我認為反例是reg file可被存取兩次,但只有一份copy d選項是錯最後一句 b的話不懂為什麼是對的 然後c是錯在latch這個字嗎? https://i.imgur.com/4Txu0B6.jpg 這題的話不知道為何a是對的 c沒有聽過memory hazard...google好像也沒找到類似的詞 這是交大自己創出來誤導的選 項嗎? 如果想法有錯再麻煩訂正了...感謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 42.75.253.231 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1573642778.A.381.html ※ 編輯: gash55025502 (42.75.253.231 臺灣), 11/13/2019 19:00:24
b10007034: 17a意思就是不管怎麼樣control hazard就是無法避免 11/13 20:01
b10007034: 理由是不可能可以預測到未來 11/13 20:03
b10007034: 17c跟你看法一樣 11/13 20:03
zuchang: 16a更明顯的錯是最後一句 c是錯在not necessary 11/13 20:52
mistel: 請問16.c的latch是什麼? 這個選項可以解釋一下嗎 11/13 22:03
mistel: 另外17c 算盤有提到是發生在mem stage的hazard 11/13 22:04
b10007034: 那是structrual hazard 不只發生在memory這個元件上 11/13 22:09
mistel: 不是 這跟ex hazard一起被歸類在Data hazard這個項目下 11/13 22:13
mistel: https://i.imgur.com/tPsUxlq.jpg 11/13 22:13
b10007034: 但這個data hazard跟這邊提到的是兩回事 11/13 22:21
b10007034: 它那個MEM是表示MEM stage並非Memory 11/13 22:22
b10007034: 16.c latch意思就是D Flip-Flop那個latch,把它想成用 11/13 22:24
b10007034: 來儲存資料的暫存區即可 11/13 22:25
b10007034: 對multi-cycle machine來說為了保持一個cycle一個instr 11/13 22:27
b10007034: 使用,必須要用暫存區儲存上一個instr.運算後的結果 11/13 22:28
b10007034: 這跟pipelined machine是一樣的概念,所以它說不是必需 11/13 22:29
b10007034: 就是錯的,大概是這樣 11/13 22:29
gash55025502: multi-cycle 不是一個指令自己在datapath中過好幾 11/13 23:10
gash55025502: 個cycle嗎?為何需要暫存區呢 11/13 23:10
gash55025502: 16.c不是應該要是pipeline register嗎?所以是latch 11/13 23:12
gash55025502: =pipeline register嗎? 11/13 23:12
mistel: 跟樓上原po同樣問題@@ 11/13 23:22
zuchang: https://i.imgur.com/ifxqWtV.jpg 11/13 23:36
b10007034: Multi-cycle還是要讀一下課本(概略、方塊圖、文字描 11/13 23:55
b10007034: 述),不然我也很難解釋清楚 11/13 23:55
b10007034: 說latch的原因還是怕跟register file 搞混,這兩個雖 11/13 23:57
b10007034: 然都是暫時保存資料,但實際上電路實作還是差很多的。 11/13 23:57
mistel: 剛剛翻到張凡的課本了 感謝兩位大大! 11/13 23:58
mistel: mem那個是我搞錯了 我覺得b大說的對 11/14 00:04
gash55025502: 好的我再研究一下 感謝各位大大 11/14 00:42
gash55025502: https://i.imgur.com/8s39Zx4.jpg 11/14 01:13
b10007034: 是這樣理解沒錯,這個邏輯跟pipelined machine 是一樣 11/14 11:41
b10007034: 的 11/14 11:41
gash55025502: 了解 非常感謝 那如果是Single cycle的話 是否就真 11/14 12:03
gash55025502: 的不需要暫存器了呢? 11/14 12:03
b10007034: 不需要一個暫存區特別暫存上一個指令的值,因爲已經儲 11/14 13:08
b10007034: 存到reg. file 了,並不是不需要暫存器 11/14 13:08
gash55025502: 了解!感謝大大 11/14 13:10