From 2ac48fa0e44016a6cb49cab84a154eb7ec2dcab4 Mon Sep 17 00:00:00 2001 From: Michael Abed Date: Wed, 21 Mar 2012 13:17:47 -0400 Subject: Initial Commit --- TEST_ClockDivider.v | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 TEST_ClockDivider.v (limited to 'TEST_ClockDivider.v') diff --git a/TEST_ClockDivider.v b/TEST_ClockDivider.v new file mode 100644 index 0000000..e7f6cfe --- /dev/null +++ b/TEST_ClockDivider.v @@ -0,0 +1,65 @@ +`timescale 1ns / 1ps + +//////////////////////////////////////////////////////////////////////////////// +// Company: +// Engineer: +// +// Create Date: 15:29:06 03/16/2012 +// Design Name: ClockDivider +// Module Name: /home/michael/Documents/School/EC311/lab4/TEST_ClockDivider.v +// Project Name: lab4 +// Target Device: +// Tool versions: +// Description: +// +// Verilog Test Fixture created by ISE for module: ClockDivider +// +// Dependencies: +// +// Revision: +// Revision 0.01 - File Created +// Additional Comments: +// +//////////////////////////////////////////////////////////////////////////////// + +module TEST_ClockDivider; + + // Inputs + reg clk_in; + reg rst; + reg [23:0] count; + + // Outputs + wire clk_out; + + // Instantiate the Unit Under Test (UUT) + ClockDivider uut ( + .clk_in(clk_in), + .rst(rst), + .count(count), + .clk_out(clk_out) + ); + + reg [15:0] i = 0; + + initial begin + // Initialize Inputs + clk_in = 0; + rst = 0; + count = 0; + + // Wait 100 ns for global reset to finish + #50; + + // Add stimulus here + + count = 15; + + for (i = 0; i < 200; i = i + 1) begin + #5; clk_in = ~clk_in; + end + + end + +endmodule + -- cgit v1.2.3