Maker Pro
Maker Pro

Looking for "alter" command help

T

Tom Bruhns

Jan 1, 1970
0
Hi all,

I'm using a pretty vanilla Berkeley Spice 3f4. The interactive
interpreter manual documents an "alter" command. Long ago I managed
to divine that for simple alterations of single-parameter components
such as resistors, I need to put in an equals-sign instead of just a
space between the device and the value, at least in my version, but
I'll be darned if I can figure out how to alter one parameter of a
multi-parameter component. In particular I have an independent
source:

vin 1 0 dc 0 ac 1

whose AC magnitude I wish to alter. Things I've tried so far that
don't work:

alter vin[ac]=0
alter @vin[ac]=0
alter @vin[ac] = 0
alter #vin[ac]=0
alter @vin(ac)=0
alter @vin[AC]=0
alter @vin[ac]=[ 0 0 ] (thinking maybe it needs both mag and phase)
alter @vin[ac]=(0;0)
....

Most of these simply kill the SPICE session. alter@vin[ac]=0 seems to
come closest to working, but SPICE complains,

Error: no such parameter ac.
Error: no such parameter ac].

What's the magic incantation for this puppy?

Cheers,
Tom
 
C

Charles DH Williams

Jan 1, 1970
0
I'll be darned if I can figure out how to alter one parameter of a
multi-parameter component. In particular I have an independent
source:

vin 1 0 dc 0 ac 1alter vin[ac]=0
alter @vin[ac]=0
alter @vin[ac] = 0
alter #vin[ac]=0
alter @vin(ac)=0
alter @vin[AC]=0
alter @vin[ac]=[ 0 0 ] (thinking maybe it needs both mag and phase)
alter @vin[ac]=(0;0)
...

The following should work:
alter @vin[ac] = 0

but is affected by several bugs in the Berkeley code. However, ISTR that
the alternative syntax

alter dev param = expression

i.e.

alter vin ac = 0

will work okay on unfixed code.

Charles.
 
T

Tom Bruhns

Jan 1, 1970
0
Hallelujah! Thank you, Charles. That (second form) did it. The one
you say should work does not on my version. Now that I look at the
documentation, I don't know why it didn't occur to me to try that
second form; it's just what the docs say except with an added "=" like
I have to do for the single-parameter devices anyway. Neurons shorted
out from frustration at the ones that didn't work?

Cheers,
Tom


Charles DH Williams said:
I'll be darned if I can figure out how to alter one parameter of a
multi-parameter component. In particular I have an independent
source:

vin 1 0 dc 0 ac 1alter vin[ac]=0
alter @vin[ac]=0
alter @vin[ac] = 0
alter #vin[ac]=0
alter @vin(ac)=0
alter @vin[AC]=0
alter @vin[ac]=[ 0 0 ] (thinking maybe it needs both mag and phase)
alter @vin[ac]=(0;0)
...

The following should work:
alter @vin[ac] = 0

but is affected by several bugs in the Berkeley code. However, ISTR that
the alternative syntax

alter dev param = expression

i.e.

alter vin ac = 0

will work okay on unfixed code.

Charles.
 
Top