lgeorge123
Full Member level 2
I have a hdl file to multiplex two input (8 bit width) to one output (8 bit width) select by sel1 and sel2 (both of them are differential input) . sel1 is rasing edge and sel2 is falling while sel1 falling edge and sel2 is rasing edge. The following file is written but after compilation Quartus said it is multiple constant driver .
Can someone help me ?
module mux3(sel1,sel2,data1,data2,data3);
input sel1,sel2;
input [7:0] data1;
input [7:0] data2;
output [7:0] data3;
reg [7:0] data3;
always @(posedge sel1)
begin
data3[7:0] <= data1[7:0];
end
always @(posedge sel2)
begin
data3[7:0] <= data2[7:0];
end
endmodule
Can someone help me ?
module mux3(sel1,sel2,data1,data2,data3);
input sel1,sel2;
input [7:0] data1;
input [7:0] data2;
output [7:0] data3;
reg [7:0] data3;
always @(posedge sel1)
begin
data3[7:0] <= data1[7:0];
end
always @(posedge sel2)
begin
data3[7:0] <= data2[7:0];
end
endmodule