Next: Embedded assertions
Up: Basic concepts
In a case where more than one value is assigned to a signal at
exactly the same time, then the following resolution rule applies:
This rule can be used, for example, to model a tristate bus. For example:
- If all assigned values are equal, then the signal is assigned the common value.
- If any assigned values are unequal, then the signal is assigned X (the undefined value).
if(enable1) bus = data1;
if(enable2) bus = data2;
In this case, when only one of the two enable signals is true, then the bus
is equal to the corresponding data signal. If both enables are true and
the data values are the same, then bus = data1 = data2. Else bus = X.