• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. VCCAP Usage and Documentation

Stats

  • Locked Locked
  • Replies 18
  • Subscribers 125
  • Views 23260
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

VCCAP Usage and Documentation

EEE student
EEE student over 4 years ago

Hi Guys, I have a question about vccap in the analogue lib.

I need to simulate a design with a varying capacitor and hence use a vccap is a good choice.

However, I don't quite know how to use it and the documentation about it is a bit unclear.

May I kindly ask if anyone has ever used it before? If you don't recommend using it, may I ask if there are other possible ways of varying caps in simulation?

Thank you very much!

Mingqiang

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    This is implemented with spectre's "vccs" component, so you can find out more by typing "spectre -h vccs" in a terminal window.

    As a simple example, if you have the controlling pairs set to 2, and controlling volt 1 as 0, and controlling volt 2 as 1, with Corresp Element 1 as 1p, and Corresp Element 2 as 5p - then the controlling voltage inputs will effectively switch between a 1p capacitor and a 5p capacitor depending on whether the input is 0V or 1V. How smooth the transition is between cap values is dependent upon Delta (which can be between 0 and 0.5). You can also scale the capacitor value using the Scale factor parameter. You can have more controlling pairs to model a different transfer function between the controlling voltage and chosen capacitor value.

    I did notice that it doesn't do a fantastic job of timestep control so use with caution.

    Regards,

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • EEE student
    EEE student over 4 years ago in reply to Andrew Beckett

    In addition,

    I am not sure whether my configuration below is correct. As you can see I used two voltages to control this vcaap, the first voltage is set at 0 and transits to 1.8V after 100ns and the second voltage source is simply set to 0 as always. Then I use transient simulation but gets linear increment voltage at the capacitor's output which is also strange. I doubt my configuration is wrong. If I want to have a capacitor whose values vary between 1pF and 5pF with 0.5pF step, do you think I shall change the driving voltage or I shall change the vccap? Thanks!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to EEE student

    It doesn't matter whether you use vccap from analogLib, or vccs with the type set to vccap - they end up being netlisted as the same in the spectre netlist.

    I tried these and they are equivalent:

    In my case that means that the cap changes from 1p (at 0V across the differential input) to 5p (when 1V is across the controlling input).

    You can also use "Linear" mode of the vccs like this:

    Yes, the name "Transconductance" and units (Mhos) is a bit odd for a capacitor - this is the C/V of the vccap (so that means 2pF/V). This will be 0F for 0V, and 2pF for 1V.

    Andrew.

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • EEE student
    EEE student over 4 years ago in reply to Andrew Beckett

    Thank you very much Sir! I have successfully used the VCCAP by changing the voltage inputs. May I ask an additional question here: how can we observe the capacitor size directly and plot a graph of another variable against it?

    I am doing the transient simulation of the capacitor with a hysteresis opamp. I want to plot the the period of oscillation against the capacitor size. The period can be obtained using the function delay() in the calculator and the capacitor size can be calculated using control-voltage*transconductance. However, this means I have to plot the graph manually by retrieving each data from the delay() function and and the capacitor inputs by calculation.

    I don't know whether Cadence can convert all these calculations automatically and plot them just like we plot the cgg of mosfet vs input voltage by inputting "save mos:oppoint".

    If Cadence cannot automatically do these, I will do them manually.

    Thank you again!

    Best Wishes,

    Mingqiang

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to EEE student

    Hi Mingqiang,

    Yes, you can plot :lx0 for the vccs/vccap (see "spectre -h vccs" again). If you use Outputs->To Be Saved->Select OP Parameters in ADE you can do this directly through the UI - click on the component in the schematic, and then type in lx0 in the Operating Parameters box (the "..." allows you to get the available parameters from a simulation too)..

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • EEE student
    EEE student over 4 years ago in reply to Andrew Beckett

    Hi Mr. Andrew,

    Sorry to disturb you again! But I have a question about the period plot against varying capacitor.

    In the calculator function, we can plot frequency against time. I have obtained a graph as shown below:

    However, the frequency is not linearly related to the capacitor value. Hence we want to check whether the period can be plotted against the capacitor's value, rather than against the time period to prove the linearity.

    May I kindly ask if you know anyways of doing this. 

    Thank you very much!

    Mingqiang

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • EEE student
    EEE student over 4 years ago in reply to EEE student

    Hi there, a quick update. I have found 1/frequency can help me get the period. Now the question becomes how to plot the period against the capacitance. Thank you!!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • EEE student
    EEE student over 4 years ago in reply to EEE student

    Hi there, a quick update. I have found 1/frequency can help me get the period. Now the question becomes how to plot the period against the capacitance. Thank you!!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • ShawnLogan
    ShawnLogan over 4 years ago in reply to EEE student

    Dear EEE student,

    I believe you need to include an impedance analysis in your transient simulation and, using the current measured through your vcvap, determine its capacitance. The resulting capacitance value can then be plotted against any other waveform using the calculator function. 

    As a student, you are hopefully familiar with the relationship between impedance and capacitance. As such, you must consider the phase of the measured current relative to the nodal voltages  across your instance of vccap.

    I hope this provides the guidance you were hoping for.

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • EEE student
    EEE student over 4 years ago in reply to ShawnLogan

    Hi Shawn,

    Thank you for your reply! However, I don't quite get your point of impedance analysis. Probably I should add the whole picture here.

    This is a voltage controlled capacitor and its capacitance is determined myself. This capacitor is used in a Hysteresis opamp and once it becomes larger, the hysteresis opamp outputs square wave has larger period. 

    Theoretically, the period of the output waveform should have relationship ln(k)*RC, where k is theoretically determined by the threshold of the v+ and v-. 

    However, practical situation is more complex and hence we want to know exact relationship between the period and this C and hence a graph plotting is needed.

    Unfortunately, 1/freq in the calculator only plots the output period against time, rather than against the capacitance.

    If you know how to plot it against the capacitance, I will appreciate!

    Thank you!

    Mingqiang

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to EEE student

    Hi Mingqiang,

    We already talked before about plotting the capacitor value via :lx0. So plot two signals - one is the period (versus time) that you asked about, and the other is the capacitor value (lx0). 

    Then over the x-axis, click right mouse->Y vs Y. Pick the trace that you want to be the x-axis (the capacitor value, lx0) and you'll then get a new graph of the period versus the capacitor value.

    Does that answer your question?

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • EEE student
    EEE student over 4 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thank you so much! This is now clear.

    Because lx0 I plotted is only against time and I am wondering how to relate it to period.

    Now your explanation is in more detail!

    Sorry for my bad understanding!

    Thanks,

    Mingqiang

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • EEE student
    EEE student over 4 years ago in reply to Andrew Beckett

    Hi Mr. Andrew,

    I am really sorry to disturb you again, but the picture I get is not a discrete graph as shown below. This is confusing as I set all capacitor values at discrete values at certain time point in the dynamic variable vector. However, the results give me continuous graph in oppoint against time. I set infotimes to save these oppoint. May I ask if there is any way of plotting frequency against discrete lx0?

    Thank you very much!

    Best Wishes,

    Mingqiang

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago in reply to EEE student

    Dear Mingqiang,

    EEE student said:
    May I ask if there is any way of plotting frequency against discrete lx0?

    Did you right click on your plot of capacitance versus time and choose "Type->Points" and, also from a right click, "Symbols on". This will only display the values without any line between data points.

    Shawn

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • EEE student
    EEE student over 4 years ago in reply to ShawnLogan

    Thank you very much! I will do it tomorrow! I will update if I succeed.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to EEE student

    I don't really understand what you're doing here - why are you using a vccap and then using a dynamic parameter to change the capacitor value? Why not just use a capacitor with a variable as the value and use the dynamic parameter to change it?

    It's unclear to me what you're really doing here - seeing the input.scs netlist would really help as it's hard to understand otherwise.

    Potentially you could take the trace that is supposed to be "discrete" and use right mouse->type->sample and hold, but that will only help if it is truly discrete, which I'm not convinced is the case here. Similarly Shawn's suggestion won't help either in that case.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • EEE student
    EEE student over 4 years ago in reply to Andrew Beckett

    Hi Mr. Andrew,

    Sorry to confuse you. Let me show you the graph below:

    As you can see, the hysteresis opamp's oscillation frequency is determined by this vccs cap. If I did directly parameter sweep, that would be in the dc analysis and every change would be against this vccs value. 

    However, hysteresis opamp will never run because it takes time to oscillate. Therefore, we must do the transient analysis to see its actual period and then treat the vccs as a dynamic variable to observe how this period changes as the vccs value increases. Hence I calculate period using 1/freq(). Then using opt() to plot vccs value against the time.

    For your reference, I have attached the netlist here:

    // Library name: Lab1
    // Cell name: schmitt_trigger
    // View name: schematic
    I13 (vdd! 0 capout vfeedback schmitt_out) opamp_sch
    R3 (vdd! vfeedback) polyhres_pcell_1 sl=156.76u w=1.2u
    R2 (capout schmitt_out) polyhres_pcell_1 sl=160.17u w=1.2u
    R1 (vfeedback 0) polyhres_pcell_1 sl=156.76u w=1.2u
    R0 (vfeedback schmitt_out) polyhres_pcell_1 sl=156.76u w=1.2u
    C1 (out 0) capacitor c=1p
    I10 (0 schmitt_out out vdd!) Inverter
    V0 (vdd! 0) vsource dc=1.8 type=pulse val0=0 val1=1.8 rise=100n
    V1 (net15 0) vsource dc=dc_cap type=dc
    G1 (capout 0 net15 0) vccs gm=1p type=vccap inputtype=single delta=0
    simulatorOptions options reltol=1e-3 vabstol=1e-6 iabstol=1e-12 temp=27 \
    tnom=27 scalem=1.0 scale=1.0 gmin=1e-12 rforce=1 maxnotes=5 maxwarns=5 \
    digits=5 cols=80 pivrel=1e-3 sensfile="../psf/sens.output" \
    checklimitdest=psf
    tran tran stop=200u param=dc_cap param_vec=[0 1 10u 1.5 20u 2 30u 2.5 40u \
    3 50u 3.5 60u 4 70u 4.5 80u 5 100u 4.5 110u 4 120u 3.5 130u 3 140u 2.5 \
    150u 2 160u 1.5 170u 1] write="spectre.ic" writefinal="spectre.fc" \
    annotate=status infotimes=[5u 15u 25u 35u 45u 55u 65u 75u 85u 95u 105u \
    115u 125u 135u 145u 155u 165u 175u] maxiters=5 infoname=tran_Info
    finalTimeOP info what=oppoint where=rawfile
    tran_Info info what=oppoint where=rawfile
    modelParameter info what=models where=rawfile
    element info what=inst where=rawfile
    outputParameter info what=output where=rawfile
    designParamVals info what=parameters where=rawfile
    primitives info what=primitives where=rawfile
    subckts info what=subckts where=rawfile
    saveOptions options save=allpub

    Thank you for your patience!

    Mingqiang

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • EEE student
    EEE student over 4 years ago in reply to ShawnLogan

    Hi there, 

    Here is a quick update. I successfully plotted the stuff using your method. I have attached it for your reference! Thank you very much!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information