module top_module(input a, input b, output y);
assign y = a;
assign y = b;
endmodule
⚠️ Important Note: Multiple Drivers on a Wire
In this example, the wire y is driven by two continuous assignments:
assign y = a; assign y = b;
🔍 What happens?
y takes that value.x (unknown).✅ Best Practices for Real Designs
assign y = a & b; or assign y = a | b;assign y = sel ? a : b;z) carefully with arbitration.👉 Takeaway: In clean designs, each wire should have exactly one driver. Multiple drivers are for special cases only (like testbenches or controlled tri-state buses).