aboutsummaryrefslogtreecommitdiffstats
path: root/tests/sim/tb/tb_dff.v
blob: aa41d1c6cda2817c4a2050661b6f870891bfb8c4 (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
`timescale 1ns/1ns 
module tb_dff();
	reg clk = 0;
	reg d = 0;
	wire q;

	dff uut(.clk(clk),.d(d),.q(q));

	always
		#(5) clk <= !clk;

	initial
	begin
		$dumpfile("tb_dff");
		$dumpvars(0,tb_dff);
		#10
		d = 1;
		#10
		d = 0;
		#10
		d = 1;
		#10
		d = 0;
		#10
		d = 1;
		#10
		d = 0;
		#10
		d = 1;
		#10
		d = 0;
		#10
		d = 1;
		#10
		d = 0;
		#10
		d = 1;
		#10
		d = 0;
		#10
		d = 1;
		#10
		d = 0;
		#10
		$finish;
	end
endmodule