When I want to make an elevator-like programme project, whatever I do to edit my module it always says:
Assignment under multiple single edges is not supported for synthesis
Some variables:
tar_floor : user input, target floor;
cur_floor : current floor located;
clk_cnt : variable added 1 each time to count.
always @(posedge clk or posedge clr) begin
if(clr)
begin
cur_floor = 0; //if clear button pressed,clear all statement
tar_floor=0;
upordown=0;
clk_cnt=0;
ryg=3'b001; //green
rgb=3'b111;
end
if(tar_floor==cur_floor) //nothing to do
begin
clk_cnt=0;
upordown=0;
clk_cnt=0;
ryg=3'b001; //green
rgb=3'b111;
end
else
begin//when up or down
clk_cnt = clk_cnt +1;
if (tar_floor>cur_floor)
begin
ryg=3'b100;//red
if (clk_cnt[27])
rgb=rgb+1;
if(clk_cnt[28])
begin
if (cur_floor<=6)
cur_floor=cur_floor+1;
end
end
if (tar_floor<cur_floor)
begin
ryg=3'b010;//yello
if (clk_cnt[27])
rgb=rgb+1;
if(clk_cnt[28])
begin
if (cur_floor>=1)
cur_floor=cur_floor-1;
end
end
end
end
wire tmp=cur_floor;
mytask_sub A1(.a_to_g(a_to_g),.cur_floor(tmp));//call show sub modudle
endmodule
At clk_cnt = clk_cnt +1;
, it says:
Assignment under multiple single edges is not supported for synthesis
Please help me solve this error.