Chip123 科技應用創新平台

 找回密碼
 申請會員

QQ登錄

只需一步,快速開始

Login

用FB帳號登入

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

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

[複製鏈接]
跳轉到指定樓層
1#
發表於 2009-3-26 19:44:35 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
請問....8 s* c( P+ D1 u% _) y8 \4 g7 K
    always (*)
' e; D6 ^0 S& A! Z, B9 G# ?# ~/ j     begin6 m$ u$ ?0 P1 w- t7 Z2 T
      if(!rstn) r1 = r2 + r3 ;, y6 E4 D4 y% m/ [$ F) R
      else      r1 = r5 << 4;* J6 Z+ [( w5 ]; c! y6 \6 i/ D; W
     end
5 }: p, }1 u5 H% {+ u    請問*是表示r2.r3.r5的意思嗎,如果是像這樣子的寫法是否能夠合成. V& C; H% Q! W: p, K
   
) p( ~9 F* u% ]" o! h     小弟才疏學淺...謝謝各位大大
分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享分享 頂 踩 分享分享
2#
發表於 2009-3-31 19:57:31 | 只看該作者
敏感表中不仅是要传送的值(r2,r3,r5),还包括判断条件(rstn)
3#
發表於 2009-4-4 08:50:12 | 只看該作者
敏感列是只要那個變數有變化,就重新判斷一次, * 應該是沒有效果才對,
4 p, @" k2 j8 E, f6 Y6 \, e4 j你這樣寫法應該會造成出來的值是跟你所要的不同結果。
4#
發表於 2009-4-17 18:46:58 | 只看該作者
可以合成 !!
9 D2 R# [  ^% ^7 w" F# ?不過應該是這樣吧; l5 K# R+ R2 y1 ?* k; |  @

( s2 U( |/ E, ^0 Z; y- i) Zalways @(*). E% C2 y8 ]1 A, J0 h. E/ z
     begin
9 ?/ S& t4 R( O8 `$ ^- h8 e" C      if(!rstn) r1 = r2 + r3 ;
8 F: f% D0 M8 l      else      r1 = r5 << 4;
; z' ^3 z6 n2 q2 R. x6 o: u4 P     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, S% k* l0 m2 r, A, m8 ?
was to create concise, error-free combinational always blocks. The @* basically means, "if Synopsys DC wants the8 |' M) f! C2 v! l6 F9 Q
combinational signal in the sensitivity list, so do we!"- B- v. |2 {. t  H8 F
Example 1 and Example 2 show the Verilog-1995 and Verilog-2001 versions respectively of combinational
6 _6 |4 R* }3 C* O! h" T% Ssensitivity lists for the combinational always block of any of the three always block fsm1 coding styles./ `% f9 f. `/ n" x7 L
0 R7 E" ~& v/ C1 w
always @(state or go or ws)
  A0 o8 z4 P, Y1 [: _* ?  f, ^' `) h4 ibegin
: C) T# D6 }2 q5 r$ O...
/ b$ n* V$ ^6 N3 I- q% Rend
" P3 X0 y" j" Y//Example 15 _; M6 T# X* v% m$ W( Y3 s+ K" t
- u; l) _1 H/ |4 D3 |" \5 `! T
* x3 v# O/ ^9 m: A
always @*" o- h- w9 p4 I8 W8 X
begin5 \3 E/ c1 `& C) i9 @7 N9 A1 M
...
+ `7 W! V# L# Kend) n6 T# t; p, l+ g! i2 r
//Example 2
9 I4 {+ d! l3 W
1 \  n5 J1 ~/ zThe @* combinational sensitivity list as defined in the IEEE Verilog-2001 Standard can be written with or without5 S' D& |0 ?# w$ y
parentheses and with or without spaces as shown in Example 3. Unfortunately (* is the token that is used to open
, Y  U) I7 m1 A0 j) n5 b. T: ]6 @a Verilog-2001 attribute, so there is some debate about removing support for all but the always @* form of this
" J# ~, o$ V, J: d' U0 m% ]combinational sensitivity list. In-house tools would probably also be easier to write if the in-house tools did not0 e) v4 t6 }* ?3 N- j
have to parse anything but the most concise @* form. For these reasons, I recommend that users restrict their usage
: h$ I- A' x! f* ~$ Gof the combinational sensitivity list to the @* form.
" z, k6 C" m0 A# A8 j( i9 Galways @*
* U2 t4 v& p! n: p1 k. Ralways @ *
0 n- M9 O# \! K) Xalways @(*)
1 y8 m/ g8 ^; V6 ]/ u# K3 Yalways @ ( * )
5 L3 H8 \% d# v, J//Example 3
您需要登錄後才可以回帖 登錄 | 申請會員

本版積分規則

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

GMT+8, 2024-9-28 01:53 AM , Processed in 0.167010 second(s), 19 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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