Re : Monte carlo, parametric analysis and measurements
Well James. I was thinking about extending the interactive langage
with some of the keywords used by IntusOft IsSpice: getparam,
alterparam, nextparam.... I think then about creating a special plot
called globalplot where global vectors will be stored.
Some new commands such as .param to define a new parameter.
We can then use script to make the parametric analysis.
Do Anyone has some sample of scripting langage code for montecarlo
and parametric analysis?
glao
--- Dans ng-spice@e..., ng-spice@i... a écrit
> I believe that Monte Carlo and parametric analysis are best
> served by command-language/model parser abstraction, and "shell"
> or application scripting. But then, this is simply what I'm
> used to. I think that since these are really applications of
> the basic simulator, and do not intimately require access to
> its "guts", that they would be best kept as adjuncts, not
> incorporated. Additionally, depending on what degree of detail
> you look for in a MC simulation, it is possible that the
> features to support it would substantially bloat not just the
> command interpreter, but the intrinsic models as well.
>
> What I mean by abstraction is, that any model parameter, or
> element parametric argument, should be specifiable as an
> expression (variable, function, array element). This gives
> the user unlimited flexibility in specifying circuit values,
> and by simply altering variables, they can rerun the netlist
> iteratively (parametric analysis). In a more elaborate scheme,
> the user might specify transistor parameters as statistical
> functions expressing process variation, device mismatch,
> even temperature (presuming they're not satisfied with SPICE
> intrinsic temperature functions) and geometry.
>
> I have used a SPICE2-based simulator for most of my career,
> which managed to perform the most elaborate MC analyses in
> this manner. Because of SPICE2 input format limitations
> (only FORTRAN floating point numbers and the most rudimentary
> text parsing), we had a command language wrapper (similar to
> Nutmeg) which also was a preprocessor. The preprocessor
> permitted abstraction as I mention above, and took care of
> all of the basic "dot" commands as well; it built a "M6" file
> from the user's "raw" netlist (.c file), the models and
> subcircuits this file referenced (.m and .s files; the .m
> support really let you do neat stuff, like variable-geometry
> transistors from a single file, instantiation of ancillary
> components along with the transistor, etc., but I digress).
> All variables, functions, etc. were "boiled down" to their
> FP numerical result, and the netlist written to M6 (in the
> mini-mainframe days, or /tmp/tmp.SLM6{procID} in later
> UNIX incarnations.
>
> I would run huge Monte Carlo jobs, 5 environmental variations*
> 50 process iterations. In some cases, I would first run jobs
> which determined, for each psuedorandom process shot, what the
> laser trim resistor values turned out to be, write these to a
> data file, then read them in (to variables) and run each of the
> set of datasheet tests using the trimmed-in circuit. This would
> tie up half a dozen workstations for days and endeared me to my
> peers immeasurably.
>
> With a "wrapper", probably something like a Gnome/GTK or other
> UI-oriented tool, you could do a couple of things. One is the
> abstraction of the netlist. Another is management of the rawfile
> and map data, particularly as relates to joining ngspice with
> design capture tools more intimately; command piping from design
> tool (or floating ngWrapper command window) to ngspice to display
> Xterm, for example. I look forward to the day that ngspice and
> gEDA (and/or ACS and gEDA) have a simple, clean interface that
> supports things like plot waveform from schematic point,
> parametric analysis by schematic instances' parameters spec'd
> as schematic variables, etc.
>
>
> JWS
>
>
>
> >Paolo, We should also have a look on some features claimed on the
webpage
> >or commonly used in spice simulations such as monte-carlo
analysis,
> >worst-case, parametric analysis and measurements. I remember
that we
> >have never decided which compatibility we should keep (hspice,
pspice,
> >isspice, smartspice... or any but trying to build a new "standard")
> >About measurements whats about the code Arno was trying to write ?
> >I am trying to write some new commands for statistical and
parametric
> >analysis.
> >But in fact, i dont know really what to do. I need help.
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
Partial thread listing: