aboutsummaryrefslogtreecommitdiffstats
path: root/tests/simple/ifdef_1.v
blob: f1358185c498b411357e1a065074fed2ae4f659c (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
module ifdef_1_top(o1, o2, o3, o4);

`define FAIL input wire not_a_port;

`ifdef COND_1
	`FAIL
`elsif COND_2
	`FAIL
`elsif COND_3
	`FAIL
`elsif COND_4
	`FAIL
`else

	`define COND_4
	output wire o4;

	`ifdef COND_1
		`FAIL
	`elsif COND_2
		`FAIL
	`elsif COND_3
		`FAIL
	`elsif COND_4

		`define COND_3
		output wire o3;

		`ifdef COND_1
			`FAIL
		`elsif COND_2
			`FAIL
		`elsif COND_3

			`define COND_2
			output wire o2;

			`ifdef COND_1
				`FAIL
			`elsif COND_2

				`define COND_1
				output wire o1;

				`ifdef COND_1

					`ifdef COND_1
					`elsif COND_2
						`FAIL
					`elsif COND_3
						`FAIL
					`elsif COND_4
						`FAIL
					`else
						`FAIL
					`endif

				`elsif COND_2
					`FAIL
				`elsif COND_3
					`FAIL
				`elsif COND_4
					`FAIL
				`else
					`FAIL
				`endif

			`elsif COND_3
				`FAIL
			`elsif COND_4
				`FAIL
			`else
				`FAIL
			`endif

		`elsif COND_4
			`FAIL
		`else
			`FAIL
		`endif

	`else
		`FAIL
	`endif

`endif

endmodule