Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Apr 14, 2011, at 2:14 PM, Krzysztof Kościuszkiewicz wrote: > But I think we're actually getting farther from something that: >* is backwards compatible with the name=value attribute definition/syntx >* can be simply used to add hierarchy/depth to attribute assignments > > It would be best to keep these two things aligned - syntax used for > general transformations should be a natural extension of the one used > for attribute definitions. As usual, we discuss *features* to exhaustion, never asking the key question: "What enabling factors are missing from the foundation?" If someone wants to write a script to directly process or generate files in .sch format, they just do it: there is no need to negotiate "features" here. They can distribute it, get feedback and enlist help for improvement without disturbing the gEDA core. Similarly, if someone wants to write a printed circuit netlister or a partlister, they can write a gnetlist back end. No negotiation is required. This is a consequence of clean, orthogonal, factored design. The .sch format is simple and easy to parse. In particular attributes are easy to isolate and process with simple tools. Fans of XML-based formats should take note. The gnetlist back end API is well adapted to generating partslists and printed circuit netlists. With some extra work, it's also OK for making simulation input. Within those limits, it's well factored and flexible. We have a more general scripting capability for gschem and gnetlist, but it's crippled by the fact that libgeda and the other hard coded parts interpret attributes, something that they simply should not do. While gEDA is unusually well factored, this is a key place where it needs to be better. Interpreting attributes should be entirely the responsibility of the scripting layer (with suitable defaults provided, of course). While we should strive for uniform, consistent *meaning* of attributes, how that meaning yields concrete results is necessarily application dependent. A classic and troublesome example is slotting, where slots represent independent model instances in simulation, but only a single package in layout. Fancy attribute translations are exactly the kind of thing that belongs in optional scripts, and not in core code. The core should be simple and clean. I've heard it said that good factoring is merely a convenience for the developers, a help for maintenance. I strongly disagree. Good factoring is precisely what users need to be able to customize the suite to *their* needs, rather than being mere consumers, hostage to the necessarily limited imaginations and priorities of the developers. A big part of what makes gEDA special is all of the user contributions. --- John Doty Noqsi Aerospace, Ltd. This message contains technical discussion involving difficult issues. No personal disrespect or malice is intended. If you perceive such, your perception is simply wrong. I'm a busy person, and in my business "go along to get along" causes mission failures and sometimes kills people, so I tend to be a bit blunt. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
Gabriel Paubert wrote: > I believed that the ß has been suppressed in a recent reform of the > german language. Actually, its use was regularized. No ß after short vowels anymore. This replaced "daß" by "dass" and thus removed the most frequent appearance of the character. Anyway, the Swiss don't use ß at all. ---<)kaimartin(>--- -- Kai-Martin Knaak Email: k...@familieknaak.de Öffentlicher PGP-Schlüssel: http://pool.sks-keyservers.net:11371/pks/lookup?search=0x6C0B9F53 ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Fri, Apr 15, 2011 at 02:16:23PM +0200, Stephan Boettcher wrote: > Gabriel Paubert writes: > > > A french or german keyboard will be different (I'm french, > > but I can't stand the layout of french keyboards). > > I'm using us keyboards exclusively, in Germany. I type a lot more > []{}\| than äöüß. I believed that the ß has been suppressed in a recent reform of the german language. But to be fair also, the umlauts are much less frequent in german than accents, diaeresis and special characters in spanish and french (ñçœ), æ is elso used in french but extremely rare. I really have to type every day in three languages (french, english, and spanish) and it's really painful on an US keyboard. Besides that, it seems to be admitted in german to replace ä, ö, and ü by the letter followed by e. There is no such mechanism in spanish, and suppressing the tilde on top of the n in the classical "Prospero Año Nuevo" ("Happy New Year") message could be embarrassing ;-) Gabriel P.S.: I remember perfectly that when the first IBM PC arrived in France in the early 80s, there were no \ on the keyboard. You had to type a contrived combination (Ctrl+Alt+I can't remember what) of keys to type the path separator, and it was at the command line under DOS, without tab completion or any kind of help. Also using TeX on a mainframe, the \{} characters were actually çéè, I won't comment on the legibility of said TeX source... ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
Gabriel Paubert writes: > A french or german keyboard will be different (I'm french, > but I can't stand the layout of french keyboards). I'm using us keyboards exclusively, in Germany. I type a lot more []{}\| than äöüß. I do not think that easy of typing should drive this decision too much. When we need to type hierachy seprators a lot, then there is a problem with the UI that needs fixing. -- Stephan ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Fri, 2011-04-15 at 11:54 +0200, Gabriel Paubert wrote: > > And a small comment regarding hierarchy separators - I would personally > > choose anything that does not require shift-keystroke to type the most > > commonly used separator - so '/' and '.' seem to be the two natural > > candidates. > > That's not a very compelling criterion; on my spanish keyboard: People put up with "/" in UNIX paths, so I think it will do for gEDA as well ;) -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) signature.asc Description: This is a digitally signed message part ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Thu, Apr 14, 2011 at 10:14:13PM +0200, Krzysztof Kościuszkiewicz wrote: > On Wed, Apr 13, 2011 at 10:41:23PM +0100, Peter Clifton wrote: > > > pin[pinnumber=1] {pinnumber="2";} > > pin[pinnumber=2] {pinnumber="1";} > > > > > > I've long seen this to be the most sane way of managing back-annotation > > into a hierarchy. I would go as far to say refdes should be > > back-annotated as such: > > > > #X1 > #X1 > #R1 {refdes = "R99";} > > #X1 > #X2 > #R1 {refdes = "R123";} > > #X1 > #X3 > #R1 {refdes = "R3";} > > That looks neat & powerful - and starting to closely resemble XPath/XSLT/CSS > transformations. > > But I think we're actually getting farther from something that: > * is backwards compatible with the name=value attribute definition/syntx > * can be simply used to add hierarchy/depth to attribute assignments > > It would be best to keep these two things aligned - syntax used for > general transformations should be a natural extension of the one used > for attribute definitions. > > And a small comment regarding hierarchy separators - I would personally > choose anything that does not require shift-keystroke to type the most > commonly used separator - so '/' and '.' seem to be the two natural > candidates. That's not a very compelling criterion; on my spanish keyboard: - the following characters need shift: !"·$%&/()=?¿*_:; (the slash is actually shift+7, which is messy to type when with the left hand when you have the right hand on the mouse) - the following ones need the AltGr key (called ISO_LEVEL3 in X): \|@#~¬{[]}œ€¶ŧ←↓→øþæßðđŋħĸ«»¢“”µ (and ł, but I don't think that you want to use this Polish specific character as a separator) Side note, I have an old (2001) black Apple keyboard, which has two AltGr keys. Most Spanish keyboards only have one, on the right side; it is _impossible_ to type with one hand some combinations using AltGr with these, most notably \|@#, which are on the number row starting from the extreme left above the Tab key until digit 3 (well I can type the #, but I have relatively large hands). - and finally the following ones need both shift and AltGr: £™±°Ω®Ŧ¥↑§©‘’×÷ A french or german keyboard will be different (I'm french, but I can't stand the layout of french keyboards). Regards, Gabriel ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Wed, Apr 13, 2011 at 10:41:23PM +0100, Peter Clifton wrote: > pin[pinnumber=1] {pinnumber="2";} > pin[pinnumber=2] {pinnumber="1";} > > > I've long seen this to be the most sane way of managing back-annotation > into a hierarchy. I would go as far to say refdes should be > back-annotated as such: > > #X1 > #X1 > #R1 {refdes = "R99";} > #X1 > #X2 > #R1 {refdes = "R123";} > #X1 > #X3 > #R1 {refdes = "R3";} That looks neat & powerful - and starting to closely resemble XPath/XSLT/CSS transformations. But I think we're actually getting farther from something that: * is backwards compatible with the name=value attribute definition/syntx * can be simply used to add hierarchy/depth to attribute assignments It would be best to keep these two things aligned - syntax used for general transformations should be a natural extension of the one used for attribute definitions. And a small comment regarding hierarchy separators - I would personally choose anything that does not require shift-keystroke to type the most commonly used separator - so '/' and '.' seem to be the two natural candidates. -- Krzysztof Kościuszkiewicz "Simplicity is the ultimate sophistication" -- Leonardo da Vinci ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
> Equality test AssignmentComment > x = y x := yAda, ALGOL, Dylan, Eiffel, Pascal > x = y x <- yR, Objective Caml > x == y x = y C, C++, Java, C#, Python > > Even though I am most accustomed to C/C++/Java style, I think that it > is ideal to use “=” in the mathematical sense of a logical statement > with a truth value, using another operator to make assignments more > obvious. Better to avoid "x = y" completely, and use == and := so there's no confusion? ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Wed, 13 Apr 2011 22:41:23 +0100 Peter Clifton wrote: > On Wed, 2011-04-13 at 22:26 +0100, Peter Clifton wrote: > > > pin[pinnumber=1] { > > pinnumber="99"; > > } > > And regarding stuff like the above - where we key off one attribute > and change it in the rule, IF that is ever legal - we should do it > like a PLC executes its processing cycles. > > Freeze a view of the attributes as exist "before", run the rules on > those frozen attributes, then bulk update. That would enable a > pin-swap with syntax such as: > > pin[pinnumber=1] {pinnumber="2";} > pin[pinnumber=2] {pinnumber="1";} It might make things simpler and more uniform for both the program and for the user if we had different operators for equality testing and for assignment. Something like one of the following: Equality test AssignmentComment x = y x := yAda, ALGOL, Dylan, Eiffel, Pascal x = y x <- yR, Objective Caml x == y x = y C, C++, Java, C#, Python Even though I am most accustomed to C/C++/Java style, I think that it is ideal to use “=” in the mathematical sense of a logical statement with a truth value, using another operator to make assignments more obvious. Regards, Colin signature.asc Description: PGP signature ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Wed, 2011-04-13 at 22:26 +0100, Peter Clifton wrote: > pin[pinnumber=1] { > pinnumber="99"; > } And regarding stuff like the above - where we key off one attribute and change it in the rule, IF that is ever legal - we should do it like a PLC executes its processing cycles. Freeze a view of the attributes as exist "before", run the rules on those frozen attributes, then bulk update. That would enable a pin-swap with syntax such as: pin[pinnumber=1] {pinnumber="2";} pin[pinnumber=2] {pinnumber="1";} I've long seen this to be the most sane way of managing back-annotation into a hierarchy. I would go as far to say refdes should be back-annotated as such: #X1 > #X1 > #R1 {refdes = "R99";} #X1 > #X2 > #R1 {refdes = "R123";} #X1 > #X3 > #R1 {refdes = "R3";} Could be included in some back-annotation file from the PCB which operates live on the design data at net-list generation stage. I'm not sure if the schematic hierarchy would use "id=R1", "id=X3" etc.. "refdes=R1", "refdes=X3" but to be honest, it doesn't really matter. The only thing which is important is the processing order of each block of attribute annotations. Whether the attribute annotations should be a separate file, or reside within an attribute (also over-ridable for extra CS recursive elegance? ;)) is not something I've thougth about much yet. Either has its charm - perhaps we could use both. -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) signature.asc Description: This is a digitally signed message part ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
> That is ancestory. I'm a big fan of backwards compatibility :-) But it does point out that no one style seems to have a clear majority of the mindset :-P ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Wed, 2011-04-13 at 16:58 -0400, DJ Delorie wrote: > > I thought we used "/" for netlist hierarchy. At least - that is what I > > coded for the netlist viewer in PCB. > > I suggested Attributes use : to "assign" attributes to owners, to > avoid conflict. That is a good separator prefix for namespacing, yes. Or :: even, like C ++. > Like PCB:background-color=yellow > > The syntax for what the owner owns can be different. > > PCB:drc.silk.minimum=5mil > > > I'd put a preference for similarity to CSS syntax if we can use that. > > CSS uses spaces for heirarchy: > > P EM { background: yellow; } That is ancestory. It would also match P/foo/bar/EM/ If you want just P/EM, you need: P > EM { background: yellow; } or P>EM { background: yellow; } -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) signature.asc Description: This is a digitally signed message part ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Wed, 2011-04-13 at 22:16 +0200, Krzysztof Kościuszkiewicz wrote: > So we are more or less looking at a simplified hierarchical path syntax, where > elements without explicit id= provide default id based on the type and other > attributes? > > Examples: > U1.1.net=Vcc (global attribute, pinnumber assumed for 1) > D1.A.net=Vcc (global, pinlabel assumed for A) You would need to be explicit about what attribute you're keying off, as "pinnumber=A" is completely vaild in gEDA. Think BGAs (A1 etc..), or transistors where the footprint is lettered. I propose we look closely at CSS: http://www.w3.org/TR/2009/PR-css3-selectors-20091215/#attribute-selectors pin[pinnumber=1] { pinnumber="99"; } complex[device=RESISTOR] { footprint="0603"; } pin#blah { pinnumber="2"; } (Shorthand for a match against a pin with id="blah") #X1 > # X2 > #R1 { value="100R"; } Override X1/X2/R1 value attribute to 100R# (Where X1, X2, R1 are "id" names. These might default from "refdes=" attributes where they are unique, and belong to a complex). Note that "id" attributes in CSS are explicitly unique, whereas our refdes= attributes historically are not required to be. -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) signature.asc Description: This is a digitally signed message part ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
> I thought we used "/" for netlist hierarchy. At least - that is what I > coded for the netlist viewer in PCB. I suggested Attributes use : to "assign" attributes to owners, to avoid conflict. Like PCB:background-color=yellow The syntax for what the owner owns can be different. PCB:drc.silk.minimum=5mil > I'd put a preference for similarity to CSS syntax if we can use that. CSS uses spaces for heirarchy: P EM { background: yellow; } ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Wed, 2011-04-13 at 16:23 -0400, DJ Delorie wrote: > > We'd have to work a bit on the syntax, precedence, resolution rules and how > > to > > For PCB attributes, we're going with foo:bar for heirarchy (or at > least grouping), so U3:14.net=+5v ? > > (: for heirarchy, . for attributes ?) I thought we used "/" for netlist hierarchy. At least - that is what I coded for the netlist viewer in PCB. I guess just because we use one for netlists doesn't mean we can't do something different for attributes though, but if it is basically a mirroring of the netlist hierarchy, we should probably go with that. I'd put a preference for similarity to CSS syntax if we can use that. > > ___ > geda-user mailing list > geda-user@moria.seul.org > http://www.seul.org/cgi-bin/mailman/listinfo/geda-user -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) signature.asc Description: This is a digitally signed message part ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
> We'd have to work a bit on the syntax, precedence, resolution rules and how to For PCB attributes, we're going with foo:bar for heirarchy (or at least grouping), so U3:14.net=+5v ? (: for heirarchy, . for attributes ?) ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Tue, Apr 12, 2011 at 04:31:03PM +0100, Peter Clifton wrote: > This is a really neat idea.. > > P pin number ":1" doesn't really matter, it is just a way of referring > to a particular pin. If we could reference by other means, that would > also be cool. I'm thinking of some kind of "id=..." attribute like CSS / > HTML / SVG would use to refer to other elements. > > As someone who's just ranted against lots of magic special cases.. how > would people feel to a primitive "id=..." attribute which is handled by > API to look up and element's ID. We could make the code DEFAULT to > looking up pinnumber= or pinseq= for pins (if an id=... doesn't exist), > so the new syntax could key off id=, not pinnumber= or So we are more or less looking at a simplified hierarchical path syntax, where elements without explicit id= provide default id based on the type and other attributes? Examples: U1.1.net=Vcc (global attribute, pinnumber assumed for 1) 1.net=Vcc (attribute attached to U1) D1.A.net=Vcc (global, pinlabel assumed for A) Same could be specified in hierarchical design and would possibly solve the problem of different values in different instances of subcircuits. We'd have to work a bit on the syntax, precedence, resolution rules and how to refer to target attribute (in the above examples net would need to be a keyword). From that there's only a small step towards referring to arbitrary values in expressions (to specify component values etc). -- Krzysztof Kościuszkiewicz "Simplicity is the ultimate sophistication" -- Leonardo da Vinci ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Tue, 2011-04-12 at 16:51 -0400, DJ Delorie wrote: > > How about component-level attributes like pin.5=vdd, pin.1=gnd ? > > Bonus if you make "pin.foo=" for for a pin with pinlabel "foo" :-) We can't differentiate like that, since "pinnumber" can be a text string as well. "pinnumber" is what gnetlist cares about really. -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) signature.asc Description: This is a digitally signed message part ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Apr 12, 2011, at 2:56 PM, Stephan Boettcher wrote: > A non-graphical netlist format could be a gschem schematic file with a > generic symbol without any pins, with just a list of attributes. You mean like the files produced by pins2gsch? http://www.gedasymbols.org/user/john_doty/tools/pins2gsch.html John Doty Noqsi Aerospace, Ltd. http://www.noqsi.com/ j...@noqsi.com ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
Peter Clifton writes: > On Tue, 2011-04-12 at 22:35 +0200, Krzysztof Kościuszkiewicz wrote: >> On Mon, Apr 11, 2011 at 11:25:19PM +0100, Peter Clifton wrote: >> >> > What about the cases where this is a mistake? The net= attribute was >> > supposed to refer to some implicit power pin - not the device's one >> > symbolic pin, but the user forgot the suffix. >> >> The special case applies only to symbols with a single pin, so no such >> error is possible here. > > What about symbols with one pin, and multiple net= attributes providing > hidden "pins". A non-graphical netlist format could be a gschem schematic file with a generic symbol without any pins, with just a list of attributes. Instead of special case, we could call it a default. If a net= attribute does not provide a pinnumber, it defaults to 1. Doesn't make is any better, but maybe feel better :-) This default is actually a natural and useful default. I'd welcome it. Whenever I forgot to put a pinnumber on a net= attribute, this default would have fixed the schematic, not hide an error. -- Stephan ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
> How about component-level attributes like pin.5=vdd, pin.1=gnd ? Bonus if you make "pin.foo=" for for a pin with pinlabel "foo" :-) ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
How about component-level attributes like pin.5=vdd, pin.1=gnd ? You could make a blank rectangle symbol with a refdes and a list of a few of those pin.N= visible, let the user edit them... gnetlist would have to look for all pin.N attributes, and connect that pin N to the given net. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Tue, 2011-04-12 at 22:35 +0200, Krzysztof Kościuszkiewicz wrote: > On Mon, Apr 11, 2011 at 11:25:19PM +0100, Peter Clifton wrote: > > > What about the cases where this is a mistake? The net= attribute was > > supposed to refer to some implicit power pin - not the device's one > > symbolic pin, but the user forgot the suffix. > > The special case applies only to symbols with a single pin, so no such > error is possible here. What about symbols with one pin, and multiple net= attributes providing hidden "pins". -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) signature.asc Description: This is a digitally signed message part ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Mon, Apr 11, 2011 at 11:25:19PM +0100, Peter Clifton wrote: > What about the cases where this is a mistake? The net= attribute was > supposed to refer to some implicit power pin - not the device's one > symbolic pin, but the user forgot the suffix. The special case applies only to symbols with a single pin, so no such error is possible here. > Our power symbols already fell like a bit of a kludge as there is no > physical pin or component which ends up in the netlist file. > > (Why should we have to give that power symbol's pin ANY pinnumber > attribute? Why is pin 1 special?) That's right - if a symbol has only one pin, then if it is :1 or :999 it does not matter. I added this restriction only because default power symbols use :1, but that can be dropped. > _I_ think it adds to the confusion - as it would mean there are two > completely different syntax for the same attribute to be used in > different situations. > > I don't want to see that special case code proliferate in gEDA. We have > enough already! That is the main case against this change - one that changes from an "improvement" to a "kludge" :) > A far more satisfying solution in the long run would be to make the > symbols which annotate net naming (like the power and ground symbols, > off-page labels etc..) have an editable attribute associated with the > PIN which gets hooked up to the net which becomes named (or renamed). > (netname=) as if it were on the net its-self. That would be the best idea, of course. The power symbol with a net=NETNAME{:PINNUMBER} actually acts same way (probably modulo gnetlist config options) as netname=NETNAME attached to the same net. Any idea how to make such "annotation" symbols work? Another variation along the lines of "graphical=1"? Attributes (inherited or explicit) of such symbol could be applied directly to the connected net/bus. -- Krzysztof Kościuszkiewicz "Simplicity is the ultimate sophistication" -- Leonardo da Vinci ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Mon, Apr 11, 2011 at 8:45 PM, John Doty wrote: > > On Apr 11, 2011, at 4:25 PM, Peter Clifton wrote: > >> I would advise a note of caution. In general, I don't like it when tools >> start special casing things like this.. it just feels wrong. > > I've long thought it a minor design flaw that indexed attributes attach the > index to the value rather than the name. So, I would prefer net:1=Vcc, while > preserving backward compatibility, of course. Yes, this makes sense. Regards, Mark markrages@gmail -- Mark Rages, Engineer Midwest Telecine LLC markra...@midwesttelecine.com ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Mon, 2011-04-11 at 23:54 -0700, Russell Dill wrote: > On Mon, Apr 11, 2011 at 6:45 PM, John Doty wrote: > > > > On Apr 11, 2011, at 4:25 PM, Peter Clifton wrote: > > > >> I would advise a note of caution. In general, I don't like it when tools > >> start special casing things like this.. it just feels wrong. > > > > I've long thought it a minor design flaw that indexed attributes > attach the index to the value rather than the name. So, I would prefer > net:1=Vcc, while preserving backward compatibility, of course. > > > > You totally win! This is a really neat idea.. P pin number ":1" doesn't really matter, it is just a way of referring to a particular pin. If we could reference by other means, that would also be cool. I'm thinking of some kind of "id=..." attribute like CSS / HTML / SVG would use to refer to other elements. As someone who's just ranted against lots of magic special cases.. how would people feel to a primitive "id=..." attribute which is handled by API to look up and element's ID. We could make the code DEFAULT to looking up pinnumber= or pinseq= for pins (if an id=... doesn't exist), so the new syntax could key off id=, not pinnumber= or Basically, I want to see an unique name= or id= attribute which could be applied to any object, and is not net specific. Also - just a reminder.. All this special syntax with ":" in them, probably means there will naturally be restrictions on the presence of ":" in netnames and various ids. Is that a reasonable restriction, or should we avoid in-band data like this? We should really define what constitutes a legal character set for certain types of attribute / name, and if necessary - any escaping to be used with other characters. -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) signature.asc Description: This is a digitally signed message part ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Mon, Apr 11, 2011 at 6:45 PM, John Doty wrote: > > On Apr 11, 2011, at 4:25 PM, Peter Clifton wrote: > >> I would advise a note of caution. In general, I don't like it when tools >> start special casing things like this.. it just feels wrong. > > I've long thought it a minor design flaw that indexed attributes attach the > index to the value rather than the name. So, I would prefer net:1=Vcc, while > preserving backward compatibility, of course. > You totally win! ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Mon, Apr 11, 2011 at 8:57 PM, Kai-Martin Knaak wrote: > Mark Rages wrote: > >> I've often though it would be extremely handy to have spreadsheet-like >> automatic calculations in gschem. > > You mean like specify the R1/R2 and R1 for the four resistors > of a differential opamp circuit? That would be cool! > Yes, or the other way to keep notes up to date: "level here is -20dBm, level after pad is -28 dBm", where the dB values would be calculated from the circuit values. Don't Repeat Yourself. Also, I've never been much into simulation, preferring to think a bit and write down equations instead. I feel kind of silly evaluating results on my HP calculator and then typing in the resulting circuit values. Seems like another place to make a cut/paste error (I'm really good at those). Regards, Mark markrages@gmail -- Mark Rages, Engineer Midwest Telecine LLC markra...@midwesttelecine.com ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
Mark Rages wrote: > I've often though it would be extremely handy to have spreadsheet-like > automatic calculations in gschem. You mean like specify the R1/R2 and R1 for the four resistors of a differential opamp circuit? That would be cool! ---<)kaimartin(>--- -- Kai-Martin Knaak Email: k...@familieknaak.de Öffentlicher PGP-Schlüssel: http://pool.sks-keyservers.net:11371/pks/lookup?search=0x6C0B9F53 ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Apr 11, 2011, at 4:25 PM, Peter Clifton wrote: > I would advise a note of caution. In general, I don't like it when tools > start special casing things like this.. it just feels wrong. I've long thought it a minor design flaw that indexed attributes attach the index to the value rather than the name. So, I would prefer net:1=Vcc, while preserving backward compatibility, of course. John Doty Noqsi Aerospace, Ltd. http://www.noqsi.com/ j...@noqsi.com ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Mon, Apr 11, 2011 at 8:19 PM, Steven Michalske wrote: > Snip. > > I agree that we should not special case it. I would prefer varibles that > refered to other attributes. > > This example: value = 3v3 > net = $value:1 > > where the default scope is the local symbol and no lookups to higher scopes. > > A resistor divider: > > R1 > Value= 1000 > > R2 > Value = ${r1.value} / 2 > > See how I snuck in math! > > This is flexible and is not special casing anything. > > Just imagining having a feedback resistor formula in a voltage regulator used > to adding values for the two feedback resistors. > > Steve I've often though it would be extremely handy to have spreadsheet-like automatic calculations in gschem. Regards, Mark markrages@gmail -- Mark Rages, Engineer Midwest Telecine LLC markra...@midwesttelecine.com ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
Snip. I agree that we should not special case it. I would prefer varibles that refered to other attributes. This example: value = 3v3 net = $value:1 where the default scope is the local symbol and no lookups to higher scopes. A resistor divider: R1 Value= 1000 R2 Value = ${r1.value} / 2 See how I snuck in math! This is flexible and is not special casing anything. Just imagining having a feedback resistor formula in a voltage regulator used to adding values for the two feedback resistors. Steve ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
> I would advise a note of caution. What some people do not like is the visible :1 in schematics -- can we simple suppress that output for symbols with only one pin and digit 1 after the : That would be a not too dangerous patch, because it concerns only graphical output. +1 Special case seems wrong. This would be a much nicer alternative. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Mon, 2011-04-11 at 23:25 +0100, Peter Clifton wrote: > I would advise a note of caution. What some people do not like is the visible :1 in schematics -- can we simple suppress that output for symbols with only one pin and digit 1 after the : That would be a not too dangerous patch, because it concerns only graphical output. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Mon, 2011-04-11 at 23:59 +0200, Krzysztof Kościuszkiewicz wrote: > On Sun, Apr 10, 2011 at 11:22:54PM +0200, Markus Traidl wrote: > > > Actually I would like to use only the net attribute. There I could > > assign net=3V3 instead of net=3V3:1. > > > > I know that the ":1" is that the gnetlist tool knows that the 3V3 is > > connected to pin 1. > > > > But in case of a "One-Pin-Symbol" the gnetlist tool could assume that > > the only net should be assigned to the only pin. > > This has been asked for several times and I don't see a reason why this should > not be allowed for single pin symbols and only for pin number 1. > > The patches are attached - please test and report any potential breakage. I would advise a note of caution. In general, I don't like it when tools start special casing things like this.. it just feels wrong. This is a FAQ though.. The problem is that one can completely validly override nets for pins which don't exist in the symbol. (E.g. hidden power pins). People are proposing we add a new special case, which says "if the user omits the :1, assume a ":1" suffix when interpreting this particular attribute. If (and only if) the symbol has one single pin. What about the cases where this is a mistake? The net= attribute was supposed to refer to some implicit power pin - not the device's one symbolic pin, but the user forgot the suffix. Our power symbols already fell like a bit of a kludge as there is no physical pin or component which ends up in the netlist file. (Why should we have to give that power symbol's pin ANY pinnumber attribute? Why is pin 1 special?) Does special casing pin 1 as the "Missing ':?'" case help teach users how to use the net= attribute properly in the general case? I don't think so. _I_ think it adds to the confusion - as it would mean there are two completely different syntax for the same attribute to be used in different situations. I don't want to see that special case code proliferate in gEDA. We have enough already! A far more satisfying solution in the long run would be to make the symbols which annotate net naming (like the power and ground symbols, off-page labels etc..) have an editable attribute associated with the PIN which gets hooked up to the net which becomes named (or renamed). (netname=) as if it were on the net its-self. I realise this isn't currently possible, as we have no means to set or override attributes on child objects of a complex (e.g. its pins). Aside.. For some tools (Xilinx's schematic editor springs to mind), the net name is a property of the net, and annotation markers you add are just graphical sugar around a visualisation of the net's name attribute. I'm not quite sure about whether power rail symbols transfer a name to nets they are attached to. -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me) signature.asc Description: This is a digitally signed message part ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Sun, Apr 10, 2011 at 11:22:54PM +0200, Markus Traidl wrote: > Actually I would like to use only the net attribute. There I could > assign net=3V3 instead of net=3V3:1. > > I know that the ":1" is that the gnetlist tool knows that the 3V3 is > connected to pin 1. > > But in case of a "One-Pin-Symbol" the gnetlist tool could assume that > the only net should be assigned to the only pin. This has been asked for several times and I don't see a reason why this should not be allowed for single pin symbols and only for pin number 1. The patches are attached - please test and report any potential breakage. -- Krzysztof Kościuszkiewicz "Simplicity is the ultimate sophistication" -- Leonardo da Vinci >From 336dbb62f859a19c5078504828c8298a11d47210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Ko=C5=9Bciuszkiewicz?= Date: Mon, 11 Apr 2011 23:03:12 +0200 Subject: [PATCH 1/3] gnetlist: refactor s_netattrib_net_search Replace two loops with one by using o_attrib_search_object_attribs_by_name. Factor out inside of the loop to a separate function, netname_if_matching_wanted_pin. --- gnetlist/src/s_netattrib.c | 94 1 files changed, 34 insertions(+), 60 deletions(-) diff --git a/gnetlist/src/s_netattrib.c b/gnetlist/src/s_netattrib.c index 957735c..c8052f9 100644 --- a/gnetlist/src/s_netattrib.c +++ b/gnetlist/src/s_netattrib.c @@ -213,84 +213,58 @@ s_netattrib_handle (TOPLEVEL * pr_current, OBJECT * o_current, } } +static char* netname_if_matching_wanted_pin (OBJECT *o_current, + char *net_attr, + const char *wanted_pin) +{ + char *char_ptr = strchr (net_attr, ':'); + + if (char_ptr != NULL) { +/* found a colon separating netname and list of pins */ +char *net_name = s_netattrib_extract_netname (net_attr); +char *start_of_pinlist = char_ptr + 1; +char *current_pin = strtok (start_of_pinlist, DELIMITERS); + +while (current_pin) { + if (strcmp (current_pin, wanted_pin) == 0) +return net_name; + current_pin = strtok (NULL, DELIMITERS); +} + +g_free (net_name); +return NULL; + } else { +fprintf (stderr, "Got an invalid net= attrib [net=%s]\n" + "Missing : in net= attrib\n", net_attr); +return NULL; + } +} + char *s_netattrib_net_search (OBJECT * o_current, char *wanted_pin) { char *value = NULL; - char *char_ptr = NULL; char *net_name = NULL; - char *current_pin = NULL; - char *start_of_pinlist = NULL; - char *return_value = NULL; int counter; if (o_current == NULL || o_current->complex == NULL) return NULL; - /* for now just look inside the component */ - for (counter = 0; ;) { -value = o_attrib_search_inherited_attribs_by_name (o_current, - "net", counter); + for (counter = 0; ; ++counter) { +value = o_attrib_search_object_attribs_by_name (o_current, +"net", counter); if (value == NULL) break; -counter++; - -char_ptr = strchr (value, ':'); -if (char_ptr == NULL) { - fprintf (stderr, "Got an invalid net= attrib [net=%s]\n" - "Missing : in net= attrib\n", value); - g_free (value); - return NULL; -} - -net_name = s_netattrib_extract_netname (value); - -start_of_pinlist = char_ptr + 1; -current_pin = strtok (start_of_pinlist, DELIMITERS); -while (current_pin && !return_value) { - if (strcmp (current_pin, wanted_pin) == 0) { -return_value = net_name; - } - current_pin = strtok (NULL, DELIMITERS); -} +net_name = netname_if_matching_wanted_pin (o_current, value, wanted_pin); g_free (value); - } - - /* now look outside the component */ - for (counter = 0; ;) { -value = o_attrib_search_attached_attribs_by_name (o_current, - "net", counter); -if (value == NULL) - break; - -counter++; -char_ptr = strchr (value, ':'); -if (char_ptr == NULL) { - fprintf (stderr, "Got an invalid net= attrib [net=%s]\n" - "Missing : in net= attrib\n", value); - g_free (value); - return NULL; -} - -net_name = s_netattrib_extract_netname (value); - -start_of_pinlist = char_ptr + 1; -current_pin = strtok (start_of_pinlist, DELIMITERS); -while (current_pin) { - if (strcmp (current_pin, wanted_pin) == 0) { -g_free (return_value); -return net_name; - } - current_pin = strtok (NULL, DELIMITERS); -} - -g_free (value); +if (net_name != NULL) + return net_name; } - return return_value; + return NULL; } char *s_netattrib_return_netname(TOPLEVEL * pr_current, OBJECT * o_current, -- 1.7.4.1 >From 68eeaa6103d851371b1264f24eab10a126fa97ad Mon Sep 17 00:00:00 2001 F
Re: gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
On Sun, Apr 10, 2011 at 11:22:54PM +0200, Markus Traidl wrote: >Actually I would like to use only the net attribute. There I could >assign net=3V3 instead of net=3V3:1. You might have missed a recent discussion on the topic: http://archives.seul.org/geda/user/Mar-2011/msg00074.html -- Krzysztof Kościuszkiewicz "Simplicity is the ultimate sophistication" -- Leonardo da Vinci ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
gEDA-user: Attribute Net (without pin assignment) - for Power and Port Symbols
Hello, I am drawing some new symbols for my library. Currently I am doing GND and Power Symbols. There I have following question: I have drawn a power symbol for the 3V3 power supply. Therefore I used one pin with the pinnumber 1. In addition I attached the attribute net=3V3:1 to assign the 3V3 net to that pin. Additionally I attached the attribute value=3V3 (this is the only attribute which is visible). Actually I would like to use only the net attribute. There I could assign net=3V3 instead of net=3V3:1. I know that the ":1" is that the gnetlist tool knows that the 3V3 is connected to pin 1. But in case of a "One-Pin-Symbol" the gnetlist tool could assume that the only net should be assigned to the only pin. The reason for asking that is, that then I could make the attribute net visible and easily change the supply net (without adding the :1) in gschem. Is there some kind of option or maybe another attribute to make this possible? In addition I would / could use the same type for input port symbols and output port symbols. Best regards, Markus ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user