X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Date: Tue, 13 Jul 2021 13:49:05 +0200 (CEST) From: Roland Lutz To: "karl AT aspodata DOT se [via geda-user AT delorie DOT com]" Subject: Re: [geda-user] file format cooperation In-Reply-To: <20210711145317.0560F83D4437@turkos.aspodata.se> Message-ID: References: <20210711145317 DOT 0560F83D4437 AT turkos DOT aspodata DOT se> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII 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 Precedence: bulk On Sun, 11 Jul 2021, karl AT aspodata DOT se [via geda-user AT delorie DOT com] wrote: > The semantics of the sym/sch files has diverged a little between geda > and lepton. As far as gEDA/gaf is concerned, there have only been backwards-compatible semantics changes. Citing from NEWS: > * There are new semantics for power and I/O port symbols: > > - Power symbols can now use a netname=NET instead of a net=NET:1 > attribute. This allows using the attribute value as a visible > label, removing the need for power symbols for individual rails. > > - I/O port symbols in subschematics can now use a portname=PORT > instead of a refdes=PORT attribute to distinguish them from > regular components. This allows checking that unconnected port > symbols aren't silently included in the netlist as components. > > * Hierarchical schematics can now use a simple form of parametrization > where the instantiating component contains an attribute of the form > `param=NAME=VALUE' and some attribute value in the subschematic > contains the pattern `$(NAME)', which will be replaced with `VALUE'. > This only works with regular attribute lookup from netlist backends > and won't affect special attributes like slot= or netname=, though. I have some plans for changes that would break the file format syntax, but so far, I haven't been too eager to implement them. > So what do the geda and lepton people say about trying to continously > agree about the semantics of sch and sym files ? I think that's difficult. lepton-netlist already diverges so far from gnetlist that you can't expect to get a consistent result. Unless there is some effort to adhere to a common testsuite, I don't think this is going to be successful. On Tue, 13 Jul 2021, Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com] wrote: > If you mean attributes, they are not the part of file format. We still > even have the old C parser for schematics/symbols. I believe Karl was asking about semantics, not the file format. > As I've said, we continue supporting the legacy file format. The > preferred format can be changed, however. I'm leaning towards using > SXML instead. gEDA/gaf already has an optional XML file format[0] which offers some advantages in terms of interoperability: - Attributes are named, so the number/order of values isn't an issue. - File format features are named, so features which aren't needed for representing a file can be selectively disabled, allowing software that doesn't support the feature to parse the file correctly. - By default, schematic files contain a copy of the used symbols, so differences in symbol lookup logic won't effect the resulting netlist. That said, having an interoperable XML file format still requires some effort from both sides. Most importantly, it requires a consistent data model--the very reason Xorn exists in the first place. Roland [0] https://hedmen.org/xorn/doc/api/html/geda-xml-format.html