Verilog Flow for the GAL16V8 and GAL22V10
Find a file
2024-05-06 01:56:47 -05:00
compiler fix 16v8 regression with tristate/registered 2024-05-05 17:30:11 -05:00
extractions Add extraction README/update techmap README 2024-05-06 01:42:29 -05:00
models Add model README and fix typo 2024-05-06 01:56:47 -05:00
techmaps Add extraction README/update techmap README 2024-05-06 01:42:29 -05:00
testcases Add initial GAL22V10 model 2024-05-05 20:02:46 -05:00
.gitignore Add gitignore and remove extra files 2024-05-04 20:59:57 -05:00
abc.script Add OLMCs 2024-04-04 01:33:47 -05:00
cells_sim.v Add tristates 2024-04-04 20:39:30 -05:00
flash_minipro.sh Complete prove_equiv script and add flashing script 2024-05-04 20:55:57 -05:00
README.md Add model README and fix typo 2024-05-06 01:56:47 -05:00
shrink_sop.tcl Add shrink SOP and PCF files 2024-05-05 02:29:15 -05:00
synth_gal.tcl Add techmap README 2024-05-06 01:32:33 -05:00

yosys4gal: Verilog Flow for the GAL16V8 and GAL22V10

A Verilog flow for GAL16V8 and GAL22V10 logic chips (and pin-compatible alternatives like the ATF16V8 and ATF22V10). It leverages Yosys and Galette.

Usage

To synthesize a Verilog file:

./synth_gal.tcl -- <VERILOG_FILE> [CHIP]

Where [CHIP] is either GAL16V8 (default) or GAL22V10. The synthesized JSON netlist will be put in output/.

To fit the synthesized design and generate the JEDEC file used for programming, first build the Rust compiler ver2gal (see the compiler/ directory) and run:

./ver2gal synth <JSON NETLIST> <PCF_CONSTRAINTS> --chip <CHIP>

Where <CHIP> is either gal16v8 or gal22v10. The generate JEDEC file will be generated in the current directory as output.jed. Note this program must be run in the same directory as the shrink_sop.tcl script.

This JEDEC file can be optionally be verified programmatically using the scripts and Verilog models found the models/ directory.

The JEDEC file can then be flashed to the GAL chips. A convenience flashing script is provided for the cheap/common TL866 family of programmers. This works around the verification bugs in the upstream minipro programming software:

./flash_minipro.sh <JEDEC FILE> <CHIP>

Where <CHIP> is GAL16V8, GAL22V10, ATF16V8B, etc.

Limitations

The GAL16V8 mode only supports the "Registered" mode and does not handle tristate Verilog for registered outputs (since they're globally shared). The GAL22V10 mode does not support the asynchronous set/reset signals for the registers. Additionally, in both modes, there is no guarantee that the mapping will be the most efficient (especially for timing). While fairly well tested, there is no guarantee of correctness either. Use at your own risk.

Dependencies

  • yosys 0.38 or higher
  • Rust
  • jedutil from MAME utilities for model-based verification checking
  • xxd from Vim for model-based verification checking
  • minipro for the provided convenience flashing script