看板 Grad-ProbAsk 關於我們 聯絡資訊
Exception detection is an important aspect of exception handling. Try to identify the cycle in which the following exceptions can be detected for the multicycle datapath in the following Figure. Consider the following exceptions: a:Divide by zero exception(suppose we use the same ALU for division in one cycle,and that it is recognized by the rest of the control) b:Overflow exception c:Invalid instruction d:External interrupt e:Invalid instruction memory address f:Invalid data memory address ---------------------------我是分隔線--------------------------------- Figure的圖就是multicycle的圖 想請問一下選項a,b,f 解答是給說a:cycle 3,b:cycle 4,f:cycle 3 1.為什麼a選項是cycle 3呢?他不算是個overflow嗎? 2.b選項說是cycle 4,那他在cycle 3不行嗎?比如說當一算到overflow 就跑到 exception,還是說這是作者規定的呢? 3.f選項我開始寫也是寫cycle 3,可是後來想想,為何不是在cycle 4當memory要 去存取位址的時候才發現錯誤呢? 可能是我有觀念錯誤!才導致有怪異的想法 囧 麻煩各位糾正 謝謝各位^^ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.62.111.241 ※ 編輯: sa074463 來自: 61.62.111.241 (12/03 00:50) ※ 編輯: sa074463 來自: 61.62.111.241 (12/03 00:51)
killerjoe:你的問題2 ALU在不同cycle才可共用喔 12/03 01:05
killerjoe:因為overflow的exception會用到ALU 12/03 01:06
killerjoe:overflow是因為算出的結果與預期不同 但是除零會被視為 12/03 01:15
polomoss:3.memory caculation時就會知道為址是否錯誤~ 12/03 01:15
killerjoe:非法指令 12/03 01:15