• 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. Time Variable Resistor

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 126
  • Views 21916
  • 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

Time Variable Resistor

Ahmed Taha
Ahmed Taha over 9 years ago

Hi,

I have RC network, and I am running transient simulation. I would like to have one of network's resistors value to change over time.

I have input signal array to the network (Volts vs. time) and a corresponding resistor array values over time (ohm vs. time)

Is it possible to create such resistor with its value defined by that array of data over time in Cadence, Spectre?

Thanks.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    A couple of ways. One is just to use a voltage-controlled-resistor. You can use the vccs component from analogLib for this - and change the "Type of Source" to "vcr". See "spectre -h vccs" at the UNIX prompt for details.

    Another way is to set the value of the resistor via a design variable, and then use the Dynamic Parameters option on the Transient analysis form in ADE to change the value at particular times. Note however that this is not continuous - it will do a step change in the parameter values at each time you specify. 

    Clearly this second approach isn't very physical - I'm guessing you're trying to model some voltage dependent resistor, and so I'd expect the first approach would be better.

    Kind Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MonEcran
    MonEcran over 9 years ago
    Andrew, I am using the vcr method and I noticed that the vcr does not like voltage ramps. When I apply a voltage ramp to the vcr it treats it as a step (for instance I want to ramp from 1mV@0s to 1V@1ms translates to X ohms from 0s to 999us and then a jump to Y Ohms @ 1ms). Do you have any idea of what I could do to fix this? (I have tried to change my time steps but it does not change anything.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Hi Nicolas,

    Can you provide your netlist (the VCR instance and the vsource driving it, together with the tran analysis) so that I can take a look? Otherwise I'll have to guess what you've done.

    Can you also let me know which simulator version you're using? (probably doesn't matter, but easier to ask now rather than later).

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MonEcran
    MonEcran over 9 years ago

    Hi Andrew,

    Thank you for the reply.

    Here is the tool version:

    mmsim/15/15.10.385

    ic/IC617/IC_617_702

    Here is the netlist:

    // Generated for: spectre
    // Generated on: May 18 09:15:47 2016
    // Design library name: scratch
    // Design cell name: tb_nb_test_vpwl
    // Design view name: schematic
    simulator lang=spectre
    global 0
    parameters iload_high_val=1m vout_val=3.3
    include "$PDKROOT/xh035/cadence/v6_0/spectre/v6_0_3/mos/top.scs" section=all_typical

    // Library name: scratch
    // Cell name: tb_nb_test_vpwl
    // View name: schematic
    source_iload_tran (net2 vss) vsource dc=vout_val/iload_high_val type=pwl \
    pwlfilter=none wave=[ 0 (vout_val/1u) 5m (vout_val/1u) 5.001m \
    (vout_val/50m) 10m (vout_val/50m) 10.001m (vout_val/100m) 15m \
    (vout_val/100m) 15.001m (vout_val/50m) 20m (vout_val/50m) 20.001m \
    (vout_val/1u) 25m (vout_val/1u) 32.5m (vout_val/100m) 40m \
    (vout_val/1u) 45m (vout_val/1u) 45.001m (vout_val/100m) 50m \
    (vout_val/100m) 50.001m (vout_val/1u) ]
    V0 (net05 vss) vsource dc=vout_val type=dc
    source_vss (vss 0) vsource dc=0 type=dc
    G0 (net05 vss net2 vss) vccs gm=1.0 type=vcr
    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=55m write="spectre.ic" writefinal="spectre.fc" \
    annotate=status maxiters=5
    finalTimeOP 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

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Hi Nicolas,

    Everything is correct here. It's because you have a linear sweep on the controlling voltage and hence a linear sweep of the resistance - and so if you're plotting the current, that will have a 1/x response on that linear sweep.

    I added save G0:oppoint to the netlist so I could plot the G0:lx0 parameter (and hence see the resistance changing). I then computed (in the calculator) both -3.3/v("net2" ?result "tran") and -3.3/getData("G0:lx0" ?result "tran") and plotted these. You can see that these two calculated currents overlay exactly with the current from the simulator. The top strip shows both the controlling voltage and the VCR value (the lx0) - again, they overlay exactly.

    Here's a zoomed in (in the y-direction) plot of the current - you can see it is gradually changing:

    This is not surprising - if you see the last red cross (at this zoom level) before the end of the ramp down, it's at about 0.5MV, which corresponds to 0.5MOhm in the VCR. Then the current will be 3.3/0.5M which is about 6uA. The scale of the current means  you hardly see this change. If you were to change the y-axis to a log scale for the current, this would be much more evident without the need to zoom in.

    So everything is working as it should - the results are correct.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MonEcran
    MonEcran over 9 years ago
    Hi Andrew, Thank you for your reply. You are right and I am feeling really stupid right now :) Regards, Nicolas.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Hi Nicolas,

    Don't worry - when I first looked at it, I thought - that's very strange. I was just about to file this as a bug and then I wondered where the step in the current was coming from at 10ms to 15ms. Then I twigged what was going on!

    BTW, it's probably a wise idea to scale your voltages to not be in the megaVolt range - instead use typical voltages in a similar range to your supplies, and then use the gm on the VCR to convert to a resistance with the right magnitude. Big voltages (when using transient with relref=allglobal) can compromise the time step control mechanism for your typical signals). That can be improved by using relref=alllocal (e.g. errpreset=conservative) but that's more expensive for simulation.

    Regards,

    Andrew

    • 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