• 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. using the switch in the analoglib

Stats

  • Locked Locked
  • Replies 13
  • Subscribers 125
  • Views 57290
  • 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

using the switch in the analoglib

Iaf22
Iaf22 over 6 years ago

Hello, i'm trying to use the ideal switch (relay) from cadencelib to create a 50MHz clock signal from a variable DC power supply. I have connected the relay with a vsource with the required frequency and set the switch open to 0v and close to 3.3v and the vsource with a pulse of 20MHz from 0 to 3.3v. Now whenever i simulate it i get the same dc voltage on the input and not the required clock. Does anyone know why this is happening?

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago

    This is because the output is floating (there's no load resistance). So the output is always connected to the input ramp source, either via a 1ohm or a 1Tohm resistance, and so it just follows the input.

    Add (say) a 1Gohm resistor to ground from the clk node, and then it will do as you expect:

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Iaf22
    Iaf22 over 6 years ago in reply to Andrew Beckett

    thanks a lot. is there also a way to use a behavioral voltage source? like multiplying the zero value (0*VDD) and the one (1*VDD). i tried doing it with a vsource but it recognized the vdd as a variable

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Iaf22

    You could use either a pvcvs (either pvcvs2 or pvcvsp with the number of inputs set to 2) to multiply the inputs, and then you'd set the Max Coefficient number to 4, and enter 0 for all of the coefficients except Poly Coeff 4 which would be 1 (or maybe 1/3.3 if you want to treat the clock as 0 or 1 and it's actually 0 and 3.3). See "spectre -h pvcvs" to see how this works.

    Alternatively you could use bsource from analogLib and in the expression to V(i1)*V(i2)/3.3 (I had my two input nets labelled i1 and i2, so you'd change the expression to match whatever node names you have).

    I think the pvcvs is a little more efficient, but in reality this is not going to significantly impact the performance anyway.

    Andrew.

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Iaf22
    Iaf22 over 6 years ago in reply to Andrew Beckett

    thanks again. adding 1 to coeff 4 means i'm having the coeff of the 4th polynomial multiplied by 1, doesn't that mean that i'm multiplying it by x^3? and will it generate current or voltage? where i can find the "spectre -h pvcvs" ?

    for your second suggestion did you mean vsource? what would be the input nets? i got somehow confused

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Iaf22

    Given that there are two inputs, the coefficients work this way:

    F = c0 + c1 * a1 + c2 * a2 + c3 * a1^2 + c4 * a1 * a2 + c5 * a2^2

    Where a1 and a2 are the two input voltages. You can type "spectre -h pvcvs" in a UNIX terminal window (assuming spectre is in  your search path, which normally it would be if you can run it from virtuoso). It's also covered in the spectre documentation - in a Virtuoso window, go to the Help menu in any window and then in the type-in search box (assuming you're not using really old Virtuoso version) you can type "pvcvs" and you'll find the documentation.

    I did mean "bsource" not "vsource". This is a "behavioral source" and is a separate component in analogLib. This was added in IC617 ISR6 (so Help->About will show at least IC6.1.7-64b.500.6 or ICADV12.1-64b.500.6). The component has been in spectre for years, but only available in analogLib since this version. If you're using an older IC version, then you could access it via this article:  How to have a symbol corresponding to spectre's bsource component which was something I developed to provide a similar component before it was added to analogLib.

    Regards,

    Andrew.

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Iaf22
    Iaf22 over 6 years ago in reply to Andrew Beckett

    aha ok  so i will be multiplying my 2 inputs by 1 but i only have the vdd as an input and i suppose if i connect the other input ground i will get always 0 on the output?

    Actually i have IC6.1.6 and can't access the article as i don't have the reference key of cadence right now

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Iaf22
    Iaf22 over 6 years ago in reply to Iaf22

    oh i think i just misinterpreted it. one input will be vdd and the second will be the pulsed voltage source?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Iaf22

    Hmm - I must have misunderstood you. I thought you had two time-varying inputs. If you only have a single time-varying input and then a voltage to multiply by, you could just use "vcvs" and set the gain to VDD (if VDD is a variable). Not clear what you're actually doing (you had a ramp in your original example for one of the inputs, and a pulse for the other). If "vdd" is a net name then  you could use the pvcvs approach and have one input as a constant voltage and the other as a pulsed source.

    Just seen you replied whilst I was typing this, so hopefully this answers that question too?

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Iaf22
    Iaf22 over 6 years ago in reply to Andrew Beckett

    what i'm trying to do is making a clock signal with a 50MHz frequency but its amplitude varying with VDD changes that's why i used the "vsource" for the switch. The problem with the switch is that it's connected to a D-flipflop so i had to put another load which doesn't give a perfect clock signal. so i will try this "pvcvs" approach with vdd and another pulsed source

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Iaf22

    OK, I understand. That makes sense - so pvcvs is probably the simplest choice as it doesn't need any other component to be added.

    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