• Please review our updated Terms and Rules here

Cloning a HAL/PAL, Part 9

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
44,477
Location
Pacific Northwest, USA
Part 1 of this series is here.

Picking up where we left off, our little board is now creating 64K binary files for parts, which should allow us to identify inputs and outputs.

To do this, the program tt16l8 is used (see attached file). This program not only separates inputs from outputs, but also attempts to optimize the truth table down to its smallest size. It can produce output for either Minilog or Espresso and optimization can be disabled.

Basically, the idea is that if a pin changes only when one of the "nudge" outputs hits it, it must be an input pin. There is one notable exception that I'll get into a bit later.

Further, you can discard any input bits that have no effect on any of the outputs and also output bits that never change. They're probably "no-connects".

Before I forget, why would anyone want to choose between Minilog and Espresso, particularly if Minilog is just a front end to Espresso?

It turns out that Minilog has a limitation of 2000 truth table entries. While this is fine for PAL10L8 chips, it's not going to be adequate for a lot of cases where the PAL16L8 is used, since up to 16 inputs can be configured. (65,536 truth table entries possible). So sometimes we need something with a little more "beef".

Let's move on to a real case--the Creative Soundblaster 2.0 upgrade PAL in part 10.
 
It's a good thing that I hang onto a lot of old crufft.
12 years later, I'd probably use an MCU with a lot of GPIOs to do this, say, an STM32F407 (which has 5V tolerant GPIOs). There's nothing quite as nice as having more speed and GPIOs than you need.

Note that registered PALs, particularly those containing feedback terms are the very devil to suss out. It helps to know a lot about the circuit using them. You can design some fairly complex logical units with a lowly GAL.
 

Attachments

  • tt16l8.zip
    19.5 KB · Views: 7
Back
Top