Chip123 科技應用創新平台

 找回密碼
 申請會員

QQ登錄

只需一步,快速開始

Login

用FB帳號登入

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

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

[複製鏈接]
跳轉到指定樓層
1#
發表於 2009-3-26 19:44:35 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
請問....
. V, M( a! Z0 ~% M  u+ l0 f    always (*)
6 y% j( W+ p: F/ ~0 C( Y+ Z$ k     begin
- D, z$ T% J- X; V- z7 H& v      if(!rstn) r1 = r2 + r3 ;" X1 f9 s0 J1 U/ H9 e2 g4 s
      else      r1 = r5 << 4;$ O7 F" b4 G! z% z- g
     end
; O1 V1 ~: u9 P3 K  a! {" ~+ q    請問*是表示r2.r3.r5的意思嗎,如果是像這樣子的寫法是否能夠合成
8 J+ k! ]% F; P, ]% `  ?  L/ G$ L: A   ( D' U& U& Q: c$ Y( q
     小弟才疏學淺...謝謝各位大大
分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享分享 頂 踩 分享分享
2#
發表於 2009-3-31 19:57:31 | 只看該作者
敏感表中不仅是要传送的值(r2,r3,r5),还包括判断条件(rstn)
3#
發表於 2009-4-4 08:50:12 | 只看該作者
敏感列是只要那個變數有變化,就重新判斷一次, * 應該是沒有效果才對,
( {/ W! Y9 L) k0 n* j% W6 i你這樣寫法應該會造成出來的值是跟你所要的不同結果。
4#
發表於 2009-4-17 18:46:58 | 只看該作者
可以合成 !!
9 ?) |. B: _. r: V1 V4 D7 f不過應該是這樣吧8 i0 w! `: i, D9 r/ q  {9 c. g" [

# u, C. G7 Z1 s' o! Q6 _% ralways @(*)
( L- X% _6 f& F/ P, o1 g: [     begin
, u& r4 {0 B3 x8 y6 ^& f      if(!rstn) r1 = r2 + r3 ;
1 g( z& a8 Z* e+ v3 I5 @      else      r1 = r5 << 4;
& d2 e4 J7 b8 C9 p8 S% `- k9 F     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
' s1 I( M9 W* V+ W/ j3 [$ hwas to create concise, error-free combinational always blocks. The @* basically means, "if Synopsys DC wants the/ ^* E! r/ U( Y
combinational signal in the sensitivity list, so do we!"* w8 Q0 o( G% p/ M' p7 y' T
Example 1 and Example 2 show the Verilog-1995 and Verilog-2001 versions respectively of combinational
6 a& K# C7 N3 L2 @0 g( I* gsensitivity lists for the combinational always block of any of the three always block fsm1 coding styles.
9 j" G& l. r% a3 k+ c* Y; P8 [! p
% H" k9 G# f! D: T8 `0 Galways @(state or go or ws)
/ e. v" k- }8 y' `begin
" Z) ~% A& f* o. S& L...
8 g7 s% d9 d( {9 w& }# d. i. K4 vend8 P' e0 _- R; P; X! P9 e: h
//Example 1$ R( n) W7 ~8 r1 d) p
+ H6 l* D2 x4 d6 `/ Q" I. [/ P
$ @& b8 ~8 Y" T& n
always @*
- A6 V1 x7 V2 jbegin
. }( B: k: Y: x/ C) p3 M7 E& i...
& ?  {4 g( X4 d3 Q9 `end+ J% g) _6 c2 L+ n8 D' R
//Example 2
+ O% E1 P* `) e5 k- c1 M
3 J/ i, `  J* ?1 k8 _+ n. m' g' b* aThe @* combinational sensitivity list as defined in the IEEE Verilog-2001 Standard can be written with or without  @3 H, T: \& T
parentheses and with or without spaces as shown in Example 3. Unfortunately (* is the token that is used to open' ~( D1 A8 h1 S0 T
a Verilog-2001 attribute, so there is some debate about removing support for all but the always @* form of this
# B; I9 m; N- [3 f0 f$ `7 W% ucombinational sensitivity list. In-house tools would probably also be easier to write if the in-house tools did not
+ G( X- F- Q* V. L4 H% D; G4 mhave to parse anything but the most concise @* form. For these reasons, I recommend that users restrict their usage& j, l8 C' e; p
of the combinational sensitivity list to the @* form.
3 q. w3 [8 ^- v' q6 Malways @*
8 i5 S. M4 p4 y" g0 nalways @ *
& ?! j5 r+ r6 }* t' z: N/ Malways @(*)
+ F! _! S7 h6 u" H6 r9 }always @ ( * )6 C2 u0 R% Y% k) p: p! w
//Example 3
您需要登錄後才可以回帖 登錄 | 申請會員

本版積分規則

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

GMT+8, 2024-6-3 02:22 PM , Processed in 0.116515 second(s), 19 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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