Chip123 科技應用創新平台

 找回密碼
 申請會員

QQ登錄

只需一步,快速開始

Login

用FB帳號登入

搜索
1 2 3 4
查看: 7410|回復: 5
打印 上一主題 下一主題

[問題求助] verilog 觸發的問題

[複製鏈接]
跳轉到指定樓層
1#
發表於 2009-3-26 19:44:35 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
請問....
" K! r7 }  l' }! ~. V* C! z    always (*)
, z! C2 L" R% E  t% L     begin
. y3 u( p9 l; r& E      if(!rstn) r1 = r2 + r3 ;  O  W( _9 t+ l) m" E- W  Y7 ^
      else      r1 = r5 << 4;0 K6 u/ _- l: M' T+ H
     end
. W) k8 H8 i) y& E  w    請問*是表示r2.r3.r5的意思嗎,如果是像這樣子的寫法是否能夠合成  U6 V+ y- g! S7 F
   ) ]& n8 s6 z8 w, `% d! X* z
     小弟才疏學淺...謝謝各位大大
分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享分享 頂 踩 分享分享
2#
發表於 2009-3-31 19:57:31 | 只看該作者
敏感表中不仅是要传送的值(r2,r3,r5),还包括判断条件(rstn)
3#
發表於 2009-4-4 08:50:12 | 只看該作者
敏感列是只要那個變數有變化,就重新判斷一次, * 應該是沒有效果才對,8 s; q; f# }5 z" Y
你這樣寫法應該會造成出來的值是跟你所要的不同結果。
4#
發表於 2009-4-17 18:46:58 | 只看該作者
可以合成 !!! Y# ]- P# c: b' b# h7 v
不過應該是這樣吧2 Q) V0 B2 z+ T  ?

( N7 ^/ W, f1 F( Jalways @(*)7 J# j8 V' d+ `" {7 k6 q
     begin
3 Q! U; k' t3 K$ ^7 ]* g& Z' ]      if(!rstn) r1 = r2 + r3 ;
& x: i7 z& {  y5 n4 Y2 ?$ z      else      r1 = r5 << 4;1 |4 e9 t: j; c* \) V4 `! t7 L+ G
     end
5#
發表於 2009-4-22 18:30:29 | 只看該作者
這個是 verilog 2001 的語法喔
6#
發表於 2009-4-28 12:44:19 | 只看該作者
Verilog-2001 added the much acclaimed @* combinational sensitivity list. The primary intent of this enhancement) k# E8 B- k3 j( K: T
was to create concise, error-free combinational always blocks. The @* basically means, "if Synopsys DC wants the
' i. k  a6 a3 b8 U. Z. H6 n+ wcombinational signal in the sensitivity list, so do we!"- {1 q9 O) Z5 U4 {1 g$ I+ k4 V+ m
Example 1 and Example 2 show the Verilog-1995 and Verilog-2001 versions respectively of combinational% f! u- N+ ?) v; H, N/ h  i
sensitivity lists for the combinational always block of any of the three always block fsm1 coding styles.
6 C6 s. e# {  J  N' X# _
* z1 _' I5 ]6 `, s) falways @(state or go or ws)
* g! S1 B9 `0 L( U+ Obegin
0 X5 r. M* h4 Y  K0 K...
9 a( F; {  b2 q# S! _, Y7 z9 vend
; A5 ~0 {5 w/ Q8 o8 B; u' L' D//Example 1
5 c6 M" {6 ~$ O
  C1 e1 u& \) q' B: u) Y5 B+ M. T1 v( P
always @*: D; P$ c" C- v+ {- D
begin
( @$ l# {2 k3 |0 Z.... A+ S( Q6 a; N  g. @1 K$ d
end9 H) J8 A9 `- w  I& q8 c4 G, _" s
//Example 24 @1 b/ Z0 O& K7 D4 z: Z

4 x, H4 c2 _+ S5 AThe @* combinational sensitivity list as defined in the IEEE Verilog-2001 Standard can be written with or without
2 N3 ~4 b) N2 f/ C: e$ |) T) rparentheses and with or without spaces as shown in Example 3. Unfortunately (* is the token that is used to open
7 K* ?- D# T7 P8 Q! Q! M8 L! Va Verilog-2001 attribute, so there is some debate about removing support for all but the always @* form of this
5 K3 m5 E/ c$ ocombinational sensitivity list. In-house tools would probably also be easier to write if the in-house tools did not9 X! C3 R- J( s! G
have to parse anything but the most concise @* form. For these reasons, I recommend that users restrict their usage- n6 X; E  _8 l3 e) \4 t3 @
of the combinational sensitivity list to the @* form.. i) ~$ v* x' I4 O# q
always @*) Y- Q( O$ w- S% r* s/ N( j1 r# ^
always @ *
, }% ?; r+ x& h7 halways @(*)3 }' P: t; W$ L- d& ]
always @ ( * )+ K/ Z5 a; Y; Y5 }, `1 H
//Example 3
您需要登錄後才可以回帖 登錄 | 申請會員

本版積分規則

首頁|手機版|Chip123 科技應用創新平台 |新契機國際商機整合股份有限公司

GMT+8, 2024-5-6 06:27 AM , Processed in 0.102006 second(s), 18 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表