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

Subversion Repositories t6507lp

[/] [t6507lp/] [trunk/] [rtl/] [verilog/] [t2600_kb_tb.v] - Diff between revs 211 and 214

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 211 Rev 214
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////                                                                    ////
////                                                                    ////
//// T2600LP IP Core                                                    ////
//// T2600LP IP Core                                                    ////
////                                                                    ////
////                                                                    ////
//// This file is part of the T2600LP project                           ////
//// This file is part of the T2600LP project                           ////
//// http://www.opencores.org/cores/t2600/                              ////
//// http://www.opencores.org/cores/t2600/                              ////
////                                                                    ////
////                                                                    ////
//// Description                                                        ////
//// Description                                                        ////
//// t2600 keyboard controller                                          ////
//// t2600 keyboard controller                                          ////
////                                                                    ////
////                                                                    ////
//// TODO:                                                              ////
//// TODO:                                                              ////
////                                                                    ////
////                                                                    ////
//// Author(s):                                                         ////
//// Author(s):                                                         ////
//// - Gabriel Oshiro Zardo, gabrieloshiro@gmail.com                    ////
//// - Gabriel Oshiro Zardo, gabrieloshiro@gmail.com                    ////
//// - Samuel Nascimento Pagliarini (creep), snpagliarini@gmail.com     ////
//// - Samuel Nascimento Pagliarini (creep), snpagliarini@gmail.com     ////
////                                                                    ////
////                                                                    ////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////                                                                    ////
////                                                                    ////
//// Copyright (C) 2001 Authors and OPENCORES.ORG                       ////
//// Copyright (C) 2001 Authors and OPENCORES.ORG                       ////
////                                                                    ////
////                                                                    ////
//// This source file may be used and distributed without               ////
//// This source file may be used and distributed without               ////
//// restriction provided that this copyright statement is not          ////
//// restriction provided that this copyright statement is not          ////
//// removed from the file and that any derivative work contains        ////
//// removed from the file and that any derivative work contains        ////
//// the original copyright notice and the associated disclaimer.       ////
//// the original copyright notice and the associated disclaimer.       ////
////                                                                    ////
////                                                                    ////
//// This source file is free software; you can redistribute it         ////
//// This source file is free software; you can redistribute it         ////
//// and/or modify it under the terms of the GNU Lesser General         ////
//// and/or modify it under the terms of the GNU Lesser General         ////
//// Public License as published by the Free Software Foundation;       ////
//// Public License as published by the Free Software Foundation;       ////
//// either version 2.1 of the License, or (at your option) any         ////
//// either version 2.1 of the License, or (at your option) any         ////
//// later version.                                                     ////
//// later version.                                                     ////
////                                                                    ////
////                                                                    ////
//// This source is distributed in the hope that it will be             ////
//// This source is distributed in the hope that it will be             ////
//// useful, but WITHOUT ANY WARRANTY; without even the implied         ////
//// useful, but WITHOUT ANY WARRANTY; without even the implied         ////
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR            ////
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR            ////
//// PURPOSE. See the GNU Lesser General Public License for more        ////
//// PURPOSE. See the GNU Lesser General Public License for more        ////
//// details.                                                           ////
//// details.                                                           ////
////                                                                    ////
////                                                                    ////
//// You should have received a copy of the GNU Lesser General          ////
//// You should have received a copy of the GNU Lesser General          ////
//// Public License along with this source; if not, download it         ////
//// Public License along with this source; if not, download it         ////
//// from http://www.opencores.org/lgpl.shtml                           ////
//// from http://www.opencores.org/lgpl.shtml                           ////
////                                                                    ////
////                                                                    ////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
 
 
`include "timescale.v"
`include "timescale.v"
 
 
module t2600_kb_tb();
module t2600_kb_tb();
        // all inputs are regs
        // all inputs are regs
        reg clk;
        reg clk;
        reg reset_n;
        reg reset_n;
 
        reg kd;
 
        reg kc;
        // all outputs are wires
        // all outputs are wires
        wire [15:0] io_lines;
        wire [15:0] io_lines;
 
 
        initial clk = 0;
 
        always #10 clk <= ~clk;
        always #10 clk <= ~clk;
 
 
        always @(posedge clk) begin
        initial begin
                //$display("reset is %b", reset_n);
                clk = 1'b0;
                //$display("alu_enable is %b", alu_enable);
                reset_n = 1'b1;
                //$display("alu_opcode is %h", alu_opcode);
                kd = 1'b0;
                //$display("alu_a is %d", alu_a);
                kc = 1'b0;
 
 
 
                #10;
 
                reset_n = 1'b0;
 
 
 
                #40000;
 
                $finish;
 
        end
 
 
 
        always @(clk) begin
 
                kc = $random;
 
                kd = $random;
        end
        end
 
 
        t2600_kb t2600_kb (
 
 
        T2600_KB T2600_KB (
                .CLK            (clk),
                .CLK            (clk),
                .RST            (reset_n),
                .RST            (reset_n),
                .io_lines       (alu_enable)
                .io_lines       (io_lines),
 
                .KC             (kc),
 
                .KD             (kd)
        );
        );
 
 
 
 
endmodule
endmodule
 
 

powered by: WebSVN 2.1.0

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