always @(posedge sys_clk or negedge rst_en) begin
if(!rst_en)
counter<=1'b0;
else if(counter<(counter_max-1)) begin
counter_en<=1'b0;
counter<=counter+1'b1;
end
else begin
counter_en<=1'b1;
counter<=1'b0;
end
end
always @(*) begin
if(rst_en==1'b0) begin
LEDCH=6'b00_0000;
LEDSEG=8'b0000_0000;
end
else if(counter_en==1'b1) begin
if(LED_Num<6'd5)
LED_Num=LED_Num+6'd1;
else
LED_Num=6'd0;
LEDCH=(6'b0000_01<<LED_Num);
LEDSEG=8'hff;
end