forked from tgiv014/ECE441-Project-2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path4bit_counter_tb.v
More file actions
34 lines (25 loc) · 761 Bytes
/
4bit_counter_tb.v
File metadata and controls
34 lines (25 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*================================================
Thomas Gorham
ECE 441 Spring 2017
Project 2 - Clock divider
Description: This module tests the clock divider
implemented in clock_divider.v
================================================*/
`timescale 100 ns / 1 ns
module fourbit_ctr_tb;
reg input_clk;
reg ar_test;
wire [3:0] ctr_test;
fourbit_ctr ctr ( .clk(input_clk), .ar(ar_test), .ctr(ctr_test));
initial
begin
input_clk = 1'b0;
ar_test = 1'b1; // Initially reset line is high
#1 ar_test = 1'b0; // Wait one time unit and make a negedge
#1 ar_test = 1'b1; // Bring it back up
end
always
begin
#1 input_clk = ~input_clk; // Invert clk
end
endmodule