delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/07/10/11:31:24

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=date:from:to:subject:message-id:mail-followup-to:references
:mime-version:content-type:content-disposition
:content-transfer-encoding:in-reply-to:user-agent;
bh=RQz1uijQc+h0PjvSEMuwkFMFujTQKhuAMKvO1zuuOT8=;
b=MYWxGnM6Fd7M/j8pnubLWBMFnHzSRB9WBsIYZjD9VSqkOgLa6AWNRGQx1mN0kKW+hz
39CmV6PkbxXfSQMAJIteY3lAdM2YkbRE2aBIQdCl7dj39nEFHa7I3E8CSDdTcgpF3NlN
PTXCECqbCd7u73zEd1V2eqquTX7M+YW4CQplEdkcv6Dm0C/3bcs2afu7KoDUmqIzqvfj
DhWth5lAHm3t15g3UWvm7h6NoSE1bedGqw+8ZXlfQIEQhZ6Uuu01wjGT5OKElAIiLcxf
bxmgga/X5VqovzIpeUZKLwxSFpZZ79g6kINOK8iUaCzpNwRjlfXw8zEyGBKvZQqfN6OJ
247A==
X-Received: by 10.112.217.2 with SMTP id ou2mr20426225lbc.15.1436542264997;
Fri, 10 Jul 2015 08:31:04 -0700 (PDT)
Date: Fri, 10 Jul 2015 18:31:03 +0300
From: "Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] why I parse sch: gnetlist, writing backends (Back
annotation)
Message-ID: <20150710153103.GC17023@localhost.localdomain>
Mail-Followup-To: geda-user AT delorie DOT com
References: <201507091843 DOT t69IhGF6028321 AT envy DOT delorie DOT com>
<6392CE1A-AFA0-4D62-979C-3F35786422BD AT noqsi DOT com>
<201507092127 DOT t69LRHRC001744 AT envy DOT delorie DOT com>
<559EFE69 DOT 1040601 AT zoot DOT drehmel DOT com>
<201507092332 DOT t69NWUEN006109 AT envy DOT delorie DOT com>
<alpine DOT DEB DOT 2 DOT 00 DOT 1507100501200 DOT 6924 AT igor2priv>
<20150710132650 DOT GA15876 AT localhost DOT localdomain>
<BFB25FA5-AD1A-473C-B3BC-E0AEC30CEE50 AT noqsi DOT com>
<CAM2RGhRb-zkTdwq3Hq_4ge8CfZgxi3JHZZZC2KzHTrMq7GWCjQ AT mail DOT gmail DOT com>
<24EB7D6F-62E5-4C78-9853-5383A034E3AA AT noqsi DOT com>
MIME-Version: 1.0
In-Reply-To: <24EB7D6F-62E5-4C78-9853-5383A034E3AA@noqsi.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
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

On Fri, Jul 10, 2015 at 09:04:14AM -0600, John Doty wrote:
> 
> On Jul 10, 2015, at 8:38 AM, Evan Foss (evanfoss AT gmail DOT com) [via geda-user AT delorie DOT com] <geda-user AT delorie DOT com> wrote:
> 
> > On Fri, Jul 10, 2015 at 9:56 AM, John Doty <jpd AT noqsi DOT com> wrote:
> >> 
> >> On Jul 10, 2015, at 7:26 AM, Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com] <geda-user AT delorie DOT com> wrote:
> >> 
> >>> TL;DR
> >>> Have you ever tried to read 'info geda-scheme’?
> >> 
> >> It doesn’t apply to gnetlist (at least in the 1.8 version). Even the “core API” functions are not available to gnetlist scripts.
> > 
> > I did not know that. I should follow gnetlist more closely. Could I
> > impose on you to explain what drove that change?
> 
> If it was a change, it was a long time ago. None of the functions in that document have ever been part of the gnetlist API as far as I know.
> 
> Here’s my rough working document on the gnetlist API (from 2009):
> 

