X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-TCPREMOTEIP: 67.253.185.10 X-Authenticated-UID: jpd AT noqsi DOT com From: John Doty Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: multipart/alternative; boundary=Apple-Mail-195-133014565 Subject: Re: [geda-user] Gschem actions Date: Mon, 5 Aug 2013 13:44:49 -0400 In-Reply-To: To: geda-user AT delorie DOT com References: Message-Id: X-Mailer: Apple Mail (2.1085) Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk --Apple-Mail-195-133014565 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Aug 5, 2013, at 8:50 AM, Nathan Stewart wrote: > After some mulling about, I think I came up with a handy way to keep = my hierarchical schems together with their simulation schematics. Make = the circuit for a simulation a sub-circuit, and make THAT component = graphical. That should keep it out of the netlister for the actual = board, without breaking the netlister when run on the sim circuit. It won't show up in the sim circuit if it's graphical. This is a good = thing from my point of view: I frequently have graphical "comments" in = circuits. =46rom my point of view, it makes better sense that the simulation = schematic is always on the highest level of interest, not in a = subcircuit. It makes more sense to simulate the lowest level circuits = first, then build more complex circuits with them, simulate those, etc. = until you've put together the biggest thing you'll simulate. >=20 > I've also stopped using pins on subcircuit components unless I want to = clearly illustrate something. Huh? Pins go on symbols. Do you mean IO symbols, perhaps? Are you really = using hierarchy, or do you just have several top-level schematics? > In my project, for instance, I have the following boards. 1) PS = Controller / Monitoring, 2) front panel (actually two boards because = it's longer than 200mm), 3) preamp, and 4) power amp.=20 That sounds like four top level schematics. >=20 > I use pins on the components that represent connections between = controller, preamp, and power amp. I don't for just about everything = else. This lets me 1) avoid creating new symbols for everything, and 2) = declutters. My basic rule is anything you would explicitly draw a line = for in a single page schematic gets a pin. If you would use a label, it = doesn't need a pin.=20 >=20 > So now that I have my simulation circuits handy, lurking under = graphical symbols - I want to add an action to run it. Before I go = reinventing wheels - does this capability already exist? I see spice = blocks for includes, models, but I want a spice file block that will run = the netlister on the current page, run ngspice then run a spice batch = file on that.=20 Doesn't exist. It might be possible to write a scheme script for gschem = that would do this. I would suggest that rather than using a symbol, you = drive this with a top level attribute instead. Gnetlist back ends ignore = unfamiliar top level attributes, but unfamiliar symbols confuse them. >=20 > So: > 1) Does this capability exist already?=20 > 2) Does it offend anyone's [who has commit access] sensibility? =20 I am strongly of the opinion that facilities like this, specialized to a = particular flow, do not belong in gschem out of the box. On the other = hand, the capability to write such a thing should be present in the = Guile scripting layer, so you could write a few lines a Guile, and then = anybody could put (load ns-ngspice-personality) in a gschemrc file and = do it your way. If it can't be done, that's where to fix it. > 3) Security - I'm not used to thinking in terms of paranoia, but it = occurs to me that: >=20 > * anytime you give people the ability to execute something from = something that people think of in terms of 'data', you introduce = security issues. >=20 > * I suspect something like 99.99% of gschem projects are viewed only = by their creator - so it might not matter. >=20 > * The security can might be kicked down the road to ngspice by = allowing only execution of the netlister, and running spice commands on = the netlist. Thus - no NEW security risks are introduced.=20 >=20 > 4) In the interest of that last bullet - does anyone use spice other = than ngspice with gschem?=20 Yes. LTspice, gnucap, and Tanner SPICE at least. I also export netlists = in SPICE format to Cadence for ASIC layout. Most probably others. Also, = I run several different versions of ngspice (one of them locally = customized) with different names depending on the simulation. >=20 > RFC >=20 >=20 John Doty Noqsi Aerospace, Ltd. http://www.noqsi.com/ jpd AT noqsi DOT com --Apple-Mail-195-133014565 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
After = some mulling about, I think I came up with a handy way to keep my = hierarchical schems together with their simulation schematics. Make the = circuit for a simulation a sub-circuit, and make THAT component = graphical. That should keep it out of the netlister for the actual = board, without breaking the netlister when run on the sim = circuit.
<= div>
It won't show up in the sim circuit if it's graphical. = This is a good thing from my point of view: I frequently have graphical = "comments" in circuits.

=46rom my point of = view, it makes better sense that the simulation schematic is always on = the highest level of interest, not in a subcircuit. It makes more sense = to simulate the lowest level circuits first, then build more complex = circuits with them, simulate those, etc. until you've put together the = biggest thing you'll simulate.


I've also stopped using pins on subcircuit components unless I = want to clearly illustrate = something.

=
Huh? Pins go on symbols. Do you mean IO symbols, perhaps? Are you = really using hierarchy, or do you just have several top-level = schematics?


In my project, for instance, = I have the following boards. 1) PS Controller / Monitoring, 2) front = panel (actually two boards because it's longer than 200mm), 3) preamp, = and 4) power amp. =

= That sounds like four top level schematics.


I use pins on the components that represent connections = between controller, preamp, and power amp. I don't for just about = everything else. This lets me 1) avoid creating new symbols for = everything, and 2) declutters. My basic rule is anything you would = explicitly draw a line for in a single page schematic gets a pin. If you = would use a label, it doesn't need a pin.

So now that I have my simulation circuits handy, lurking under = graphical symbols - I want to add an action to run it. Before I go = reinventing wheels - does this capability already exist? I see spice = blocks for includes, models, but I want a spice file block that will run = the netlister on the current page, run ngspice then run a spice batch = file on that. =

Doesn't= exist. It might be possible to write a scheme script for gschem that = would do this. I would suggest that rather than using a symbol, you = drive this with a top level attribute instead. Gnetlist back ends ignore = unfamiliar top level attributes, but unfamiliar symbols confuse = them.


So:
1) Does this capability exist already?
2) Does it = offend anyone's [who has commit access] sensibility?  =

I am strongly of = the opinion that facilities like this, specialized to a particular flow, = do not belong in gschem out of the box. On the other hand, the = capability to write such a thing should be present in the Guile = scripting layer, so you could write a few lines a Guile, and then = anybody could put (load ns-ngspice-personality) in a gschemrc file and = do it your way. If it can't be done, that's where to fix = it.

3) Security - I'm not used to thinking in = terms of paranoia, but it occurs to me that:

* anytime you give people the ability to execute something from = something that people think of in terms of 'data', you introduce = security issues.

* I suspect something like 99.99% of = gschem projects are viewed only by their creator - so it might not = matter.

* The security can might be kicked down the road to ngspice by = allowing only execution of the netlister, and running spice commands on = the netlist. Thus - no NEW security risks are introduced. =

4) In the interest of that last bullet - does anyone use spice other = than ngspice with gschem? =

Yes. LTspice, gnucap, and = Tanner SPICE at least. I also export netlists in SPICE format to Cadence = for ASIC layout. Most probably others. Also, I run several different = versions of ngspice (one of them locally customized) with different = names depending on the simulation.


RFC



John Doty              Noqsi = Aerospace, Ltd.

http://www.noqsi.com/

jpd AT noqsi DOT com



= --Apple-Mail-195-133014565--