este seria el codigo que simule pero no se que hacer con la variable sensor de entrada, esta es de suma importancia ya que el sensor cada ves que cambie va hacer que se guarden el registro.

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
entity contador_de_personas is
Port ( clk : in STD_LOGIC;
reset : in STD_LOGIC;
--sensor : in STD_LOGIC;
h1 : out STD_LOGIC_VECTOR (2 downto 0);
h2 : out STD_LOGIC_VECTOR (3 downto 0);
m1 : out STD_LOGIC_VECTOR (2 downto 0);
m2 : out STD_LOGIC_VECTOR (3 downto 0);
s1 : out STD_LOGIC_VECTOR (2 downto 0);
s2 : out STD_LOGIC_VECTOR (3 downto 0));
end contador_de_personas;
architecture Behavioral of contador_de_personas is
signal hora1: UNSIGNED(2 downto 0) := "000" ;
signal hora2: UNSIGNED(3 downto 0) := "0000";
signal mit1: UNSIGNED(2 downto 0) := "000" ;
signal mit2: UNSIGNED(3 downto 0) := "0000";
signal seg1: UNSIGNED(2 downto 0) := "000" ;
signal seg2: UNSIGNED(3 downto 0) := "0000";
begin
reloj: process (clk, reset) begin
if reset = '1' then
hora1 <= "000" ;
hora2 <= "0000";
mit1 <= "000" ;
mit2 <= "0000";
seg1 <= "000" ;
seg2 <= "0000";
elsif rising_edge(clk) then
seg2 <= seg2 + 1;
if seg2 = 10 then
seg1 <= seg1 + 1;
seg2 <= "0000";
end if;
if seg1 = 6 then
mit2 <= mit2 + 1;
seg1 <= "000";
end if;
if mit2 = 10 then
mit1 <= mit1 + 1;
mit2 <= "0000";
end if;
-- Al pasar 59 minutos, contar una hora.
if mit1 = 6 then
hora2 <= hora2 + 1;
mit1 <= "000";
end if;
if hora2 = 9 then
hora1 <= hora1 + 1;
hora2 <= "0000";
end if;
if hora1 = 2 AND hora2 = 4 then
hora1 <= "000";
hora2 <= "0000";
end if;
end if;
end process;
H1 <= STD_LOGIC_VECTOR(hora1);
H2 <= STD_LOGIC_VECTOR(hora2);
M1 <= STD_LOGIC_VECTOR(mit1);
M2 <= STD_LOGIC_VECTOR(mit2);
S1 <= STD_LOGIC_VECTOR(seg1);
S2 <= STD_LOGIC_VECTOR(seg2);
end Behavioral;