Hardware Design: SIE
Sign in or create your account | Project List | Help
Hardware Design: SIE Git Source Tree
Root/
| 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 | |
| 18 | module tb_pixelfeed(); |
| 19 | |
| 20 | reg sys_clk; |
| 21 | initial sys_clk = 1'b0; |
| 22 | always #5 sys_clk = ~sys_clk; |
| 23 | |
| 24 | reg sys_rst; |
| 25 | reg vga_rst; |
| 26 | |
| 27 | wire pixel_valid; |
| 28 | wire fml_stb; |
| 29 | wire [25:0] fml_adr; |
| 30 | |
| 31 | initial begin |
| 32 | sys_rst = 1'b1; |
| 33 | vga_rst = 1'b1; |
| 34 | #20 sys_rst = 1'b0; |
| 35 | #20 vga_rst = 1'b0; |
| 36 | end |
| 37 | |
| 38 | vgafb_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 | |
| 57 | always @(posedge sys_clk) $display("%x", fml_adr); |
| 58 | |
| 59 | initial #600 $finish; |
| 60 | |
| 61 | endmodule |
| 62 |
Branches:
master
