Skip to content

Boolean algebra to circuit

@chanhuiwah @kenlam296 @RonaldPark

I want to build an engine to direct convert boolean algebra to the circuit.

Features:

  1. Rather than click on the truth table, I want to let use input the formula by text, e.g. o=ab+c
  2. Capture letter means not so o=aB+c means a or not b and c
  3. First stage we only support single-character input/output names. So there will be 26 inputs and 26 outputs
  4. First stage no need to perform any logic optimization
  5. Design needs to be flexible enough for future support pluggable optimization engine

Because this is super foundation tech, so straight follow the building steps

  1. The boolean algebra parser done here by antlr https://gitlab.com/quantr/eda/quantr-boolean-algebra-library
  2. Main intake is QuantrBooleanAlgebra.parse(String) function

Hints:

  1. Use quantr netbeans antlr plugin to debug the g4. To install it, follow https://netbeans.quantr.hk/ Something like this:
  2. https://www.youtube.com/watch?v=rDFkhrHxHMw&t=105s

Screenshot_2023-07-11_at_6.56.57_PM

Screenshot_2023-07-11_at_9.19.56_PM

Screenshot_2023-07-11_at_9.20.01_PM

Edited by Placeholder Peter