You must change your two processes:
- Make a process for the clock:
Clock_Process: PROCESS
BEGIN
clock <= '0';
WAIT FOR 50 ns;
clock <= '1';
WAIT FOR 50 ns;
-- Do not put 'WAIT;' as it will force the process
-- to wait forever and consequently, clock will never toggle.
END PROCESS;
- Make a process for the reset:
Reset_Process: PROCESS
BEGIN
Resetn <= '0'; -- Active low reset
WAIT FOR 201 ns; -- Maintain low reset during 201ns
Resetn <= '1'; -- Release resetn
WAIT;
END PROCESS;
- Make a process for the input data:
always : PROCESS
-- optional sensitivity list
( clock )
BEGIN
-- code executes for every event on sensitivity list
carry_in <= '0'; -- First carry_in value (input of your block)
D <= "1101"; -- First D value (input of your block)
wait for 300ns;
wait until rising_edge(clock); -- wait until rising edge of clock
wait for 1ns; -- Just to model the Tco of flip-flop
carry_in <= '0'; -- Second carry_in value (input of your block)
D <= "1101"; -- SecondD value (input of your block)
wait; -- You can use this as this is the last data of your test bench
END PROCESS always;