[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnucap-devel] Let me introduce myself

From: al davis
Subject: Re: [Gnucap-devel] Let me introduce myself
Date: Mon, 24 Mar 2008 20:03:54 -0400
User-agent: KMail/1.9.9

On Sunday 23 March 2008, Stuart Brorson wrote:
> I imagine the goal is to write a plant simulation in Octave,
> design a control system using gschem, export a SPICE/gnucap
> netlist, and then invoke gnucap analyses from within Octave
> while simulating the control dynamics, right?

could be.

Eventually, Verilog-A can be used for that, very well.  if we 
ever get that far...

What I was thinking of is the other way .. to write the math 
code for a module in octave, and it would look like a device.

> FWIW, I tried doing something similar using pipes to slave
> gnucap to an octave simulation.  It didn't work well, because
> octave didn't consistently flush its IO buffers, so gnucap
> was often left waiting for input, while octave thought it was
> done giving gnucap the data.
> However, the same thing works very well between Python/NumPy
> and gnucap: You can easily write a Python program which uses
> a gnucap slave to perform circuit analyses.  Communication
> via pipes works well in this case.  I wrote an app note for
> my current employer detailing how to do this in a parallel
> computer environment.

"gnucap slave" .. probably means issuing commands, getting the 
results .. essentially using octave to do scripting.

> Apropos GSoC, my thought is this:  Maybe an interesting
> summer project would be to create a set of Python bindings to
> gnucap, so you can write Python/NumPy simulations which
> employ gnucap to perform circuit analysis as part of a larger
> control system simulation.

I was thinking of the other way ,, so you could write a plugin 
in python.  Since plugins can do anything, it opens it up in 
both directions.  The plugin interface is probably too 
difficult at this point.  It will probably be easier next year.  
It's on the list of possible topics.

A text/pipe interface is short term.  As things change it will 
become obsolete fast, and will always be too specialized.  It's 
easy enough that someone might do it just for one job.

> I believe there are already gnucap bindings in Ruby, so
> Python bindings would be pretty easy to implement using the
> Ruby bindings as an example.  The advantage is Python is that
> it is much more well known, and -- more importantly -- has a
> very nice numerical package called NumPy which offers similar
> functionality to Matlab/octave.

Sort of ...  From what I see, it is a text interface, just a 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]