NAND Genetics
NAND Genetics
gets its name from the NAND gate, a functionally-complete digital logic gate
from which all other logic gates can be formed. The initial intention of this
project was to use only NAND gates to formulate netlists,
with any development of AND, OR, NOT, and NOR logic arising by chance and
artificial selection. However, I soon realized that it would be a lot more
interesting if I included these additional gates from the outset, with the
option of including or precluding logic gates left up to the user. Even though
the program by default utilizes many more gates than NAND gates, the name stuck
which is why it is called NAND Genetics.
Overview
This project
focuses on computer-generated source code and selection techniques that mimic
natural selection. The goal is to produce computer-generated source code that
conforms to the output as defined by the user. Two modes of operation are
present that perform distinct tasks: the first mode, Digital Mode, creates
digital logic circuits using the VHDL language and the ModelSim compiler. The
second mode, Analog Mode, creates analog circuits using the PSpice
language. Both modes utilize the Boost library to produce graph representations
of their circuits, which are output as dot files that are compatible with the
excellent GraphViz graph viewing software. Curry, a
handy C++ wrapper class for PSpice, was generated as
a stepping stone in this project. This class allows developers to generate PSpice files using the logical flow control of C++, in
addition to providing a new way of generating sub-circuits using an
object-oriented approach. Curry is a handy time-saving device!