> gnetlist:get-packages level
> 
> Yields a list of refdes values for the set of schematics. Duplicated values are only listed once. The "level" argument must be present, but is unused.
> 
> gnetlist:get-non-unique-packages level
> 
> Yields a list of refdes values for the set of schematics. Duplicated values are listed as many times as they appear. The "level" argument must be present, but is unused.
> 
> gnetlist:get-pins refdes
> 
> Yields a list of pin numbers for the specified refdes value.
> 
> gnetlist:get-all-nets level
> 
> Yields a list of net names for the set of schematics. Duplicated values are listed as many times as they appear (once per segment?). The "level" argument must be present, but is unused.
> 
> gnetlist:get-all-unique-nets level
> 
> Yields a list of net names for the set of schematics. Duplicated values are only listed once. The "level" argument must be present, but is unused.
> 
> gnetlist:get-all-connections net
> 
> Yields a list of all connections to the named net. Each element of the list is itself a two element list of the form (refdes pinnumber).
> 
> gnetlist:get-nets refdes pin
> 
> This is apparently intended to yield the netname connected to the given pin along with all pins connected to that net, including the pin in the initial query. A little experimentation, however, shows that it does not reliably list all of the connections, possibly due to a problem with net= connections. Most (all?) existing back ends that use this appear to use only the netname.
> 
> gnetlist:get-pins-nets refdes
> 
> Yields a list of (pinnumber . netname) pairs detailing all connections for the given refdes.
> 
> gnetlist:get-package-attribute refdes attribute
> 
> Yields the value of the named attribute attached to a symbol instance with the given refdes. Yields "unknown" if the attribute is absent. It only yields one value, regardless of how many matching attributes exist in the set of schematics. If there is more than one instance only the first instance encountered is inspected, so it may yield "unknown, even if a matching attribute is present.
> 
> gnetlist:get-toplevel-attribute attribute
> 
> Yields the value of the named attribute at top level, that is, an attribute present in one of the schematics unattached to any object. Yields "not found" if no matching attribute is present.
> 
> gnetlist:get-renamed-nets level
> 
> When gnetlist expands a hierarchical subcircuit, it first assigns every net within the subcircuit a unique name based on the refdes of the subcircuit instance and, if present, the netname within the subcircuit. If a net is attached to the higher level circuit, gnetlist then changes the name of the subcircuit net to the name of the higher level net to which it is attached. "gnetlist:get-renamed-nets" returns a list of lists of pairs of names. The first name in a pair is the initial unique netname within the subcircuit, the second is the higher level netname it has acquired. The "level" argument must be present, but is unused.
> 
> gnetlist:get-attribute-by-pinseq refdes pinseq attribute
> 
> Yields the value of the named attribute attached to the pin with the named pinseq attribute to the package with the named refdes attribute.
> 
> gnetlist:get-attribute-by-pinnumber refdes pinnumber attribute
> 
> Yields the value of the named attribute attached to the pin with the named pinnumber attribute to the package with the named refdes attribute.
> 
> gnetlist:vams-get-package-attributes refdes
> 
> Yields a list of the names of attributes attached to the symbol at schematic level?
> 
> gnetlist:get-slots refdes
> 
> Yields a list of all slot attributes associated with a given refdes. Duplicated values are listed as many times as they appear.
> 
> gnetlist:get-unique-slots refdes
> 
> Yields a list of all slot attributes associated with a given refdes. Duplicated values are listed only once.
> 
> gnetlist:graphical-objs-in-net-with-attrib-get-attrib netname attrstring attribute
> 
> This searches for a graphical symbol attached to a net with the given netname. The symbol must have attrstring (of the form name=value) attached. It yields the value of the specified attribute,
> 
> gnetlist:get-calling-flags
> 
> Yields a list of lists of command line flags and values. Each flag must be known to the gnetlist front end. For example, the "--nomunge" flag will yield ("nomunge_mode" #t).
> 
> gnetlist:get-command-line
> 
> Broken or unimplemented? Yields #f.

Hi John,

Since, AFAIK, we have no similar description in the geda-gaf
documentation, may I add this to the geda wiki, please?

Thanks,
  Vladimir

- Raw text -


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