Re: [問題] verilog always 合成

看板Electronics作者 (bakerly)時間19年前 (2007/01/09 17:02), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《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
文章代碼(AID): #15ere-j5 (Electronics)
討論串 (同標題文章)
文章代碼(AID): #15ere-j5 (Electronics)