URL
https://opencores.org/ocsvn/layer2/layer2/trunk
[/] [layer2/] [trunk/] [vhdl/] [keyb/] [bench/] [tb_keyb.vhd] - Blame information for rev 6
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
2 |
idiolatrie |
--------------------------------------------------------------------------------
|
2 |
|
|
-- --
|
3 |
|
|
--------------------------------------------------------------------------------
|
4 |
|
|
-- Version: 1.0 --
|
5 |
|
|
-- Device: Spartan 3E --
|
6 |
|
|
-- --
|
7 |
|
|
-- DESCRIPTION --
|
8 |
|
|
-- --
|
9 |
|
|
-- --
|
10 |
|
|
--------------------------------------------------------------------------------
|
11 |
|
|
-- Copyright (C)2011 Mathias Hörtnagl <mathias.hoertnagl@gmail.comt> --
|
12 |
|
|
-- --
|
13 |
|
|
-- This program is free software: you can redistribute it and/or modify --
|
14 |
|
|
-- it under the terms of the GNU General Public License as published by --
|
15 |
|
|
-- the Free Software Foundation, either version 3 of the License, or --
|
16 |
|
|
-- (at your option) any later version. --
|
17 |
|
|
-- --
|
18 |
|
|
-- This program is distributed in the hope that it will be useful, --
|
19 |
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
|
20 |
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --
|
21 |
|
|
-- GNU General Public License for more details. --
|
22 |
|
|
-- --
|
23 |
|
|
-- You should have received a copy of the GNU General Public License --
|
24 |
|
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>. --
|
25 |
|
|
--------------------------------------------------------------------------------
|
26 |
|
|
library ieee;
|
27 |
|
|
use ieee.std_logic_1164.all;
|
28 |
|
|
use ieee.numeric_std.all;
|
29 |
|
|
|
30 |
|
|
library work;
|
31 |
|
|
use work.iwb.all;
|
32 |
|
|
use work.ikeyb.all;
|
33 |
|
|
|
34 |
|
|
entity tb_keyb is
|
35 |
|
|
port(
|
36 |
|
|
CLK : in std_logic;
|
37 |
|
|
PS2_CLK : in std_logic;
|
38 |
|
|
PS2_DATA : in std_logic;
|
39 |
|
|
LED : out std_logic_vector(7 downto 0)
|
40 |
|
|
);
|
41 |
|
|
end tb_keyb;
|
42 |
|
|
|
43 |
|
|
architecture tb of tb_keyb is
|
44 |
|
|
|
45 |
|
|
signal si : slave_in_t;
|
46 |
|
|
signal so : slave_out_t;
|
47 |
|
|
signal intr : std_logic;
|
48 |
|
|
begin
|
49 |
|
|
|
50 |
|
|
si.clk <= CLK;
|
51 |
|
|
si.rst <= '0';
|
52 |
|
|
si.we <= '0';
|
53 |
|
|
si.stb <= '1' when intr = '1' else '0';
|
54 |
|
|
|
55 |
|
|
uut0 : keyb port map(
|
56 |
|
|
si => si,
|
57 |
|
|
so => so,
|
58 |
|
|
PS2_CLK => PS2_CLK,
|
59 |
|
|
PS2_DATA => PS2_DATA,
|
60 |
|
|
intr => intr
|
61 |
|
|
);
|
62 |
|
|
|
63 |
|
|
LED <= so.dat(7 downto 0);
|
64 |
|
|
end tb;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.