thanks
always@(posedge CLK) is used to describe a D-Flip Flop, while @(posedge
CLK) is used in testbench.
For example,
c = d;
@(posedge CLK);
a = b;
means a = b; will not be executed until there is a posedge CLK(i.e. at
the posedge CLK time slot, simulator will execute a = b) .
Thanks!
Davy
You are not allowed to use a @(posedge CLK) (or any other @... event
control statement for that matter) unless you are in a procedural
block (that is, in an always block). (Well, you can use it in a
specify block as well but I don't think that is what you are asking
for.)
So I guess your question boils down to something like this:
What is the difference between
always@(posedge CLK) begin
/* Some code */
end
and
always begin
@(posedge CLK);
/* Some code */
end
As far as I know there is no behavioral difference between these.
But your synthesizer might not like the last example. (At least XST
8.1 doesn't like it.)
/Andreas
I just realized that I forgot about initial blocks.
shame on me. You can of course use @... in those blocks
as well.
/Andreas