sweeping the value of a capacitor in a subcircuit

Discussion in 'Cadence' started by Mohit, Apr 5, 2007.

  1. Mohit

    Mohit Guest

    Hi,

    I have a testbench that has 3 instances of a subcircuit called
    DTC_NEA. This subcircuit is basically a differential buffer and it has
    a couple of ideal capacitors with identical values in it. The top
    level testbench puts these three buffers in a chain and also has the
    necessary bias and voltage sources needed to make it work.

    What I need to do is to sweep the value of these caps from 5fF to 50fF
    and see what effect it has on the delay. How do I go about doing this?
    I don't use the ADE tool, but do everything on the command line.

    Currently, in my schematic, I have given the caps a value of C, which
    is a parameter. Here is my sweep statement:

    sweep_cap sweep sub=DTC_NEA param=C start=5e-15 stop=50e-15
    step=53-15 {
    tran tran stop=5n maxstep=20p errpreset=moderate write="spectre.ic"
    writefinal="spectre.fc" annotate=status maxiters=5
    }


    Also, my subcircuit definition for DTC_NEA looks like this:

    subckt DTC_NEA IS ISb Ts odp VB6Q VCC3
    parameters C=5e-15
    C0 (VCC3 t0) capacitor c=C
    C1 (VCC3 t0b) capacitor c=C
    .......
    ends DTC_NEA



    I use the following command to run the spectre netlist (sp.scs):

    spectre sp.scs > sp.raw/Spectre.out


    When I run the test, I get the following error:

    "Error found by spectre during Sweep analysis 'sweep_cap'.
    Subckt instance 'DTC_NEA' does not exist.


    Does this mean that I have to give the instance name of the buffer
    rather than the subcircuit name in the sweep statement? If so, how do
    I ensure that the cap value changes for all three instances and not
    just for one?


    Any help would be appreciated.

    Thanks,

    Mohit A.
     
    Mohit, Apr 5, 2007
    #1
  2. Mohit

    S. Badel Guest

    Currently, in my schematic, I have given the caps a value of C, which
    First note : step=53-15 seems a bit high ;)

    About the sweep, if you use sub=, it expects the name of a subcircuit instance. I do not think it is
    possible to specify multiple instances here.

    What you should do is define a global parameter and "propagate" it to all subcircuit instances.
    Then, do not specify sub= in your sweep statement.

    simulator lang=spectre
    parameters C=5e.15 .....
    ....
    I1 (...) DTC_NEA C=C
    I2 (...) DTC_NEA C=C
    I3 (...) DTC_NEA C=C
    ....
    sweep cap sweep param=C start=5e-15 stop=50e-15 step=53-15 {
    ...
    }


    Hope this'll work,

    Stéphane
     
    S. Badel, Apr 5, 2007
    #2
  3. Mohit

    Mohit Guest

    Thanks, that worked well for me! and the step size was meant to be
    5e-15. :)

    Mohit.
     
    Mohit, Apr 5, 2007
    #3
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.