Cours:TP M1102 TP 4 Corr
Révision datée du 28 septembre 2020 à 12:08 par SergeMoutou (discussion | contributions) (Page créée avec « =TP 4= ==Exercice 1== <source lang=vhdl> library IEEE; use IEEE.STD_LOGIC_1164.ALL; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; ENTITY cmpt24bits IS P... »)
TP 4
Exercice 1
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
ENTITY cmpt24bits IS
PORT(clk_50MHz : IN STD_LOGIC; -- une seule entrée
clk_slow : OUT STD_LOGIC); -- une seule sortie
END cmpt24bits;
ARCHITECTURE acmpt24bits OF cmpt24bits IS
signal cmpt : std_logic_vector(23 downto 0);
BEGIN
process(clk_50MHz) begin
if rising_edge(clk_50MHz) then
cmpt <= cmpt + 1;
end if;
end process;
clk_slow <= cmpt(23); -- partie combinatoire de construction de l'horloge lente
END acmpt24bits;