2024-09-19 13:29:27 +02:00
2024-09-19 13:29:27 +02:00
2024-09-19 13:29:27 +02:00

Truth table generator for CGP

Simple truth table generator python implementation. It can generate circuic definition for openmp-cgp. It iplemented in python3 and need only default python libraries.

Using

usage: tt.py [-h] [--inputWidth INPUTWIDTH] [--outputWidth OUTPUTWIDTH] [--file FILE] exp [exp ...]

Simple TT file generator for CGP.

positional arguments:
  exp                   expression for TT

options:
  -h, --help            show this help message and exit
  --inputWidth INPUTWIDTH
                        Bit width of all inputs (default 1)
  --outputWidth OUTPUTWIDTH
                        Bit width of all outputs (default 1)
  --file FILE           File to save TT if not set STDOUT used

example - generate TT for 8b adder

python tt.py "a+b" --inputWidth 8 --outputWidth 8 --file "8badder.txt"

example - generate TT for 4b parity

python tt.py "a^b^c^d" --file "4bparity.txt"

example - generate TT for 8b multiplier

python tt.py "a*b" --inputWidth 8 --outputWidth 16 --file "8bmul.txt"
Description
No description provided
Readme 25 KiB
Languages
Python 100%