Chip123 科技應用創新平台

 找回密碼
 申請會員

QQ登錄

只需一步,快速開始

Login

用FB帳號登入

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

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

[複製鏈接]
跳轉到指定樓層
1#
發表於 2009-3-26 19:44:35 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
請問....
6 {  e, ?# {5 G. U; J    always (*)
2 V' A& O) O9 Z0 }: p6 q     begin
) _+ x9 Z; s6 e' }      if(!rstn) r1 = r2 + r3 ;
2 B+ h3 P1 S5 [6 V      else      r1 = r5 << 4;
  \" P" @$ o2 L8 l     end
% t* W! l& ~0 m; x& E    請問*是表示r2.r3.r5的意思嗎,如果是像這樣子的寫法是否能夠合成- c5 h9 x' F2 B; |8 z3 @
   - I0 Z" g# Z9 m
     小弟才疏學淺...謝謝各位大大
分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享分享 頂 踩 分享分享
2#
發表於 2009-3-31 19:57:31 | 只看該作者
敏感表中不仅是要传送的值(r2,r3,r5),还包括判断条件(rstn)
3#
發表於 2009-4-4 08:50:12 | 只看該作者
敏感列是只要那個變數有變化,就重新判斷一次, * 應該是沒有效果才對,
. E- ]% z4 Y5 [% V" `1 G你這樣寫法應該會造成出來的值是跟你所要的不同結果。
4#
發表於 2009-4-17 18:46:58 | 只看該作者
可以合成 !!( i$ O4 v  Q) L6 z
不過應該是這樣吧, x3 w# m3 e/ Q7 s, V: F) F3 h% x
7 r8 D) ]0 u! a/ O$ \
always @(*); }) t! Z6 H0 V- {2 q6 _% F
     begin
% e5 _% R! U  G+ W! y      if(!rstn) r1 = r2 + r3 ;
5 q2 {5 k& o& ?      else      r1 = r5 << 4;2 Y; w* p' g" ^( c' {) F4 I
     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 enhancement6 ?$ f" d/ t& h4 U! i
was to create concise, error-free combinational always blocks. The @* basically means, "if Synopsys DC wants the
1 q+ l+ t) x9 c" Z! P5 pcombinational signal in the sensitivity list, so do we!"
( u' v  x5 _$ S. V' g' [5 s' _Example 1 and Example 2 show the Verilog-1995 and Verilog-2001 versions respectively of combinational; @$ v7 o3 u4 l( K9 c
sensitivity lists for the combinational always block of any of the three always block fsm1 coding styles.
# e; t/ s9 E2 {/ m  m6 U0 f" C' |/ S* z1 M' |
always @(state or go or ws)% ?/ V3 }! w0 B
begin
5 F  a1 L9 }- H* g8 S. H  }...6 c( L6 J6 ?. p! f. J5 f# k7 A
end0 ~1 b# Z; E- a" p
//Example 1
/ Y, ?3 O, n- k5 ?1 b6 m6 K# i. a" n3 x6 H7 V. o

9 m; ^( O- L! c& ~' Lalways @*0 l& V4 Z! u0 u: p6 O  c
begin
- L3 o: y/ p, B% }. C5 ~...% @: Z* B0 |- Z4 G  F
end$ m; H, m/ j5 M- w
//Example 2" p  O* n3 h0 a4 L7 a* p
" `/ T& o- |' L+ g% [+ [" l
The @* combinational sensitivity list as defined in the IEEE Verilog-2001 Standard can be written with or without
/ `$ _% z* o0 p8 l4 Cparentheses and with or without spaces as shown in Example 3. Unfortunately (* is the token that is used to open7 O& B  T) r( d- U4 B9 B1 j
a Verilog-2001 attribute, so there is some debate about removing support for all but the always @* form of this# r  C$ t* h0 X- U3 |& j
combinational sensitivity list. In-house tools would probably also be easier to write if the in-house tools did not& t) i# `+ ]% c4 Z, A$ ]) B
have to parse anything but the most concise @* form. For these reasons, I recommend that users restrict their usage
: w) J$ A* i' p  M/ O4 V& `  Wof the combinational sensitivity list to the @* form.
# [8 A2 n) H: u1 Y! [, Qalways @*( K5 Q( ^0 a* I. D: x: R
always @ *
6 w3 P5 x( n: @3 F. X) ~7 ]; Halways @(*)8 F: z# Y3 T: C% M7 z4 C; k
always @ ( * )+ m6 ~$ e  B: j; C, V
//Example 3
您需要登錄後才可以回帖 登錄 | 申請會員

本版積分規則

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

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

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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