[eispice] Re: Spice Model Converter Experiment

  • From: Charles Eidsness <charles@xxxxxxxxxxxxxxxxxxxxx>
  • To: eispice@xxxxxxxxxxxxx
  • Date: Tue, 13 Nov 2007 18:58:16 -0500

Hi Thomas,

This is great, I also like the way you generated that plot with matplotlib.

How about instead of building special diode classes using a dict like this for 
the models?

d_1N914 = {'IS':'2.52n', 'RS':0.568, 'N':1.752, 'CJO':'4p', 'M':0.4, 'TT':'20n'}

Then to use the model:
cct.Dx = eispice.D(1, eispice.GND, area=1, **d_1N914)

I can't think of any real advantage to using dictionaries instead of classes, 
but it would line up a little closer with traditional spice model definitions.

I think I prefer converting into Python code like you're doing as opposed to 
keeping models in spice and running right away after the conversion. That way 
you can make hand modifications to the model if you want, and save it for later 
when it can be loaded with an import command, i.e.

import mylib.diodes.D_MURS120 # (or something like that)

I've been thinking about eventually having a separate eispice library package, 
this is a great step in that direction.

Thanks!
Charles


Thomas Traber wrote:
> Hi,
> 
> I am currently playing around with a spice model converter.
> It converts spice diode models into eispice code.
> The first code and results can be found here:
> http://www.desy.de/~traber/eispice.html
> 
> Maybe it is better not to write the python code to a file but to execute
> it directly. But it is not that bad to have an eispice parts library.
> With the approach shown here Ipython completion works for the library
> parts. With online conversion of spice models direct code entry is more
> bumpy.
> 
> 
> Regards,
> Thomas
> 
> 
> 
> ------------------------------------------------------------------
> To unsubscribe from the eispice list send an email to:
> eispice-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field
> 
------------------------------------------------------------------
To unsubscribe from the eispice list send an email to:
eispice-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field

Other related posts: