Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

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;"
 

AlexWan

Full Member level 5
Joined
Dec 26, 2003
Messages
304
Helped
8
Reputation
16
Reaction score
2
Trophy points
1,298
Activity points
2,692
First is a condition, another is a statement.
 

semiconductorman

Full Member level 3
Joined
Dec 18, 2004
Messages
156
Helped
23
Reputation
46
Reaction score
4
Trophy points
1,298
Activity points
1,769
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.
 

Thomson

Full Member level 3
Joined
Oct 15, 2004
Messages
181
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,298
Activity points
2,400
semiconductorman said:
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.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top