Chip123 科技應用創新平台

 找回密碼
 申請會員

QQ登錄

只需一步,快速開始

Login

用FB帳號登入

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

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

[複製鏈接]
跳轉到指定樓層
1#
發表於 2009-3-26 19:44:35 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
請問....
% P4 [4 I) Z8 r3 J( v8 q/ H) ]# R    always (*)" _1 v. I5 y, v4 |
     begin
5 S+ y. ?4 t8 @" L' o4 u      if(!rstn) r1 = r2 + r3 ;
# O& \9 p- A  R: G9 K) M+ B+ {      else      r1 = r5 << 4;9 @$ H8 _) v/ y7 N# e$ e1 \
     end
/ n' s2 v5 D4 Q4 `    請問*是表示r2.r3.r5的意思嗎,如果是像這樣子的寫法是否能夠合成
! S& Y) z$ G6 ]* B- {& g! }0 I   1 F% s9 C% G! k1 E
     小弟才疏學淺...謝謝各位大大
分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享分享 頂 踩 分享分享
2#
發表於 2009-3-31 19:57:31 | 只看該作者
敏感表中不仅是要传送的值(r2,r3,r5),还包括判断条件(rstn)
3#
發表於 2009-4-4 08:50:12 | 只看該作者
敏感列是只要那個變數有變化,就重新判斷一次, * 應該是沒有效果才對,
: u5 }" M! W5 Y1 q( Q; {& m9 u你這樣寫法應該會造成出來的值是跟你所要的不同結果。
4#
發表於 2009-4-17 18:46:58 | 只看該作者
可以合成 !!, v3 T9 W' ^' W/ ~+ S
不過應該是這樣吧6 B: N  K8 i, H3 w

' i  l; F* }. j5 P2 `always @(*)& K! L% N# H/ u* {4 l* B
     begin
& a% l1 X/ l6 |6 L$ v      if(!rstn) r1 = r2 + r3 ;
/ l3 `  [( m$ s* d7 R5 K; P$ o! Q3 m      else      r1 = r5 << 4;3 l; n, K$ F# J' f! |5 W, L
     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
6 \4 p! o- w- F9 b+ H) a5 Zwas to create concise, error-free combinational always blocks. The @* basically means, "if Synopsys DC wants the
9 H% @# q$ ^- W. s! H" l- v2 c3 Ocombinational signal in the sensitivity list, so do we!"
% `& v  ]: [, O$ `, xExample 1 and Example 2 show the Verilog-1995 and Verilog-2001 versions respectively of combinational+ c+ A5 x8 h( L- b2 ~
sensitivity lists for the combinational always block of any of the three always block fsm1 coding styles.
$ |! R1 F: D8 T, Z% Q4 l* k9 f! u* E. N+ P$ F8 w
always @(state or go or ws)
* \2 M* e. Q. Nbegin
9 J! p/ r! x8 {9 c- `+ S- \.... {# ?8 E# z6 s0 h0 h, @+ l$ X! p
end; I! K- {9 [% p
//Example 1
' g9 g  `; D% g- |% \
6 c4 U) f: ~- @
" Y% W" M; C5 A* a( z/ N* Balways @*  z$ }$ B5 C; ]
begin6 q. B$ A' A5 H) B: g  o( j
...
- V0 f0 K# X+ ^4 K6 \end
1 ~; r& t! e: p6 U3 O//Example 2% G2 g- S  ^0 h: O* z# ], E; h

, z- t& i0 U3 _* @The @* combinational sensitivity list as defined in the IEEE Verilog-2001 Standard can be written with or without8 \0 b; H- d/ B) `
parentheses and with or without spaces as shown in Example 3. Unfortunately (* is the token that is used to open
; l  E' ^* D+ o5 T* t; }a Verilog-2001 attribute, so there is some debate about removing support for all but the always @* form of this- _  t; W* u6 D; u( X( C
combinational sensitivity list. In-house tools would probably also be easier to write if the in-house tools did not* D$ q2 |$ D; [* {+ k
have to parse anything but the most concise @* form. For these reasons, I recommend that users restrict their usage& J! V% g' w6 x1 M$ `
of the combinational sensitivity list to the @* form.
  p1 _& f: c2 |6 e& `always @*- K$ R( D, d( i2 k/ [9 ]" d; ~
always @ *
" Y/ @* y; H* H7 l8 Q& calways @(*)% n3 Y1 X% {3 z) _+ e
always @ ( * ). O* d& X( @5 \% n
//Example 3
您需要登錄後才可以回帖 登錄 | 申請會員

本版積分規則

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

GMT+8, 2024-6-9 12:09 PM , Processed in 0.159020 second(s), 18 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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