The more seemingly simple and frequently used. The more we don't know why. This is why I wrote this article.
Blocking and non-blocking assignments are generally used in the process, including always, initial processes, and assign assignments.
Blocking assignment and non-blocking assignment
Always @ (Event-expression)
Begin <lhs1 = rhs1>
<Lhs2 = rhs2>
......
End
You can also write the always process blocks that adopt the non-blocking assignment method as follows:
Always @ (Event-expression)
Begin <lhs1 <= rhs1>
<Lhs2 <= rhs2>
......
End
The essential difference between the blocking assignment "=" and the non-blocking assignment "<=" is that the right-side expression of the non-blocking assignment statement is not immediately assigned to the left-side after calculation, instead, start the next statement to continue execution. We can understand it as all right-side expressions, such as rhs1 and rhs2, are calculated at the beginning of the process. After calculation, at the end of the process, the left-side variables lhs1 and lhs2 are assigned respectively.
The blocking assignment statement is assigned to the left variable immediately after each right expression is calculated, that is, the assignment statement lhs1 = after rhs1 is executed, lhs1 is updated immediately, at the same time, the statement lhs1 = rhs2 can be executed only after the execution of lhs1 = rhs1, and so on. The execution result of the previous statement directly affects the execution result of the subsequent statement.
Blocking and non-blocking in OpenGL