File: x_dump.v

package info (click to toggle)
vbs 1.4.0-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,200 kB
  • ctags: 4,401
  • sloc: cpp: 17,643; yacc: 1,880; ansic: 884; makefile: 419; sh: 375; lex: 345
file content (55 lines) | stat: -rw-r--r-- 714 bytes parent folder | download | duplicates (2)
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
48
49
50
51
52
53
54
55
/*
 * Test system tasks and functions.
 *  dependencies:
 *	initial procedural block
 *	always procedural block
 *	sequential block
 *	system tasks ($dump*)
 */

module test(a, b, c);
	reg a, b, c;
	inout a, b, c;

	always @(posedge a)
		b = ~b;

	always @(posedge b)
		c = ~c;

	always @(posedge c)
		a = ~a;
endmodule

module main;
	wire a, b, c;

	test t1(a, b, c);

	initial
		begin
		$dumpfile("myfile.vcd");
		a = 0;
		b = 0;
		c = 0;
		$dumpvars(0, main);
		$monitor("%d %d %d", a, b, c);
		$dumpon;
		#1 a = 1;
		#1 a = 0;
		#1 a = 1;
		$dumpoff;
		#1 a = 0;
		#1 a = 1;
		#1 a = 0;
		#1 a = 1;
		#1 a = 0;
		#1 a = 1;
		#1 a = 0;
		#1 a = 1;
		$dumpon;
		#1 a = 0;
		#1 a = 1;
		$dumpall;
		end
endmodule