Chip123 科技應用創新平台

 找回密碼
 申請會員

QQ登錄

只需一步,快速開始

Login

用FB帳號登入

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

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

[複製鏈接]
跳轉到指定樓層
1#
發表於 2009-3-26 19:44:35 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
請問....& t: z- Q% n/ q- z1 @% [2 \
    always (*)9 F8 g6 ~! W( ~2 ^7 o
     begin' @: I  Z' _5 X/ m" Q, Z
      if(!rstn) r1 = r2 + r3 ;
4 d5 Y1 p% p4 A) W. V6 G1 I      else      r1 = r5 << 4;
# F* c9 Q8 V$ {     end
& s! I) z: L3 o6 X: r  ~0 k    請問*是表示r2.r3.r5的意思嗎,如果是像這樣子的寫法是否能夠合成
. r3 f) f2 K! S: q   4 l& B/ S: S4 Y$ {
     小弟才疏學淺...謝謝各位大大
分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享分享 頂 踩 分享分享
2#
發表於 2009-3-31 19:57:31 | 只看該作者
敏感表中不仅是要传送的值(r2,r3,r5),还包括判断条件(rstn)
3#
發表於 2009-4-4 08:50:12 | 只看該作者
敏感列是只要那個變數有變化,就重新判斷一次, * 應該是沒有效果才對,
: P3 [7 J7 K0 g6 L' P* ]; g你這樣寫法應該會造成出來的值是跟你所要的不同結果。
4#
發表於 2009-4-17 18:46:58 | 只看該作者
可以合成 !!/ {; x' |% H5 \7 v! W+ f5 T
不過應該是這樣吧
+ }$ S+ B2 `5 [. E8 M# h8 d; A' f
3 y7 X% q) f3 ^6 [8 W( v7 H* ?0 ~5 Yalways @(*)
9 y4 c8 }- {4 L- ^' n     begin# l: m9 H5 h6 W8 ^' Q! @
      if(!rstn) r1 = r2 + r3 ;
: K- O3 p0 y2 Y1 K7 {      else      r1 = r5 << 4;9 D0 J$ _$ K+ z* b8 m8 i& D
     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 S* C5 h' U) [3 r6 v
was to create concise, error-free combinational always blocks. The @* basically means, "if Synopsys DC wants the9 k5 U& s: \0 M$ [( |- n4 W
combinational signal in the sensitivity list, so do we!"
) N- }- V6 B2 }; k$ V! u0 x$ \7 pExample 1 and Example 2 show the Verilog-1995 and Verilog-2001 versions respectively of combinational
8 I6 V7 a; @+ `/ Isensitivity lists for the combinational always block of any of the three always block fsm1 coding styles.
" ^) g+ c) g: f3 E) q5 x: ^% ?# Q4 Q$ B6 r6 U2 S
always @(state or go or ws)+ T" O3 y+ M) z9 f( l! n
begin
. B4 P" {9 i/ j, l+ X7 ]...8 z! I$ m; ^1 p7 ^
end
8 _  _/ T& u* z. R/ W( i& F//Example 14 Q: I0 R2 p  O* b8 k  J
& |( S; Z/ A$ [6 u) G8 r

, H7 I% Y& p1 {8 c4 ^7 W* [always @*+ B7 J5 R! S; y( Z% K$ z, U
begin
' a& i( L9 r5 a2 r# }...
. L- b  n! g3 l5 m6 ]. \end
8 R5 R) G3 i: U4 l9 s3 h//Example 2
8 |1 D- G& ?! k* Q
+ p/ v% Q2 [- e) n; BThe @* combinational sensitivity list as defined in the IEEE Verilog-2001 Standard can be written with or without7 h& t& P- x) ^- [) e' q: H
parentheses and with or without spaces as shown in Example 3. Unfortunately (* is the token that is used to open; f( W, _6 o* f1 ^' e9 i" f" X7 w  O
a Verilog-2001 attribute, so there is some debate about removing support for all but the always @* form of this
! E# V3 o! o$ f! j" q3 H: fcombinational sensitivity list. In-house tools would probably also be easier to write if the in-house tools did not
) j7 s% n4 [* e6 B5 ehave to parse anything but the most concise @* form. For these reasons, I recommend that users restrict their usage0 i1 z% J7 E/ m6 @
of the combinational sensitivity list to the @* form.
4 S& M' {( `2 v) {always @*' V2 v+ g$ I0 [* R7 u8 H% k; \4 ^7 n
always @ *. I" R; K$ k- d8 v" W( e7 k" f0 f
always @(*)8 F/ V) a' j+ p" c6 m
always @ ( * )
1 S7 m, O0 e1 D  L+ U" ~; H  P//Example 3
您需要登錄後才可以回帖 登錄 | 申請會員

本版積分規則

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

GMT+8, 2024-6-3 01:58 AM , Processed in 0.128516 second(s), 19 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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