A native macOS toolchain for GAL programmable logic devices (GAL16V8, GAL22V10),
written in Swift. Compiles CUPL .PLD sources to JEDEC fuse maps — no Wine, no
Windows VM, no abandonware IDE.
Sibling project of m11asm and J11Terminal; built for bare-metal DCJ-11 / PDP-11 hardware development on the DCJ11 SBC by Peter Schranz.
Early development. Roadmap:
- JED toolkit (done) — read, write, decode, and diff JEDEC fuse maps; decode GAL16V8/22V10 macrocell configuration back to equations
- Equation compiler (done) — CUPL-subset combinational equations to GAL16V8 fuse map, golden-tested against WinCUPL output. Note: GAL16V8 simple mode is hardware-verified; complex mode (.OE) compiles to GALasm-equivalent fuse maps but failed its first in-circuit test and is considered unvalidated on real silicon
- Registered outputs (done) —
.d/.oe/.ar/.spextensions and a GAL22V10 fitter, golden-tested against the Multi IO card's WinCUPL image - State machines (done) — CUPL
FIELDandSEQUENCE(with IF/NEXT/ OUT/DEFAULT); Peter Schranz's original Multi IO glue PLD compiles unmodified to a fuse map equivalent to the hardware image.TABLEdeferred until a design needs it - Verification (done) — functional-equivalence diffing (part of the
JED toolkit) plus cycle-level simulation:
mgalcli sim design.pld script.vecdrives a design through clocked vector scripts with watch/set/clock/expect commands, covering registered state machines, output enables and polarities before any chip is programmed
Requires Xcode 16 or the Swift 6 toolchain.
swift build
swift testMIT — see LICENSE.