A simple boolean algebra solver with gui
Project description
EC530_Final
Logic Synthesis Engine API
Repo Organization
program1.py -- Contains main function as well as all sub-functions called during the main function
input_examples/ -- Contains two examples of inputs to program1.py
input.txt shows an example boolean algebraic function input
BILF.txt shows an example of BILF (Berkeley Logic Interchange Format) input which represents a digital combinational logic circuit
Tool Description
This tool is an attempt to make a logic synthesis engine. It takes either a boolean algebraic function or a digital combinational logic circuit (BILF) input from a text file and produces a variety of outputs:
- The design as a canonical SOP
- The design as a canonical POS
- The design INVERSE as a canonical SOP
- The design INVERSE as a canonical POS
- A minimized number of literals representation in SOP a. The number of saved literals vs. the canonical version
- A minimized number of literals representation in POS a. Report on the number of saved literals vs. the canonical version
- The number of Prime Implicants
- The number of Essential Prime Implicants
- The number of ON-Set minterms
- The number of ON-Set maxterms
- The total number of transistors needed for the minimized SOP design
- The total number of transistors needed for the minimized POS design
The tool also produces the inputted boolean expression, variable names, minterms, maxterms, and recommends SOP or POS design based on required transistor numbers.
Essential prime implicants and prime implicants are found through the use of the Quine- McCluskey method. An open source python library (shown here: https://github.com/tpircher-zz/quine-mccluskey/tree/master) was used to calculate the Essential Prime Implicants through the provided QM algorithm, and the sympy library was used for much of the boolean algebra.
How to run the program
Some libraries may need to be downloaded, such as sympy and pyeda, to run the code properly. Ensure that input files are located in the same directory as the program. The program can be run with the following command on windows:
python .\program1.py input.txt
When prompted with: "Is the input a combinational logic circuit or a boolean algebraic function? (C/B):" input 'C' for combinational logic circuit and 'B' for boolean algebraic function.
The input file is passed as an argument with the run command. Input constraints can be found on the example input text files.
Collaborators
This program was made with the assistance of ChatGPT-3.5 as an AI coding copilot. ChatGPT was used mainly for debugging/syntax and recommendations on function implementations.
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 Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file boolean_solver_gui-0.1.0-py3-none-any.whl.
File metadata
- Download URL: boolean_solver_gui-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ab835a5996465def2cfc38ae08d2d6bb0daedc43d633e8addcf23d48929c41e
|
|
| MD5 |
0f66d3ffd73047121047e40199787304
|
|
| BLAKE2b-256 |
158730cf78816a00a507746de46d4d95ab57f5024e3942f39805e53f22e14922
|