Prev Problem
Next Problem

26. Shared Line using wor

module alarm_siren(
  input  wire alarm1, alarm2,
  output wor  siren           // wor = wired-OR resolution
);
  // Two independent drivers onto the same 'siren' net
  assign siren = alarm1;
  assign siren = alarm2;
endmodule

💡 Remember

  • wor resolves multiple drivers by bitwise OR—avoids x on 0/1 conflicts.
  • Default wire with multiple conflicting drivers can go unknown (x), but wor defines resolution.
  • Net resolution behaviour is part of the standard’s wired nets semantics.