← Back to team overview

kicad-developers team mailing list archive

Re: eeschema: how to handle component references on

 

Huh?

Your mere use of the work "instantiate" suggests that there is a fundamental mis-understanding of the principal purpose of the SHEET paradigm.

Beyond that I cannot comment because I do not understand what you need vs. what the software currently does. Elaborate for me please if you really want an opinion from me.

I am not feeling real smart right now so if you can dumb it down that would help.

Thanks,

Dick

Hi,

So, Ive looked at the code a bit, and it seems that each time a sheet is
found while reading in a file, it loads the sheet DrawStruct, and later
fills out the sheet's EEDrawList by reading in the sheet's filename.
Hence, the class SCH_SCREEN is the basis of the sheet hierarchy. There is
a new instance of the sheet per DrawStruct.

To allow multiple hierarchal instantiations of the same schematic sheet,
it makes sense to replace these many instantiations with references to a
single sheet. The only way different instantiations of a given sheet
differ is in their component references (C202 etc), so I propose that
instead of a single entries in the component reference field, there
should be an array. This array should be indexed by the sheet reference
number, and the array should be saved when saving the schematic sheet. Hence, the file specification will have to change a small bit.

Now, if the sheet DrawStruct is duplicated, then users cannot have varying
interfaces to it -- this part has to be different, as the location has to
be different on the parent shematic. It is the EEDrawlist & sheet that
should be the same, so that if you edit one all of them change.

I can't think of many other ways of doing it, other than enforcing a
component ref offset per sheet instantiation (like 1000, so that the first
instantiation of adc.sch has caps labeled C1001, C1002 .. etc & the second
instantiation C2001 ...). But this is kludgy.

Of course, once a present hierarchal schematic is loaded into memory, you
can annotate all components and get a valid netlist from which to layout a
board. The problem is, if you go back and, say, add a component to the
ROOT sheet, then subsequent annotations of the hierarchy will be
conflicting, and you cannot go back and forth between schematic and
layout. bad, no?

Tim



Hi,

I have a schematic with the following hierarchy:
{root}
-{16 channel mod}
-- {4 channel ADC}
--- {2 channel filter}
--- {2 channel filter}
-- {4 channel ADC}
--- {2 channel filter}
--- {2 channel filter}
-- {4 channel ADC}
--- {2 channel filter}
--- {2 channel filter}
-- {4 channel ADC}
--- {2 channel filter}
--- {2 channel filter}

e.g. the 2-channel filtering is instantiated 8 times for the 16 channels.
The problem is that it only saves the component references for *one* of
these schematics, so that when I reload, I have to re-annotate the entire
schematic. While the thing is in memory, this is fine, since it seems
each instantiation is separate & i can do DRC etc. But this will not be
good when I move to layout - the components need to have stable
references.

How should this be done?

I'm happy to code it up, just want some input.

Also, is anyone else annoyed when, also in eeschema, you delete a long
straight line, and instead of the deletion terminating at the next node or
intersection, it deletes *everything*. This frequently forces me to redo
long lines.. worth a fix?

thanks yall,
Tim

ps. I've been noticing that each SVN revision makes kicad appreciably
better - good job everybdy!









Follow ups

References