Root/lm32/logic/sakc/cores/vgafb/test/tb_pixelfeed.v

1/*
2 * Milkymist VJ SoC
3 * Copyright (C) 2007, 2008, 2009 Sebastien Bourdeauducq
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 3 of the License.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18module tb_pixelfeed();
19
20reg sys_clk;
21initial sys_clk = 1'b0;
22always #5 sys_clk = ~sys_clk;
23
24reg sys_rst;
25reg vga_rst;
26
27wire pixel_valid;
28wire fml_stb;
29wire [25:0] fml_adr;
30
31initial begin
32    sys_rst = 1'b1;
33    vga_rst = 1'b1;
34    #20 sys_rst = 1'b0;
35    #20 vga_rst = 1'b0;
36end
37
38vgafb_pixelfeed dut(
39    .sys_clk(sys_clk),
40    .sys_rst(sys_rst),
41    .vga_rst(vga_rst),
42    
43    .nbursts(18'd100),
44    .baseaddress(26'd1024),
45    .baseaddress_ack(),
46    
47    .fml_adr(fml_adr),
48    .fml_stb(fml_stb),
49    .fml_ack(fml_stb),
50    .fml_di(64'hcafebabedeadbeef),
51    
52    .pixel_valid(pixel_valid),
53    .pixel(),
54    .pixel_ack(pixel_valid)
55);
56
57always @(posedge sys_clk) $display("%x", fml_adr);
58
59initial #600 $finish;
60
61endmodule
62

Archive Download this file

Branches:
master



interactive