there is difference -
always @(event1) begin
end
@(event) begin
end
always @(event1)
@(event)
there is difference in all 4 statement ,
1st statement
always@(event1) begin
end
whenever event1 happen, all statement in always block ( inside begin ..... end) will be executed.
2nd statement
@(event1) begin
end
whenever this statement executed, simulator will wait for event1 , once event1 there then simulator will executed rest of statement ....
to keep this statement executed all time, you need to write below code
forever begin
@(event1) begin
end
end
3rd statement ... is similar to 1st statement , except statement just after always @(event1) will executed everytime whenever event1 happen ,
4th statement is similar to 2nd statement , except statement just after @(event1) will be executed , rest will not.