Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

What's the difference between always @ (posedge clk) and @ (posedge clk)?

Status
Not open for further replies.

spartanthewarrior

Full Member level 2
Joined
Jun 13, 2007
Messages
122
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
2,142
Hi,

Can anybody tell me that What is the difference between

always @ (posedge clk)

and

@ (posedge clk)
 

Re: Always Block

the difference is that when you write @(posedge clk) it's just a conditional statement, which checks for clocks positive edge. And always @(posedge clk) is continous by its nature and is usually used for modelling of synchronous logic like flip-flops.
 

Re: Always Block

Hai dude,

always@ (pos edge)

This is like saying at all pos egde do the job always.

no condition to contiune with pos edge only.

@pos edge

this is saying like do the job inly at pos edge.

conditioning
 

Re: Always Block

always @(posedge clk) means at every positive edge of the clock the code inside the always block will be executed.
 

Always Block

the difference is the "always"

"@ (posedge clk) " is checked somtimes, if "always" is put ahead, it's "always" checked during simulation
 

Re: Always Block

when you use always it means that all posedges of the clock this should happen. @() is just a conditional statement when you synthesize it may be then u will find the difference
 

Re: Always Block

The first one ,i.e.
always@(posedge clk)
The block under this executes at every postive edge of the clock

@posedge clk
This means that the block under this executes only once and that too, only at the first posedge of the clock
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top