next up previous contents
Next: Embedded assertions Up: Basic concepts Previous: Conditionals   Contents

Resolution

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:
always
  begin
    if(enable1) bus = data1;
  end

always
  begin
    if(enable2) bus = data2;
  end
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.

2003-01-07