SPICE not nice

So "they" have buggered SPICE some.. Back in the good old DOS daze, there was a command .STEP which one could recalc with specified parameters changed in an arbitrary manner; each STEP value of a given item being set to specified values (which could be randomly chosen). *poof* cannot do that anymore. And what the heck happened to .ALTER ??

Reply to
Robert Baer
Loading thread data ...

--
From the LTspice help:

.STEP -- Parameter Sweeps
 Click to see the full signature
Reply to
John Fields

.STEP exists in PSpice AND LTspice

.ALTER is specific to HSpice, and re-runs the simulation with changes that can include .LIB variations. I force that capability by concatenating the .CIR file upon itself, then manually editing the changes. PITA, but it works.

Maybe Mike could add .ALTER to LTspice.

I'm almost a convert. That feature could pull me closer to being a proselytizer ;-) ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
 Click to see the full signature
Reply to
Jim Thompson

That is NOT what .STEP used to do; it is that difference that i am ranting about. Quote from old DOS SPICE manual: "old" .STEP syntax: .STEP variable value1 [value2...(up to 20)] Examples: .STEP Vdd 3V 5V 6V .SEP RLOAD 50 100 200 .STEP IBIAS 1mA 2Ma 10mA This statement causes the simulation to be repeated for all of the specified values of the parameter (similar to the .TEMP card). If there are .ALTER or .TEMP cards in the input file thei will be done for each parameter calue.

Reply to
Robert Baer

the syntax for a list of values is like this: .STEP Vdd list 3V 5V 6V

-Lasse

Reply to
langwadt

[snip]

I don't recall .STEP being "nest-able", .DC is.

.ALTER would "repeat simulations" for each change. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
 Click to see the full signature
Reply to
Jim Thompson
[snip]

It occurs to me that you also have the syntax wrong. The above should be...

.STEP Vdd LIST 3V 5V 6V .STEP PARAM RLOAD LIST 50 100 200 .STEP IBIAS LIST 1mA 2mA 10mA

LTspice may allow the second example without the "PARAM" as LTspice periodically does things different than standard.

Note: Incremental stepping would be

.STEP LIN Vdd 3V 5V 1V

-or-

.DC LIN Vdd 3V 5V 1V

...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
 Click to see the full signature
Reply to
Jim Thompson
[snip]

.ALTER would be awfully handy if, as I have to do, need to run simulations over process corners, temperature AND voltage variations.

I'll see if my son can't come up with a post-processor to massage the .CIR file before running, to emulate .ALTER ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
 Click to see the full signature
Reply to
Jim Thompson

Emulating .ALTER is easier than I first thought:

Put all items you want to vary into a text file separate from the schematic.

Name it perhaps "\Path\CircuitNameAlter1.txt"

Create other versions by editing to...

"\Path\CircuitNameAlter2.txt" "\Path\CircuitNameAlter3.txt" | | | "\Path\CircuitNameAlterX.txt"

In the schematic place "Spice Directive":

.include "\Path\CircuitNameAlter1.txt"

Create .CIR file:

"\Path\CircuitName.cir"

Concatenate this file on itself X times

(I use a utility "concat" from jddesign.co.uk)

Edit the concatenated file to have the includes properly numbered.

Just occurred to me that this will only work repetitively with simulators that create separate .CIR and .NET files, like PSpice. Otherwise you'd have to redo the .CIR file every time.

In PSpice just off-name the concatenated .CIR file, then save-as the proper name after you make changes in the schematic (netlist).

A bit cumbersome, but maybe not so much... even with .ALTER you have to type out all the variations, so typing into separate files is the only issue.

Wonder why I'm posting on Christmas day? We're celebrating tomorrow so that each family can do their own thing, then drive to Oni and Opa's house for a all-family event. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
 Click to see the full signature
Reply to
Jim Thompson

Thanks; it would be nice if the "documentation" was more complete..

Reply to
Robert Baer

RE: I don't recall .STEP being "nest-able", .DC is ..perhaps because you have been using LTCspice?

Reply to
Robert Baer

...the syntax (for the DOS SPICE) was correct; straight out of the book / documentation. Now for LTspice...

Reply to
Robert Baer

PSpice and occasional use of LTspice ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
 Click to see the full signature
Reply to
Jim Thompson

Nowhere have you said what flavor of "Spice" you are using??

There are ways to parameterize, using tables and/or equations, to get multiple items changing value as desired.

But you seem more interested in being argumentative than learning. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
 Click to see the full signature
Reply to
Jim Thompson

"Nowhere"??? At least _twice_ i said it was a DOS version. Maybe the mention of that modern OS turns your brain off?

Reply to
Robert Baer

DOS version of WHAT? Berkeley? 2G6? 3F3? Some private compilation?

I found a copy of the 3F3 manual. Nary a mention of .STEP ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
 Click to see the full signature
Reply to
Jim Thompson

Hey, smart-ass, what was it?

I've been using Spice for a very long time, started on a VAX780, with Spice compiled in Fortran, then on DOS (PSpice, with hand-written netlists :-) ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
 Click to see the full signature
Reply to
Jim Thompson
[snippage]

A DOS version of what???? There are a number of Spice programs which run under DOS.

Reply to
qrk

I think Baer is just a troll. Nothing he ever posts ends up making sense. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
 Click to see the full signature
Reply to
Jim Thompson

TopSPICE, Mixed-Mode Circuit Simulator by Penzar Development, Rev 2.6 (C) 1993, PO Box 10358, Canoga Park CA 91309 (818)594-0363. The address and phone number _might_ have changed during the intervening few days.

Reply to
Robert Baer

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.