Chip123 科技應用創新平台

 找回密碼
 申請會員

QQ登錄

只需一步,快速開始

Login

用FB帳號登入

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

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

[複製鏈接]
跳轉到指定樓層
1#
發表於 2009-3-26 19:44:35 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
請問....8 p$ }1 X3 O0 B- j# C: f1 w4 I% F
    always (*)
5 M6 I0 V8 R% W     begin
( p7 Y9 Q9 H8 k# _      if(!rstn) r1 = r2 + r3 ;! l* u: x% t/ {5 g
      else      r1 = r5 << 4;
9 f; q( g+ ]5 E* |# l) L4 I' L     end& D/ C4 j7 c4 F, D" Q/ u
    請問*是表示r2.r3.r5的意思嗎,如果是像這樣子的寫法是否能夠合成8 V" g3 W7 g( L* n+ H8 F5 j+ r1 L
   
: Q" y: p8 A, i* l     小弟才疏學淺...謝謝各位大大
分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享分享 頂 踩 分享分享
2#
發表於 2009-3-31 19:57:31 | 只看該作者
敏感表中不仅是要传送的值(r2,r3,r5),还包括判断条件(rstn)
3#
發表於 2009-4-4 08:50:12 | 只看該作者
敏感列是只要那個變數有變化,就重新判斷一次, * 應該是沒有效果才對,
5 F2 p+ A# w4 G8 V& @5 N你這樣寫法應該會造成出來的值是跟你所要的不同結果。
4#
發表於 2009-4-17 18:46:58 | 只看該作者
可以合成 !!) a; r8 c* X' D: d" a
不過應該是這樣吧
* G* b# e" N5 D* {) ^, e
. n$ i5 U* F6 K% s0 J% J; K1 y& l( H+ r0 valways @(*)8 d5 u% Q# D4 V
     begin
1 ~) d4 w$ @# b" R# ]      if(!rstn) r1 = r2 + r3 ;( q% D, j% X1 o
      else      r1 = r5 << 4;7 A, T* @( m: r& Q. e2 d+ R* @
     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- i! t! f; q" h6 Z/ u
was to create concise, error-free combinational always blocks. The @* basically means, "if Synopsys DC wants the
4 X9 a* }$ b3 a2 B0 T2 ~0 D* ?combinational signal in the sensitivity list, so do we!": ]3 }% x$ p7 m1 k. |* n; M
Example 1 and Example 2 show the Verilog-1995 and Verilog-2001 versions respectively of combinational
# N, k: b8 J+ z! J( J* J" xsensitivity lists for the combinational always block of any of the three always block fsm1 coding styles.
# D6 w3 ?% ^5 ^' V9 ?7 m
  J9 ]8 J  d; P, ualways @(state or go or ws)
) h" \1 t( J' kbegin' v6 O9 c- g! [
...
' r6 L+ h& H6 o8 e$ `end
; T% k0 `# U5 y8 _1 \2 @//Example 1" D8 [4 \* H4 ^4 B/ z$ Z- d3 e

% j' `' G, m0 y" d( o+ P9 B; u7 }% I# F1 T( ~9 Q. A: y
always @*
* D' b  c, ]& n2 }begin
" y8 H; G$ l2 E; {+ t$ }7 g, W...
* \$ \) p! Y& Z1 n3 Tend3 P4 ]2 ]; Y" e
//Example 2( x- v5 \! G5 Y2 d
! e5 f7 h1 @, H: M  L% B
The @* combinational sensitivity list as defined in the IEEE Verilog-2001 Standard can be written with or without2 v" B2 Y7 t) W5 S' q8 k" T
parentheses and with or without spaces as shown in Example 3. Unfortunately (* is the token that is used to open8 v/ k3 U6 Y! X
a Verilog-2001 attribute, so there is some debate about removing support for all but the always @* form of this
4 I" B! ?) W. b3 J$ M% ^4 xcombinational sensitivity list. In-house tools would probably also be easier to write if the in-house tools did not
" @+ r" Y9 a! @& f& L0 i4 Uhave to parse anything but the most concise @* form. For these reasons, I recommend that users restrict their usage' n3 t7 e5 g; \3 O* P
of the combinational sensitivity list to the @* form.
& a" t0 M( A. J3 Ralways @*
$ c' F9 p) x$ R7 S  F0 valways @ *
8 Q" O+ M1 Z* c: [& l' [4 h! Oalways @(*)
: V2 [" F# B% _! Q, i' Qalways @ ( * )
" @, o7 S; n) Q0 Y# \' K! a$ t//Example 3
您需要登錄後才可以回帖 登錄 | 申請會員

本版積分規則

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

GMT+8, 2024-9-27 10:06 PM , Processed in 0.169010 second(s), 19 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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