what's the difference between them

Status
Not open for further replies.

tigerajs

Member level 3
Joined
Feb 8, 2006
Messages
55
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,638
"@posedge clk" and "@posedge clk;"
 

First is a condition, another is a statement.
 

A semicolon ! Kidding ............ . Let me put it is code snipet and tell you .
1.
@posedge clk
a = 0 ;
// here the value of a is assigned to 0 after the event of posedge of clk .

2.
@posedge clk;
a = 0;
// Here value of a =0 after the event posedge of clk.
 


If you only contian a assignmets in one block, there's no difference for these two ways; however, if there are more than one block which will assign some values to a with these two methods, then the result may be different.

Thomson
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…