delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/01/16/16:20:45

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-TCPREMOTEIP: 207.224.51.38
X-Authenticated-UID: jpd AT noqsi DOT com
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
Subject: Re: [geda-user] first attempt at bus support in gnetlist for pcb
X-Pgp-Agent: GPGMail 2.5.2
From: John Doty <jpd AT noqsi DOT com>
In-Reply-To: <201601161959.u0GJxa4G027544@envy.delorie.com>
Date: Sat, 16 Jan 2016 14:18:58 -0700
Message-Id: <0E73A3F8-8B1B-4C2A-9792-766AA724905D@noqsi.com>
References: <201601080714 DOT u087Ejj5032766 AT envy DOT delorie DOT com> <F723B760-53BB-467C-8595-20EB5FC50E47 AT noqsi DOT com> <201601161959 DOT u0GJxa4G027544 AT envy DOT delorie DOT com>
To: geda-user AT delorie DOT com
X-Mailer: Apple Mail (2.1878.6)
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

--Apple-Mail=_D0EE8546-FB3E-439E-86BB-A2967512792E
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=windows-1252


On Jan 16, 2016, at 12:59 PM, DJ Delorie <dj AT delorie DOT com> wrote:

>=20
>> 1. For netlists flattened by gnetlist, we have a configurable syntax
>> for net renaming before the Scheme stuff gets the data. The bus
>> syntax here will have some difficulty with that.
>=20
> Because of my choice of syntax, or because of some design limitation
> in that part of the code?  I'm not tied to the syntax, I know verilog
> has a specific one it needs to use, that I don't mind adopting, but I
> figured it would be neccessary for the backend at some point to pick
> "something" via a callback to choose/enable such expansion.

By default, a net nBL,A[8:2] internal to a subcircuit with refdes A1 =
will get the name A1/nBL,A[8:2] when gnetlist flattens hierarchy. That =
won=92t expand right. And note that the user can decide to use a =
different separator and whether hierarchy is prefix or postfix in =
gnetlistrc, so it isn=92t as simple as looking for the last /.

>=20
>> 2. For genuinely hierarchical netlists, there's probably not a
>> single one-size-fits-all plug in solution. Not today.
>=20
> Sigh.

What do you expect? For Verilog, you can connect whole busses between =
levels, so you want that, but you may need to translate the bus syntax. =
For SPICE, you can=92t connect busses between levels, so you have to =
expand busses looking upward and downward. Upward is yet a different =
beast. At least SPICE isn=92t fussy about naming. Then there are several =
gnetlist back ends that are aware of hierarchy via the =
(gnetlist:get-renamed-nets) mechanism, but I don=92t understand how they =
use that information, so that=92s another case to consider.

>=20
>> 3. For pinseq-centered netlisting (SPICE), it needs to expand
>> pinseqs, too.
>=20
> My example expands two attributes; expanding three shouldn't be a
> problem.

Yep.

>=20
>> Another issue is that "-" seems a little strange as a range
>> token. ":" would match Verilog and some programming languages for
>> more user familiarity.
>=20
> I picked dash because common English uses it as a shortcut for "to",
> like "Copyright 1990-1995" or "meeting from 1-3pm".  It made sense in
> a list context.
>=20
> Perl, C, and C++ use ".." (or "...") for ranges.  It varies.
>=20
> Plus, consider that a layout "bus" connects to a list of usually
> non-sequential pin numbers.  =46rom the pinnumber point of view, "A:B"
> syntax is less common than the "A,B,C" syntax.

Comma is fine, I think.

>=20
> OTOH the two syntaxes are orthogonal; one module could expand both -
> so you could say A[1:4] connects to pins "4-6,8".
>=20
> And I can see some folks getting confused about whether the :N means
> "to this number" or "for this many numbers".  I.e. is A[4:2] A4,A3,A2
> or A4,A5 ?  Unless you already know Verilog, it might be a stumbling
> point, esp if you've seen ":16" elsewhere to mean "a 16-bit bus".
>=20
> But in any case I'm not particularly tied to the syntax.
>=20
>> I suggest using Dirac-style angle brackets to designate a bus
>> definition, so a typical example might be "<nBL,A[8:2]>". While I
>> think a sufficiently aware gnetlist plugin could navigate this
>> without the extra tokens, we've historically exploited the
>> transparency of our formats to process schematics with other tools
>> as well. The extra tokens will help.
>=20
> I don't see how the extra syntax helps anything, as it would just add
> a "strip angle brackets around string" step.  Busses would always only
> have <> around the whole string.

Not after hierarchical renaming. A plug-in could probe this with =
(gnetlist:get-renamed-nets), but I think it=92s more flexible and =
transparent to delimit the part of the name to be expanded. Of course, =
the reason I bring this up is that I=92m interested in other opinions.

>=20
> I.e. what's the difference in usability between these:
>=20
>     <nBL,A[8:2]>
>     nBL,A[8:2]
>=20
> I see no problem with just stripping out angle brackets, if that's
> what you mean.
>=20

John Doty              Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd AT noqsi DOT com



--Apple-Mail=_D0EE8546-FB3E-439E-86BB-A2967512792E
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJWmrPCAAoJEF1Aj/0UKykRmQIQAKUN/xVpI289D9OKIJAE6uql
3hdhMkoCTLzk0FdL44cSs3WUF3cF6DDIONUnQUIkniKhwUysIYWa561lNzHYvER+
KGEinPCMJmukzbV3Q06e/0DpbPzZLAQWfk+0J9WLmM6/mSIvVkwOMUQ97s/U6dgE
EA6ON9bpk9F0aI7IterCf4BzClxfWCsmh+YThe7TxY+ZBpr5G+liKr7KxOh11Pbs
PLdcHkRRHVghYFDslIhKshIJYxmKvyM2aiVOyhDA/MrscOItoEzFxsHafH/DhMsJ
64I7DuOap8eJmwJuGCAGkVD88MiyysPn3QnVWAqh076MBj3snqm5fbQPhTQawqGQ
lVr3HqDjmFsf0xrQAH3NSdMqcMGjGOLdpO8REg0oHFjeweBx1e7luIq8C84B76sz
Tuo08iuEIj5fn1BX8yBxQNYu//CFtOM2fMJdrcU0O72nhjn+LaARFZ7QXGMcrOXg
rW0vbCoxNO5JpSPr12yRNsSpxtYKLL9JEPcz9td3tCPL/R5en1XI8kbWR496oDxO
O6pjjUfm+vByxVbboSUwAEpA1lznByXTmX/Rc2iv0BH+0YGn5MMbWU2DZI0tBubK
ILeqoWAZD2K0Uu0dhlSuN5ssY7skOyJlUvOMrIG0jyjlYhYU1miVMEyngIQl3986
IzeeNhL2rosfC+J/1HSw
=jO+1
-----END PGP SIGNATURE-----

--Apple-Mail=_D0EE8546-FB3E-439E-86BB-A2967512792E--

- Raw text -


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