OpenCores
URL https://opencores.org/ocsvn/t6507lp/t6507lp/trunk

Subversion Repositories t6507lp

[/] [t6507lp/] [trunk/] [rtl/] [verilog/] [t2600_kb_tb.v] - Blame information for rev 258

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 211 creep
////////////////////////////////////////////////////////////////////////////
2
////                                                                    ////
3
//// T2600LP IP Core                                                    ////
4
////                                                                    ////
5
//// This file is part of the T2600LP project                           ////
6
//// http://www.opencores.org/cores/t2600/                              ////
7
////                                                                    ////
8
//// Description                                                        ////
9
//// t2600 keyboard controller                                          ////
10
////                                                                    ////
11
//// TODO:                                                              ////
12
////                                                                    ////
13
//// Author(s):                                                         ////
14
//// - Gabriel Oshiro Zardo, gabrieloshiro@gmail.com                    ////
15
//// - Samuel Nascimento Pagliarini (creep), snpagliarini@gmail.com     ////
16
////                                                                    ////
17
////////////////////////////////////////////////////////////////////////////
18
////                                                                    ////
19
//// Copyright (C) 2001 Authors and OPENCORES.ORG                       ////
20
////                                                                    ////
21
//// This source file may be used and distributed without               ////
22
//// restriction provided that this copyright statement is not          ////
23
//// removed from the file and that any derivative work contains        ////
24
//// the original copyright notice and the associated disclaimer.       ////
25
////                                                                    ////
26
//// This source file is free software; you can redistribute it         ////
27
//// and/or modify it under the terms of the GNU Lesser General         ////
28
//// Public License as published by the Free Software Foundation;       ////
29
//// either version 2.1 of the License, or (at your option) any         ////
30
//// later version.                                                     ////
31
////                                                                    ////
32
//// This source is distributed in the hope that it will be             ////
33
//// useful, but WITHOUT ANY WARRANTY; without even the implied         ////
34
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR            ////
35
//// PURPOSE. See the GNU Lesser General Public License for more        ////
36
//// details.                                                           ////
37
////                                                                    ////
38
//// You should have received a copy of the GNU Lesser General          ////
39
//// Public License along with this source; if not, download it         ////
40
//// from http://www.opencores.org/lgpl.shtml                           ////
41
////                                                                    ////
42
////////////////////////////////////////////////////////////////////////////
43
 
44
`include "timescale.v"
45
 
46
module t2600_kb_tb();
47
        // all inputs are regs
48
        reg clk;
49
        reg reset_n;
50 214 creep
        reg kd;
51
        reg kc;
52 211 creep
        // all outputs are wires
53
        wire [15:0] io_lines;
54 214 creep
 
55
        always #10 clk <= ~clk;
56 211 creep
 
57 214 creep
        initial begin
58
                clk = 1'b0;
59
                reset_n = 1'b1;
60
                kd = 1'b0;
61
                kc = 1'b0;
62 211 creep
 
63 214 creep
                #10;
64
                reset_n = 1'b0;
65
 
66
                #40000;
67
                $finish;
68 211 creep
        end
69 214 creep
 
70
        always @(clk) begin
71
                kc = $random;
72
                kd = $random;
73
        end
74
 
75
 
76
        T2600_KB T2600_KB (
77 211 creep
                .CLK            (clk),
78
                .RST            (reset_n),
79 214 creep
                .io_lines       (io_lines),
80
                .KC             (kc),
81
                .KD             (kd)
82 211 creep
        );
83 214 creep
 
84
 
85 211 creep
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.