always @(posedge clk or negedge rst)
begin
if(!rst)
counter2<=0;
else
begin
if(counter2==49)
counter2<=0;
else
counter2<=counter2+1;
end
end
always @(posedge scl)
begin
counter2<=0;
end
以上代码在做DC综合时总是报错:如下
counter2[5] or a directly connected net is driven by more than one source, and not all drivers are three-state.
counter2计数器的每一位都报同样的错,以上错误是counter2计数器的第5位报错。
请高手指教,怎么修改以上代码,但是功能不能改变。