aboutsummaryrefslogtreecommitdiffstats
path: root/examples/gowin/testbench.v
blob: 6d206381e4937424e3ca0119a682c1531f8929ad (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
module testbench;
	reg clk;

	initial begin
		#5 clk = 0;
		forever #5 clk = ~clk;
	end

	wire [15:0] leds;

	initial begin
		// $dumpfile("testbench.vcd");
		// $dumpvars(0, testbench);
		$monitor("%b", leds);
	end

	demo uut (
		.clk  (clk  ),
`ifdef POST_IMPL
		.\leds[0]  (leds[0]),
		.\leds[1]  (leds[1]),
		.\leds[2]  (leds[2]),
		.\leds[3]  (leds[3]),
		.\leds[4]  (leds[4]),
		.\leds[5]  (leds[5]),
		.\leds[6]  (leds[6]),
		.\leds[7]  (leds[7]),
		.\leds[8]  (leds[8]),
		.\leds[9]  (leds[9]),
		.\leds[10] (leds[10]),
		.\leds[11] (leds[11]),
		.\leds[12] (leds[12]),
		.\leds[13] (leds[13]),
		.\leds[14] (leds[14]),
		.\leds[15] (leds[15])
`else
		.leds(leds)
`endif
	);
endmodule