Contador ascendente-descendente en GAL

agradeceria que me dieran un norte, como el titulo ya lo dice necesito meter un contador en un GAL, tengo mas o menos idea de como hacer lo del contador, pero no de la parte del GAL, de antemano gracias
 
Arreglos Lógicos Genéricos (GAL´S)


En general, los GAL, son circuitos integrados de lógica programable que utilizan tecnología MOSFET, éstos cuentan con un arreglo matricial de fusibles que inicialmente conectan todas las terminales de entrada del circuito, con todas las compuertas de un arreglo AND-OR.

Además contiene una sección denominada Macrocelda Lógica de Salida OLMC (Ouput Logic Macro Cell), que es una sección del GAL que incluye a los elementos necesarios para configurar sus salidas, de cuatro maneras lógicas distintas.

Con los GAL´s se proporciona una herramienta versátil en la solución de sistemas lógicos combinatorios o secuenciales.

Los circuitos que se generan con esta técnica de diseño son pequeños y consecuentemente económicos.
 
tengo idea de lo que es un GAL, pero no se biien como programarlos, que meto en las entradas? o_O
o si alguien tiene algun manual del opal seria mucha ayuda
salu2
 
Tengo que hacer una máquina de estados sobre un contador ascendente y descendente pero que también cuente de dos en dos, dependiendo el numero en el que esté, teniendo en cuenta que si llega al los limites superior e inferior se detenga.

Tengo este código, pero me surgen dos errores:
0006cc excessive number of product terms: C.d
0006cc excessive number of product terms: C.d

Espero me puedan ayudar a arreglarlo, por favor, o encontrar otra forma de hacerlo.
PHP:
Name     xnueva ;
PartNo   00 ;
Date     14/12/2016 ;
Revision 01 ;
Designer Engineer ;
Company  Universidad ;
Assembly None ;
Location  ;
Device   g22v10 ;

/* *************** INPUT PINS *********************/
PIN    1 = sum                        ; /*                                 */ 
PIN    2 = inc1                        ; /*                                 */ 
PIN    3 = inc2                        ; /*                                 */ 
PIN    4 = up                        ; /*                                 */ 
PIN    5 = down                        ; /*                                 */ 

/* *************** OUTPUT PINS *********************/
PIN    14 = D                        ; /*                                 */ 
PIN    15 = C                        ; /*                                 */ 
PIN    16 = B                        ; /*                                 */ 
PIN    17 = A                        ; /*                                 */ 

$define s0 \'b\'0000
$define s1 \'b\'0001
$define s2 \'b\'0010
$define s3 \'b\'0011
$define s4 \'b\'0100
$define s5 \'b\'0101
$define s6 \'b\'0110
$define s7 \'b\'0111
$define s8 \'b\'1000
$define s9 \'b\'1001
$define s10 \'b\'1010
$define s11 \'b\'1011
$define s12 \'b\'1100
$define s13 \'b\'1101
$define s14 \'b\'1110
$define s15 \'b\'1111

sequence D, C, B, A 
{
present s0 
if inc1&up next s1;
if inc2&up next s2;
if inc1&down next s0;
if inc2&down next s0;
present s1
if inc1&up next s2;
if inc2&up next s3;
if inc1&down next s0;
if inc2&down next s0;
present s2
if inc1&up next s3;
if inc2&up next s4;
if inc1&down next s1;
if inc2&down next s0;
present s3
if inc1&up next s4;
if inc2&up next s5;
if inc1&down next s2;
if inc2&down next s1;
present s4
if inc1&up next s5;
if inc2&up next s6;
if inc1&down next s3;
if inc2&down next s2;
present s5
if inc1&up next s6;
if inc2&up next s7;
if inc1&down next s4;
if inc2&down next s3;
present s6
if inc1&up next s7;
if inc2&up next s8;
if inc1&down next s5;
if inc2&down next s4;
present s7
if inc1&up next s8;
if inc2&up next s9;
if inc1&down next s6;
if inc2&down next s5;
present s8
if inc1&up next s9;
if inc2&up next s10;
if inc1&down next s7;
if inc2&down next s6;
present s9
if inc1&up next s10;
if inc2&up next s11;
if inc1&down next s8;
if inc2&down next s7;
present s10
if inc1&up next s11;
if inc2&up next s12;
if inc1&down next s9;
if inc2&down next s8;
present s11
if inc1&up next s12;
if inc2&up next s13;
if inc1&down next s10;
if inc2&down next s9;
present s12
if inc1&up next s13;
if inc2&up next s14;
if inc1&down next s11;
if inc2&down next s10;
present s13
if inc1&up next s14;
if inc2&up next s15;
if inc1&down next s12;
if inc2&down next s11;
present s14
if inc1&up next s15;
if inc2&up next s15;
if inc1&down next s13;
if inc2&down next s12;
present s15
if inc1&up next s15;
if inc2&up next s15;
if inc1&down next s14;
if inc2&down next s13;
}
 
Atmel wincupl es gratis y hay bastante documentación
de este conocido problema...
Si te fijas en la hoja de datos del 20V10 o 22v10 el dibujo de la pal tiene varias lineas
de entrada para las compuertas AND para cada flipflop. Por ejemplo para la IO9 tienes9
para IO8 tienes 11, etc

el compilador traduce a una salida con cierta profundidad en cuanto a las operaciones & y #
ejemplo:
!CNT1.D = !CNT1
$ !LL1.DQ & LPL.DQ & !PLDONE & CNT1
# LL1.DQ & LPL.DQ & !PLDONE & !CNT1
# UPL.DQ & !PLDONE & !UL1 & CNT1
# UPL.DQ & !PLDONE & UL1 & !CNT1
# CNT0 & PLDONE & !UP
# !CNT0 & PLDONE & UP ;
y claro cuando se sobrepasa de esta profundida te da esos errores

Fijate el archivo *.doc que te entrega el compilador para que te des una idea
de como el compilador traduce tu máquina de estados

Notaras que como tratas de implementar 2 maquinas de estado
( la que subeo-baja en 1 y laque sube- baja en 2)
te da el error
 
Última edición:
Atrás
Arriba