Changes
''' Correction '''
Merci aux réponses de Rick sur la mailing list de Fixme (voir la date du 29 Août 2016) - pour résoudre cette histoire, il fallait aussi synchroniser le signal de sortie (nouvelle clock) à la clock du système, dont voici le code
--------------
-- compteur --
--------------
CMPT_ETAT_FUTUR_2HZ : process(compteur_num_p)
begin
if (compteur_num_p >= VAL_MAX_COMPTEUR_2HZ) then
compteur_num_f <= (others => '0');
else
compteur_num_f <= compteur_num_p + 1;
end if;
end process;
CMPT_ETAT_PRESENT_2HZ : process(CLK_1_8MHZ)
begin
if ((CLK_1_8MHZ'event) and (CLK_1_8MHZ = '1')) then
compteur_num_p <= compteur_num_f;
end if;
end process;
-----------------------------------------
-- Horloge 2Hz rapport cyclique de 50% --
-----------------------------------------
CLK_2HZ_50P : process (compteur_num_p)
begin
if rising_edge (CLK_1_8MHZ) then
if (compteur_num_f <= VAL_MAX_CMPT_DIV_2) then
clk_2Hz <= '0';
else
clk_2Hz <= '1';
end if;
end if;
end process;
clk_2Hz_SIM <= clk_2Hz