Contador (Ascendente y descendente) en VHDL

Hola , tengo un pequeño problema
Estoy haciendo un proyecto con una GAL ,
necesito hacer un contador, que cuando presione un push button, el contador ascienda un numero en un display de 7 segmentos.
Cuando presione el otro push button, el contados debe descender
Y un tercer push button hara la funcion de reset.
se usaran las salidas de la gal para encender los diferentes leds en el display y dibujar el un numero, del 0-9 y de A-F
Tengo este codigo, pero apenas soy principiante en este lenguaje y no eh logrado compilarlo
De antemano les agradezco su ayuda.

Este es elcodigo

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity CONTADOR_PRINCIPAL is
port (
push_button_increment, push_button_reset, push_button_decrement: IN BIT;
DISPLAY: out std_logic_vector(6 DOWNTO 0));
END;
ENTITY cont is

attribute pin_numbers:string;
attribute pin_numbers of cont: entity is
"push_button_increment=2 push_button_reset=3 push_button_decrement=4" &
"DISPLAY(0)=13 DISPLAY(1)=14 DISPLAY(2)=15 DISPLAY(3)=16 DISPLAY(4)=17 DISPLAY(5)=18 DISPLAY(6)=19";

end cont;

architecture Behavioral of cont is
BEGIN

PROCESS ( push_button_reset, push_button_decrement,push_button_increment)
VARIABLE count :INTEGER RANGE 0 to 15;

BEGIN

IF (push_button_reset = \'1\' AND push_button_reset \'EVENT) THEN count := 0;
IF (push_button_increment = \'1\' AND push_button_increment \'EVENT) THEN count := count + 1;
ELSIF (push_button_decrement = \'1\' AND push_button_decrement \'EVENT) THEN count := count - 1;
END IF;
END IF;

IF (((count = 0) AND (push_button_decrement = \'0\')) OR ((count = 15) AND (push_button_increment = \'0\'))) THEN count := 0;
END IF;

END PROCESS;

DISPLAY <= "0000001" WHEN CONTADOR_PRINCIPAL=0 ELSE
"1001111" WHEN CONTADOR_PRINCIPAL=1 ELSE
"0010010" WHEN CONTADOR_PRINCIPAL=2 ELSE
"0000110" WHEN CONTADOR_PRINCIPAL=3 ELSE
"1001100" WHEN CONTADOR_PRINCIPAL=4 ELSE
"0100100" WHEN CONTADOR_PRINCIPAL=5 ELSE
"0100000" WHEN CONTADOR_PRINCIPAL=6 ELSE
"0001111" WHEN CONTADOR_PRINCIPAL=7 ELSE
"0000000" WHEN CONTADOR_PRINCIPAL=8 ELSE
"0001100" WHEN CONTADOR_PRINCIPAL=9 ELSE
"0001000" WHEN CONTADOR_PRINCIPAL=10 ELSE
"1100000" WHEN CONTADOR_PRINCIPAL=11 ELSE
"0110001" WHEN CONTADOR_PRINCIPAL=12 ELSE
"1000010" WHEN CONTADOR_PRINCIPAL=13 ELSE
"0110000" WHEN CONTADOR_PRINCIPAL=14 ELSE
"0111000" WHEN CONTADOR_PRINCIPAL=15 ELSE
"0000100";

END Behavioral;
...
 
Atrás
Arriba