gEDA-user: series of gnetlist backend patches
I've pushed my local changes to the spice-sdb gnetlist backend and a new backend out to repo.or.cz and also on the SourceForge patch tracker. These have been part of my workflow for gschem -> {gnucap-arails, hspice} within my analog VLSI work for some time. The holidays presented time to clean them up. http://repo.or.cz/w/geda-gaf/whiteaudio.git I use hierarchical, multi-page schematics and mostly use subcircuits for IC devices to model parasitics and such from the foundry. The Analog Rails tweaks to gnucap make parallel simulations with hspice feasible from a common *.sch set. Their repo is at http://redmine.gnucapplus.org/ A short summary of the patches: gnetlist: spice-sdb "no_end_card" option suppresses ".end" SF: 3150011 A two-liner to allow a simulation netlist to .include the topology/designn netlist. gnetlist: spice-sdb: write provided subckt parameters from value= attr SF: 3150016 A value= attribute on the spice-subcircuit-LL symbol is the default subcircuit parameters. This then outputs e.g. .subckt name n1 n2 n3 n4 M=1 foo=43 *contents .ends gnetlist: spice-sdb MOS subcircuits SF: 3150017 Makes device=SUBCKT_NMOS and PMOS behave like a spice M device but wrapped in a subcircuit. gnetlist: New spice-sdb:packsort, generalize to any refdes prefix. SF: 3150018 The main one, sorts by the refdes alpha-prefix (case insensitive) order given by 'refdes-sort-order which defaults to: ("*" "TP" "A"). Gnucap is (more) sensitive to netlist order for parameters, probes, and analyses. This gives control over the sorting (with the gnetlist -s option) by specifying the order of certain prefixes. gnetlist: Option "sort_port_value" sorts spice-IO devs by value=. SF: 3150019 This allows using the refdes' to indicate pinlabel and then using value= to yield a meaningful ordering to a subckt's ports. My symbol generator script uses the refdes for pinlabel, order from the value attribute, and pintype from the device attribute. gnetlist: makedepend backend SF: 3150021 Gnetlist backend to determine a schematic's dependencies. Output is in the form of: source.sch: depend1.sch depend2.sch source.cir: source.sch depend1.cir depend2.cir other.inc ...written to "source.d" file for inclusion into a project's Makefile. First line collects all source= attributes in the input pages. Second line lists transformed source='s/sch/cir/' and file= attributes (.include files). Makefile snippets for my usage of the makedepend backend and other patches: # # AUTO-DEPENDENCIES # For the moment I don't know a way to avoid restarting make using the methods # described in http://mad-scientist.net/make/autodep.html #generate schematic hierarchy dependencies for .sch and .cir %.d: %.sch $(GNETLIST) -g makedepend -o $@ $< -include $(schematics:.sch=.d) # # bash script generator, if $1 matches, keep the element # use as $(shell $(call keep-filter,*.sch)) # (removes all matches, then removes these elements from orig array) define keep-filter a=( $^ ); for c in $$...@]##$1}; do a=( $$...@]#$$c} ); done; echo $$...@]} endef %.cir: $$(wildcard %-*.sch) %.drc gnetlist -g spice-sdb -I -s \ -O sort_port_value \ -O no_end_card \ -o $@ $(shell $(call keep-filter,*.sch)) # At some point I'll write-up my usage of GAF, but for now: The setup uses a naming convention including: some_name-{1,2,..}.sch --> some_name.cir "make tests" in gnetlist/tests and "./run_tests.sh" in gnetlist/tests/common both pass. Dan -- SDG www.whiteaudio.com ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: No-Net Copper
Christian Riggenbach wrote: > There is a trick to connect to some other copper not in the same net: > > - enter the "line" mode > - hover over the copper to connect > - press 'f' (to mark it as "found") > - start the line from the not marked copper. >Both should now be marked as "found" and should be connectable. This is a nice one! :-) I added it to the pcb-tips in the wiki (and remembered that I promised to merge "pcb-tips" and "FAQ-pcb") http://geda.seul.org/wiki/geda:pcb_tips?pcb_won_t_let_me_connect_to_copper_that_is_not_connected_to_anything > mit freundlichem Gruss > Christian Riggenbach Allmählich sollten wir über eine deutsche User-Gruppe nachdenken ;-) Sozusagen als Gegenstück zu den Free-Dogs in Boston. ---<)kaimartin(>--- -- Kai-Martin Knaak Öffentlicher PGP-Schlüssel: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53 ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Strange problems in multi part symbols
Oliver King-Smith wrote: > I am continuing to have problems with multi part symbols. Here > > I have an op amp define as thus: > ( snip ) > > When I try to use this op amp, the pin number show up wrong on the schematic. > > For slot 1 they show up as 1,2,1 (not 3,2,1). When I try slot 2 I get 5,6,1 > not > 5,6,7. The slotting mechanism expects the pinseq numbers to start at 1 and increment to the number of pins. It uses these numbers to map the sequences given in the slotdef string. The pin with pinseq=1 gets mapped to the first number in the slotdef string. The second maps to the second number in the string and so on. Your symbol has the pinseq attributes at 1, 2 and 5. The "5" is ignored since there are only three numbers in the slotdef string. Thus it keeps its default value "1" no matter what slot is chosen. Bottom line: A symbol with three pins should have the pinseq values "1", "2" and "3". Anything else confuses the slotting mechanism. Here is a corrected version of your symbol. Note, that the value of the pin number attributes is ignored. For demonstration, I set them to some wild numbers. /- v 20100214 2 L 200 800 200 0 3 0 0 0 -1 -1 L 200 800 800 400 3 0 0 0 -1 -1 T 400 2600 5 10 0 0 0 0 1 device=SUBCIRCUIT T 400 1100 5 10 0 0 0 0 1 slot=1 T 400 1700 5 10 0 0 0 0 1 numslots=2 T 400 1300 5 10 0 0 0 0 1 slotdef=1:1,2,3 T 400 1500 5 10 0 0 0 0 1 slotdef=2:5,6,7 L 800 400 200 0 3 0 0 0 -1 -1 L 300 650 300 550 3 0 0 0 -1 -1 L 250 600 350 600 3 0 0 0 -1 -1 L 250 200 350 200 3 0 0 0 -1 -1 P 0 600 200 600 1 0 0 { T 150 650 5 8 1 1 0 6 1 pinnumber=111 T 150 550 5 8 0 1 0 8 1 pinseq=3 T 250 600 9 8 0 1 0 0 1 pinlabel=in+ T 250 600 5 8 0 1 0 2 1 pintype=in } P 0 200 200 200 1 0 0 { T 150 250 5 8 1 1 0 6 1 pinnumber=222 T 150 150 5 8 0 1 0 8 1 pinseq=2 T 250 200 9 8 0 1 0 0 1 pinlabel=in- T 250 200 5 8 0 1 0 2 1 pintype=in } P 800 400 1000 400 1 0 1 { T 800 450 5 8 1 1 0 0 1 pinnumber=333 T 800 350 5 8 0 1 0 2 1 pinseq=1 T 750 400 9 8 0 1 0 6 1 pinlabel=out T 750 400 5 8 0 1 0 8 1 pintype=out } T 700 600 8 10 1 1 0 0 1 refdes=U? T 400 2800 5 10 0 0 0 0 1 description=operational amplifier T 400 2400 5 10 0 0 0 0 1 symversion=0.1 T 400 1950 8 10 0 0 0 0 1 footprint=soic-08-d.fp T 400 2200 8 10 0 0 0 0 1 file=./spice/OPA333.lib \ ---<)kaimartin(>--- -- Kai-Martin Knaak Öffentlicher PGP-Schlüssel: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53 ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Strange problems in multi part symbols
On Jan 2, 2011, at 6:14 PM, Oliver King-Smith wrote: > Likewise spice back end also blows a > gasket trying with the pinseq numbers. I thought the pin seq refers to > which position in the spice parameter list the pin refers to? > I was going to see if I could fix up the spice-sdb backend to handle > putting multi part symbols back together, but I think something might > be more fundamentally broken inside gschem. Do folks have any > thoughts? pinseq is overloaded. It is impossible to use slotted symbols for simulation. Stuart tried mightily to fix this and failed. It could be fixed if the slot semantics were moved out of the core code. Then we could have the standard helpers in gnetlist.scm collect all slots for a given refdes into one package (for printed circuit flows) but simulation flows could separate slots into separate packages. This requires removing the special semantics for refdes from the core: the "same refdes, same package" rule is only appropriate for printed circuits. Given that Stuart understood gschem and gnetlist better than most and put a lot of effort into fixing this, I believe that this cannot be fixed without more significant refactoring than he was willing to attempt. I don't think there's anything you can do in Guile alone to fix this. 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
gEDA-user: Strange problems in multi part symbols
I am continuing to have problems with multi part symbols. Here I have an op amp define as thus: v 20100214 2 L 200 800 200 0 3 0 0 0 -1 -1 L 200 800 800 400 3 0 0 0 -1 -1 T 700 800 5 10 0 0 0 0 1 device=SUBCIRCUIT T 600 1100 5 10 0 0 0 0 1 slot=1 T 600 1300 5 10 0 0 0 0 1 numslots=2 T 600 1500 5 10 0 0 0 0 1 slotdef=1:1,2,3 T 600 1700 5 10 0 0 0 0 1 slotdef=2:5,6,7 L 800 400 200 0 3 0 0 0 -1 -1 L 300 650 300 550 3 0 0 0 -1 -1 L 250 600 350 600 3 0 0 0 -1 -1 L 250 200 350 200 3 0 0 0 -1 -1 P 0 600 200 600 1 0 0 { T 150 650 5 8 1 1 0 6 1 pinnumber=3 T 150 550 5 8 0 1 0 8 1 pinseq=1 T 250 600 9 8 0 1 0 0 1 pinlabel=in+ T 250 600 5 8 0 1 0 2 1 pintype=in } P 0 200 200 200 1 0 0 { T 150 250 5 8 1 1 0 6 1 pinnumber=2 T 150 150 5 8 0 1 0 8 1 pinseq=2 T 250 200 9 8 0 1 0 0 1 pinlabel=in- T 250 200 5 8 0 1 0 2 1 pintype=in } P 800 400 1000 400 1 0 1 { T 800 450 5 8 1 1 0 0 1 pinnumber=1 T 800 350 5 8 0 1 0 2 1 pinseq=5 T 750 400 9 8 0 1 0 6 1 pinlabel=out T 750 400 5 8 0 1 0 8 1 pintype=out } T 700 600 8 10 1 1 0 0 1 refdes=U? T 700 1200 5 10 0 0 0 0 1 description=operational amplifier T 700 1400 5 10 0 0 0 0 1 symversion=0.1 T 200 1450 8 10 0 0 0 0 1 footprint=soic-08-d.fp T 700 1000 8 10 0 0 0 0 1 file=./spice/OPA333.lib When I try to use this op amp, the pin number show up wrong on the schematic. For slot 1 they show up as 1,2,1 (not 3,2,1). When I try slot 2 I get 5,6,1 not 5,6,7. Likewise spice back end also blows a gasket trying with the pinseq numbers. I thought the pin seq refers to which position in the spice parameter list the pin refers to? I was going to see if I could fix up the spice-sdb backend to handle putting multi part symbols back together, but I think something might be more fundamentally broken inside gschem. Do folks have any thoughts? Oliver ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
gEDA-user: PCB object data and attributes
On 01/02/2011 04:14 PM, Stephan Boettcher wrote: If you do not use it, why do you care about associating netnames to traces? That's not about auto DRC enforce drawing, it's about searching for parts related to schematic and cross probing and creating layout dereived models of trace capacitance for simulations. John ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Bugs, warts and feature requests (4)
• gschem room for improvement: Currently, nets attached to dragged symbols will go any angle. This is rarely desired in schematics. Instead pure orthogonal style is almost universally used. Suggestion: Add a mode to automatically make nets Manhattan style. Make this mode the default. Yes, I think this would be a big improvement. Also, I'd like to have the arrow keys move the selected objects around in small increments, rather than panning the view. Arrow keys can still pan the view if there is no selection. • gschem usability: Currently, there is no visible hint in the Options menu whether or not a boolean option is active. Suggestion: Add a check mark in front of the menu item like pcb does. This was bothering me the other day too. I looked into it a bit, but it isn't quite as east to fix as you'd think. All menu items are defined through the system-gschemrc file. They create a GschemAction object which is a custom widget class derived from GtkAction with the ability to have multi-key accelerators like 'om'. A new derived class, GschemActionToggle would have to be created to enable making toggle menu items with multi-key accelerators. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
gEDA-user: gschem usability: expand the component tree after filtering
All, I found it annoying that I need to "click through" the whole component tree after filtering the symbol file names. For some time I've been running my copy with the change that expands the tree after the filtering by name is done. This saves 1+ clicks in the most common use-case: add a known symbol to the diagram. The patch is here: https://sourceforge.net/tracker/?func=detail&aid=3149995&group_id=161080&atid=818428 Best regards, -- 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: No-Net Copper
John Griessen writes: > I wish we were attaching netnames to pcb trace segments as we create > them and using that to do auto enforce Please don't! > Guess I need to try out that Auto enforce DRC feature -- I've never > purposely used it yet Same here. If you do not use it, why do you care about associating netnames to traces? -- Stephan ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Bugs, warts and feature requests (4)
On Sun, Jan 02, 2011 at 09:55:18PM +0100, kai-martin knaak wrote: > This edition of "Bugs, warts and feature requests" focuses on gschem: > • gschem/pcb feature request: Automatically add a note the version string > that says which branch/fork/development/patch it was compiled from. This > would help to avoid confusion for testers like me. This would also help me. > > • gschem feature request: An option to renumber subsheets with the usual > offsets. That is, numbers on the first page start at 100, second page starts > at 200, etc. > Alternative idea: Evaluate a dedicated attribute "refdes_number_offset" > in the subsheet symbol. I consider this 'refdes_number_offset' a great idea. > > • gschem misbehavior: Currently, renumber does not honor multi symbol > components. The script renders all symbols with disjunct refdeses, even > if they were slots of the same component. I'd call this almost a bug. > It makes renumber barely usable with components that are spread among > more than one symbol. This is serious problem. > > • gschem usability: Currently, you'd have to manually call update component > after a symbol was modified with down-symbol->edit->up. > Suggestion: Please execute update component automatically as part of the > "up"-action. This would also help, and should be pretty easy. > > • gschem room for improvement: Currently, nets attached to dragged symbols > will go any angle. This is rarely desired in schematics. Instead pure > orthogonal style is almost universally used. > Suggestion: Add a mode to automatically make nets Manhattan style. > Make this mode the default. I wonder how difficult it would be to code, but will definetly help a lot. > > • gschem usability: Currently, there is no visible hint in the Options > menu whether or not a boolean option is active. > Suggestion: Add a check mark in front of the menu item like pcb does. Should be easy and helpfull. Best regards, Martin Kupec ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: No-Net Copper
On 01/01/2011 12:20 PM, Rick Collins wrote: If copper is left behind because of manufacturing, it doesn't really impact the layout process or connectivity checking. Sure does if it is DRC rule close -- it could be short in etching process results. On 01/01/2011 01:58 PM, Christian Riggenbach wrote: > press 'f' (to mark it as "found") > - start the line from the not marked copper. Both should now be marked as > "found" and should be connectable. > > This is possible, because "Auto enforce DRC clearance" only relies on the > "found" flag. Also it only resets the "found" status on entering the "line" > mode. I suppose toggling enforce makes sense if that's the way it is. I wish we were attaching netnames to pcb trace segments as we create them and using that to do auto enforce without having to toggle of add f flags first. Guess I need to try out that Auto enforce DRC feature -- I've never purposely used it yet, but have seen it somewhere...showing up by accident. :-) John Griessen -- Ecosensory Austin TX ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
gEDA-user: Bugs, warts and feature requests (4)
This edition of "Bugs, warts and feature requests" focuses on gschem: • gschem non-feature: Currently, gschem dialogs are always in front of the main window. That is, they cannot be put behind the main window. They have to be closed to get them out of the way. This is ok for small dialogs like the translate dialog. But complex dialogs like Select_Component forget their state. Others like the text_entry dialog might benefit from placement halfway behind the main window. • gschem non-feature: Currently, the single_attribute_editor is modal. IMHO, modal dialogs are generally a PITA to usability. Please use this property only, as a last resort. The multi_attribute_editor works fine without being modal. • gschem room for improvement: Currently, there is a help text at the top of the text entry dialog. While it is fine to have help available, it should not clutter often used dialogs. Suggestion: Add a help button. • gschem/pcb feature request: Automatically add a note the version string that says which branch/fork/development/patch it was compiled from. This would help to avoid confusion for testers like me. • gschem feature request: An option to renumber subsheets with the usual offsets. That is, numbers on the first page start at 100, second page starts at 200, etc. Alternative idea: Evaluate a dedicated attribute "refdes_number_offset" in the subsheet symbol. • gschem misbehavior: Currently, renumber does not honor multi symbol components. The script renders all symbols with disjunct refdeses, even if they were slots of the same component. I'd call this almost a bug. It makes renumber barely usable with components that are spread among more than one symbol. • gschem usability: Currently, you'd have to manually call update component after a symbol was modified with down-symbol->edit->up. Suggestion: Please execute update component automatically as part of the "up"-action. • gschem room for improvement: Currently, nets attached to dragged symbols will go any angle. This is rarely desired in schematics. Instead pure orthogonal style is almost universally used. Suggestion: Add a mode to automatically make nets Manhattan style. Make this mode the default. • gschem usability: Currently, there is no visible hint in the Options menu whether or not a boolean option is active. Suggestion: Add a check mark in front of the menu item like pcb does. Please comment. Unless there are reasons to drop the issues, I will inject them to the source forge trackers. ---<)kaimartin(>--- -- Kai-Martin Knaak Öffentlicher PGP-Schlüssel: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53 ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: European symbols?
Den 2011-01-02 20:51:04 skrev kai-martin knaak : Johnny Rosenberg wrote: Because the footprint information can be scanned at a glance in the schematic. The footprint needs attention just like the value or the refdes. So it is convenient to have it visible by default. If I don't want to see the footprint attributes in finished design I can still hide them with "Hide specific text" in the attributes menu. But if it is invisible, won't it show up with ”Show specific text” in the same menu? Typically, I need to look at footprints during design. Hide them for beauty is at a later stage. So I like to have them visible by default. Maybe off topic, but really, why a license at all, when I really don't care what people do with the symbols anyway? To the law there is nothing like "no license" in a literal sense. By the way, I was searching for information about the sym file format, but I didn't find much. (...) Can anyone point me to some place where I can learn everything about this? see http://geda.seul.org/wiki/geda:file_format_spec This page links to all the "official" documentation: http://geda.seul.org/wiki/geda:documentation ---<)kaimartin(>--- Thanks for the very useful interesting links. -- Kind regards Johnny Rosenberg ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: bugs, warts and feature requests (3)
Hi Kai-Martin, > -Original Message- > From: geda-user-boun...@moria.seul.org > [mailto:geda-user-boun...@moria.seul.org] On Behalf Of > kai-martin knaak > Sent: Sunday, January 02, 2011 5:37 PM > To: geda-u...@seul.org > Subject: Re: gEDA-user: bugs, warts and feature requests (3) > > Bert Timmerman wrote: > > >> pcb feature request: Please put all the gerbers in a dedicated > >> subdir of the working directory by default. The name of the subdir > >> should be configurable. > > > > Is doable. > > > >> pcb feature request: Optionally zip all gerbers and the > cnc files > >> to yield a single file that can be sent to the fab. The > name of the > >> zip file might contain the current date. > > > > Is doable > > You mean, it can already be done? How? > > ---<)kaimartin(>--- > -- > Kai-Martin Knaak > Öffentlicher PGP-Schlüssel: > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53 > > Issues 1 and 2 can be done by means of a Makefile, TBH I have no such Makefile lingering around, but remain confident that requested functionality is within the reach of make-and-friends. Issue 1 could also be coded into the gerber exporter if this were a Frequently Asked Feature, AFAIK this is not the case. Kind regards, Bert Timmerman. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Resistor values.
Hi Kai-Martin, > -Original Message- > From: geda-user-boun...@moria.seul.org > [mailto:geda-user-boun...@moria.seul.org] On Behalf Of > kai-martin knaak > Sent: Saturday, January 01, 2011 4:32 AM > To: geda-u...@seul.org > Subject: Re: gEDA-user: Resistor values. > > Bert Timmerman wrote: > > >> ARE there any "current" gEDA developers? > >> > > > > Yes, I think there is lots of patches or patch series in SF > to prove > > that. > > For 2010 there were exactly 16 patches in the geda tracker: > http://sourceforge.net/tracker/?group_id=161080&atid=818428 > I wouldn't call this "lots of". None of these patches was > supplied by one of the people mentioned in gpleda.org/people.html > > ---<)kaimartin(>--- > -- > Kai-Martin Knaak > Öffentlicher PGP-Schlüssel: > http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53 > > Sorry for the confusion, looks like I did not have the right glasses on, I made my remark w.r.t. the pcb patch tracker. Kind regards, Bert Timmerman. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: European symbols?
Johnny Rosenberg wrote: >> Because the footprint information can be scanned at a glance >> in the schematic. The footprint needs attention just like the >> value or the refdes. So it is convenient to have it visible >> by default. If I don't want to see the footprint attributes in >> finished design I can still hide them with "Hide specific text" >> in the attributes menu. > > But if it is invisible, won't it show up with ”Show specific text” in the > same menu? Typically, I need to look at footprints during design. Hide them for beauty is at a later stage. So I like to have them visible by default. > Maybe off topic, but really, why a license at all, when I really don't > care what people do with the symbols anyway? To the law there is nothing like "no license" in a literal sense. > By the way, I was searching for information about the sym file format, but > I didn't find much. (...) > Can anyone point me to some place where I can learn > everything about this? > see http://geda.seul.org/wiki/geda:file_format_spec This page links to all the "official" documentation: http://geda.seul.org/wiki/geda:documentation ---<)kaimartin(>--- -- Kai-Martin Knaak Öffentlicher PGP-Schlüssel: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53 ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: [PATCH 1/3] Quick testcase for patch #3071482.
On Sunday 02 January 2011 17:19:23 Patrick Bernaud wrote: > > [snip] > > 2 files changed, 169 insertions(+), 0 deletions(-) > create mode 100644 tests/testcase.sch > create mode 100644 tests/testcase.scm > > diff --git a/tests/testcase.sch b/tests/testcase.sch > > [snip] > Hi Patrick, Where exactly is this patch supposed to be applied...? Or is it purely for informational purposes? Thanks, Peter -- Peter Brett Remote Sensing Research Group Surrey Space Centre 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: European symbols?
On Jan 2, 2011, at 11:12 AM, "Johnny Rosenberg" wrote: > Den 2011-01-02 13:13:55 skrev kai-martin knaak : > >> Johnny Rosenberg wrote: >> >>> I didn't add or modify any invisible text except those very >>> unnecessary (?) author- and license lines. I guess I should >>> remove them entirely. >> >> License lines are a necessity for sharing. Else, you'd have to >> put some license information in the environment of the share. >> * the footprint attribute is invisible >>> >>> Didn't change that either. Why would you like them visible? >> >> Because the footprint information can be scanned at a glance >> in the schematic. The footprint needs attention just like the >> value or the refdes. So it is convenient to have it visible >> by default. If I don't want to see the footprint attributes in >> finished design I can still hide them with "Hide specific text" >> in the attributes menu. > > But if it is invisible, won't it show up with ”Show specific text” in the > same menu? > >> In addition, the footprint provides a >> hint what to look for in the layout when I read the schematic. >> Else, a SO23 transistor looks the same in the schematic as a >> TO247 with cooler. >> >> >>> 200? Strange. Strange. Looks like 300 to me, except the output pin, >>> which indeed is 200. I didn't change that from the original symbol >>> either, though. >> >> "200" was just a typo by me... >> Somewhere in the documentation pin length 300 is recommended. However, >> nobody could give a reason for this value when I asked on this list. >> Since pins cannot be differentiated in print from nets, I decided to >> opt for short pins in my symbols. That is, 100 units, or sometimes even >> zero. > > Well, I agree that short pins are better, I will change them in all the > symbols. >> >>> If it's not too much work, could you modify the 7400 symbol to your >>> likings and then send it back so I can modify the other symbols >>> accordingly? >>> >> >> See below. > > Thanks. > >> Except for the license, the symbol would fit into my collection of >> symbols in gedasymbols.org. I prefer the GPL as distribution license. > > Maybe off topic, but really, why a license at all, when I really don't care > what people do with the symbols anyway? Mostly because in some countries authors rights are reserved, and must be declined. > >> As John Doty already pointed out, there is no hard right or wrong >> with many design decisions. I am, of course, biased :-) > > Well, I asked for suggestions and I got suggestions. So far so good. :) > > By the way, I was searching for information about the sym file format, but I > didn't find much. I would like to know what all the numbers mean, for example > in lines like this: > ”V 850 500 50 6 0 0 0 -1 -1 0 -1 -1 -1 -1 -1” > > The four first is of course coordinates, and there seems to be numbers for > thickness and colour, but I changed a few of them with no result at all as > far as I could see. Can anyone point me to some place where I can learn > everything about this? > > >> >> / >> v 20100214 2 >> B 200 200 600 600 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1 >> T 500 500 9 20 1 0 0 4 1 >> & >> T 400 4100 5 8 0 0 0 0 1 >> device=7400 >> T 700 0 8 8 0 0 0 0 1 >> slot=1 >> T 400 2400 5 8 0 0 0 0 1 >> numslots=4 >> T 400 1600 5 8 0 0 0 0 1 >> slotdef=1:1,2,3 >> T 400 1800 5 8 0 0 0 0 1 >> slotdef=2:4,5,6 >> T 400 2000 5 8 0 0 0 0 1 >> slotdef=3:9,10,8 >> T 400 2200 5 8 0 0 0 0 1 >> slotdef=4:12,13,11 >> V 850 500 50 6 0 0 0 -1 -1 0 -1 -1 -1 -1 -1 >> P 900 500 900 500 1 0 1 >> { >> T 850 600 5 8 1 1 0 0 1 >> pinnumber=3 >> T 850 600 5 8 0 1 0 0 1 >> pinseq=3 >> T 750 500 9 8 0 1 0 7 1 >> pinlabel=Y >> T 850 450 5 8 0 1 0 2 1 >> pintype=out >> } >> P 200 300 100 300 1 0 1 >> { >> T 150 350 5 8 1 1 0 6 1 >> pinnumber=2 >> T 150 350 5 8 0 1 0 6 1 >> pinseq=2 >> T 250 300 9 8 0 1 0 1 1 >> pinlabel=B >> T 150 250 5 8 0 1 0 8 1 >> pintype=in >> } >> P 200 700 100 700 1 0 1 >> { >> T 150 750 5 8 1 1 0 6 1 >> pinnumber=1 >> T 150 750 5 8 0 1 0 6 1 >> pinseq=1 >> T 250 700 9 8 0 1 0 1 1 >> pinlabel=A >> T 150 650 5 8 0 1 0 8 1 >> pintype=in >> } >> T 200 1100 8 10 1 1 0 0 1 >> refdes=U? >> T 200 0 8 8 1 1 0 0 1 >> footprint=DIP14 >> T 400 3900 5 8 0 0 0 0 1 >> description=4 NAND gates with 2 inputs >> T 400 3700 5 8 0 0 0 0 1 >> documentation=http://www-s.ti.com/sc/ds/sn74hc00.pdf >> T 400 3100 5 8 0 0 0 0 1 >> author=Johnny Rosenberg – johnny.a.rosenb...@gmail.com >> T 400 2900 5 8 0 0 0 0 1 >> dist-license=None – do whatever you want, I don't care >> T 400 2700 5 8 0 0 0 0 1 >> use-license=unlimited >> T 200 900 8 10 1 1 0 0 1 >> value=7400 >> T 400 3500 5 8 0 0 0 0 1 >> comment=use 74_pwr.sym for supply >> T 400 3300 5 8 0 0 0 0 1 >> comment=this symbol was designed according to IEC-(INSERT SPECIFIC NORM) >> \ >> > > Thanks for all your inputs! > > -- > Kind regards > > Johnny Rosenberg > > > __
Re: gEDA-user: European symbols?
Den 2011-01-02 13:13:55 skrev kai-martin knaak : Johnny Rosenberg wrote: I didn't add or modify any invisible text except those very unnecessary (?) author- and license lines. I guess I should remove them entirely. License lines are a necessity for sharing. Else, you'd have to put some license information in the environment of the share. * the footprint attribute is invisible Didn't change that either. Why would you like them visible? Because the footprint information can be scanned at a glance in the schematic. The footprint needs attention just like the value or the refdes. So it is convenient to have it visible by default. If I don't want to see the footprint attributes in finished design I can still hide them with "Hide specific text" in the attributes menu. But if it is invisible, won't it show up with ”Show specific text” in the same menu? In addition, the footprint provides a hint what to look for in the layout when I read the schematic. Else, a SO23 transistor looks the same in the schematic as a TO247 with cooler. 200? Strange. Strange. Looks like 300 to me, except the output pin, which indeed is 200. I didn't change that from the original symbol either, though. "200" was just a typo by me... Somewhere in the documentation pin length 300 is recommended. However, nobody could give a reason for this value when I asked on this list. Since pins cannot be differentiated in print from nets, I decided to opt for short pins in my symbols. That is, 100 units, or sometimes even zero. Well, I agree that short pins are better, I will change them in all the symbols. If it's not too much work, could you modify the 7400 symbol to your likings and then send it back so I can modify the other symbols accordingly? See below. Thanks. Except for the license, the symbol would fit into my collection of symbols in gedasymbols.org. I prefer the GPL as distribution license. Maybe off topic, but really, why a license at all, when I really don't care what people do with the symbols anyway? As John Doty already pointed out, there is no hard right or wrong with many design decisions. I am, of course, biased :-) Well, I asked for suggestions and I got suggestions. So far so good. :) By the way, I was searching for information about the sym file format, but I didn't find much. I would like to know what all the numbers mean, for example in lines like this: ”V 850 500 50 6 0 0 0 -1 -1 0 -1 -1 -1 -1 -1” The four first is of course coordinates, and there seems to be numbers for thickness and colour, but I changed a few of them with no result at all as far as I could see. Can anyone point me to some place where I can learn everything about this? / v 20100214 2 B 200 200 600 600 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1 T 500 500 9 20 1 0 0 4 1 & T 400 4100 5 8 0 0 0 0 1 device=7400 T 700 0 8 8 0 0 0 0 1 slot=1 T 400 2400 5 8 0 0 0 0 1 numslots=4 T 400 1600 5 8 0 0 0 0 1 slotdef=1:1,2,3 T 400 1800 5 8 0 0 0 0 1 slotdef=2:4,5,6 T 400 2000 5 8 0 0 0 0 1 slotdef=3:9,10,8 T 400 2200 5 8 0 0 0 0 1 slotdef=4:12,13,11 V 850 500 50 6 0 0 0 -1 -1 0 -1 -1 -1 -1 -1 P 900 500 900 500 1 0 1 { T 850 600 5 8 1 1 0 0 1 pinnumber=3 T 850 600 5 8 0 1 0 0 1 pinseq=3 T 750 500 9 8 0 1 0 7 1 pinlabel=Y T 850 450 5 8 0 1 0 2 1 pintype=out } P 200 300 100 300 1 0 1 { T 150 350 5 8 1 1 0 6 1 pinnumber=2 T 150 350 5 8 0 1 0 6 1 pinseq=2 T 250 300 9 8 0 1 0 1 1 pinlabel=B T 150 250 5 8 0 1 0 8 1 pintype=in } P 200 700 100 700 1 0 1 { T 150 750 5 8 1 1 0 6 1 pinnumber=1 T 150 750 5 8 0 1 0 6 1 pinseq=1 T 250 700 9 8 0 1 0 1 1 pinlabel=A T 150 650 5 8 0 1 0 8 1 pintype=in } T 200 1100 8 10 1 1 0 0 1 refdes=U? T 200 0 8 8 1 1 0 0 1 footprint=DIP14 T 400 3900 5 8 0 0 0 0 1 description=4 NAND gates with 2 inputs T 400 3700 5 8 0 0 0 0 1 documentation=http://www-s.ti.com/sc/ds/sn74hc00.pdf T 400 3100 5 8 0 0 0 0 1 author=Johnny Rosenberg – johnny.a.rosenb...@gmail.com T 400 2900 5 8 0 0 0 0 1 dist-license=None – do whatever you want, I don't care T 400 2700 5 8 0 0 0 0 1 use-license=unlimited T 200 900 8 10 1 1 0 0 1 value=7400 T 400 3500 5 8 0 0 0 0 1 comment=use 74_pwr.sym for supply T 400 3300 5 8 0 0 0 0 1 comment=this symbol was designed according to IEC-(INSERT SPECIFIC NORM) \ Thanks for all your inputs! -- Kind regards Johnny Rosenberg ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: [PATCH 3/3] gnetlist: Add access to attribute from components with multiple symbol instances.
Hi all, The patch from the parent message has to be replaced by the one below. Sorry for the inconvenience. Patrick multi-part-attribute-search.patch Description: Binary data ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: [Patches] GTK Recent-file-manager
Am 02.01.2011 16:03, schrieb kai-martin knaak: Just gave it a test run. The source compiles fine and "recent files" appears in the menu :-) A minor complaint: Currently, the list is only populated when I use the load action from the file menu. IMHO, it should be appended to by files on the command line and by the save-as action. You are right, this were fine! I usually don't use the command line input, so I didn't think about it. Have just have a look into the code and I see no chance to put files loaded by the command line to the recent file list if no file-select-window is used (e.g. action: 'SaveTo()' or 'Save(Layout)', but 'Save(LayoutAs)' is no problem). To append files used by the 'save-as'-Dialog is no problem, I appended a patch to this mail and will also push it to SF and my github-branch. Perhaps someone else has an idea to fix the issue with the command-line and the recent list? I will think about it, too. Some kind of README with a list of changes would be nice. So I know what great features to look for. ---<)kaimartin(>--- Good idea. Have just added a file 'README.fruoff' which lists the new features/changes. But you can also have a look at the commit-messages of the patches. Kind regards, Felix >From aca0a21a61fc2265b06d444c0f37a5a89f866756 Mon Sep 17 00:00:00 2001 From: Felix Ruoff Date: Sun, 2 Jan 2011 18:47:08 +0100 Subject: [PATCH] Add files to recent-list on saving Adds files to the recent-file-list on saving, but only, if the file-save-dialog is used. --- src/hid/gtk/gtkhid-main.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c index 2ec7737..1558f3a 100644 --- a/src/hid/gtk/gtkhid-main.c +++ b/src/hid/gtk/gtkhid-main.c @@ -1329,6 +1329,7 @@ Save (int argc, char **argv, int x, int y) else hid_actionl ("SaveTo", function, name, NULL); } + gtk_recent_manager_add_item (ghidgui->recent_manager, g_filename_to_uri(name, NULL, NULL)); g_free (name); } else -- 1.7.1 ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Resistor values?
On Jan 2, 2011, at 10:18 AM, Patrick Bernaud wrote: > Still, and as a side note, look how much beneficial a change > from "unknown" to #f (as value for no- or unknown attribute) would be. Different layers. "unknown" is is the appropriate return when the back end will simply put the result in the output file. #f is the appropriate return when the back end will process the result. So, the high level factor, (gnetlist:get-package-attribute) should continue to yield "unknown", but I would agree that it would be beneficial for the lower level (gnetlist:get-all-package-attributes) to yield #f. Although perhaps '() would be more consistent. --- 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
gEDA-user: [PATCH 1/3] Quick testcase for patch #3071482.
--- tests/testcase.sch | 128 tests/testcase.scm | 41 + 2 files changed, 169 insertions(+), 0 deletions(-) create mode 100644 tests/testcase.sch create mode 100644 tests/testcase.scm diff --git a/tests/testcase.sch b/tests/testcase.sch new file mode 100644 index 000..b8165ff --- /dev/null +++ b/tests/testcase.sch @@ -0,0 +1,128 @@ +v 20100214 2 +C 4 4 0 0 0 title-bordered-A3.sym +T 41500 48900 9 30 1 0 0 0 1 +Test file for gnetlist:get-package-attribute, patch #3071482 +T 46400 48200 8 10 1 0 0 0 1 +Do not change the order of the elements in the file. +C 46700 46800 1 0 0 resistor-1.sym +{ +T 47000 47200 5 10 0 0 0 0 1 +device=RESISTOR +T 46900 47100 5 10 1 1 0 0 1 +refdes=R1 +T 46900 46600 5 10 1 1 0 0 1 +value=OK +} +C 48000 46800 1 0 0 resistor-1.sym +{ +T 48300 47200 5 10 0 0 0 0 1 +device=RESISTOR +T 48200 47100 5 10 1 1 0 0 1 +refdes=R2 +} +C 48000 46100 1 0 0 resistor-1.sym +{ +T 48300 46500 5 10 0 0 0 0 1 +device=RESISTOR +T 48200 46400 5 10 1 1 0 0 1 +refdes=R2 +} +C 49300 46800 1 0 0 resistor-1.sym +{ +T 49600 47200 5 10 0 0 0 0 1 +device=RESISTOR +T 49500 47100 5 10 1 1 0 0 1 +refdes=R3 +T 49500 46600 5 10 1 1 0 0 1 +value=OK +} +C 49300 46100 1 0 0 resistor-1.sym +{ +T 49600 46500 5 10 0 0 0 0 1 +device=RESISTOR +T 49500 46400 5 10 1 1 0 0 1 +refdes=R3 +T 49500 45900 5 10 1 1 0 0 1 +value=OK +} +C 50600 46800 1 0 0 resistor-1.sym +{ +T 50900 47200 5 10 0 0 0 0 1 +device=RESISTOR +T 50800 47100 5 10 1 1 0 0 1 +refdes=R4 +T 50800 46600 5 10 1 1 0 0 1 +value=value1 +} +C 50600 46100 1 0 0 resistor-1.sym +{ +T 50900 46500 5 10 0 0 0 0 1 +device=RESISTOR +T 50800 46400 5 10 1 1 0 0 1 +refdes=R4 +T 50800 45900 5 10 1 1 0 0 1 +value=value2 +} +C 50600 45400 1 0 0 resistor-1.sym +{ +T 50900 45800 5 10 0 0 0 0 1 +device=RESISTOR +T 50800 45700 5 10 1 1 0 0 1 +refdes=R4 +T 50800 45200 5 10 1 1 0 0 1 +value=value3 +} +C 51900 46800 1 0 0 resistor-1.sym +{ +T 52200 47200 5 10 0 0 0 0 1 +device=RESISTOR +T 52100 47100 5 10 1 1 0 0 1 +refdes=R5 +} +C 51900 46100 1 0 0 resistor-1.sym +{ +T 52200 46500 5 10 0 0 0 0 1 +device=RESISTOR +T 52100 46400 5 10 1 1 0 0 1 +refdes=R5 +} +C 51900 45400 1 0 0 resistor-1.sym +{ +T 52200 45800 5 10 0 0 0 0 1 +device=RESISTOR +T 52100 45700 5 10 1 1 0 0 1 +refdes=R5 +T 52100 45200 5 10 1 1 0 0 1 +value=OK +} +T 43600 44200 9 10 1 0 0 0 3 +multiple instances +same value +expected result: "OK" +T 43600 43300 9 10 1 0 0 0 3 +multiple instances +different values +expected result: "value1" with warning +T 43600 42400 9 10 1 0 0 0 3 +multiple instances +one instance (not first) with attribute +expected result: "unknown" with warning +T 43600 45100 9 10 1 0 0 0 3 +multiple instances +no attributes +expected result: "unknown" +T 43600 46000 9 10 1 0 0 0 2 +single instance +expected result: "OK" +L 45400 46200 47100 46200 3 0 0 0 -1 -1 +L 47100 46500 47100 46200 3 0 0 0 -1 -1 +L 45900 45400 48400 45400 3 0 0 0 -1 -1 +L 48400 46000 48400 45400 3 0 0 0 -1 -1 +L 45500 44500 49700 44500 3 0 0 0 -1 -1 +L 49700 45800 49700 44500 3 0 0 0 -1 -1 +L 45500 43600 51100 43600 3 0 0 0 -1 -1 +L 51100 45100 51100 43600 3 0 0 0 -1 -1 +L 52300 45100 52300 42700 3 0 0 0 -1 -1 +L 52300 42700 46800 42700 3 0 0 0 -1 -1 +T 43000 46600 9 10 1 0 0 0 1 +WITH DEFAULT RESOLVER, diff --git a/tests/testcase.scm b/tests/testcase.scm new file mode 100644 index 000..2be7205 --- /dev/null +++ b/tests/testcase.scm @@ -0,0 +1,41 @@ +(use-modules (ice-9 format)) + +(define-macro (expect form expected) + `(begin + (let ((result ,form)) + (if (equal? result ,expected) + (format #t "OK~%") + (format #t "~%ERROR: evaluating ~s produced: ~a instead of: ~a~%" + ',form result ,expected) + +(display "attribute from non-existent package... ") +(expect (gnetlist:get-package-attribute "R0" "value") "unknown") +(newline) + +(display "unknown attribute from single symbol package... ") +(expect (gnetlist:get-package-attribute "R1" "foo") "unknown") +(newline) + +(display "existing attribute from single symbol package... ") +(expect (gnetlist:get-package-attribute "R1" "value") "OK") +(newline) + +(display "attribute value from multi symbol package:\n") +(display "\tno symbol instances with this attribute... ") +(expect (gnetlist:get-package-attribute "R2" "value") "unknown") + +(display "\tall symbol instances with same attribute value... ") +(expect (gnetlist:get-package-attribute "R3" "value") "OK") + +(display "\tdifferent attribute value for each symbol instance... ") +;; current behavior, take value from first symbol in file order +;; should also test for warning +(expect (gnetlist:get-package-attribute "R4" "value") "value1") + +(display "\tcustom attribute value resolver... ") +(define (attribute-value-resolver refdes name values) + ;; select first existing attribute from symbols in the file order + (or (find string? values) "unknown")) +(expect (gnetlist:get-package-attribute "R
gEDA-user: [PATCH 3/3] gnetlist: Add access to attribute from components with multiple symbol instances.
This commit introduces 'gnetlist:get-all-package-attributes' to retrieve every first attribute value for package consisting of multiple symbol instances. 'gnetlist:get-package-attribute' gets redefined to use the above procedure. To preserve backward compatibility, it returns the first value found in file order and warns when detecting different, possibly conflicting values. This behavior is configurable. Derived from patch #3071482, C code by Sebastian Gieltjes. --- gnetlist/include/prototype.h |2 +- gnetlist/scheme/gnet-drc2.scm |4 +++- gnetlist/scheme/gnetlist.scm | 41 ++ gnetlist/src/g_netlist.c | 44 - gnetlist/src/g_register.c |2 +- 5 files changed, 72 insertions(+), 21 deletions(-) diff --git a/gnetlist/include/prototype.h b/gnetlist/include/prototype.h index d37d397..3a976c2 100644 --- a/gnetlist/include/prototype.h +++ b/gnetlist/include/prototype.h @@ -11,7 +11,7 @@ SCM g_get_all_unique_nets(SCM scm_level); SCM g_get_all_connections(SCM scm_netname); SCM g_get_nets(SCM scm_uref, SCM scm_pin); SCM g_get_pins_nets(SCM scm_uref); -SCM g_get_package_attribute(SCM scm_uref, SCM scm_wanted_attrib); +SCM g_get_all_package_attributes(SCM scm_uref, SCM scm_wanted_attrib); SCM g_get_attribute_by_pinseq(SCM scm_uref, SCM scm_pinseq, SCM scm_wanted_attrib); SCM g_get_attribute_by_pinnumber(SCM scm_uref, SCM scm_pin, SCM scm_wanted_attrib); SCM g_get_toplevel_attribute(SCM scm_wanted_attrib); diff --git a/gnetlist/scheme/gnet-drc2.scm b/gnetlist/scheme/gnet-drc2.scm index a72f2a4..0570ba4 100644 --- a/gnetlist/scheme/gnet-drc2.scm +++ b/gnetlist/scheme/gnet-drc2.scm @@ -430,7 +430,9 @@ (let* ( (numslots_string (gnetlist:get-package-attribute uref "numslots")) (numslots (string->number numslots_string)) - (slot_string (gnetlist:get-package-attribute uref "slot")) + (slot_string (let ((slots (gnetlist:get-all-package-attributes uref "slot"))) + (if (or (null? slots) (not (car slots))) + "unknown" (car slots (slot (string->number slot_string)) ) (let () diff --git a/gnetlist/scheme/gnetlist.scm b/gnetlist/scheme/gnetlist.scm index d798259..70ae135 100644 --- a/gnetlist/scheme/gnetlist.scm +++ b/gnetlist/scheme/gnetlist.scm @@ -17,6 +17,8 @@ ;;; along with this program; if not, write to the Free Software ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +(use-modules (srfi srfi-1)) + ;;-- ;; The below functions added by SDB in Sept 2003 to support command-line flag ;; processing. @@ -94,6 +96,45 @@ ) ) +;; Default resolver: returns value associated with first symbol instance +;; in file order and warns if instances have different values. +(define (unique-attribute refdes name values) +(let ((value (car values))) + (or (every (lambda (x) (equal? x value)) values) + (format (current-error-port) "\ +Possible attribute conflict for refdes: ~A +name: ~A +values: ~A +" refdes name values)) + value))) + +(define (gnetlist:get-package-attribute refdes name) + "Return the value associated with attribute NAME on package +identified by REFDES. + +It actually computes a single value from the full list of values +produced by 'gnetlist:get-all-package-attributes' as that list is +passed through 'unique-attribute'. + +For backward compatibility, the default behavior is to return the +value associated with the first symbol instance for REFDES. If all +instances of REFDES do not have the same value for NAME, it prints a +warning. + +This can be modified by redefining 'unique-attribute' that is a +procedure that gets provided a non-empty list of attribute values, the +REFDES and the NAME used for the search. It is expected to return a +single value as a string or #f for an empty or non-existent attribute +value. + +Note that given the current load sequence of gnetlist, this +customization can only happen in the backend itself or in a file +loaded after the backend ('-m' option of gnetlist)." + (let* ((values (gnetlist:get-all-package-attributes refdes name)) + (value (and (not (null? values)) + (unique-attribute refdes name values +(or value "unknown"))) + ;; ;; Given a uref, returns the device attribute value (unknown if not defined) ;; diff --git a/gnetlist/src/g_netlist.c b/gnetlist/src/g_netlist.c index 14441cc..3e1bbe0 100644 --- a/gnetlist/src/g_netlist.c +++ b/gnetlist/src/g_netlist.c @@ -472,19 +472,33 @@ SCM g_get_pins_nets(SCM scm_uref) } -SCM g_get_package_attribute(SCM scm_uref, SCM scm_wanted_attrib) +/*! \brief Get attribute value(s) from a package with given uref. + * \par Function Description + * This function returns the values of a specific attribute type + * at
gEDA-user: [PATCH 2/3] gnetlist: Fix memory leak in g_get_package_attribute().
--- gnetlist/src/g_netlist.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/gnetlist/src/g_netlist.c b/gnetlist/src/g_netlist.c index b3af8fa..14441cc 100644 --- a/gnetlist/src/g_netlist.c +++ b/gnetlist/src/g_netlist.c @@ -513,6 +513,7 @@ SCM g_get_package_attribute(SCM scm_uref, SCM scm_wanted_attrib) } else { scm_return_value = scm_makfrom0str ("unknown"); } +g_free (return_value); free (uref); free (wanted_attrib); ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Resistor values?
John Doty writes: > [...] > We agreed it has to be addressed, yes. But who should address it? Since it was so kindly asked, I did: my full (and final as far as I am concerned) patch set for this issue follows this message (so our fellow readers will get a chance to understand what we are talking about). Note that the fix in gnet-drc2.scm will not survive long: 'drc2:check-slots' bitterly need to get a full rewrite (as we already discussed). And I will do that as soon as this issue is settled. Still, and as a side note, look how much beneficial a change from "unknown" to #f (as value for no- or unknown attribute) would be. Patrick ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: bugs, warts and feature requests (3)
Bert Timmerman wrote: >> • pcb feature request: Please put all the gerbers in a >> dedicated subdir of the working directory by default. The >> name of the subdir should be configurable. > > Is doable. > >> • pcb feature request: Optionally zip all gerbers and the cnc >> files to yield a single file that can be sent to the fab. The >> name of the zip file might contain the current date. > > Is doable You mean, it can already be done? How? ---<)kaimartin(>--- -- Kai-Martin Knaak Öffentlicher PGP-Schlüssel: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53 ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: bugs, warts and feature requests (3)
Levente Kovacs wrote: >> • pcb feature request: Please put all the gerbers in a dedicated >> subdir of the working directory by default. The name of the subdir >> should be configurable. >> >> • pcb feature request: Optionally zip all gerbers and the cnc files >> to yield a single file that can be sent to the fab. The name of the >> zip file might contain the current date. > > The two can be done by hand or scripts or Makefile, etc. Like I did > (a Makefile snipet) Sure, it can be done. But these are common generic tasks with pcb. I see no reason to induce reinvention of wheels by each and every user. ---<)kaimartin(>--- -- Kai-Martin Knaak Öffentlicher PGP-Schlüssel: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53 ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Resistor values?
On Jan 2, 2011, at 3:23 AM, Patrick Bernaud wrote: > John Doty writes: >> [...] >> The work-around for the drc2 incompatibility. Where is it? > > You remember that I am not the person proposing the initial patch, > only one reviewer? You did more than review: you thoroughly rewrote it in a way that makes it more difficult to read, repair, reuse, and override if needed. You dismissed factoring that helped put the back end writer in control as "crippling the API". It seemed to me you wanted ownership of that code. You can have it if you want it. If not, I'll try to find time to finish it. The political difficulty of improving the factoring in this small area has me discouraged about any serious improvement in the flexibility of gnetlist. The existing back ends will constrain it to remain an unusually powerful and flexible tool within its box, but the box will never expand very much. In the meantime, at Noqsi Aerospace, we've been developing "lambda-geda" which is potentially a much more flexible schematic processor. Right now we use it for schematic to schematic transformations, but netlisting is certainly a potential application area. So that's where my focus will inevitably move in the future. > > Beside with the example I proposed, it is not an "incompatibility", > but merely a (valid) warning triggered by the new code. > > Of course it has to be addressed and that's why I mentionned it as > part of my review. We agreed it has to be addressed, yes. But who should address it? --- 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: [Patches] GTK Recent-file-manager
Felix Ruoff wrote: > git clone git://github.com/fruoff/pcb-fruoff.git Just gave it a test run. The source compiles fine and "recent files" appears in the menu :-) A minor complaint: Currently, the list is only populated when I use the load action from the file menu. IMHO, it should be appended to by files on the command line and by the save-as action. > I will push some of my other modifications to this repository, too. > Hope, this will make testing easier. Some kind of README with a list of changes would be nice. So I know what great features to look for. ---<)kaimartin(>--- -- Kai-Martin Knaak Öffentlicher PGP-Schlüssel: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53 ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: [Patches] GTK Recent-file-manager
> Can you set up a git repository of pcb with your patches applied? > (The way Peter Clifton makes his GL-enabled version of pcb available to > potential testers) This patch is on my list of things to look at when I get home in a couple of hours -- it seems like a good idea in principle, so hopefully we can get it merged sooner rather than later. FWIW I think the existing code has been broken for a while, unfortunately, so to have someone looking at this is quite welcome! Peter -- Peter Brett Remote Sensing Research Group Surrey Space Centre ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: [Patches] GTK Recent-file-manager
Am 01.01.2011 23:10, schrieb Felix Ruoff: Am 01.01.2011 21:35, schrieb Felix Ruoff: Am 01.01.2011 20:30, schrieb kai-martin knaak: Hmm. Isolated patches make testing a bit awkward. What might be ok for simple additions gets progressively less fun for more complicated changes. Can you set up a git repository of pcb with your patches applied? (The way Peter Clifton makes his GL-enabled version of pcb available to potential testers) ---<)kaimartin(>--- (...) I have figured out myself how to set up a git repository on github. The page, where you can browse it online is https://github.com/fruoff/pcb-fruoff . If you like, you can get the branch with the following command: git clone git://github.com/fruoff/pcb-fruoff.git And now, the same for gaf/gschem (I forgot to create this yesterday evening): git clone git://github.com/fruoff/gaf-fruoff.git This repository has applied the gschem-patch for the GTK recent-manager and the appended patch. The appended patch fixes a warning, if there are menu-items without action (e.g. the recent-files - topitem (labeled 'Recent Files' (Zuletzt geöffnet))). I have also send all these Patches to the sourceforge-tracker. Thanks to Bert, who has already leaved a comment there! Kind regards, Felix >From 71b8a5a3e8e2831065291bd1f6f629cb78b67f18 Mon Sep 17 00:00:00 2001 From: Felix Ruoff Date: Sat, 9 Oct 2010 18:35:33 +0200 Subject: [PATCH] Fix warning on moving over menu-item without action Fix a warning at the info-dialog if the mouse moves over a menu-item which has no action defined, e.g. the top item of a submenu. --- gschem/src/x_menus.c | 30 ++ 1 files changed, 14 insertions(+), 16 deletions(-) diff --git a/gschem/src/x_menus.c b/gschem/src/x_menus.c index 6ea77ed..5a7e9ba 100644 --- a/gschem/src/x_menus.c +++ b/gschem/src/x_menus.c @@ -105,7 +105,6 @@ get_main_menu(GSCHEM_TOPLEVEL *w_current) char **raw_menu_name = g_malloc (sizeof(char *)); char *menu_item_name; char *raw_menu_item_name; - char *menu_item_func; char *menu_item_hotkey_func; char *menu_item_stock; char *menu_item_keys; @@ -149,11 +148,6 @@ get_main_menu(GSCHEM_TOPLEVEL *w_current) raw_menu_item_name = SCM_STRING_CHARS (scm_item_name); - if (scm_is_false (scm_item_func)) -menu_item_func = "no-action"; - else -menu_item_func = SCM_SYMBOL_CHARS (scm_item_func); - if (scm_is_false (scm_item_hotkey_func)) menu_item_hotkey_func = NULL; else @@ -187,17 +181,21 @@ get_main_menu(GSCHEM_TOPLEVEL *w_current) menu_item_keys = ""; } -action = gschem_action_new (menu_item_func, /* Action name */ -menu_item_name, /* Text */ -menu_item_name, /* Tooltip */ -menu_item_stock, /* Icon stock ID */ -menu_item_keys); /* Accelerator string */ -menu_item = gtk_action_create_menu_item (GTK_ACTION (action)); -gtk_menu_append (GTK_MENU (menu), menu_item); +if(scm_is_false (scm_item_func)) { + menu_item = gtk_menu_item_new_with_mnemonic(menu_item_name); +} else { + action = gschem_action_new (SCM_SYMBOL_CHARS (scm_item_func), /* Action name */ + menu_item_name, /* Text */ + menu_item_name, /* Tooltip */ + menu_item_stock, /* Icon stock ID */ + menu_item_keys); /* Accelerator string */ + menu_item = gtk_action_create_menu_item (GTK_ACTION (action)); + g_signal_connect (G_OBJECT(action), "activate", +G_CALLBACK(g_menu_execute), +w_current); +} -g_signal_connect (G_OBJECT(action), "activate", - G_CALLBACK(g_menu_execute), - w_current); +gtk_menu_append (GTK_MENU (menu), menu_item); } gtk_widget_show (menu_item); -- 1.7.1 ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: European symbols?
Johnny Rosenberg wrote: > I didn't add or modify any invisible text except those very > unnecessary (?) author- and license lines. I guess I should > remove them entirely. License lines are a necessity for sharing. Else, you'd have to put some license information in the environment of the share. >> * the footprint attribute is invisible > > Didn't change that either. Why would you like them visible? Because the footprint information can be scanned at a glance in the schematic. The footprint needs attention just like the value or the refdes. So it is convenient to have it visible by default. If I don't want to see the footprint attributes in finished design I can still hide them with "Hide specific text" in the attributes menu. In addition, the footprint provides a hint what to look for in the layout when I read the schematic. Else, a SO23 transistor looks the same in the schematic as a TO247 with cooler. > 200? Strange. Strange. Looks like 300 to me, except the output pin, > which indeed is 200. I didn't change that from the original symbol > either, though. "200" was just a typo by me... Somewhere in the documentation pin length 300 is recommended. However, nobody could give a reason for this value when I asked on this list. Since pins cannot be differentiated in print from nets, I decided to opt for short pins in my symbols. That is, 100 units, or sometimes even zero. > If it's not too much work, could you modify the 7400 symbol to your > likings and then send it back so I can modify the other symbols > accordingly? > See below. Except for the license, the symbol would fit into my collection of symbols in gedasymbols.org. I prefer the GPL as distribution license. As John Doty already pointed out, there is no hard right or wrong with many design decisions. I am, of course, biased :-) / v 20100214 2 B 200 200 600 600 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1 T 500 500 9 20 1 0 0 4 1 & T 400 4100 5 8 0 0 0 0 1 device=7400 T 700 0 8 8 0 0 0 0 1 slot=1 T 400 2400 5 8 0 0 0 0 1 numslots=4 T 400 1600 5 8 0 0 0 0 1 slotdef=1:1,2,3 T 400 1800 5 8 0 0 0 0 1 slotdef=2:4,5,6 T 400 2000 5 8 0 0 0 0 1 slotdef=3:9,10,8 T 400 2200 5 8 0 0 0 0 1 slotdef=4:12,13,11 V 850 500 50 6 0 0 0 -1 -1 0 -1 -1 -1 -1 -1 P 900 500 900 500 1 0 1 { T 850 600 5 8 1 1 0 0 1 pinnumber=3 T 850 600 5 8 0 1 0 0 1 pinseq=3 T 750 500 9 8 0 1 0 7 1 pinlabel=Y T 850 450 5 8 0 1 0 2 1 pintype=out } P 200 300 100 300 1 0 1 { T 150 350 5 8 1 1 0 6 1 pinnumber=2 T 150 350 5 8 0 1 0 6 1 pinseq=2 T 250 300 9 8 0 1 0 1 1 pinlabel=B T 150 250 5 8 0 1 0 8 1 pintype=in } P 200 700 100 700 1 0 1 { T 150 750 5 8 1 1 0 6 1 pinnumber=1 T 150 750 5 8 0 1 0 6 1 pinseq=1 T 250 700 9 8 0 1 0 1 1 pinlabel=A T 150 650 5 8 0 1 0 8 1 pintype=in } T 200 1100 8 10 1 1 0 0 1 refdes=U? T 200 0 8 8 1 1 0 0 1 footprint=DIP14 T 400 3900 5 8 0 0 0 0 1 description=4 NAND gates with 2 inputs T 400 3700 5 8 0 0 0 0 1 documentation=http://www-s.ti.com/sc/ds/sn74hc00.pdf T 400 3100 5 8 0 0 0 0 1 author=Johnny Rosenberg – johnny.a.rosenb...@gmail.com T 400 2900 5 8 0 0 0 0 1 dist-license=None – do whatever you want, I don't care T 400 2700 5 8 0 0 0 0 1 use-license=unlimited T 200 900 8 10 1 1 0 0 1 value=7400 T 400 3500 5 8 0 0 0 0 1 comment=use 74_pwr.sym for supply T 400 3300 5 8 0 0 0 0 1 comment=this symbol was designed according to IEC-(INSERT SPECIFIC NORM) \ -- Kai-Martin Knaak Öffentlicher PGP-Schlüssel: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53 ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Resistor values?
John Doty writes: > [...] > The work-around for the drc2 incompatibility. Where is it? You remember that I am not the person proposing the initial patch, only one reviewer? Beside with the example I proposed, it is not an "incompatibility", but merely a (valid) warning triggered by the new code. Of course it has to be addressed and that's why I mentionned it as part of my review. Patrick ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: Resistor values?
On Jan 2, 2011, at 2:50 AM, Patrick Bernaud wrote: > John Doty writes: >> [...] >> Then there's Patrick Bernaud. Bas Gjeltes and I tried to contribute a patch >> for the attribute censorship bug, but Patrick grabbed it, unfactored my >> Guile code, found a problem that broke drc2, and then dropped it. > > Maybe you can elaborate on your last sentence: what did I drop > exactly? The work-around for the drc2 incompatibility. Where is it? > > > Patrick "the gatekeeper" > > > ___ > geda-user mailing list > geda-user@moria.seul.org > http://www.seul.org/cgi-bin/mailman/listinfo/geda-user > 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: Resistor values?
John Doty writes: > [...] > Then there's Patrick Bernaud. Bas Gjeltes and I tried to contribute a patch > for the attribute censorship bug, but Patrick grabbed it, unfactored my > Guile code, found a problem that broke drc2, and then dropped it. Maybe you can elaborate on your last sentence: what did I drop exactly? Patrick "the gatekeeper" ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user