• 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. ADE: get waveform value "closest" to a given instant (NO...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 125
  • Views 2861
  • 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

ADE: get waveform value "closest" to a given instant (NO INTERPOLATION)

jorgeluislagos
jorgeluislagos over 11 years ago

Hi all! I am having a problem in ADE while using the calculator functions to check the transient operating points of a large-signal circuit (a relaxation VCO). In my testbench, I detect the commutation instants of the circuit and evaluate the transient operating points of critical devices at the instants half-way in between. In particular, I would check the operating region of a device at time "Tmeasure" using the value() function:

value(getData("MP1:region" ?result "tran") Tmeasure)

The problem is that the value() function returns an interpolated value using the 2 timesteps closest to the specified time instant (which are not necessarily equal!). Of course, this doesn't make any sense for operating region codes, which assume discrete values. As an example, if the device went from off-state (code 0) to subthreshold (code 3) before and after time "Tmeasure", I end up reading a non-sense interpolated value like 781.2m.

Thus I need to change my formula in order not to return an interpolated value but the actual value of the waveform at the timestep closest to the specified instant (or, say, the timestep just before it). I have read the documentation on the calculator functions, but haven't found anything close to what I need. Does anybody have a clue as to how I can achieve this?

Thanks in advance for any help!

Cheers,

Jorge.

  • Cancel
  • ShawnLogan
    ShawnLogan over 11 years ago

     Hi Jorge,

     

    I  am not sure I fully appreciate why you are interested in the defined operating points at a given time. The operating states are really just arbitrary thresholds defined by the model and their exit and entry points will be highly temperature, voltage, and process related. Perhaps a different way to study the issue is to examine the terminal voltages as a function of time and use those to interpret the operating state.

     Nevertheless, there is a means to limit the value() function to a set of specific data using a SKILL function. This may be useful and may be found at URL:

    /wps/mypoc/cos?uri=deeplinkmin:ViewSolution;solutionNumber=11300426;searchHash=3804bd989ec67c12bafddc38a05632d1
     
    Shawn

     

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

    The URL was incomplete for solution 11300426. Anyway, I don't think that's what you want (I wrote that solution), as that's more to do with families of data where some of the curves in the family are missing.

    You may want something more like this:

    /* abValueHold.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Mar 25, 2014 
    Modified   
    By         
    
    Similar to value() function, but does not interpolate. 
    Gives you the "held" value of the previous point.
    Also only does the value on the inner sweep, so does
    not allow picking which variable to take the value at
    on a family curve.
    
    Potentially useful for measuring discrete values
    which do not make sense to be interpolated or any
    "sample and hold" type output.
    
    ***************************************************
    
    SCCS Info: @(#) abValueHold.il 03/25/14.09:46:29 1.1
    
    */
    
    /***************************************************************
    *                                                              *
    *                   (abValueHold wave xVal)                    *
    *                                                              *
    *   Compute the value at the x-point at or just before xVal    *
    *                    with no interpolation.                    *
    *                                                              *
    ***************************************************************/
    
    (defun abValueHold (wave xVal)
      (cond 
        ((drIsWaveform wave)
         (let (xVec yVec len (ind 0) lst)
           (setq xVec (drGetWaveformXVec wave))
           (setq len (drVectorLength xVec))
           (setq yVec (drGetWaveformYVec wave))
           (setq lst (drGetElem yVec ind))
           (while (and (lessp ind len)
                       (geqp xVal (drGetElem xVec ind)))
                  (setq lst (drGetElem yVec ind))
                  (postincrement ind)
                  )
           lst
           ))
        ((famIsFamily wave)
         (famMap 'abValueHold wave xVal))
        (t
          (error "abValueHold: can't handle %L\n" wave))
        )
      )
    Regards,

     

    Andrew.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jorgeluislagos
    jorgeluislagos over 11 years ago

    Thanks so much for the replies, Shawn and Andrew; the function abValueHold() is exactly what I was looking for!

    Cheers,

    Jorge.

    • 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