Home > Community > Forums > Custom IC Design > ADE: get waveform value "closest" to a given instant (NO INTERPOLATION)

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

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

Last post Tue, Mar 25 2014 10:18 AM by jorgeluislagos. 3 replies.
Started by jorgeluislagos 24 Mar 2014 02:03 PM. Topic has 3 replies and 331 views
Page 1 of 1 (4 items)
Sort Posts:
  • Mon, Mar 24 2014 2:03 PM

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

    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.

    Filed under: , ,
    • Post Points: 20
  • Mon, Mar 24 2014 2:21 PM

    • smlogan
    • Top 75 Contributor
    • Joined on Tue, Jun 10 2014
    • Posts 105
    • Points 1,800
    Re: ADE: get waveform value "closest" to a given instant (NO INTERPOLATION) Reply

     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:

     

    • Post Points: 20
  • Tue, Mar 25 2014 2:49 AM

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

    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.

     

    • Post Points: 5
  • Tue, Mar 25 2014 10:18 AM

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

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

    Cheers,

    Jorge.

    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by jorgeluislagos at 24 Mar 2014 02:03 PM. Topic has 3 replies.