• 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. Customized histogram for MC

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 125
  • Views 15733
  • 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

Customized histogram for MC

RAO VINAY
RAO VINAY over 10 years ago

Hi all,

I am using IC614.500.12 with ADEXL. I have designed a current reference with resulting current is around 1uA. I ran MC for 1000 runs with sigma=3. Out of 1000, 991 samples are having the values ranging from 900nA to 1130nA. Rest 8 samples fell far outside of this range, few are near to zero and few are near to 50uA. Because of those 8 samples, the ranges of 991 samples are not visible properly or all those 991 samples fell in a single bin. I have selected bin size as 50. My question is

1> How to make a multiple distinct clearly visible bin for those 991 samples by discarding those unwanted 8 samples ?

2> How one can make to have a particular bin which is exactly at mean value (to see how many samples are falling near to mean value)?

Thanks and regards,

Vinay Rao.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    Hi Vinay,

    There is currently no way to exclude outliers from the histogram. There is an enhancement CCR for this, 1158568. Some capability was added in IC616 ISR6 to filter evaluation and simulation errors from the yield and histogram data (you can access this by Right Mouse Button menu over the Error column in the Yield view, or in the grey bar at the top of the yield view), but nothing to set limits. Hopefully this will be added in IC617 when we add some more generic filtering capability (hopefully).

    You also cannot set a bin to be in a specific place. You sort of could do this in the past with the old histo function (replaced in IC616 with histogram2D) which allowed you to set the min and max and the number of bins. The function still works, but is going to be removed in a future release. It sort of allows filtering of results too - but it's a bit clunky.

    Anyway, one way to solve this would be to use the SKILL code below. Load this code from your .cdsinit, and then plot the histogram as normal from ADE XL. Then over the name of the signal in the waveform tool, do Right Mouse->Send to Calculator. You'll end up with an expression something like this in the calculator:

    histogram2D((statGetWaveform "Current_C3_0" nil ?resDbFile axlGetHistoryResults(axlGetCurrentHistory(_vivaGetSessionName())) ?testName "AC" ?filtPointsList "") 10 "standard" "stddev" t)

    Around the (statGetWaveform ...) bit, insert abFilterByValue (highlighted in red):

    histogram2D(abFilterByValue((statGetWaveform "Current_C3_0" nil ?resDbFile axlGetHistoryResults(axlGetCurrentHistory(_vivaGetSessionName())) ?testName "AC" ?filtPointsList "") 2.1m 4.5m) 10 "standard" "stddev" t)

    The two numbers are the min and max values for your filter. Alternatively you could strip off everything but the (statGetWaveform...) call, add the abFilterByValue around it, and then use the histogram2D function in the calculator to reconstruct the histogram - and then you can plot this from the calculator.

    A bit manual, but hopefully good enough for now until we build this in properly.

    Kind Regards,

    Andrew.

    /* abFilterByValue.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Feb 02, 2015 
    Modified   
    By         
    
    Filter outliers from a waveform (by value). Useful for histogram
    plotting. For example:
    
    abFilterByValue((statGetWaveform "Current_C3_0" nil ?resDbFile 
        axlGetHistoryResults(axlGetCurrentHistory(_vivaGetSessionName())) ?testName "AC" ?filtPointsList "") 
        8.29m 8.295m
    )
    
    ***************************************************
    
    SCCS Info: @(#) abFilterByValue.il 02/02/15.11:27:19 1.1
    
    */
    
    /**********************************************************************
    *                                                                     *
    *                   (abFilterByValue wave min max)                    *
    *                                                                     *
    * Filter a waveform by value. If any points are outside the range min *
    *         to max, they are omitted from the output waveform.          *
    *                                                                     *
    **********************************************************************/
    
    (defun abFilterByValue (wave min max)
      (cond
        ((drIsWaveform wave)
         (let (xVec yVec newXVec newYVec val len newWave)
           (setq xVec (drGetWaveformXVec wave))
           (setq yVec (drGetWaveformYVec wave))
           (setq len (drVectorLength xVec))
           (setq newXVec (drCreateVec (drType xVec) len))
           (setq newYVec (drCreateVec (drType yVec) len))
           (for i 0 (sub1 len)
                (setq val (drGetElem yVec i))
                (when (and
                        (or (null max) (leqp val max))
                        (or (null min) (geqp val min)))
                  (drAddElem newXVec (drGetElem xVec i))
                  (drAddElem newYVec val)
                  )
                )
           ;-----------------------------------------------------------------
           ; Set the units, name and expression attributes
           ;-----------------------------------------------------------------
           (putpropq newXVec (getq xVec units) units)
           (putpropq newXVec (getq xVec name) name)
           (putpropq newYVec (getq yVec units) units)
           (putpropq newYVec (getq yVec name) name)
           (setq newWave (drCreateWaveform newXVec newYVec))
           (famSetExpr newWave `(abFilterByValue ,(famGetExpr wave) ,min ,max))
           newWave
           )
         )
        ((famIsFamily wave)
         (famMap 'abFilterByValue wave min max)
         )
        (t
          (error "abFilterByValue: cannot handle %L\n" wave)
          )
        )
      )
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RAO VINAY
    RAO VINAY over 10 years ago

    Thanks a lot Andrew. This script works well.

    Regards,

    Vinay.

    • 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