The following behavior of blocking vs. non-blocking stumps me. Non-blocking event triggers when I don’t expect it to. And Blocking event does not trigger when I expect it to.
Here’s the EDA playground link. Questions are embedded in the code.
In the blocking sceanrio, the a = !a executes before @a, because a = !a executes in active region, and it will not suspend the initial, so the initial block executes sequentially. Therefore, @a will never get excuted.
In the non-blcoking sceanrio, the a <= !a calaculates the RHS in active region and suspends itself, waiting for this non-blocking assignment done in NBA-region, then the @a will resumes this suspension(bacuause currently the actice-queue is empty), and the a <= !a get executed, then @a executes.