Inspiration
A couple of us are taking an integrated circuits course whose premise is to design a simple computer that runs simple operations such as addition and multiplication from scratch. The catch? The class has us design the computer using transistors. The process can be tedious, and this application hopes to speed up the process between coming up with logic and creating an electrically valid schematic that executes said logic in circuit simulation software (LTSpice in this implementation). It is worth noting thaxt the use case would exist primarily for education (EE courses) as the process for industry has already abstracted what we do here.
What it does
- Interprets (very simple) handwritten boolean algebra using OpenCV
- Translates it into transistor logic internally
- Translates the logic into the two pullup and pulldown networks inherent to CMOS logic
- Translates the CMOS logic into a netlist
- Translates the netlist into schematic syntax that can be opened by LTSpice
- Adds voltage sources into the schematic for each unique transistor input
- Opens the schematic in LTSpice
How we built it
- On the computer vision side, pretty much just trial and error using different parameters with OpenCV...
(Python, TensorFlow, OpenCV, and EMNIST on the computer vision side)
On the transistor logic side, a bunch of string manipulation takes place to create the final electrical schematic (we used Java for this)
Challenges we ran into
- Interpreting the boolean algebra to be formed into CMOS logic was harder than we thought it would be. We imagined we'd just use a stack and in the same way a calculator performs operations (popping values, evaluating an expression, then pushing the evaluated expression onto the stack). However, certain logic needed to be preserved and the same boolean algebra expression needed to be interpreted differently between the pullup and pulldown network necessary for CMOS design.
- Time was our enemy, we ran out of time before we could implement a lot of quality of life design features... Such as parenthesis
- Consistency issues with recognizing letters and symbols for computer vision
Accomplishments that we're proud of
- Given a (very) simple boolean algebra equation, we are able to generate a netlist for the corresponding NMOS pull-down network and PMOS pull-up network.
- We are then able to translate this netlist into the proper schematic syntax utilized by LTSpice (circuit simulation software).
- Because the schematic is valid, it can thus be simulated in LTSpice.
What we learned
- It can be difficult to integrate with the syntax used by SPICE (Circuit simulation software)
- It is difficult to create a model that can be used to generate both
- Computer vision can take a long time to implement (we didn't have a lot of computer vision experience prior to this)
What's next for CMOSBuilder
- Fully support all mechanisms in boolean algebra to CMOS logic (add support for parenthesis and brackets)
- Simplify the boolean algebra where possible using Karnaugh maps
- Improve accuracy of computer vision scripts
- Implement other circuit design features. It would be awesome to successfully implement the conversion of simple hand-written circuits (with sources, resistors, capacitors, inductors, etc.) and complete a proper netlist to connect drawn nodes together.
Log in or sign up for Devpost to join the conversation.