Professional Documents
Culture Documents
Use IEEE.STD_LOGIC_1164.ALL;
Use IEEE.STD_LOGIC_ARITH.ALL;
Use IEEE.STD_LOGIC_UNSIGNED.ALL;
reset : in STD_LOGIC;
enable: in STD_LOGIC;
);
end top_level;
-------------------------------------------------------
COMPONENT banco_contadorAN
PORT(
clock: IN std_logic;
reset : in STD_LOGIC;
enable: in STD_LOGIC;
);
END COMPONENT;
----------------------------------------------
Entity banco_contadorAN is
reset: in STD_LOGIC;
enable: in STD_LOGIC;
);
End banco_contadorAN;
-------------------------------------------------------------------------
COMPONENT contador_anodos
PORT (
clock : IN STD_LOGIC;
reset: IN STD_LOGIC;
enable: IN STD_LOGIC;
);
END COMPONENT;
-------------------------------------------------------------------------
COMPONENT div_freq_anodos
PORT (
clock : IN STD_LOGIC;
reset: IN STD_LOGIC;
enable: IN STD_LOGIC;
);
END COMPONENT;
-------------------------------------------------------------------------
begin
------------------------------------------------------------------------------
Clock=>clock,
Reset =>reset,
Enable=>enable;
);
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
clock=>clock,
reset =>reset,
enable=> freq500hz;
);
-------------------------------------------------------------------------------
End behavioral;
----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Design Name:
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Additional Comments:
--
----------------------------------------------------------------------------------
Library IEEE;
Use IEEE.STD_LOGIC_1164.ALL;
Use IEEE.STD_LOGIC_ARITH.ALL;
Use IEEE.STD_LOGIC_UNSIGNED.ALL;
Entity contador_anodos is
reset: in STD_LOGIC;
enable: in STD_LOGIC;
);
End contador_anodos;
Begin
MC <= ´´111´´;
-----------------------------------registro de estado 1----------------------------
Process (clock)
Begin
If reset =´1´then
End if;
End if;
End process;
----------------------------logica de salida-------------------------
End behavioral;
Library IEEE;
Use IEEE.STD_LOGIC_1164.ALL;
Use IEEE.STD_LOGIC_ARITH.ALL;
Use IEEE.STD_LOGIC_UNSIGNED.ALL;
Entity banco_contadores is
reset: in STD_LOGIC;
Enable: in STD_LOGIC;
);
end banco_contadores;
-----------------------------------------------------
COMPONENT contador
PORT (
clock : IN STD_LOGIC;
reset: IN STD_LOGIC;
Enable: IN STD_LOGIC;
);
END COMPONENT;
------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
COMPONENT divisor_freq
PORT (
clock : IN STD_LOGIC;
reset: IN STD_LOGIC;
enable: IN STD_LOGIC;
clkdiv:OUT STD_LOGIC
);
END COMPONENT;
---------------------------------------------------------------------------------
----------------------------------------------------------------------------------
Signal pulso4,pulso5,pulso6,pulso7,pulso8,:std_logic;
------------------------------------------------------------------------
begin
-------------------------------------------------------------------------
clock=>clock,
reset =>reset,
enable=>enable;
selMf=>selMF,
--in_display =>in_display0,
clkdiv =>clkdiv
);
-------------------------------------------------
-------------------------------------------------
clock=>clock,
reset =>reset,
enable=>clkdiv;
in_display => in_displays1,
);
-----------------------------------------------------------
------------------------------------------------------------
clock=>clock,
reset =>reset,
enable=>pulso1,
in_display =>in_displays2,
);
-----------------------------------------------------------
------------------------------------------------------------
clock=>clock,
reset =>reset,
enable=>pulso2,
in_display =>in_displays3,
);
-----------------------------------------------------------
------------------------------------------------------------
clock=>clock,
reset =>reset,
enable=>pulso3,
in_display =>in_displays4,
-----------------------------------------------------------
------------------------------------------------------------
clock=>clock,
reset =>reset,
enable=>pulso4,
in_display =>in_displays5,
);
-----------------------------------------------------------
------------------------------------------------------------
clock=>clock,
reset =>reset,
enable=>pulso5,
in_display =>in_displays6,
);
-----------------------------------------------------------
------------------------------------------------------------
clock=>clock,
reset =>reset,
enable=>pulso6,
in_display =>in_displays7,
);
-----------------------------------------------------------
------------------------------------------------------------
clock=>clock,
reset =>reset,
enable=>pulso7,
in_display =>in_displays8,
);
-----------------------------------------------------------
------------------------------------------------------------
end Behavioral;
---------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity divisor_freq is
reset: in STD_LOGIC;
enable: in STD_LOGIC;
);
end divisor_freq;
Begin
--1001100010010110100000000 5hz
--0100110001001011010000000 10 hz
--0011010101100111111000000 15 hz
--0010011000100101101000000 20 hz
Begin
End if;
End if;
End process;
----------------logica de salida----------------------
----in_display<=sumador;
End Behavioral;
Library IEEE;
Use IEEE.STD_LOGIC_1164.ALL;
Use IEEE.STD_LOGIC_ARITH.ALL;
Use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity contador is
reset: in STD_LOGIC;
enable: in STD_LOGIC;
);
end contador;
Begin
MC<="1001"; -------el contador que permite contar de cero a 9 y activa el siguiente multiplexor
process (clock)
begin
end if;
end if;
end process;
-----------------------------logica de salida---------------------------------
Process (clock)
begin
Com<= '0';
else
end if;
end if
end process;
end behavioral;
Library IEEE;
Use IEEE.STD_LOGIC_1164.ALL;
Use IEEE.STD_LOGIC_ARITH.ALL;
Use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity contador is
reset: in STD_LOGIC;
enable: in STD_LOGIC;
);
end contador;
Begin
MC<="1001"; -------el contador que permite contar de cero a 9 y activa el siguiente multiplexor
process (clock)
begin
end if;
end if;
end process;
-----------------------------logica de salida---------------------------------
Process (clock)
begin
Com<= '0';
else
end if;
end if
end process;
end behavioral;
Library IEEE;
Use IEEE.STD_LOGIC_1164.ALL;
Use IEEE.STD_LOGIC_ARITH.ALL;
Use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity contador is
reset: in STD_LOGIC;
enable: in STD_LOGIC;
);
end contador;
Begin
MC<="1001"; -------el contador que permite contar de cero a 9 y activa el siguiente multiplexor
process (clock)
begin
end if;
end if;
end process;
-----------------------------logica de salida---------------------------------
Process (clock)
begin
if clock'event and clock='1'then
Com<= '0';
else
end if;
end if
end process;
end behavioral;
----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Design Name:
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Additional Comments:
--
----------------------------------------------------------------------------------
Library IEEE;
Use IEEE.STD_LOGIC_1164.ALL;
Use IEEE.STD_LOGIC_ARITH.ALL;
Use IEEE.STD_LOGIC_UNSIGNED.ALL;
Entity div_freq_anodos is
reset: in STD_LOGIC;
Enable: in STD_LOGIC;
);
End div_freq_anodos;
Begin
Process (clock)
Begin
If reset =´1´then
End if;
End if;
End process;
----------------------------logica de salida-------------------------
Clkdiv_an<= compara;
End behavioral;
----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Design Name:
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Additional Comments:
--
----------------------------------------------------------------------------------
Library IEEE;
Use IEEE.STD_LOGIC_1164.ALL;
Entity mux_anodos is
End mux_anodos;
Begin
----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Design Name:
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Additional Comments:
--
----------------------------------------------------------------------------------
Library IEEE;
Use IEEE.STD_LOGIC_1164.ALL;
Entity segmentos is
Port (
End segmentos;
Architecture behavioral of segmentos is
Begin
---------------------------multiplexor---------
--------------------------------------------------------------------------------------
End behavioral;
Library IEEE;
Use IEEE.STD_LOGIC_1164.ALL;
Use IEEE.STD_LOGIC_ARITH.ALL;
Use IEEE.STD_LOGIC_UNSIGNED.ALL;
reset : in STD_LOGIC;
enable: in STD_LOGIC;
);
end top_level;
-------------------------------------------------------
COMPONENT banco_contadorAN
PORT(
clock: IN std_logic;
reset : in STD_LOGIC;
enable: in STD_LOGIC;
);
END COMPONENT;
----------------------------------------------
Entity banco_contadorAN is
reset: in STD_LOGIC;
enable: in STD_LOGIC;
);
End banco_contadorAN;
-------------------------------------------------------------------------
COMPONENT contador_anodos
PORT (
clock : IN STD_LOGIC;
reset: IN STD_LOGIC;
enable: IN STD_LOGIC;
);
END COMPONENT;
-------------------------------------------------------------------------
COMPONENT div_freq_anodos
PORT (
clock : IN STD_LOGIC;
reset: IN STD_LOGIC;
enable: IN STD_LOGIC;
);
END COMPONENT;
-------------------------------------------------------------------------
begin
------------------------------------------------------------------------------
Reset =>reset,
Enable=>enable;
);
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
clock=>clock,
reset =>reset,
enable=> freq500hz;
);
-------------------------------------------------------------------------------
End behavioral;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
reset : in STD_LOGIC;
enable: in STD_LOGIC;
sw_selM:in STD_LOGIC_VECTOR (1 downto 0);
);
end top_level;
-------------------------------------------------------
COMPONENT banco_contadorAN
PORT(
clock: IN std_logic;
reset : IN STD_LOGIC;
enable: IN STD_LOGIC;
);
END COMPONENT;
----------------------------------------------
Entity banco_contadorAN is
reset: in STD_LOGIC;
enable: in STD_LOGIC;
);
End banco_contadorAN;
-------------------------------------------------------------------------
COMPONENT contador_anodos
PORT (
clock : IN STD_LOGIC;
reset: IN STD_LOGIC;
enable: IN STD_LOGIC;
);
END COMPONENT;
-------------------------------------------------------------------------
COMPONENT div_freq_anodos
PORT (
clock : IN STD_LOGIC;
reset: IN STD_LOGIC;
enable: IN STD_LOGIC;
);
END COMPONENT;
-------------------------------------------------------------------------
begin
------------------------------------------------------------------------------
Inst_div_freq_anodos: div_freq_anodos
PORT MAP (
clock=>clock,
reset =>reset,
enable=>enable;
);
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Inst_contador_anodos: contador_anodos
PORT MAP (
clock=>clock,
reset =>reset,
enable=> freq500hz;
);
-------------------------------------------------------------------------------
End behavioral;