Altera_Forum
Honored Contributor
18 years agoCan't resolve multiple constant drivers for net "next_state"
Dear Sir,
I am writing one simple program for traffic signalling. I got the following error. Error (10028): Can't resolve multiple constant drivers for net "next_state" at traffic.v(43) can anyone help to solve this problem?? the code is below: `define GREEN 0 `define YELLOW 1 `define RED 2 module traffic(R, G, Y, clock, reset); output R, Y, G; // Red, Yellow, Green Signal lines input clock, reset; reg next_state; reg R, Y, G; always @(posedge clock) begin case (next_state) `GREEN: begin next_state = `YELLOW; G=1; R = 0; end `YELLOW: begin next_state = `RED; Y=1; G = 0; end `RED: begin next_state = `GREEN; R = 1; Y = 0; end endcase end always @(reset) next_state =`RED; endmodule //