Changing position of a switch in spectremdl

S

Svenn Bjerkem

Guest
Hi,

how is it possible to change the position of a switch with spectremdl
on the command line?

// Netlist
sw0 (drain vds) switch position=1
sw1 (drain vgs gate) switch position=1

alter_idsat altergroup {
sw0 (drain vds) switch position=1
sw1 (drain vgs gate) switch position=1
}

alter_diode altergroup {
sw0 (drain vds) switch position=0
sw1 (drain vgs gate) switch position=2
}

Spectre give me an error message on the command line
Instance 'sw0' defined in the altergroup 'alter_idsat' cannot be
altered (not supported by device 'switch').
Instance 'sw1' defined in the altergroup 'alter_idsat' cannot be
altered (not supported by device 'switch').

Do I have to set the position with a parameter or is there a way to do
this as indicated above. As the analogLib symol for the switches does
not have a possibility to set the position as a variable, I insert the
altergroups into the processed netlist in order to do a workaroud.

By the way, does anybody use spectremdl actively? I have big problems
getting anything useful out of the documentation.
--
Svenn
 
Hi Svenn,

For the alter statement, it isn't allowed to change the circuit
topology. It is true for almost all of simulators. So as you mentioned,
the only way is to define a parameter for the arguement 'position'. For
example:
sw0 (drain vds) switch position=sw0_pos
alter_idsat altergroup {
parameters sw0_pos=1
}
......

For Spectremdl, there is a tutorial you can walk through. I think it
should be shipped with MMSIM. If not, you can ask AE to get one.

Hope it helps!

Yuchun

Svenn Bjerkem 写道:

Hi,

how is it possible to change the position of a switch with spectremdl
on the command line?

// Netlist
sw0 (drain vds) switch position=1
sw1 (drain vgs gate) switch position=1

alter_idsat altergroup {
sw0 (drain vds) switch position=1
sw1 (drain vgs gate) switch position=1
}

alter_diode altergroup {
sw0 (drain vds) switch position=0
sw1 (drain vgs gate) switch position=2
}

Spectre give me an error message on the command line
Instance 'sw0' defined in the altergroup 'alter_idsat' cannot be
altered (not supported by device 'switch').
Instance 'sw1' defined in the altergroup 'alter_idsat' cannot be
altered (not supported by device 'switch').

Do I have to set the position with a parameter or is there a way to do
this as indicated above. As the analogLib symol for the switches does
not have a possibility to set the position as a variable, I insert the
altergroups into the processed netlist in order to do a workaroud.

By the way, does anybody use spectremdl actively? I have big problems
getting anything useful out of the documentation.
--
Svenn
 
leanderdeng@gmail.com wrote:
Hi Svenn,

For the alter statement, it isn't allowed to change the circuit
topology. It is true for almost all of simulators. So as you mentioned,
the only way is to define a parameter for the arguement 'position'. For
example:
sw0 (drain vds) switch position=sw0_pos
alter_idsat altergroup {
parameters sw0_pos=1
}
.....

For Spectremdl, there is a tutorial you can walk through. I think it
should be shipped with MMSIM. If not, you can ask AE to get one.

Hope it helps!
Hi Yuchun,

I was hoping that switching a switch would not change the circuit
topology as it is just the throw that is moved, but it seems that
switches is something that simulators have a bit problem with as they
introduce discontinuities in the simulation.
--
Svenn
 
Hi Svenn,

You are right. It is OK to alter parameter of other devices such as
resistor, capacitor as showed in your example. But I don't think switch
alter will introduce convergence issue because Spectre can run through
if we alter parameter for switch.

Yuchun

Svenn Bjerkem wrote:
leanderdeng@gmail.com wrote:
Hi Svenn,

For the alter statement, it isn't allowed to change the circuit
topology. It is true for almost all of simulators. So as you mentioned,
the only way is to define a parameter for the arguement 'position'. For
example:
sw0 (drain vds) switch position=sw0_pos
alter_idsat altergroup {
parameters sw0_pos=1
}
.....

For Spectremdl, there is a tutorial you can walk through. I think it
should be shipped with MMSIM. If not, you can ask AE to get one.

Hope it helps!


Hi Yuchun,

I was hoping that switching a switch would not change the circuit
topology as it is just the throw that is moved, but it seems that
switches is something that simulators have a bit problem with as they
introduce discontinuities in the simulation.
--
Svenn
 

Welcome to EDABoard.com

Sponsor

Back
Top