However, I discovered the limitations when I was trying to build a simple 13 input NAND gate on a 16V8 chip. I could only do 8 inputs before the compiler gave me errors. I had though that you could AND any and all inputs on a single product term input to an output but the software errors on anything over the product term limit for the output used. The 16V8 and 20V8 have 8 product terms-per-output. The 22V10 has more, ranging from 8 to 16. Purhaps its possible to AND more inputs, but the WinCupl software has a limitation. Anyone else have any insight on this?
It could be a problem in WinCupl, I had a similar issue when I once tried to write a similar (single term) GAL logic in VHDL using ispLever. I guess the optimizer thought it'd be better to convert my single, active low output, AND term into multiple OR terms which of course failed. Maybe I could have solved this issue by configuring the optimizer settings, but I didn't try this.
For GAL logic I prefer the good, old PALASM (use chip PALCE16V8 or PALCE22V10 for GALs). So far it worked very reliable - I already had some issues with broken optimizers in other software.
I remember that an older version of WinCupl had problems when you defined an output to be active low, and a friend of mine was using GDSWin which didn't expand terms with parentheses correctly. Both programs assembled the logic without warnings, but the output was completely broken. In these cases I ran the jedec file through "jed2eqn" and immediately saw that the logic wasn't correct...
Another thing to be careful about 16V8s is whether the GAL is configured to registered, complex, or simple mode. Most of the time used complex mode, but you can't use pins 12 and 19 of a 16V8 as inputs in this mode. In simple mode pins 15 and 16 can't be used as input, and in registered mode you have to keep in mind that pin 11 is used as a global /OE for all registered outputs.
So, for example, if you configure the 16V8 to use complex mode, you should be able to create a 16-input NAND terrm, using inputs 1-9, 11 and 13-18 and pins 12 and/or 19 as outputs.
BTW: personally I prefer the 22V10 over the 16V8 as it's a lot more flexible (no simple/complex/registered mode).
Edit: Just tried the 16-input NAND gate with PALASM and it worked (note that pin 12 is defined as active-low output). This is the source code:
Code: Select all
TITLE simple NAND gate
PATTERN
REVISION 1.0
AUTHOR Matthias Reichl
COMPANY HiassofT
DATE 2010/10/21
CHIP ramdisk PALCE16V8
;---------------------------------- PIN Declarations ---------------
PIN 1 I1 COMBINATORIAL ; INPUT
PIN 2 I2 COMBINATORIAL ; INPUT
PIN 3 I3 COMBINATORIAL ; INPUT
PIN 4 I4 COMBINATORIAL ; INPUT
PIN 5 I5 COMBINATORIAL ; INPUT
PIN 6 I6 COMBINATORIAL ; INPUT
PIN 7 I7 COMBINATORIAL ; INPUT
PIN 8 I8 COMBINATORIAL ; INPUT
PIN 9 I9 COMBINATORIAL ; INPUT
;PIN 10 GND
PIN 11 I10 COMBINATORIAL ; INPUT
PIN 12 /OUT COMBINATORIAL ; OUTPUT
PIN 13 I11 COMBINATORIAL ; INPUT
PIN 14 I12 COMBINATORIAL ; INPUT
PIN 15 I13 COMBINATORIAL ; INPUT
PIN 16 I14 COMBINATORIAL ; INPUT
PIN 17 I15 COMBINATORIAL ; INPUT
PIN 18 I16 COMBINATORIAL ; INPUT
;PIN 19 unused
;PIN 20 VCC
;----------------------------------- Boolean Equation Segment ------
EQUATIONS
OUT = I1 * I2 * I3 * I4 * /I5 * /I6 * /I7 * /I8 * I9 * I10 * I11 * /I12 * I13 */I14 * I15 * I16
;----------------------------------- Simulation Segment ------------
SIMULATION
And this is the output of jed2eqn:
Code: Select all
; JED2EQN -- JEDEC file to Boolean Equations disassembler (Version V063)
; Copyright (c) National Semiconductor Corporation 1990-1993
; Disassembled from nand.jed. Date: 10-21-110
;$GALMODE MEDIUM
chip nand GAL16V8
i1=1 i2=2 i3=3 i4=4 i5=5 i6=6 i7=7 i8=8 i9=9 GND=10 /i11=11 o12=12
f13=13 f14=14 f15=15 f16=16 f17=17 f18=18 o19=19 VCC=20
@ues 0000000000000000
@ptd unused
equations
o19 = gnd
o19.oe = gnd
f18 = gnd
f18.oe = gnd
f17 = gnd
f17.oe = gnd
f16 = gnd
f16.oe = gnd
f15 = gnd
f15.oe = gnd
f14 = gnd
f14.oe = gnd
f13 = gnd
f13.oe = gnd
/o12 = i2 * i1 * i3 * f18 * i4 * f17 * /i5 * /f16 * /i6 * f15 * /i7 * /f14
* /i8 * f13 * i9 * /i11
o12.oe = vcc
so long,
Hias