Wait and @event syntax difference issues

In reply to megamind:

You need to go back and edit your post as your image is not visible. A link to EDAPlayground would be much better.

The 2 big differences between event controls @(posedge signal) and wait(signal)

  1. The transition from 0 to 1 must not have already happened for @(posedge signal) when encountering that event control. It really should read as “wait for the next transition to 1”
  2. wait(signal) will not block if signal is already 1. If you have this construct in a loop without any other blocking event controls, you get an infinite 0-delay loop.

So they only behave the same if signal is not 0 at the point when encountering either event control.

When you say that a signal is synchronous, that means you only want to sample its value on a clock edge. You would want to use @(posedge clk iff (signal))