• 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 20404
  • 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
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    This is rather confusing - so some answers to your questions (as best as I can given my understanding of what you're doing):

    1. There is @(cross...) in Verilog-A but this only works with transient, so that won't help you. You could use @(above...) instead. This would normally control time steps to ensure the event is resolved accurately, but that wouldn't happen with a dc sweep - it won't insert additional sweep points.
    2. This makes no sense. The cross function just interpolates between the points, so I can't see how it can do this - it's not rounding any integers. My guess is that something else is at work here and maybe you're misinterpreting the symptoms that you see?
    3. I don't understand this either. There is no "step of limit" - it just does a floating point interpolation between the points either side of the threshold.

    If you can't share data to reproduce this problem here, customer support is your best bet.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Charanraj Mohan
    Charanraj Mohan over 8 years ago
    Thanks Andrew.
    I understand, for
    1. I think no cross function in veriloga in DC sweep
    2. I am using the expression (vg -cross(VDC(“/out”) 2.4 1 “either” nil nil) to find a result. Say, i am sweeping my DC from 0 to VDD in step size of 10mV. I am converting signal /out to scalar first & then finding the x-axis (DC sweep) value exactly when my y-axis (or output) is 2.4 using cross function & then subtracting it from vg. There is no problem when vg is 2.4 or 2.45 or 2.46. I am pretty sure that the result when vg is 2.455 should be in between the results of vg=2.45 & vg=2.46. But it gives me very less results. For example, if I get in mV range for vg=2.45 & vg=2.46, i get microvolt results in vg=2.455. Then I have to tune the step size of DC sweep to make it fall in between these results.

    For example, the above expression gives me --> 2.35mV if vg=2.45 V & 2.4mV if vg=2.46 V when I sweep DC in 10mV step size, i need to tune the step size for vg=2.455 & finally, I see the result for vg=2.455 settles in between 2.35mV & 2.4mV when step size is 12.3345mV (say).

    To put it very short--> why do we need to tune the step size for cross function when the input has 3 decimals ??

    3. Seems that there is a relation between step size of DC sweep & cross function. For every half of step size the result using cross function expression also gets halved.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • 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
  • Charanraj Mohan
    Charanraj Mohan over 8 years ago
    Hi Andrew,
    Thanks a lot

    Yes, the waveform, '/out' is similar to hysteresis, in which i have +/-3sigma for the range of values of vg in the above expression. So, when i change vg I am picking one of the operating point in +/-sigma & doing a cross function operation & subtracting it from the reference, vg.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Charanraj Mohan
    Charanraj Mohan over 8 years ago
    Hi sorry, I am picking one of the operating points in +/-3sigma
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Charanraj Mohan
    Charanraj Mohan over 8 years ago

    Hey,

     I just sorted the issue. If I use a 3rd decimal, then the cross function is not crossing, but jumping. So, I have to start the DC sweep from 0.00a, where a is the 3rd decimal.

    • 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