📄 tb_data_pro.vhd
字号:
--------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 19:49:07 05/04/2008
-- Design Name: data_pro
-- Module Name: tb_data_pro.vhd
-- Project Name: BCH_decoder
-- Target Device:
-- Tool versions:
-- Description:
--
-- VHDL Test Bench Created by ISE for module: data_pro
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
-- Notes:
-- This testbench has been automatically generated using types std_logic and
-- std_logic_vector for the ports of the unit under test. Xilinx recommends
-- that these types always be used for the top-level I/O of a design in order
-- to guarantee that the testbench will bind correctly to the post-implementation
-- simulation model.
--------------------------------------------------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_unsigned.all;
USE ieee.numeric_std.ALL;
ENTITY tb_data_pro_vhd IS
END tb_data_pro_vhd;
ARCHITECTURE behavior OF tb_data_pro_vhd IS
-- Component Declaration for the Unit Under Test (UUT)
COMPONENT data_pro
PORT(
clk : IN std_logic;
reset : IN std_logic;
en_in : IN std_logic;
data_in : IN std_logic_vector(7 downto 0);
data_out : OUT std_logic_vector(7 downto 0);
en_out : OUT std_logic
);
END COMPONENT;
--Inputs
SIGNAL clk : std_logic := '0';
SIGNAL reset : std_logic := '0';
SIGNAL en_in : std_logic := '0';
SIGNAL data_in : std_logic_vector(7 downto 0) := (others=>'0');
--Outputs
SIGNAL data_out : std_logic_vector(7 downto 0);
SIGNAL en_out : std_logic;
BEGIN
-- Instantiate the Unit Under Test (UUT)
uut: data_pro PORT MAP(
clk => clk,
reset => reset,
en_in => en_in,
data_in => data_in,
data_out => data_out,
en_out => en_out
);
clk_pro: process begin clk<='1'; wait for 50ns;
clk<='0'; wait for 50ns; end process;reset_pro: process begin reset<='1'; wait for 500ns; reset<='0'; wait; end process;en_pro: process begin en_in<='1'; wait for 700ns; en_in<='0'; wait for 300ns; end process;data_pro: process begin data_in<="11111111"; wait for 100ns; data_in<="10101010"; wait for 100ns; end process;
END;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -