www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2018/03/11/20:41:17

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Mon, 12 Mar 2018 01:39:08 +0100
From: Kai-Martin Knaak <kmk AT familieknaak DOT de>
To: geda-user AT delorie DOT com
Subject: [geda-user] current gnetlist from git and hierarchy
Message-ID: <20180312013908.3dbbb5bc@swips.iqo.uni-hannover.de>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
MIME-Version: 1.0
X-Provags-ID: V03:K0:G2pQTqs9XdDPMZ1AwyXkV01YUOCoQxZjXOH0MQHNzs1VCMMQsom
JBLwGZp5iyUMEWY+Qqjs1LIrFJOEY0OvJp+JE9ZOOL5iWrNnE/I2lO2M6obWrTsifiy//0x
3H137SdjcJJxtWs1GDMg38nQ43wOruCKeNSDIsD4v4BkB604Hpyxwv9jZ8+YUDpWMi8k8iJ
bi1+DzX3czuckzy0Rfscw==
X-UI-Out-Filterresults: notjunk:1;V01:K0:Lt6q4mRaw20=:gkmyAtf1Cbb8jaQqsZGh+w
piC3YUBp0rkSRZz2RQJcwktD0qG6I1pybUGShZDWjWOCwczWR3rQ1fvTdhTQ0j4vcfNw1QEYx
+rnWLuGlyDiTNTKFFFmh6EqU4tVEWUv19sHp7Pcpid8MUoKHJ+ehjuAtyRFTGm/7gTxbBFy9P
nsiERtitB4LJ/VSyIHoix/pUxqkhxVLz8XdroYiLpkU1J6/UTDgePc5vAqoW8L6o6dYZPZ1Qy
9sEpuDHFnwH/v6GMOTUtrmoDIQFK+KgxqZKenrp6rMPOeN+yScjVpOFAWN9mFcDfjqCP6T3yj
NgR4dJshpHKxYRA8WtLdYhVZVnbI1zjxCnq3kDqKOkJw6irNawDn0guNSyX2aGevL73sGIOsc
A42uL1j4TJZ7zJL5k7eUhe0pd+axxOIqivtafeppTAcdNGnlvQTkqXv6Ievm5zZNetM/INDfn
ocK0qx1YbWwhmxB6Lnug35PZoA3U+WWeuuQNncOyfYWn32Z6cNNIrQMAaeT1g89J2TCM33uy1
AIIMqwfbSG/+Th2Ht3aVEOpSRXWdOsY9Aqzf9cwGrO7cvcAZpT4t4joXIdvhO0hBZixU7K8ER
Bd0QoyGi7nLZKQU5qy01DiD2hgcvzHnjm5dNtHUgMpdUycBFxGbNa0TFO25WOi+VRMiRx3+Jh
RkZf66iPoZFwFtsCTzTQxM0AxMz4u5awgn/E4AALPyB42QOa23BArWy4vkf75b8fIutzk3jl7
E68R1E87FMtk6ezKAwmUuBmg0mpvVEUxPEjU2Q==
Reply-To: geda-user AT delorie DOT com

--Sig_/Fn63+rUodqKRx955SQh.nUz
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Today, I wanted to rework one of my older projects. Unfortunately
something seems to be in the way of my usual work-flow and set-up. The
project makes use of hierarchical schematics.=20

This is the gnetlistrc I originally used to set up netlisting:
--------- $PROJECT/gnetlistrc -------------
(hierarchy-uref-mangle "enabled")
(hierarchy-uref-separator "")
(hierarchy-netname-mangle "enabled")
(hierarchy-netname-separator "/")
(hierarchy-netattrib-mangle "disabled")
(hierarchy-netattrib-separator "/")
--------------------------------------------

The config deliberately uses the empty string as separator for refdes and
no mangling of netname attributes. No separator allows for the shortest
refdeses possible. In my projects netname attributes are uses
exclusively for GND, Ub, and the likes. I like to have these available
globally.

With this set-up I get (gda-gaf freshly compiled from git master):
/-----------------------------------
$ gnetlist -g PCB  lasertreiber_0_master.sch
WARNING: The RC file function 'hierarchy-uref-mangle' is deprecated.

RC configuration functions will be removed in an upcoming gEDA
release.  Please use configuration files instead.

WARNING: The RC file function 'hierarchy-uref-separator' is deprecated.

RC configuration functions will be removed in an upcoming gEDA
release.  Please use configuration files instead.

WARNING: The RC file function 'hierarchy-netname-mangle' is deprecated.

RC configuration functions will be removed in an upcoming gEDA
release.  Please use configuration files instead.

WARNING: The RC file function 'hierarchy-netname-separator' is deprecated.

RC configuration functions will be removed in an upcoming gEDA
release.  Please use configuration files instead.

WARNING: The RC file function 'hierarchy-netattrib-mangle' is deprecated.

RC configuration functions will be removed in an upcoming gEDA
release.  Please use configuration files instead.

WARNING: The RC file function 'hierarchy-netattrib-separator' is deprecated.

RC configuration functions will be removed in an upcoming gEDA
release.  Please use configuration files instead.

WARNING: The RC file function 'hierarchy-uref-mangle' is deprecated.

RC configuration functions will be removed in an upcoming gEDA
release.  Please use configuration files instead.

Backtrace:
In ice-9/boot-9.scm:
 160: 19 [catch #t #<catch-closure 56382f0ff1a0> ...]
In unknown file:
   ?: 18 [apply-smob/1 #<catch-closure 56382f0ff1a0>]
   ?: 17 [call-with-input-string "(with-fluids ((rc-filename-fluid \"/home/=
kmk/.gEDA/gnetlistrc\")  (rc-config-fluid (eda-config-scm-from-config #f)))=
 (primitive-load \"/home/kmk/.gEDA/gnetlistrc\"))" ...]
In ice-9/boot-9.scm:
2404: 16 [save-module-excursion #<procedure 56382f0f9660 at ice-9/eval-stri=
ng.scm:65:9 ()>]
In ice-9/eval-string.scm:
  44: 15 [read-and-eval #<input: string 56382f0f5b60> #:lang ...]
  37: 14 [lp (with-fluids (# #) (primitive-load "/home/kmk/.gEDA/gnetlistrc=
"))]
In ice-9/eval.scm:
 481: 13 [lp (#<fluid 27> #<fluid 28>) ("/home/kmk/.gEDA/gnetlistrc" #f)]
 481: 12 [lp (#<fluid 28>) (#f)]
In unknown file:
   ?: 11 [primitive-load "/home/kmk/.gEDA/gnetlistrc"]
In geda-deprecated-config.scm:
  80: 10 [#<procedure 56382f0496c0 at geda-deprecated-config.scm:77:4 args>=
 "enabled"]
In ice-9/boot-9.scm:
2792: 9 [#<procedure 56382ed3b500 at ice-9/boot-9.scm:2780:4 (name #:option=
al autoload version #:key ensure)> # ...]
3068: 8 [try-module-autoload (geda config) #f]
2404: 7 [save-module-excursion #<procedure 56382f10ac00 at ice-9/boot-9.scm=
:3069:17 ()>]
3088: 6 [#<procedure 56382f10ac00 at ice-9/boot-9.scm:3069:17 ()>]
In unknown file:
   ?: 5 [primitive-load-path "geda/config" ...]
In geda/config.scm:
  20: 4 [#<procedure 56382f1182e0 ()>]
In ice-9/boot-9.scm:
2954: 3 [define-module* (geda config) #:filename ...]
2929: 2 [resolve-imports (((geda core smob)) ((geda core config)))]
2870: 1 [resolve-interface (geda core smob) #:select ...]
In unknown file:
   ?: 0 [scm-error misc-error #f "~A ~S" ("no code for module" (geda core s=
mob)) #f]

ERROR: In procedure scm-error:
ERROR: no code for module (geda core smob)
Failed to load RC file [/home/kmk/.gEDA/gnetlistrc]
\--------------------------------

The import schematic function of the pcb GUI fails with the same message
on the command line.

What I get from this is:
a) the traditional scheme statements in gnetlistrc are depreciated.
b) when gnetlist tries to process the gnetlistrc anyway, it runs into probl=
ems.=20
It seems like an entity called "smob" is missing.

I tried to look up how hierarchy is supposed to be configured with config
files now.
The user guide=20
	http://wiki.geda-project.org/geda:gnetlist_ug:hierarchy
points to a page on gnetlist configuration
	http://wiki.geda-project.org/geda:gnetlist_ug:config
This page still exclusively presents the depreciated commands.

With a similar situation for printing the magic key word was "gaf command
line utility". So my next stop was the documentation page on gaf:
	http://wiki.geda-project.org/geda:gaf_utility
However, the only hierarchy related option this page knows about is=20
the boolean 'traverse-hierarchy'. This is supposed to control whether
or not hierarchy is considered at all. In particular, there is no=20
option to set the separator string or differentiate between the
hierarchy is handled for refdes, net_name and net_attribute.

grep-ing through the source of gnetlist I found a list of hierarchy=20
related options in netlist.py . These include
	--hierarchy-refdes-separator
	--hierarchy-netattrib-mangle
	--hierarchy-netname-separator
So the options I need seem to be available. But how do I activate them?

If I try to directly add these as an option on the command line, they appear
not recognized:
    $ gnetlist --hierarchy-refdes-separator=3D":" -g PCB  lasertreiber_0_ma=
ster.sch
    gnetlist: unrecognized option '--hierarchy-refdes-separator=3D:'
    Run `gnetlist --help' for more information.

If I use the -O flag to pass the options to the PCB backend, the options se=
em
to be ignored. Refdeses are mangled with the prefix separated from the local
refdes by a '/'.=20

Unfortunately, in the context of my existing project this means pcb wants to
replace every footprint in the hierarchy. I'd have to manually place them at
their correct position again. With literally hundreds of components in the
project, this is clearly not an option. If everything else fails, I may wri=
te
a script to introduce '/' in the refdeses. I would rather avoid this, thoug=
h.
After all, this affects quite a number of projects. And documentation would
have to be changed, too.

Do I miss something obvious?

---<)kaimartin(>---
--=20
Kai-Martin Knaak
Email: kmk AT familieknaak DOT de
=C3=96ffentlicher PGP-Schl=C3=BCssel:
https://keyserver.ubuntu.com/pks/lookup?op=3Dindex&search=3D0x7B0F9882

--Sig_/Fn63+rUodqKRx955SQh.nUz
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEyAypwA/y2l/nFU8PwTqkzHsPmIIFAlqlzCwACgkQwTqkzHsP
mIKtqQ//aDDVlYkCVxb9iUrbs3jCcjoP7TBd8MxImCB6W2xfLT1mMlH0P3p7/ubb
dBaORDTha0kwSFfdLyHb/AEgLLSFZAY4gkmSy5iR609cD3j48FpbettujiaTYf0l
NwceYutjOGTdmChzk617vRi/wxBXMLsuvRXDfqYMmIL8aBx9XLTsPy9XIiESEnCA
lKMDF+IAM3K0N5yY8UHAcM4pJ96PpxH9Tr2NUnuF3nur3qf3sBEElfuUDV1wNJK8
PHOp9e0ikgoR7IaHBE5gjrsfvSkQerIDu/BbCM9Yu7ja/1lQtT9fn8CNEFUApQJS
TP3dX1cnmpngK5ILWeujMAkW0s/0U9M8sstEq+rmj0dRVn5I/SmKFeedwmeQgwQ5
i3Wpk73ncid5zPu8x/dmkPGa/1hzyMkY3sdmp4Zf3ioZSVvdyVS91SBGQBh7GgKw
fLJ5KTlroU5MV+t1i6IdpREBvJ8FbNrax6ly/uvDF3OtDNJOqF86aMyMT8qkQPJA
0QWETp90MLq2Gx8VN+pDxuzyywF19sTfGZASOYY9nbBgRTmdmAeZ4SOCuT/v47A3
foiS3KeM6J9joarSG0w25JYMGHnLaLT9Z6XVXykHCga6u1vNOPm734pT4CX3VoFR
S/Hkm5IDGtwc67C4UgxLimUIxV3Tl2Igi/B9Dc17WH8yv2Z81fI=
=ikXb
-----END PGP SIGNATURE-----

--Sig_/Fn63+rUodqKRx955SQh.nUz--

- Raw text -


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