Here's a problem:
A set of signals select the enable for an output.
Later another signal pulses high then low after this is enabled.
The output selected must then be disabled on the falling edge of the second signal. The state is reset when the selection terminates.
How would I go about doing this using an ATF16V8B GAL?
It would have to go into register mode I would imagine.
Any experts here?
GAL programming conundrum.
- stephen_usher
- Site sponsor

- Posts: 7696
- Joined: Mon Nov 13, 2017 7:19 pm
- Location: Oxford, UK.
- Contact:
GAL programming conundrum.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
Re: GAL programming conundrum.
I've pretty much forgot gal stuff.. So here's a AI verbose instead
Code: Select all
Name SELLATCH;
PartNo 00;
Date 11/11/2026;
Revision 01;
Designer exxos;
Company exxos;
Assembly None;
Location None;
Device g16v8ma; /* complex mode: async logic with I/O feedback */
/* Inputs */
Pin 2 = S0; /* select code bit 0 */
Pin 3 = S1; /* select code bit 1 */
Pin 4 = EN; /* selection active (high) */
Pin 5 = PULSE; /* second signal */
/* Outputs */
Pin 12 = OUT0;
Pin 19 = OUT1;
Pin 13 = OUT2;
Pin 14 = OUT3;
/* Internal latches, must be on 13-18 for feedback in complex mode */
Pin 15 = ARM;
Pin 16 = DONE;
/* ARM: set by PULSE high, held while selected, cleared when EN drops */
ARM = EN & PULSE
# EN & ARM;
/* DONE: set by PULSE low after ARM, held while selected */
DONE = EN & ARM & !PULSE
# EN & DONE;
/* Decoded outputs, killed by DONE */
OUT0 = EN & !S1 & !S0 & !DONE;
OUT1 = EN & !S1 & S0 & !DONE;
OUT2 = EN & S1 & !S0 & !DONE;
OUT3 = EN & S1 & S0 & !DONE;- stephen_usher
- Site sponsor

- Posts: 7696
- Joined: Mon Nov 13, 2017 7:19 pm
- Location: Oxford, UK.
- Contact:
Re: GAL programming conundrum.
Thanks! 
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
