Discussion:
[geda-user] gnetlist backend
gedau-1XeMD6fE9sqV9CSZFf/
2014-10-18 09:16:12 UTC
Permalink
Hi all,

I'd write a script that does things that seem to be unusual (judging from
the current gnetlist backends). I do not wish to write the script in
scheme but I'd like to avoid rewriting existing scheme code in my
preferred language. Especially I'd like to avoid building the actual
netlist, figuring attribute promotion and collecting all non-embedded
symbols on my side. The most trivial solution seems to be to use gnetlist
with a backend that does all those and spits out enough data for my script
to process.

I have two questions regarding to this:

1. is there a ready-to-use gnetlist backend that prints the netlist in
some easy-to-process text format and prints _all_ attributes of all
components in an also easy-to-process format?

2. is it possible to have a project-specific gnetlist backend, an .scm
that is not installed system-wide but lives in the project's directory,
still gnetlist can access it?

Regards,

Tibor
gedau-1XeMD6fE9sqV9CSZFf/
2014-10-18 11:20:58 UTC
Permalink
1. is there a ready-to-use gnetlist backend that prints the netlist in some
easy-to-process text format and prints _all_ attributes of all components in
an also easy-to-process format?
I have a working prototype already (attached). It's a copy of the osmond
backend. Please note that I don't know anything about scheme, so my code
may look strange.

The output is one-line-per-record with fields separated by tab. First
field is record type. Things are announced before details are given, e.g.
before listing pin attributes the pin names of the element is listed.

I couldn't figure how to:

- get a list of attribute names attached to a net

- access attributes attached to a net, other than its netname

- get a list of attribute names attached to a pin

Could someone help with these so I can make the backend more generic?

Once this works, as I'm already knee-deep in scheme I will probably
bite the bullet and write a few other similar backends, exporting to
lihata, xml, indented text and json (in this order of priority).

TIA,

Tibor
gedau-1XeMD6fE9sqV9CSZFf/
2014-10-18 15:12:14 UTC
Permalink
On Sat, 18 Oct 2014, gedau-1XeMD6fE9sqV9CSZFf/***@public.gmane.org wrote:

Please disregard the attachment of the previous mail. Meanwhile the script
has changed a lot and supports text, lihata and xml dumps. New versions
are accessible in my svn repo:

svn ls svn://repo.hu/openhw/projects/util/trunk/gnetlist-extras

I'm still interested in the answer to the questions in that mail, tho.

Regards,

Tibor
John Doty
2014-10-18 16:12:55 UTC
Permalink
Post by gedau-1XeMD6fE9sqV9CSZFf/
- get a list of attribute names attached to a net
- access attributes attached to a net, other than its netname
- get a list of attribute names attached to a pin
None of these are implemented in gnetlist at present.

John Doty Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd-***@public.gmane.org
gedau-1XeMD6fE9sqV9CSZFf/
2014-10-18 16:27:42 UTC
Permalink
Post by John Doty
Post by gedau-1XeMD6fE9sqV9CSZFf/
- get a list of attribute names attached to a net
- access attributes attached to a net, other than its netname
- get a list of attribute names attached to a pin
None of these are implemented in gnetlist at present.
Thank you.


How often do users have non-name attributes on nets?

Are there any common pin attributes in use beside pinnumber, pinseq,
pinlabel and pintype?

TIA,

Tibor
John Doty
2014-10-18 17:03:22 UTC
Permalink
Post by gedau-1XeMD6fE9sqV9CSZFf/
How often do users have non-name attributes on nets?
I expect it’s rare, because there isn’t any way to use such an attribute.
Post by gedau-1XeMD6fE9sqV9CSZFf/
Are there any common pin attributes in use beside pinnumber, pinseq, pinlabel and pintype?
"grep by-pin *.scm" in the gnetlist scheme directory shows me that:

gnet-gossip uses “label”. This may be a bug.

gnet-vams explicitly uses “port_object”, “port_type”, “port_mode", and “width”. It uses an additional list of pin attributes (connlist) but I don’t know what that might contain.

John Doty Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd-***@public.gmane.org

John Doty
2014-10-18 16:14:52 UTC
Permalink
2. is it possible to have a project-specific gnetlist backend, an .scm that is not installed system-wide but lives in the project's directory, still gnetlist can access it?
The -L command line flag allows you to add a directory to the list gnetlist uses when searching for .scm files.

John Doty Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd-***@public.gmane.org
gedau-1XeMD6fE9sqV9CSZFf/
2014-10-18 16:29:08 UTC
Permalink
Post by John Doty
2. is it possible to have a project-specific gnetlist backend, an .scm that is not installed system-wide but lives in the project's directory, still gnetlist can access it?
The -L command line flag allows you to add a directory to the list gnetlist uses when searching for .scm files.
Perfect, thank you!

Regards,

Tibor
Loading...