Why don't KiCad 6 Eeschema file format embed the netlist?

Why don’t KiCad 6 Eeschema file format embed the netlist ?

This would help to get it directly from the Eeschema file without the need to manually export it.

As far I understand it, the file format is only a graphical description of the schema, and it requires a complex interpretation to get the netlist, which is the root semantic of a schema. I guess we have to make a (x,y) map of each component pin and then match the wire coordinates. Since coordinates are float and thus inaccurately represented, it looks like a bit strange to use them as a key.

In Modelica language, you first describe how components are connected, and then you add graphical annotations to draw a schema.

First. KiCad is not Modelica. It uses it’s own formats.

Why do you assume there are floats used anywhere?
Floats are imprecise and have rounding issues.
Pcbnew uses 32 bit integers with nanometer scale, which gives a PCB area of +2 to -2 meter)

Eeschema uses a text based format, and it uses a different resolution.
I never see a a measurement with more then 3 digits behind the decimal point.
But as it’s a text format, it is fixed point by default and no floats. There are no exponents in KiCad’s file formats.

About the netlist…
Adding this would simple be redundant information, and that raises issues such as what to do if there is a difference between the “netlist” and the graphical presentation.

A much more logical way (and this is also planned for some future version) is to add scripting and command line capabilities to Eeschema. When this is implemented, you can simply tell Eeschema to generate a netlist for you, and you do not have to worry at all about the internal data format of schematic files. This has the added advantage that your own scripts will keep working even when KiCads file formats change at some time in the future. You just tell your (then current) Eeschema to extract a netlist file and it does it for you.

1 Like

(KiCad 6 doesn’t exist yet, the development version leading to 6 is 5.99 ATM.)

Why do you want to extract it? If you want to do it programmatically instead of using the GUI there may be some other way to do it in the future, through the python API.

There is also not a 1:1 correspondence between a schematic sheet file and a netlist, if the design has more than one sheet. Not only would it be redundant information to store the calculated netlist in the schematic sheet, but it would potentially become inaccurate if the sheet is ever separated from its other sheets in a multi-sheet design.

And yes, we plan to add support for generating a netlist from Python.

1 Like

And something to consider: Normally when designing a PCB one does not even need a netlist. If you want to get the connectivity information into pcbnew you would use the “update pcb from schematic” tool. (The netlist was required up until version 4 of kicad but since v5 this tool provides a more direct way to get schematic changes into the layout)

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.