Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

only @ with always

22 views
Skip to first unread message

RyanS

unread,
Dec 9, 2011, 1:42:40 AM12/9/11
to
What is the difference bewteen two commands,
always @(sigs)
and
@(sigs)?

RolfK

unread,
Dec 12, 2011, 2:11:41 AM12/12/11
to
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

unread,
Dec 12, 2011, 11:45:59 PM12/12/11
to
always @(sigs) executes every time sigs changes value.

@(sigs) executes once when sigs changes value.


Cheers,
Jim
http://myfpgablog.blogspot.com/

Gabor

unread,
Dec 13, 2011, 9:04:51 AM12/13/11
to
@ (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
0 new messages