User-defined fields not fully exported for multi-unit parts

Bug #1788540 reported by Mike Stewart
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Triaged
Medium
Unassigned

Bug Description

For multi-unit parts, only one value for each user-defined field is exported in the generic netlist exporter, even though each unit can have different values for the same user-defined field. This is a well-understood problem (comments in the netlist exporter code lament it). It sounds like the original thinking here was that Eeschema would be changed to enforce uniformity in fields across multi-unit components, but based on the most recent discussions here: https://bugs.launchpad.net/kicad/+bug/1765771 it appears that this may no longer be the case.

I'm involved in the same project to digitize a bunch of Apollo Guidance Computer schematics that became available recently into KiCAD. What we'd really like to do, in the long run, is generate digital simulations of the computer from netlists exported from KiCAD, both as a means of validating the correctness of the transcription, and for study to help improve our understanding of it.

For this, it would be extremely useful to be able to export all of the user-defined fields for multi-unit parts. The logic of the computer was constructed exclusively using dual three-input NOR gate integrated circuits. For the purposes of the schematics, both "units" (gates) are assigned a unique designator, which we have entered as a user-defined field per unit, and displayed on the schematic. For simulation purposes, we also need to tag the gates with initial conditions of "1" or "0", to stabilize the simulation (otherwise flip-flops would bounce endlessly). And lastly, each pin of the main 276-pin backplane connector is drawn as its own "unit". For these, we adding a field to each pin's unit with the net name of the backplane signal connected to that pin. Here's an image showing all of that: http://www.ibiblio.org/apollo/KiCad/2005060D-p1of3.png

Based on the comments in the exporter, the current way to do this would be to find the first unit in the component, and add uniquely named fields for each gate number, each initial condition, and each backplane net. This would get confusing and error-prone pretty quickly, especially for the big backplane connector.

Would it be possible to get all of this information added to the netlist export? It could be done in a backwards-compatible way with a relatively small number of changes. I've attached a patch that implements sort of what I'm thinking. It would add a new little section to each component in the generated XML that looks like this:
    ...
    <comp ref="U41">
      <unit_fields>
        <unit number="1">
          <field name="Gate">38124</field>
          <field name="Initial">1</field>
        </unit>
        <unit number="2">
          <field name="Gate">38126</field>
          <field name="Initial">0</field>
        </unit>
      </unit_fields>
      <value>D3NOR-+4VDC-0VDCA-B_C-E_F</value>
    ...

Revision history for this message
Mike Stewart (mastewar1) wrote :
description: updated
Jeff Young (jeyjey)
Changed in kicad:
importance: Undecided → Medium
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.