-------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 20:04:48 11/30/2014 -- Design Name: -- Module Name: /home/p3t3r/classes/ece446/final_project/RS-232/rx_tx_test.vhd -- Project Name: RS-232 -- Target Device: -- Tool versions: -- Description: -- -- VHDL Test Bench Created by ISE for module: rx_tx -- -- 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; -- Uncomment the following library declaration if using -- arithmetic functions with Signed or Unsigned values --USE ieee.numeric_std.ALL; ENTITY rx_tx_test IS END rx_tx_test; ARCHITECTURE behavior OF rx_tx_test IS -- Component Declaration for the Unit Under Test (UUT) COMPONENT rx_tx PORT( din : IN std_logic_vector(7 downto 0); dout : OUT std_logic_vector(7 downto 0); speed : IN std_logic; clk : IN std_logic ); END COMPONENT; --Inputs signal din : std_logic_vector(7 downto 0) := (others => '0'); signal speed : std_logic := '0'; signal clk : std_logic := '0'; --Outputs signal dout : std_logic_vector(7 downto 0); -- Clock period definitions constant clk_period : time := 10 ns; BEGIN -- Instantiate the Unit Under Test (UUT) uut: rx_tx PORT MAP ( din => din, dout => dout, speed => speed, clk => clk ); -- Clock process definitions clk_process :process begin clk <= '0'; wait for clk_period/2; clk <= '1'; wait for clk_period/2; end process; -- Stimulus process stim_proc: process begin -- hold reset state for 100 ns. wait for 100 ns; wait for clk_period*10; speed <= '1'; din <= "01011010"; -- insert stimulus here wait; end process; END;