Professional Documents
Culture Documents
VHDL
VHDL
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
component Divisor
Port ( CLK 50Mhz : in STD_LOGIC;
CLK1khz : out STD_LOGIC);
end component;
component Cont
Port ( Clk : in STD_LOGIC;
Q : out STD_LOGIC_VECTOR (2 downto 0);
end component;
component anillo
Port ( Entrada : in STD_LOGIC_VECTOR (2 downto 0);
salida : out STD_LOGIC_VECTOR (4 downto 0));
end component;
component Memoria
Port ( Selector_Letra: in STD_LOGIC_VECTOR (5 downto 0);
Direccion : in STD_LOGIC_VECTOR (4 downto 0);
Datos : out STD_LOGIC_VECTOR (2 downto 0));
end component;
component Cont_Letras
Port ( CLK_Letras in STD_LOGIC;
Q : out STD_LOGIC_VECTOR (5 downto 0));
end component;
component Reloj_letras
Port ( CLK50Hmz : in STD_LOGIC;
CLL1hz : out STD_LOGIC);
end component;
begin
step1: Divisor port map (CLOCK50MHZ, Xclk);
step2: Cont port map (Xclk, Xq);
step3: anillo port map (Xq, Xcol);
step4: Memoria port map (XSL, Xcol, FIL);
step5: Reloj_letras port map (CLOCK50MHZ, Xclk_Letras);
step6: Cont_Letras port map (Xclk_letras, XSL);
entity anillo is
Port ( Entrada : in STD_LOGIC_VECTOR (2 downto 0);
Salida : out STD_LOGIC_VECTOR (4 downto 0);
end anillo;
begin
process(Entrada)
begin
case ENTRADA is
when "000" => Salida <= "01111";
when "001" => Salida <= "10111";
when "010" => Salida <= "11011";
when "011" => Salida <= "11101";
when "100" => Salida <= "11110";
when others => Salida <= "00000";
end case;
end process;
end Behavioral;
s0 <= "0000000";
s1 <= "1111111";
s2 <= "0001000";
s3 <= "0010100";
s4 <= "0100010";
s5 <= "1000001";
s0 <= "0000000";
s1 <= "1111111";
s2 <= "0001000";
s3 <= "0010100";
s4 <= "0100010";
s5 <= "1000001";