Escolar Documentos
Profissional Documentos
Cultura Documentos
-- Company:
-- Engineer:
--
-- Create Date: 18:49:40 10/04/2013
-- Design Name:
-- Module Name: cont99 - descripconta99
-- Project Name:
-- Target Devices:
-- Tool versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity cont99 is
Port ( reseteo : in STD_LOGIC;
clk : in STD_LOGIC;
enabledisplay : out STD_LOGIC_VECTOR (3 downto 0);
Salida : out STD_LOGIC_VECTOR (6 downto 0));
end cont99;
begin
process (clk,reseteo)
if (reseteo='1') then
unidades:=0;
decenas:=0;
estado_pre<=estadoD; --Estado inicial decenas.
retraso:=retraso+1;
if (retraso=25000000) then
if (decenas=9) then
if (unidades=9) then
unidades:=0;
decenas:=0;
end if;
end if;
unidades:=unidades+1;
if (unidades=10) then
decenas:=decenas+1;
unidades:=0;
end if;
retraso:=0;
end if; --cierra if de retraso
--Bloque de visualizacion.
visualc:=visualc+1;
if (visualc>5000000)then
estado_pre<=estado_fut;
visualc:=0;
end if;
case estado_pre is
when estadoD=>Temporal:=Decenas; enabledisplay<="1101";
estado_fut<=estadoU;
when estadoU=> Temporal:=Unidades; enabledisplay<="1110";
estado_fut<=estadoD;
end case;
case Temporal is
end if;
end process;
end descripconta99;