User guide
2-21
Modeling Your Design
The following code examples illustrate this rule:
Example 1
VCS infers that the following always block is combinatorial, not
sequential:
always @ (a or b)
y = a or b
Here the sensitivity list event control is level sensitive and VCS
assigns a value to y whether a or b are true or false.
Example 2
VCS also infers that the following always block is combinatorial, not
sequential:
always @ (sel or a or b)
if (sel)
y=a;
else
y=b;
Here the sensitivity list event control is also level sensitive and VCS
assigns a value to y whether a, b, or sel are true or false. Note that
the if-else conditional statement uses signal sel completely, VCS
executes an assignment statement whether sel is true or false.
Example 3
VCS infers that the following always block is sequential:
always @ (sel or a or b)
if (sel)
y=a;
Here there is no simulation event when signal sel is false (0).