作者sa074463 (垒包)
看板Grad-ProbAsk
标题[理工] [计组]-multiple cycle
时间Thu Dec 3 00:50:04 2009
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)
1F:推 killerjoe:你的问题2 ALU在不同cycle才可共用喔 12/03 01:05
2F:→ killerjoe:因为overflow的exception会用到ALU 12/03 01:06
3F:推 killerjoe:overflow是因为算出的结果与预期不同 但是除零会被视为 12/03 01:15
4F:推 polomoss:3.memory caculation时就会知道为址是否错误~ 12/03 01:15
5F:→ killerjoe:非法指令 12/03 01:15