always@(posedge clk or negedge rst_n)begin
if(rst_n==1'b0)begin
miao_g <= 0;
end
else if(add_miao_g)begin
if(end_miao_g)begin
miao_g <= 0;
end
else begin
miao_g <= miao_g + 1;
end
end
end
always @(posedge clk or negedge rst_n)begin
if(rst_n==1'b0)begin
miao_s <= 0;
end
else if(add_miao_s)begin
if(end_miao_s)begin
miao_s <= 0;
end
else begin
miao_s <= miao_s + 1;
end
end
end
always @(posedge clk or negedge rst_n)begin
if(rst_n==1'b0)begin
fen_g <= 0;
end
else if(add_fen_g)begin
if(end_fen_g)begin
fen_g <= 0;
end
else begin
fen_g <= fen_g + 1;
end
end
end
always @(posedge clk or negedge rst_n)begin
if(rst_n==1'b0)begin
fen_s <= 0;
end
else if(add_fen_s)begin
if(end_fen_s)begin
fen_s <= 0;
end
else begin
fen_s <= fen_s + 1;
end
end
end
always @(posedge clk or negedge rst_n)begin
if(rst_n==1'b0)begin
shi_g <= 0;
end
else if(add_shi_g)begin
if(end_shi_g)begin
shi_g <= 0;
end
else begin
shi_g <= shi_g + 1;
end
end
end
always @(posedge clk or negedge rst_n)begin
if(rst_n==1'b0)begin
shi_s <= 0;
end
else if(add_shi_s)begin
if(end_shi_s)begin
shi_s <= 0;
end
else begin
shi_s <= shi_s + 1;
end
end
end