RyanS
Guest
Fri Dec 09, 2011 8:42 am
What is the difference bewteen two commands,
always @(sigs)
and
@(sigs)?
RolfK
Guest
Mon Dec 12, 2011 9:11 am
On Dec 9, 7:42 am, RyanS <yann....@gmail.com> wrote:
Quote:
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
Jim Wu
Guest
Tue Dec 13, 2011 6:45 am
On Dec 9, 1:42 am, RyanS <yann....@gmail.com> wrote:
Quote:
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/
Gabor
Guest
Tue Dec 13, 2011 3:04 pm
RyanS wrote:
Quote:
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