Electronic – Langage to declare a circuit board


I am looking for a language that can declare a circuit board, and then draw it in schematic form or whatever. Can you tell me if such a thing even exists?

The common "language" people use to design circuit boards is some graphical tool like Eagle, KiCad, Altium or any of the plethora EDA packages https://en.wikipedia.org/wiki/Comparison_of_EDA_software. I am looking to create a text file instead, that will be processed and generate as output one of the EDA file formats.

Detailed explanation:

For example in the world of computer cloud infrastructure, there are several declarative languages that are used to define resources and create them. HashiCorp Terraform, AWS CloudFormation, OpenStack HOT, Azure ARM Templates, and more.

For example, if I need to create a circuit that has a battery, IR receiver, IR transmitted and an Arduino. Using this language I would just define which pin of each device needs to be connected to which other pin – and the output of the language can be a graphical representation of the circuit. As-if I designed it in KiCad or some other EDA.

One example for automatic dependency resolving is Graphviz. For example using Graphviz I can create a text file where each component is listed, along with all the dependencies and it creates a graphical representation from this in some graphics format (svg, png, …).

Example Graphviz dot notation file

When rendered it looks like this

Best Answer

There are a bunch (dozens) of common formats for netlists.

Netlists describe the logical connections between component pins, and are logically equivalent to a schematic (minus any notes and other information such as rules that is communicated in the schematic- many of which are actually required to create an optimal PCB from the schematic).

Drawing a good human-readable schematic is an art form. As far as I know nobody has put in the effort it would take into trying to create excellent schematics automatically. I don't see that it would be impossible - there are a number of general rules, and machine learning could suck up all the many examples (assuming it knew which ones were atrocious) and learn from them.

It's possible to create a PCB without a schematic- the schematic is just for humans to understand, but the netlist does not necessarily contain information on how to handle power connections, differential pairs, controlled impedance conductors, guard rings, shields, parts that need to be close and so on. If you've ever seen a PCB laid out by a dolt that doesn't understand electrics you will understand- 150mm (6") conductors run to a clock crystal etc. When you start laying out a PCB you usually see the parts (which have to be 'placed' ) and a rat's next of connections that represents the netlist graphically.

Generally auto-placement and schematics (I've seen a few examples of machine generated schematics) are the hardest for automation. Autorouting is useful in some cases, though humans still tend to do better, so far, with machine assistance that enforces pre-determined rules such as clearances by net, trace width by net, etc.