I wrote a test program that will assign a pin to 1 when the positive edge of a signal is found, and to 0 when a negative edge of a different signal is found.
By using 2 always statements, I get the multiple constant drivers error. How can I edit my code so that I only use 1 always block and not get the error?
module clockedge(clock1, clock2, out);
input clock1;
input clock2;
output out;
reg out;
always@(posedge clock1) begin
out=1;
end
always@(negedge clock2) begin
out=0;
end
endmodule
I am compiling in Quartus II for a Cyclone II.
The errors that I get:
- Error (10028): Can't resolve multiple constant drivers for net "out" at clockedge.v(11)
- Error (10029): Constant driver at clockedge.v(7)