I am trying to create a CPU on an FPGA, but I don't know how to create the main data bus. Ideally, I would have a wire array that has multiple inputs and outputs which get enabled at different times, but if I do that I get a "Multiple Driver Nets" error.
I have tried using wires, registers, and different assignment methods to achieve this result, but I can't get it to work, because it will always inherently have multiple input connections.
module Top(
input [7:0] sw,
output [7:0] led,
input we,
input oe,
input clk
);
wire [7:0] regData;
Register register (regData, we, oe, clk);
assign led = regData;
assign regData = sw;
endmodule
The exact error message is "[DRC MDRV-1] Multiple Driver Nets: Net led_OBUF[0] has multiple drivers: register/led_OBUF[0]_inst_i_1/O, and sw_IBUF[0]_inst/O. " one of those for each bit in the register (8 bits)