Line 1... |
Line 1... |
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
--
|
--
|
-- Testbench for the
|
-- Testbench for the
|
-- SNESpad controller core
|
-- SNESpad controller core
|
--
|
--
|
-- $Id: tb.vhd,v 1.1 2004-10-05 17:05:31 arniml Exp $
|
-- $Id: tb.vhd,v 1.2 2004-10-05 18:19:08 arniml Exp $
|
--
|
--
|
-- Copyright (c) 2004, Arnim Laeuger (arniml@opencores.org)
|
-- Copyright (c) 2004, Arnim Laeuger (arniml@opencores.org)
|
--
|
--
|
-- All rights reserved
|
-- All rights reserved
|
--
|
--
|
Line 54... |
Line 54... |
|
|
end tb;
|
end tb;
|
|
|
|
|
use work.snespad_pack.all;
|
use work.snespad_pack.all;
|
|
use work.snespad_comp.snespad;
|
|
|
architecture behav of tb is
|
architecture behav of tb is
|
|
|
constant period_c : time := 100 ns;
|
constant period_c : time := 100 ns;
|
constant num_pads_c : natural := 2;
|
constant num_pads_c : natural := 2;
|
constant reset_level_c : natural := 0;
|
constant reset_level_c : natural := 0;
|
constant button_level_c : natural := 0;
|
constant button_level_c : natural := 0;
|
|
|
component snespad
|
|
generic (
|
|
num_pads_g : natural := 1;
|
|
reset_level_g : natural := 0;
|
|
button_level_g : natural := 0;
|
|
clocks_per_6us_g : natural := 6
|
|
);
|
|
port (
|
|
clk_i : in std_logic;
|
|
reset_i : in std_logic;
|
|
pad_clk_o : out std_logic;
|
|
pad_latch_o : out std_logic;
|
|
pad_data_i : in std_logic_vector(num_pads_g-1 downto 0);
|
|
but_a_o : out std_logic_vector(num_pads_g-1 downto 0);
|
|
but_b_o : out std_logic_vector(num_pads_g-1 downto 0);
|
|
but_x_o : out std_logic_vector(num_pads_g-1 downto 0);
|
|
but_y_o : out std_logic_vector(num_pads_g-1 downto 0);
|
|
but_start_o : out std_logic_vector(num_pads_g-1 downto 0);
|
|
but_sel_o : out std_logic_vector(num_pads_g-1 downto 0);
|
|
but_tl_o : out std_logic_vector(num_pads_g-1 downto 0);
|
|
but_tr_o : out std_logic_vector(num_pads_g-1 downto 0);
|
|
but_up_o : out std_logic_vector(num_pads_g-1 downto 0);
|
|
but_down_o : out std_logic_vector(num_pads_g-1 downto 0);
|
|
but_left_o : out std_logic_vector(num_pads_g-1 downto 0);
|
|
but_right_o : out std_logic_vector(num_pads_g-1 downto 0)
|
|
);
|
|
end component snespad;
|
|
|
|
|
|
signal clk_s : std_logic;
|
signal clk_s : std_logic;
|
signal reset_s : std_logic;
|
signal reset_s : std_logic;
|
|
|
signal pad_clk_s : std_logic;
|
signal pad_clk_s : std_logic;
|
Line 244... |
Line 217... |
|
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
-- File History:
|
-- File History:
|
--
|
--
|
-- $Log: not supported by cvs2svn $
|
-- $Log: not supported by cvs2svn $
|
|
-- Revision 1.1 2004/10/05 17:05:31 arniml
|
|
-- initial check-in
|
|
--
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
|
|
No newline at end of file
|
No newline at end of file
|