// output [9:0] LED_DATA; //LED data output.
output [3:0] LED_DATA;
//===========================================================================
//Wire and reg declaration
//===========================================================================
wire SYSCLK;
wire RST_B;
//reg [9:0] LED_DATA;
reg [3:0] LED_DATA;
//===========================================================================
//Wire and reg in the module
//===========================================================================
reg [23:0] TIME_CNT; //Count the time, everyone show 1ms.
//reg [9:0] LED_DATA_N; //Next value of LED_DATA.
reg [9:0] LED_DATA_N;
wire [21:0] TIME_CNT_N; //Next value of TIME_CNT.
//Count the time, let the every led show 50ms.
always @(negedge RST_B or negedge SYSCLK)
begin
if(!RST_B)
TIME_CNT <= 22'b0;// 2^21=1024*1024*2 50MHZ
else
TIME_CNT <= TIME_CNT_N;
end
assign TIME_CNT_N = TIME_CNT + 22'b1;
//LED light output control.
always @(negedge RST_B or negedge SYSCLK)
begin
if(!RST_B)
// LED_DATA <= `UD 10'b11_1111_1110;
LED_DATA <= 4'b1110;
else
LED_DATA <= LED_DATA_N;
end