0
\$\begingroup\$

I am building an accessory for a 6502-based computer, and am trying to stick with (reasonably) period-era components. To this end I am using a GAL16v8 (specifically an ATF16V8C) to handle register selection, interrupt signaling, and resetting. Everything worked fine until I realized I needed to change how to signal clearing an interrupt. When I changed my logic equations to add the new functionality WinCUPL returned an error: "Excessive number of product terms: IRQTMP".

I am familiar with what this error means, however I am not sure how/if I can simplify the required logic. Is there a way to make this logic work on a GAL16V8?

The contents of my .pld file (minus the header info):

/* *************** INPUT PINS *********************/ PIN 1 = CLK ; /* */ PIN 2 = RW ; /* */ PIN 3 = CS1 ; /* */ PIN 4 = CS2 ; /* */ PIN 5 = RS0 ; /* */ PIN 6 = RS1 ; /* */ PIN 7 = RESET ; /* */ PIN 8 = IRQIN ; /* */ PIN 9 = INHIBITIN ; /* */ /* *************** OUTPUT PINS *********************/ PIN 11 = RESETIRQ ; /* */ PIN 12 = IRQ ; /* */ PIN 13 = IRQN ; /* */ PIN 14 = IRQTMP ; /* */ PIN 15 = INHIBIT ; /* */ PIN 16 = R2 ; /* */ PIN 17 = R1 ; /* */ PIN 18 = R3 ; /* */ PIN 19 = R0 ; /* */ /** Declarations and Intermediate Variable Definitions **/ ENABLE = (CS1 & !CS2); ACTIVER = (ENABLE & CLK & RW); ACTIVEW = (ENABLE & CLK & !RW); WRITER3 = (ACTIVEW & RS0 & RS1); /** Logic Equations **/ R0 = !(ACTIVER & !RS0 & !RS1); R1 = !(ACTIVER & RS0 & !RS1); R2 = !(ACTIVER & !RS0 & RS1); R3 = !(ACTIVER & RS0 & RS1); RN = (!(WRITER3 & RESETIRQ) & RESET); IRQTMP = (!IRQIN # (RN & IRQTMP)); RESETINHIBIT = (!RESET # (!INHIBITIN & WRITER3)); S = (INHIBITIN & WRITER3); INHIBIT = (!RESETINHIBIT & (S # INHIBIT)); IRQ = (IRQTMP & !INHIBIT); IRQN = !(IRQTMP & !INHIBIT); 

The logic diagram I am trying to create:

logic diagram

\$\endgroup\$
2
  • \$\begingroup\$ Is this an academic assignment? \$\endgroup\$ Commented Sep 25, 2024 at 23:35
  • \$\begingroup\$ Of the eight combo outputs, only 6 of them are fed back to the grid. (Assuming this is in 'simple mode') Can't you just see if you can lay this out by hand? That's what I'd do if I ran into this problem. It's not a complex grid to look at. If you can, then coding may matter. If not, you have your answer. \$\endgroup\$ Commented Sep 25, 2024 at 23:36

1 Answer 1

1
\$\begingroup\$

This turned out to be an issue with the .pld file header information not included in my post combined with the specific output pins used. The initial header specified

Device g16v8a ; 

In addition, pin 15 was defined as INHIBIT which requires the pin to be both input and output.

Changing the header to

Device g16v8as ; 

and changing the pinout to

PIN 12 = IRQTMP ; /* */ PIN 13 = INHIBIT ; /* */ PIN 14 = IRQ ; /* */ PIN 15 = IRQB ; /* */ 

(IRQB is output only) caused WinCUPL to switch from complex to simple mode, therefore increasing the number of available product terms from 7 to 8.

The moral of the story... rtfm... and read it correctly. Don't mix up different modes.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ I'm glad I mentioned the simple mode in comments. Since you have your answer, you should probably just select it now. That will help others avoid extended time reading this and wondering if they should perhaps provide another answer. Unless, that is, you actually want that. Otherwise, it sounds to me like you are good to go. :) \$\endgroup\$ Commented Sep 26, 2024 at 4:05

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.