delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2024/04/30/04:40:52

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Virus-Scanned: Debian amavisd-new at mail.linetec.nl
Message-ID: <a49f9288-9af4-4bd7-b8bb-f1f6c41fd01f@linetec.nl>
Date: Tue, 30 Apr 2024 10:38:37 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [geda-user] Gschem refdes autonumber over multiple pages?
To: geda-user AT delorie DOT com
References: <37de350c-1e5f-422f-b13a-c5a9a1e132ac AT linetec DOT nl>
<20240429130455 DOT F01EF81AB8C5 AT turkos DOT aspodata DOT se>
From: "Richard Rasker (rasker AT linetec DOT nl) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
In-Reply-To: <20240429130455.F01EF81AB8C5@turkos.aspodata.se>
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Hello Karl,

Thank you for your explanation. So there is no easy solution that I 
overlooked. This hierarchical numbering seems rather complicated; I 
think I'll follow upĀ  on your suggestion and write a simple script that 
maintains a list of all RefDes-attributes in all relevant page files, 
and simply coughs up the next free RefDes for the most common categories 
of components (R, C, L, U, Q).

It's a bit of a hassle with saving gschem files(*) and then invoking the 
script when numbering a new component, but less so than having to 
stumble upon duplicate numbers all the time when importing in PCB, and 
going back and seek out the next free one by hand.

*: I guess there isn't an external command for saving the currently 
opened files from the command line? Or is there? Then I could 
incorporate it in my script, prior to updating the list.

Thanks again,

Regards,

Richard

Op 29-04-2024 om 15:04 schreef karl AT aspodata DOT se [via geda-user AT delorie DOT com]:
> 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
>
>
Met vriendelijke groeten,

Richard Rasker
-- 
Linetec
Akkerstafhof 15
7544SP  Enschede
053-4350834
http://www.linetec.nl/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019