LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY test_gen IS
END test_gen;
ARCHITECTURE behavior OF test_gen IS
-- Component Declaration for the Unit Under Test (UUT)
COMPONENT generateur_bits
PORT(
Output_data : OUT std_logic;
Clock_250kHz : IN std_logic;
Load_sr : IN std_logic;
Input_datas : IN std_logic_vector(3 downto 0)
);
END COMPONENT;
--Inputs
signal Clock_250kHz : std_logic := '0';
signal Load_sr : std_logic := '0';
signal Input_datas : std_logic_vector(3 downto 0) := (others => '0');
--Outputs
signal Output_data : std_logic;
-- Clock period definitions
constant Clock_250kHz_period : time := 4 us;
BEGIN
-- Instantiate the Unit Under Test (UUT)
uut: generateur_bits PORT MAP (
Output_data => Output_data,
Clock_250kHz => Clock_250kHz,
Load_sr => Load_sr,
Input_datas => Input_datas
);
-- Clock process definitions
Clock_250kHz_process :process
begin
Clock_250kHz <= '0';
wait for Clock_250kHz_period/2;
Clock_250kHz <= '1';
wait for Clock_250kHz_period/2;
end process;
-- Stimulus process
stim_proc: process
begin
-- hold reset state for 100 ns.
--wait for 16 us;
wait for Clock_250kHz_period*4;
Load_sr <= '1';
Input_datas <= "1100";
-- insert stimulus here
wait;
end process;
END;