errors · bitdewfpga bit, yosys
design.sv:2 and design.sv:3: ERROR [two-assign-drivers]: led is written by two continuous assigns (design.sv:2 and design.sv:3): yosys resolved the conflict to a constant, so the board would not do what the simulation showed. Fix: drive led from one assign (select with a mux: assign led = sel ? b : a;).
design.sv:2 and design.sv:3: ERROR [two-assign-drivers]: led is written by two continuous assigns (design.sv:2 and design.sv:3): yosys resolved the conflict to a constant, so the board would not do what the simulation showed. Fix: drive led from one assign (select with a mux: assign led = sel ? b : a;). https://nosey-dewdrop.github.io/dewfpga/errors/two-assign-drivers/
Why does it happen?
Every assign is a permanent driver. Two of them on one wire fight; on the chip a wire has one driver, so yosys resolves the conflict to a constant with a warning, and the netlist no longer matches the RTL. The second line of the message names both assigns.
What is the fix?
One assign, with the choice written as a mux:
assign led = sel ? ~sw : sw;