GAL equation solver
Project description
GINGER
Ginger Is Not a GAL EmulatoR
So what is this then?
This is a tool that reads GAL .pld
files and uses .vec
files to solve equation.
Some may call this an emulator, but it is not: it's just an equation solver that feels like it's "emulating" a real GAL.
Quick start
pip install ginger-emulator
ginger ./sample/addr.pld ./sample/addr.vec
Please see sample GAL code and corresponding vector file.
Rules on writing .vec
files:
- Lines that start with
@
are test case names. - Lines that start with
<
list signals that you want to input (and each following line needs to set those signals high or low). - Lines that start with
>
list signals that you want to display after every step. - Comments start with
#
. If a comment is added after a vector, it will be printed during run. - Empty lines are ignored.
- All other lines are vectors.
Requirements
- Python 3.x
- Lark parser
Features
Supported:
- Combinatorial logic
- Registered logic
- Tri-states
Not supported (yet?):
- Output enable (ignored)
- Validation of inputs/outputs
- Automated test-case assertions
Disclaimer & some technical warnings
This tool does not guarantee that the assembled .pld
code will behave in the same way on a real GAL.
Additionally, it does not guarantee that the .pld
file is a valid assembly (e. g. it does not validate
if user is trying to use input pins as outputs, term limit, etc, and and will allow the user to do all sorts of silly stuff).
Ginger is using Lark for parsing .pld
grammar and only validates the syntax, not the semantics.
So please use, say, galasm
to assembled the .pld
file first in order to see if it can be used to program a GAL in the first place,
and then feel free to use Ginger!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ginger-emulator-0.1.4.tar.gz
.
File metadata
- Download URL: ginger-emulator-0.1.4.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 291d5dcbb9a377c7eb7211cafea556b4be5171ed53aa6ec903fc13e83d67c344 |
|
MD5 | 7f922b3531affd4845e58efc3230cae4 |
|
BLAKE2b-256 | 900e6cc97c6b4028582a35050d918acac85153fe9568fb70c10769d3bc4169bc |
File details
Details for the file ginger_emulator-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: ginger_emulator-0.1.4-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27b950d8da0fc8659b30102c8643914c419185fd1784d6349fc0288d233b723e |
|
MD5 | 02f91661559008ea5627b9567dd2c8a4 |
|
BLAKE2b-256 | 95f4828d3904730363ac2303ba9c33798008de0b415caa0613ee620eb2d070c0 |