errors · bitdewfpga bit, yosys

design.sv:3 and design.sv:7: ERROR [multiple-drivers]: q is written from more than one place (design.sv:3 and design.sv:7): yosys resolved the conflict to a constant, so the board would not do what the simulation showed. Fix: drive q from one always block or one assign; give each other writer its own signal.

design.sv:3 and design.sv:7: ERROR [multiple-drivers]: q is written from more than one place (design.sv:3 and design.sv:7): yosys resolved the conflict to a constant, so the board would not do what the simulation showed. Fix: drive q from one always block or one assign; give each other writer its own signal. https://nosey-dewdrop.github.io/dewfpga/errors/multiple-drivers/

Why does it happen?

yosys found two drivers on the signal (its "multiple conflicting drivers" warning) and resolved them to a constant. When the two writers are two always blocks, an always block and an assign, or two assigns, dewfpga names that case (two-always-drivers, always-and-assign, two-assign-drivers); this is the general message, printed when the writers are something else (a task, an instance port and an assign) or when the scan could not read them. The lines are the ones yosys named.

What is the fix?

Look at the lines named: every signal gets one writer. Two always blocks merge into one; an assign next to an always block goes into the block; a submodule output and an assign on the same wire get two wires.

Which command prints it?