only @ with always

R

RyanS

Guest
What is the difference bewteen two commands,
always @(sigs)
and
@(sigs)?
 
On Dec 9, 7:42 am, RyanS <yann....@gmail.com> wrote:
What is the difference bewteen two commands,
always @(sigs)
and
@(sigs)?
Ryan,

I'm not 100% sure of your context.

Howver, as the statement says: always
Statements inside the block are executed if sigs are changed.
Statements in parallel to the always block will be executed in
parrallel.

@(sigs) only will let the execution wait up to sigs is changed.
Hence the executing the code after the @(sigs) statement ic blocked.

Hope that helped

RolfK
 
On Dec 9, 1:42 am, RyanS <yann....@gmail.com> wrote:
What is the difference bewteen two commands,
always @(sigs)
and
@(sigs)?
always @(sigs) executes every time sigs changes value.

@(sigs) executes once when sigs changes value.


Cheers,
Jim
http://myfpgablog.blogspot.com/
 
RyanS wrote:
What is the difference bewteen two commands,
always @(sigs)
and
@(sigs)?
@ (sigs) needs to be inside some kind of procedural block. It
can be in an always block or an initial block. In either case
it does the same thing.

always says to continuously loop on the code in the statement
that follows. That statement can be either a single statement
like:

always
#7 foo = bar;

or a group of statements like

always
begin
#7 foo = bar;
@ (posedge clk) baz = #1 splat;
end

or:

always
@ (sigs) begin
foo = some_sig;
bar = some_other_sig;
end

I placed the @ (sigs) on a separate line to underline the point
that it is really independent of the "always" and not a special
case.

HTH,
Gabor
 

Welcome to EDABoard.com

Sponsor

Back
Top