標題: verilog 觸發的問題 [打印本頁] 作者: scroll529 時間: 2009-3-26 07:44 PM 標題: verilog 觸發的問題 請問...." _1 g4 c" t+ C$ ^
always (*) + B9 Y) X! ~$ w5 W* _' |+ Z begin& |+ s6 u5 F W
if(!rstn) r1 = r2 + r3 ;2 s& U. b& d8 E u l5 k! K
else r1 = r5 << 4;2 }2 u* P; [/ D8 V
end 6 t+ M) b" m3 }3 v$ y' C+ Q8 T/ x 請問*是表示r2.r3.r5的意思嗎,如果是像這樣子的寫法是否能夠合成6 x; u6 N, p9 B. X
$ d. `7 [1 p0 f, c/ ` 小弟才疏學淺...謝謝各位大大作者: newwalkman 時間: 2009-3-31 07:57 PM
敏感表中不仅是要传送的值(r2,r3,r5),还包括判断条件(rstn)作者: spring69393 時間: 2009-4-4 08:50 AM
敏感列是只要那個變數有變化,就重新判斷一次, * 應該是沒有效果才對, ; L6 P8 [) ^5 |0 `" T你這樣寫法應該會造成出來的值是跟你所要的不同結果。作者: videochip 時間: 2009-4-17 06:46 PM
可以合成 !! 5 F: M p' p+ b: E3 ~. h不過應該是這樣吧 ( G3 w" z# K% @: x& a9 X! C/ x 8 I6 U0 z+ }4 i1 R5 H" Nalways @(*) 4 u6 L( P" V z1 R+ C begin 2 H' Y3 V( P+ q6 j9 z" G if(!rstn) r1 = r2 + r3 ;3 ]0 s# L/ T- z
else r1 = r5 << 4; 8 y- L" s0 L. n k% M end作者: masonchung 時間: 2009-4-22 06:30 PM
這個是 verilog 2001 的語法喔作者: 賈斯丁 時間: 2009-4-28 12:44 PM
Verilog-2001 added the much acclaimed @* combinational sensitivity list. The primary intent of this enhancement : j/ K$ a7 _: N( Rwas to create concise, error-free combinational always blocks. The @* basically means, "if Synopsys DC wants the ! x# I1 i% T. _combinational signal in the sensitivity list, so do we!": N5 Q; i: H9 ?7 r+ o) }/ n
Example 1 and Example 2 show the Verilog-1995 and Verilog-2001 versions respectively of combinational 8 x5 H' d0 h* W' b' W1 Qsensitivity lists for the combinational always block of any of the three always block fsm1 coding styles.+ n# T, u% V' Q# {
" L' i+ J4 U7 G( f0 D, Q- i
always @(state or go or ws)7 a# S! c/ c, P
begin 7 {) m: O/ D9 g/ C! E8 s* I' g...5 t: t8 D& L6 w* B5 N* o
end5 m+ |2 t9 t, ?( z7 c0 |4 C8 N
//Example 1; w7 Z( ~+ c" k) J: `9 B
6 e d5 M& o2 E( b% j6 T $ F. `' E0 N( H7 I" oalways @*: U& E3 ~; o: _1 V, `* ~
begin 6 s7 u- h: S! w; u5 M4 K# R* D... 6 n+ q; c' K5 N, {' S p# V Qend% S& B! |( K: N9 o9 Z7 _5 \. O
//Example 2( Q" V1 g' Y- a
4 O' n9 S4 W' JThe @* combinational sensitivity list as defined in the IEEE Verilog-2001 Standard can be written with or without * ]" W" B6 r- x+ y0 W6 S6 Y% ~- t, yparentheses and with or without spaces as shown in Example 3. Unfortunately (* is the token that is used to open 1 b z2 R* |" n% Q( ia Verilog-2001 attribute, so there is some debate about removing support for all but the always @* form of this 9 D: t+ s3 r# \' Wcombinational sensitivity list. In-house tools would probably also be easier to write if the in-house tools did not/ k/ \$ f3 V, Q, i# V. n
have to parse anything but the most concise @* form. For these reasons, I recommend that users restrict their usage6 @6 s5 o) t+ K& Y) I. q- x: f
of the combinational sensitivity list to the @* form. 7 ?- z1 x0 G0 I3 ~6 Q9 c6 Falways @*& K- A5 g* z% o v- J; m
always @ *5 a5 b4 ^1 {2 v* ]% K% [; T
always @(*)% l* p* T# I, O& G# [
always @ ( * ); t# W m$ |- R" \' P. l/ J
//Example 3