Changing position of a switch in spectremdl

Discussion in 'Cadence' started by Svenn Bjerkem, Aug 9, 2006.

  1. 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 Bjerkem, Aug 9, 2006
    #1
  2. Svenn Bjerkem

    leanderdeng Guest

    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 写é“:
     
    leanderdeng, Aug 9, 2006
    #2
  3. 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 Bjerkem, Aug 9, 2006
    #3
  4. Svenn Bjerkem

    leanderdeng Guest

    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
     
    leanderdeng, Aug 10, 2006
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.