Mail Archives: geda-user/2024/04/29/09:07:06
Richard:
> I'm working on a project with several gschem-pages, based on an older,
> existing schematic from someone else. I'm asked to add extra components
> to these schematic pages, however while preserving the RefDes-numbering
> of the older parts.
>
> This presents the problem that autonumbering in one page is not aware of
> the numbering in other pages, so new components tend to get numbers that
> are already in use in other pages, which is only signalled when I import
> them into PCB.
Well, lepton/geda doesn't really support a global numbering of
components. It only supports hierarchical numbering, i.e. instead of
using R1 to R9999, it uses a/R1, a/R2 etc for subpage a, b/R1 etc for
subpage b, and so on. This also works for subsubpages e.g. c/x/R1.
You can get a global numbering (in lepton) if you don't use the same
subpage twice or more, uses an empty refdes-attribute-separator, an
empty refdes in the source symbol, and handle the numbering yourself.
Well, it is a little painful.
> Is there a way to make gschem aware of all existing pages in a project?
You could perhaps write a plugin or some external program.
> Obviously, merely having those pages opened in the Page Manager doesn't
> do the trick. I saw some references to defining a hierarchy and
> sub-schematics, but I'm not sure if that is what I need (also, the wiki
> page seems broken: wiki.geda-project.org/geda:hierarchy).
I have a simple example in:
https://aspodata.se/git/openhw/test_files/hier_design/01_simple/
With hierarchical (isn't there a easier word for this?) design, you
use a symbol which has an attribute "source=<file>" where <file> is
the name of the sub page. The connections from the top.sch and the
sub.sch is using pins in top.sch and net symbols in sub.sch.
Each pin in top.sch with label "A" is connected to the net-symbol with
refdes "A" in sub.sch (I think gschem prefer the use of portname
instead) and so on.
In the net file, the final refdes will be a combination of the source
symbols' refdes and the sub.sch's component refdes.
Since I prefer short refdes' and am using lepton, I tell lepton to not
insert any character between top and sub strings for refdeses:
$ cat lepton.conf
[netlist.hierarchy]
refdes-attribute-separator=
> I'd say it should be as simple as enumerating all project .sch files in
> one place, but I can't find anything like this.
It woldn't be that difficult to list all refdeses, generating a bom
would be one way.
Regards,
/Karl Hammar
- Raw text -