always @(posedge clk or negedge rst_n)begin
if(rst_n==1'b0)begin
flag_add <= 0;
end
else if(en==1)begin
flag_add <= 1;
end
else if(end_cnt1)begin
flag_add <= 0;
end
end
reg dout ;
always @(posedge clk or negedge rst_n)begin
if(rst_n==1'b0)begin
dout <= 0;
end
else if(add_cnt0 && cnt0==1-1)begin
dout <= 1;
end
else if(end_cnt0)begin
dout <= 0;
end
end