Chip123 科技應用創新平台

 找回密碼
 申請會員

QQ登錄

只需一步,快速開始

Login

用FB帳號登入

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

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

[複製鏈接]
跳轉到指定樓層
1#
發表於 2009-3-26 19:44:35 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
請問....  Y  X1 u  _7 t$ z* ^0 i$ n
    always (*)* \+ L, B0 E" l
     begin
  K$ F6 t9 Q& d( }5 k& N      if(!rstn) r1 = r2 + r3 ;* T( E5 A( x4 _7 y
      else      r1 = r5 << 4;2 a  D& J' {" h. Q0 l: y9 G" O
     end  e: U' v% T" B% t6 D+ G
    請問*是表示r2.r3.r5的意思嗎,如果是像這樣子的寫法是否能夠合成& D4 G& q' z8 C* k% C) K- {3 h
   
0 d, i2 b0 w% z. E     小弟才疏學淺...謝謝各位大大
分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享分享 頂 踩 分享分享
2#
發表於 2009-3-31 19:57:31 | 只看該作者
敏感表中不仅是要传送的值(r2,r3,r5),还包括判断条件(rstn)
3#
發表於 2009-4-4 08:50:12 | 只看該作者
敏感列是只要那個變數有變化,就重新判斷一次, * 應該是沒有效果才對,
0 U. H3 n% C) J% O, k你這樣寫法應該會造成出來的值是跟你所要的不同結果。
4#
發表於 2009-4-17 18:46:58 | 只看該作者
可以合成 !!, ]! J( v) b, ~5 T* }" i
不過應該是這樣吧
, M1 d1 H7 n: E, C/ i, p6 q  q4 I: k/ U+ U3 E1 g
always @(*)
' G) j' W. C% r2 O+ |     begin( ?: k' u+ t: G1 o! I( K2 R
      if(!rstn) r1 = r2 + r3 ;
) D8 K- l3 H6 Q- k: n& W2 x- b      else      r1 = r5 << 4;
' v8 `" `. E4 T! C: ~4 Y6 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
4 O* x0 o. ^( A: vwas to create concise, error-free combinational always blocks. The @* basically means, "if Synopsys DC wants the( }& ~+ U# J7 n% g4 Q
combinational signal in the sensitivity list, so do we!"8 ~! w6 b: l) a( {! k* e
Example 1 and Example 2 show the Verilog-1995 and Verilog-2001 versions respectively of combinational
4 ~; `/ s0 @$ V: I) Jsensitivity lists for the combinational always block of any of the three always block fsm1 coding styles.
9 C- l! Y; w8 n# ~
7 T3 @6 y/ u( d! h" N" l6 D5 Jalways @(state or go or ws)
) K- H" I% N- l) W0 ~" jbegin
+ R  z* h( I4 P% L. V/ T' r( Q...( d( ~. m4 y% A; J3 J, z
end" {/ _5 H0 i, E# j) k
//Example 1' W6 o: Q  f  P, c. s
1 l- u7 W& k+ C7 _& w2 g

5 ~) I  x" K0 B0 {1 Palways @*
8 [- T! j# N, m; ebegin
: O& k/ l- j' u$ Y3 P4 y3 v4 F2 j+ v...
1 j5 B! x% n! E+ M1 V" eend; E$ T. X& L  V# t9 q. i
//Example 2
6 I: R; C* H1 u# z
3 E9 d. ^% f+ C6 L% v, DThe @* combinational sensitivity list as defined in the IEEE Verilog-2001 Standard can be written with or without
: Y. U1 e4 R1 H  T# h, cparentheses and with or without spaces as shown in Example 3. Unfortunately (* is the token that is used to open" B" C9 N% E7 l, ^2 p$ u
a Verilog-2001 attribute, so there is some debate about removing support for all but the always @* form of this
, {+ q* t3 s; R" |$ W, F( [; Acombinational sensitivity list. In-house tools would probably also be easier to write if the in-house tools did not
4 y! v/ z" d0 L6 B4 Y2 ^  shave to parse anything but the most concise @* form. For these reasons, I recommend that users restrict their usage# L* V) A2 j/ o' P3 [
of the combinational sensitivity list to the @* form., P7 W' J5 b  P$ F7 c- Y. R! Q: F
always @*
8 m$ G: T. p8 x0 d% S$ n% xalways @ *2 e' _; o7 ~6 R4 x
always @(*)
& i% k( D1 p; H7 p" f3 G$ Kalways @ ( * )
$ f. J& b( w, ~7 g7 @' {( N- l1 J//Example 3
您需要登錄後才可以回帖 登錄 | 申請會員

本版積分規則

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

GMT+8, 2024-5-19 05:38 AM , Processed in 0.108514 second(s), 19 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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