In previous blog posts, I showed how the GAL16V8 operated and how to program it (see here and here). In this blog post, I’m going to discuss the differences between the 16V8 and the 22V10. Here’s the specification sheet for the GAL22V10: Lattice GAL22V10 Specifications.
On first inspection, both devices look identical, except for the increased number of inputs and outputs. The specifications are straightforward once you know what to expect. If you’re familiar with the 16V8 and have never used the 22V10, there are some confusing differences.
Here’s the full fuse map for the GAL22V10:
0 - 5807 matrix 5808 S0 for OLMC 0 (active low/high) 5809 S1 for OLMC 0 (registered/combinatorial) 5810 S0 for OLMC 1 5811 S1 for OLMC 1 5812 S0 for OLMC 2 5813 S1 for OLMC 2 5814 S0 for OLMC 3 5815 S1 for OLMC 3 5816 S0 for OLMC 4 5817 S1 for OLMC 4 5818 S0 for OLMC 5 5819 S1 for OLMC 5 5820 S0 for OLMC 6 5821 S1 for OLMC 6 5822 S0 for OLMC 7 5823 S1 for OLMC 7 5824 S0 for OLMC 8 5825 S1 for OLMC 8 5826 S0 for OLMC 9 5827 S1 for OLMC 9 5828 - 5891 Signature
No PTD Fuses
You’ll notice that there are no PTD (Product Term Disable) fuses. This device doesn’t have any.
No Common Mode Bits
Next, the mode bits are missing (the GAL16V8 had 3 modes controlled by fuses 2192 and 2193). The OLMC modes for the GAL22V10 are built into the S0 and S1 bits. There are only two modes: Registered and Combinatorial, controlled by the S1 bit. Each OLMC can be programmed separately, which means that you can designate which OLMCs are Registered and which are Combinatorial. The S0 bit controls active high and active low outputs for each OLMC.
Variable Rows per OLMC
The next complication to this device is that the matrix of fuses that control the AND gates is variable in the number of rows. The GAL16V8 had a simple arrangement of 8 rows for each OLMC. In the 22V10, there are a variable number of rows for each OLMC starting with 8, then incrementing by 2 for each OLMC until 16 and then decrementing by 2 until the last OLMC has 8 inputs. You can see the number of inputs for each OLMC in the functional block diagram:
If you have an equation with 13 terms like this arbitrary example:
OUT = A*B + C + /B + A*/C + D*E + C*D + A*D*E + A*/B*D + B*/D + /B*C*E + C*E*F + E*/F + /E*C*D
You’ll need to make sure it lines up with an OLMC that has more than 12 rows. This equation will not fit on OLMC 0, 1, 2 or OMLC 7, 8 or 9. What this means is that you will have to rearrange your output pins for circuits that use more than 8 rows because each OLMC is tied to a specific output pin.
The number of Fuses Per Row is 44
Also, since there are more inputs, then there are also more columns in the matrix. The number of columns is 44, which is not a round binary number. The number of columns is determined by the total number of inputs and feedback wires. Each input and feedback takes 2 columns (the signal and the inverse of the signal).
Preset and Reset Lines
Two extra lines can be used to control reset and set for all registers (assuming you use the registered mode). The reset line causes the starting fuse of the first OLMC to be 44 instead of zero. The purpose of the reset line is to reset all the registers used in the device. You can connect any logic to the reset line to perform reset via a pin, or some combination of logic. The same goes for the preset line, which is the line that is positioned after the last matrix row starting at fuse 5764 (row 131).
Other Differences
The clock pin is still pin 1 as in the GAL16V8. The difference is that in the GAL16V8, the clock pin is not used at all in modes that don’t use the registers. So pin 1 feeds fuse columns 2 and 3. In the GAL22V10, the clock can control zero or more registered outputs because registered outputs can be selected per OLMC. Therefore the clock pin is wired to fuse columns 0 and 1 and to the register clock inputs.
The active high/low logic is performed on the output of the D-flip/flop of the GAL22V10, where it is on the input of the GAL16V8 (controlled by an XOR gate).
Using PALASM for DOS
PALASM4 for DOS is still around. You can go to this website and scroll to the bottom to download the RAR file (S100 Computers). The article is rather old, but it still works. Here are the steps I took to get this working:
- Make sure you have DOSBOX installed.
- Download the RAR file from the article above (or the link at the bottom of this article).
- You can use 7-zip to unzip the RAR file. Right-click on the RAR file and use extract files. That will maintain the directory structure. I used d:\palasm.
- Start DOSBOX.
- Type: “MOUNT c d:\palasm
- Type: C:
- Type: SET PALASM=c:\
- Type: PALASM
Now you should see this screen (after the intro screen):
Select “Retrieve existing design” and type in your filename (I’m assuming you created a file, or you can copy one of the .pds files in the EXAMPLES directory. Hit the F10 button, then use the right arrow to select the RUN menu and hit enter (Compilation is the first choice). Then just hit F10 to compile your PDS file. You’ll see some processing and then it should end with no errors or warnings:
You can hit ESC to return control to the menus. Switch back to your directory in windows and you can see that an XPT and JED file was created. Open your JED file to see the fuse map results:
Finally…
PALs and GALs are obsolete and the digital world has moved on to FPGAs. These devices are still available and are still useful for hobby purposes. They can be purchased through Jameco or DigiKey. PALASM is also obsolete, hence the reason that it only exists in FORTRAN and DOS versions.
Files to download (in case they disappear from other sources on the web):
You can also use WinCUPL to generate the JED file. The nice thing about WinCUPL is it is free, it runs under Windows and it can be used for all sorts of GALs and the Atmel CPLDs. And just to let you know GALs are still in production by Atmel, they are called ATF16V8 and ATF22V10, however you need a programmer that is capable of programming these specific devices as they have their own programming algorithm. However I heard that the Wellon VP-290 supports this.
I appreciate the information. It’s difficult to find information on the web due to the fact that these devices fell out of favor before the web became popular. It looks like DigiKey sells the ATF16V8 and ATF22V10. I’ll try and work WinCUPL into a future post so anybody that wanders onto my site can find it all in one place.
Useful! And yes I *JUST* bought those parts from both Digikey and Microchip Direct (who bought Atmel.) 11/2017.
Sorry in advance for my ignorance and lack of knowledge when it comes to GAL, PAL, and the like but, I don’t understand the connection between the gate chips and the DOS software. Is there a programmer I need to have? I am fortunate enough to have a real DOS machine handy. Seems like a parallel port connected device is in order. I’ll get the software. Maybe it says in there.
-John
Sorry it took so long to reply. I must have missed the email notification for your comment.
I used the DOS program to generate a JDEC file. Then I used the TL866 programmer programmer (which uses a USB port) to read the JDEC file and program the GAL device.
I have a .jed file that I need to program to a GAL22V10. Can that be done directly with the TL866? I’m looking for a programmer but it may not be cost effective. Unsure. Really wanted a TOP2007 but they seem to be sold out everywhere. Do you do programming of chips for others? Thanks in advance.
The TL866 connects to the PC. Basically, you use the software on your PC to send the raw hex data to the TL866 and that puts it into the chip that is mounted to it. I haven’t touched my programmer since I wrote these articles (back in 2017). I’ve never used the TOP2007. The crazy thing about obsolete hardware is that it’s difficult to find parts and equipment. Jameco still sells the TL866 (I see they have a 3rd generation one).
https://www.jameco.com/z/TL866-3G-T48-Jameco-ValuePro-USB-High-Performance-Programmer-3rd-Generation-_2304999.html
Ah, it’s on backorder until October. Sheesh.
I’m sorry to say that I don’t do programming for others.
Where is the OP located? If in the U.S., I could do it.
Hello
Please, could you help me? about ATF 22v10C in combinatorial mode.
I don’t understand how to set bits S0 and S1 with CUPL. could you send me an example in combinatorial mode in the design file or compiler options, I don’t use clock, only simple boolean equations.
Thanks for your help.
Christian
It’s been a while since I used one of these chips, but… I just discovered that Amazon sells the darn things, so I ordered some. Amazon says they’ll be here between Feb 14-27th (which is a bummer). In the meantime, I’m going to study some of the specs and see if I can get you an answer. When those chips arrive, I’ll be testing it out and I’ll write up an extensive post on the GAL220V10, because I seem to be “The Guy” who knows these things. That only happened because I played around with these chips and posted my knowledge here. The chips were obsolete before the web was popular, so nobody else has taken the time and effort to post about them.
Anyway, I’m sure you need the info quick, so, I’ll do the best I can to get you what you need.
@biercewicz: AFAIK the CUPL compiler detects which mode you use in your code. If you don’t use pin1 as a clock and don’t use specific dot syntax on the pin formulas in your code then the compiler (at least WinCupl) will use the combinatorial mode and sets the appropriate fuses for you. You should be able to check the values of S0 and S1 fuse bits in the generated .jed file if you know their indices.
Ah, that’s what I suspected, but I wanted to test it with the software. I’ll put together a post that demonstrates all of this in the future. Thank’s for verifying that.
Hi,
In the header section of a .PLD file (at least in WinCUPL), this is controlled with the device parameter (and one of the selections can be effectively “auto”).
Table 7-1. Compiler Mode Selection from this datasheet goes into it:
http://ww1.microchip.com/downloads/en/devicedoc/atmel-0425-pld-atf16v8c-datasheet.pdf
In short, these are the various device
G16V8MS – Registered
G16V8MA – Complex
G16V8AS – Simple
G16V8A – Auto Select
I’ve been documenting a good bit about CUPL and PLDs in general here:
https://github.com/peterzieba/5Vpld
This is a good reminder that I should add a bit about this specifically as it is not obvious.
Hope this helps,
Cheers!