← Back to team overview

kicad-developers team mailing list archive

Re: Eeschema 6.0 file format / data structure

 

On Thu, Mar 29, 2018 at 9:30 AM, Simon Richter <Simon.Richter@xxxxxxxxxx>
wrote:

> Hi,
>
> On 29.03.2018 15:02, Jeff Young wrote:
>
> > (That way the Symbol
> > Settings dialog maps 1:1 with the parent symbol, and the Symbol Fields
> > dialog maps 1:1 with the alias.)
>
> I wonder if it would make sense to go the opposite direction, and
> introduce an inheritance hierarchy. Symbols can inherit from other
> symbols, define or override attributes and also add new attributes that
> may in turn be abstract.
>
> So for example, a "generic diode" would
>
>  - provide a diode symbol as vectors
>  - provide a SPICE type of D
>  - provide the reference prefix "D"
>  - define abstract properties for forward voltage, maximum current etc.
>
> Specific diodes would inherit that, provide the forward voltage and
> maximum current and name of the correct SPICE model, and would also map
> the pins in the drawing.
>
> Components that use the same graphical representation can then be easily
> exchanged without having to adjust the schematic, which would be useful
> e.g. when exchanging a single-unit device for a multi-unit one.
>
>    Simon
>
>
This is a good idea. Give a symbol the ability to link to any other child
symbol. You instantiate the
parent and it provides its name and attributes before pulling in the
attributes from the children. Anything
already defined is ignored but all other attributes are added.

So I create a symbol for a specific diode that links to a generic diode
that is instantiated on my schematic. All
I do is change the component name from generic to specific and I get all
the new info from the specific but still
retain everything from the generic that wasn't overridden(including the
graphic and all the pins).


I can create a generic NAND gate and instantiate that on my schematic. I
then create a 74LS00 component that
has a graphic for power and ground along with four links back to my NAND
gate. When I package my gates it keeps
the NAND graphic but adds the slot and pin swap info from the 74LS00 symbol.

I can even create a generic 7400 symbol and have specific
74LS00,74HC00,74ACT00 etc symbols link to it.

Hierarchy is your friend.

John Eaton

References