LIBRARY ieee; USE ieee.std_logic_1164.ALL; USE ieee.numeric_std.ALL; ENTITY CPU_test IS END CPU_test; ARCHITECTURE behavior OF CPU_test IS -- Component Declaration for the Unit Under Test (UUT) COMPONENT CPU PORT( clk : in STD_LOGIC; rst : IN std_logic ); END COMPONENT; --Inputs signal clk : std_logic := '0'; signal rst : std_logic := '0'; -- Clock period definitions constant clk_period : time := 10 ns; BEGIN -- Instantiate the Unit Under Test (UUT) uut: CPU PORT MAP ( clk => clk, rst => rst ); -- 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 rst <= '1' after 2*clk_period; wait for 10*clk_period; wait; end process; END;