• 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 SKILL
  3. Traversing the sweeps of a family of waveforms to calculate...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 16265
  • 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

Traversing the sweeps of a family of waveforms to calculate the max turn-on time

Curtisma
Curtisma over 7 years ago

Hello:

I am trying to make a turn-on time measurement on a transient voltage.  This measures how long it takes for a certain voltage to reach a certain Y-value threshold, Yth.  However I would like to create a function that can take a family of waveforms (set of corners) and give me the maximum of the turn-on times over the family of waveforms.  Here is what I have so far with comments explaining how I would like the function to work:

;apGetMaxTurnOn(famIn tmin tmax Yth)
; INPUTS
; famIn - wave or family of waves to measure the turn-on time.
; tmin - minimum time
; tmax - maximim time
; Yth - Y value threshold to get the period.
; Returns a list with the following elements
; '(maxWaveform maxT cornerInfo)
; maxWaveform: Waveform object with the max turn-on period
; maxT - Max turn-on period
; cornerInfo - A list with the corner information. One entry for each sweep name in the family of curves.
; EXAMPLE
; ; Calculate the max turn-on time to 1.5v for famIn which is between 0us and 20us
; turnOnList = apGetMaxTurnOn(nthelem(6 out) 0 20u -2.5)
procedure(apGetMaxTurnOn(famIn tmin tmax Yth)
let(()
xVal=cross(clip(famIn tmin tmax) Yth 1 "either" nil nil nil )
;xVal=cross(nthelem(6 out) -2.5 1 "either" nil nil nil )
when(drIsWaveform(xVal)
1 ; TO DO: Return the turn-on list for the turn-on time of the single waveform
)
when(famIsFamily(xVal)
1 ; TO DO: Return the turn-on list list as described above for the trace with the max turn-on time
))
)

I have figured out how to get to the data by  repeatedly using drGetWaveformYVec and drGetElem:

Note: xVal is a family of waveforms with the lowest waveform in the sweep hierarchy having the turn-on period for one of the traces.

drGetElem(drGetWaveformYVec(drGetElem(drGetWaveformYVec(drGetElem(drGetWaveformYVec(xVall) 0)) 0)) 0)

However I would like the function to work with any number of sweep parameters but I'm not sure how to traverse an unknown number of sweep parameters.  If I knew the number of sweep parameters I could use a nested loop, however the family of waveforms that is input to the function could have an arbitrary number of sweeps. 

What's the best way to traverse a family of waveforms to calculate the max turn-on period?  Could you please provide some example code?

I am using IC6.1.7.

-Curtis

  • Cancel
Parents
  • Curtisma
    Curtisma over 7 years ago
    Hey Andrew,

    Thanks for the suggestion, it certainly looks much simpler. How would I also get the waveform object and wave index which has this max turn-on?

    I need the waveform so I can add a marker to a plot of the waveform that marks the location of the worst case turn-on time. Actually I suppose in the end I need the wave index to supply to awvPlaceWaveformLabel. I assume that I would need to get the sweep (corner) information from the waveform and then find the wave index based on that sweep (corner) information.

    -Curtis
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Curtisma
    Curtisma over 7 years ago
    Hey Andrew,

    Thanks for the suggestion, it certainly looks much simpler. How would I also get the waveform object and wave index which has this max turn-on?

    I need the waveform so I can add a marker to a plot of the waveform that marks the location of the worst case turn-on time. Actually I suppose in the end I need the wave index to supply to awvPlaceWaveformLabel. I assume that I would need to get the sweep (corner) information from the waveform and then find the wave index based on that sweep (corner) information.

    -Curtis
    • 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