作者bakerly (bakerly)
看板Electronics
标题Re: [问题] verilog always 合成
时间Tue Jan 9 17:02:53 2007
※ 引述《DecadentX (失踪很久的钥匙)》之铭言:
: 像下面的例子
: 讯号线C有用到但没在always() 里面
: 这样合成出来结果
: 是一定有问题吗??
: 因为发现这样simulation只会出现 warning
: 不会 error
: RTL sim 正确~~^^
: Gate sim 有错....囧oo
: 所以想知道写这样
: 到底会合成出来什麽~~
: always@( A or B )
: begin
: if(B && C)
: A = B;
: else
: A = 0;
: end
抄一段以前上课讲义上的话
Event List Rules
If an always statement is modeling a combinational circuit,
then every variable which is read before it is updated inside
the always block MUST be in this statement's event list
otherwise the synthesis toll will create hardware that agrees
whit this requirement, even though the original always statement
does not.
上面那一段code在RTL sim 的时候会产生有点像latch的效果
但是synthesis tool产生出来的gate level code 只会有
a = b & c 的结果
所以你的gate sim 会和rtl sim 不一致...
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 203.66.222.12