---------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 09/17/2015 06:01:25 PM -- Design Name: -- Module Name: task1_tb - Behavioral -- Project Name: -- Target Devices: -- Tool Versions: -- Description: -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Additional Comments: -- ---------------------------------------------------------------------------------- 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; -- Uncomment the following library declaration if instantiating -- any Xilinx leaf cells in this code. --library UNISIM; --use UNISIM.VComponents.all; entity task1_tb is -- Port ( ); end task1_tb; architecture Behavioral of task1_tb is --declaring the component component task1 Port ( a : in STD_LOGIC; b : in STD_LOGIC; y : out STD_LOGIC); end component; --declaring the signals needed --these y,a,b signals are different from the --internal ones of the component signal counter: unsigned(1 downto 0):="00"; signal y,a,b: std_logic; begin -- component assignment uut: task1 port map( a => a, b => b, y => y ); --assignint a and b to the counter bits so that --all possible inputs are tested a <= counter(0); b <= counter(1); --increments the counter tb: process begin wait for 20ns; counter <= counter + 1; end process tb; end Behavioral;