流水灯测试文件

// --------------------------------------------------------------------
// >>>>>>>>>>>>>>>>>>>>>>>>> COPYRIGHT NOTICE <<<<<<<<<<<<<<<<<<<<<<<<<
// --------------------------------------------------------------------
// Module: Water_led_test
// 
// Author: Step
// 
// Description: Testbench for Water_led
// 
// Web: www.ecbcamp.com
// 
// --------------------------------------------------------------------
// Code Revision History :
// --------------------------------------------------------------------
// Version: |Mod. Date:   |Changes Made:
// V1.0     |2015/11/11   |Initial ver
// --------------------------------------------------------------------
`timescale 1ns / 100ps
module Water_led_test;
 
parameter CLK_PERIOD = 40;  //CLK_PERIOD=40ns, Frequency=25MHz
parameter CNT_NUM = 10;
 
reg sys_clk;
initial
	sys_clk = 1'b0;
always
	sys_clk = #(CLK_PERIOD/2) ~sys_clk;
 
reg sys_rst_n;  //active low
initial 
	begin
		sys_rst_n = 1'b0;
		#100;
		sys_rst_n = 1'b1;
	end
 
wire [7:0] led_out;
Water_led #(.CNT_NUM(CNT_NUM))
Water_led_uut
(
.clk_in(sys_clk),
.rst_n_in(sys_rst_n),
.led_out(led_out)
);
 
endmodule