delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/03/12/11:27:59

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Sat, 12 Mar 2016 17:25:14 +0100 (CET)
From: Roland Lutz <rlutz AT hedmen DOT org>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] gnetlist shorting wires
In-Reply-To: <20160312145647.Horde.toH7mUmRASGNT3axa-gppQG@webmail.in-berlin.de>
Message-ID: <alpine.DEB.2.11.1603121619001.2835@nimbus>
References: <20160312145647 DOT Horde DOT toH7mUmRASGNT3axa-gppQG AT webmail DOT in-berlin DOT de>
User-Agent: Alpine 2.11 (DEB 23 2013-08-11)
MIME-Version: 1.0
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 Sat, 12 Mar 2016, Hagen SANKOWSKI wrote:
> During gnetlist generation I got this lines, which seems to be important:
>
> Found duplicate net name, renaming [INPUT] to [\_SPIR_CS\_]
> Found duplicate net name, renaming [OUTPUT] to [SPIR_SDO]
> Found duplicate net name, renaming [S1] to [B]
> Found duplicate net name, renaming [IO] to [B]

The first line means that the nets "INPUT" and "\_SPIR_CS\_" are shorted. 
There is no net named "INPUT" in your schematic, so where did it come 
from?  The top left input port has an attached attribute 
net=\_SPIR_CS\_:\_SPIR_CS\_ (which means the pin with pinname=\_SPIR_CS\_ 
is connected to the net "\_SPIR_CS\_") and an inherited attribute 
net=INPUT:1 (which means the pin with pinname=1 is connected to the net 
"INPUT").  As opposed to most other attributes, gnetlist doesn't simply 
ignore inherited net= attributes.  If there is no attached net= attribute 
for a given pin, it falls back to using the inherited net= attribute. 
(Otherwise, you would have to remember to duplicate all inherited net= 
attributes if you wanted to add one.)  The pin of the input-2 symbol has 
pinnumber=1, though (you can't override that in the schematic), so the 
input port connects to the net "INPUT".

The other port symbols have the same problem, so all I/O nets are 
shorted to the nets "INPUT", "OUTPUT", and "IO", respectively.

> So what I might doing wrong?

See the net= attribute mini-HOWTO for an explanation of what this 
attribute is for and how it is used:

     http://wiki.geda-project.org/geda:na_howto

If you remove all net= attributes from your schematic and replace all port 
symbols with input-1 and output-1 which don't have a net= attribute, the 
schematic (almost) works as expected.

There is one additional problem: the net on the right-hand side has two 
netname= attributes attached to it which don't match.  (Also, the netname= 
attribute on the net "A" is duplicated, which isn't a problem).

> Or where can I see the Source Code for this read-into-memory inside 
> gnetlist to verify am I an idiot or getting a tool bug?

If you are trying to understand the way gnetlist works, I suggest you have 
a look at the refactored codebase in xorn/src/python/geda/netlist/ in the 
gEDA/gaf repository or at Github:

     https://github.com/rlutz/xorn/tree/master/src/python/geda/netlist

For example, you can find the exact algorithm gnetlist employs to resolve 
net= attributes in xorn/src/python/geda/netlist/pp_netattrib.py.  (This 
isn't the actual code you executed, but it's equivalent and much easier to 
read.)

Roland

- Raw text -


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