• 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. Mixed-Signal Design
  3. Cross function

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 64
  • Views 20426
  • 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

Cross function

Charanraj Mohan
Charanraj Mohan over 8 years ago

Hey,

I am doing a simple DC sweep & using the cross function in the calculator, i am finding the x-axis in my sweep range for a particular y-axis value. I am also aware that cross function used here gives the user the choice for rising edge or falling edge.

My queries-

1. Is it possible to implement the same using veriloga code?

2. Actually I am changing the value of gate input of the circuit & doing the sweep to find the particular Value in x-axis & calibrate something. If I change the Value of gate in 2 decimals, for example 2.57 (say), I have no problem. But when I use a 3rd integer for example   2.575 (say), the cross function gives me a wrong result. If I calibrate for 2.58, it works. But I am unable to calibrate in between 2.57 & 2.58. Seems cross function is rounding the integer. Is it possible to have facility for the user to set this limit in veriloga code??

3. When I use 10mV step in my DC sweep, i get x (say)

   When I use 5mV step , i get x/2.

   When I use 2.5mV, i get x/4. Why is this changing ? What is the default step of limit of cross function in CADENCE IC6 calculator?? If we write this code in veriloga, can we have a provision to set this too ??

Thanks in advance

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

    What you're saying doesn't make sense. The only relationship between the step size of the DC sweep and the cross function is that with a finer step size there would be more points in the waveform and so there's likely to be smaller interpolation error as you'll have closer simulated points either side of the crossing point, and so the point where it intercepts  your cross threshold will be closer to the real crossing point. As I said before, all the cross function does is find the points either side of the threshold and linearly interpolate between them.

    To illustrate this, if I use this netlist (I used a netlist which you can run with spectre command line in order to make the testcase simple):

    //
    vin (vg 0) vsource dc=1
    vout (out 0) bsource v=sin(v(vg))

    dc dc dev=vin param=dc start=0 stop=3 step=0.3

    Run "spectre forum.scs" and then in Virtuoso type: openResults("forum.raw"). Having done that, if I then (in the CIW) type:

    cross(VDC("out") 0.5)
    cross(VDC("out") 0.51)
    cross(VDC("out") 0.52)

    you'll see the crossing points computed in the CIW. If I was to run the same with a step size of 0.1 or 0.05 in the dc analysis, the results will be different - just more accurate. It won't fundamentally change the behaviour.

    I don't understand what you mean by "I am converting ... to scalar first" - the results aren't scalar here (by the way, the function you should really use for a DC sweep is VS not VDC, but it does work in both cases).

    The only thing I can imagine is whether your circuit has some kind of hysteresis effect or multiple operating points. That ought to be evident though if you plot the waveform for VDC("/out") in your case.

    Perhaps the sensible thing is to contact customer support so that we can see your data. What you describe doesn't sound like anything I've ever seen before, so my guess is there is some kind of mistake in your setup which will be hard to diagnose over the forums.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    What you're saying doesn't make sense. The only relationship between the step size of the DC sweep and the cross function is that with a finer step size there would be more points in the waveform and so there's likely to be smaller interpolation error as you'll have closer simulated points either side of the crossing point, and so the point where it intercepts  your cross threshold will be closer to the real crossing point. As I said before, all the cross function does is find the points either side of the threshold and linearly interpolate between them.

    To illustrate this, if I use this netlist (I used a netlist which you can run with spectre command line in order to make the testcase simple):

    //
    vin (vg 0) vsource dc=1
    vout (out 0) bsource v=sin(v(vg))

    dc dc dev=vin param=dc start=0 stop=3 step=0.3

    Run "spectre forum.scs" and then in Virtuoso type: openResults("forum.raw"). Having done that, if I then (in the CIW) type:

    cross(VDC("out") 0.5)
    cross(VDC("out") 0.51)
    cross(VDC("out") 0.52)

    you'll see the crossing points computed in the CIW. If I was to run the same with a step size of 0.1 or 0.05 in the dc analysis, the results will be different - just more accurate. It won't fundamentally change the behaviour.

    I don't understand what you mean by "I am converting ... to scalar first" - the results aren't scalar here (by the way, the function you should really use for a DC sweep is VS not VDC, but it does work in both cases).

    The only thing I can imagine is whether your circuit has some kind of hysteresis effect or multiple operating points. That ought to be evident though if you plot the waveform for VDC("/out") in your case.

    Perhaps the sensible thing is to contact customer support so that we can see your data. What you describe doesn't sound like anything I've ever seen before, so my guess is there is some kind of mistake in your setup which will be hard to diagnose over the forums.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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