LIBRARY ieee; USE ieee.std_logic_1164.ALL; ENTITY tb_contador IS END tb_contador; ARCHITECTURE behavior OF tb_contador IS -- Component Declaration for the Unit Under Test (UUT) COMPONENT contador PORT( rst : IN std_logic; clk : IN std_logic; enable : IN std_logic; cuenta : OUT std_logic_vector(7 downto 0) ); END COMPONENT; --Inputs signal rst : std_logic := '0'; signal clk : std_logic := '0'; signal enable : std_logic := '0'; --Outputs signal cuenta : std_logic_vector(7 downto 0); -- Clock period definitions constant clk_period : time := 10 ns; BEGIN -- Instantiate the Unit Under Test (UUT) uut: contador PORT MAP ( rst => rst, clk => clk, enable => enable, cuenta => cuenta ); -- 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. rst <= '1'; enable <= '0'; wait for 100 ns; rst <= '0'; wait for clk_period; enable <= '1'; wait for clk_period*10; -- insert stimulus here wait; -- wait forever end process; END;