• 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. Plotting Y vs Y with OCEAN

Stats

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

Plotting Y vs Y with OCEAN

kitmonisit
kitmonisit over 12 years ago
The following code is the plotting part of my OCEAN script. vds and gmbs are previously defined variables which can be plotted.

win = newWindow()
wv = ocnYvsYplot(?wavex vds ?wavey gmbs)
ocnSetAttrib(?XAxisLabel 'vds ?YAxisLabel 'gmbs ?yNumber 1 ?stripNumber 1)
 
The Problem:
I get a dialog box titled "ChangeMode", which says "Licence Virtuoso_Visual_Analysis_XL not available. Would you like to run Analog_Design_Environment_L license?". I click Yes.
 
But now the X and Y axis labels are not what I want them to be. I think the ocnSetAttrib line gets passed over because of the license checkout glitch.
  • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Try adding:

    envSetVal("wavescan.application" "VIVALicenseCheckoutOrder" 'string "ADE,VIVA")

    to alter the license checkout order for ViVA.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • kitmonisit
    kitmonisit over 12 years ago

    Thanks, that fixed it.

    One more question: how do I rename the trace label, as seen in the legend rows? At this point it looks like "getData("M0.m1:gmbs" ?results..." 

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

    For example:

    net51=getData("net51" ?result 'tran)
    net25=getData("net25" ?result 'tran)
    drGetWaveformYVec(net51)->expression='net51
    drGetWaveformYVec(net25)->expression='net25
    ocnYvsYplot(?wavex net51 ?wavey net25)

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • huoyunjie
    huoyunjie over 11 years ago
    hi Andrew: I have a question about using ocnYvsYplot(). My cadence version is 5141. I can't use ocnYvsYplot(). When i use ocnHelp(), I can't find ocnYvsYplot(). Can you help me?
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    It's in IC5141, at least in the latest hotfix (I didn't go back and check). It's in the documentation, and help(), but not in ocnHelp:

    > help(ocnYvsYplot)
    Loading skillDev.cxt
    Consulting cdsFinder database (may take a while) ...

    ocnYvsYplot([?wavex o_wavex ?wavey o_wavey] [?exprx o_exprx ?expry
    o_expry] [?title l_titleList] [?color l_colorList])
    => wave / nil

    Plots a wave against another wave or an expression against another
    expression.
    t

    I guess as an alternative, you could use this:

    /* abChangeXAxis.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       May 25, 1999 
    Modified   May 21, 2002 
    By         A.D.Beckett
    
    Function to change the X Axis of a waveform to the corresponding
    Y values of the second variable.
    
    Also function to transpose the X and Y axes of a waveform.
    
    Now handles families, and can be registered as a special function.
    Just call:
    
    abRegChangeXAxis()
    
    to add to the calculator.
    
    ***************************************************
    
    SCCS Info: @(#) abChangeXAxis.il 11/27/08.09:59:36 1.3
    
    */
    
    /*******************************************************************
    *                                                                  *
    *                    (abChangeXAxis yVar xVar)                     *
    *                                                                  *
    * Return a new waveform object with the x axis set to the y values *
    *                     of the second argument.                      *
    *                                                                  *
    *******************************************************************/
    
    (procedure (abChangeXAxis yVar xVar)
      (let (newWave)
        (cond
          ;------------------------------------------------------------------
          ; Handle normal waveform
          ;------------------------------------------------------------------
          ((drIsWaveform yVar)
           (setq newWave (drCreateEmptyWaveform))
           (drPutWaveformXVec newWave (drGetWaveformYVec xVar))
           (if (eq (drGetWaveformXVec yVar) (drGetWaveformXVec xVar))
             ;---------------------------------------------------------------
             ; if the x axes are the same for both, it's simple
             ;---------------------------------------------------------------
             (drPutWaveformYVec newWave (drGetWaveformYVec yVar))
             ;---------------------------------------------------------------
             ; otherwise need to use value() to interpolate
             ;---------------------------------------------------------------
             (let (xVec yVec len)
               (setq xVec (drGetWaveformXVec xVar))
               (setq len (drVectorLength xVec))
               (setq yVec (drCreateVec (drGetWaveformYType yVar) len))
               (for ind 0 (sub1 len)
                    (drAddElem yVec (value yVar (drGetElem xVec ind)))
                    )
               (drPutWaveformYVec newWave yVec)
               )
             )
           newWave
           )
          ;------------------------------------------------------------------
          ; Handle family
          ;------------------------------------------------------------------
          ((famIsFamily yVar)
           (famMap 'abChangeXAxis yVar xVar)
           ) ; is family
          (t
            (error "abChangeXAxis - can't handle %L\n" yVar)
            )
          ) ; cond
        ) ; let
      ) ; defun
    
    /**********************************************************************
    *                                                                     *
    *                         (abRegChangeXAxis)                          *
    *                                                                     *
    * Registers abChangeXAxis as a new special function in the calculator *
    *                                                                     *
    **********************************************************************/
    
    (procedure (abRegChangeXAxis)
      (calRegisterSpecialFunction
        (list "abChangeXAxis" 'abChangeXAxisCB)
        )
      t
      )
    
    /***************************************************************************
    *                                                                          *
    *                            (abChangeXAxisCB)                             *
    *                                                                          *
    * Callback function for the special function - which builds the expression *
    *                                                                          *
    ***************************************************************************/
    
    (procedure (abChangeXAxisCB)
      (calSpecialFunctionInput 'abChangeXAxis '(STACK))
      )
    
    /***************************************************************
    *                                                              *
    *                     (abTransposeXY var)                      *
    *                                                              *
    *             Swap the X and Y axes of a variable              *
    *                                                              *
    ***************************************************************/
    
    (procedure (abTransposeXY var)
      (let (newWave)
           (setq newWave (drCreateEmptyWaveform))
           (drPutWaveformXVec newWave (drGetWaveformYVec var))
           (drPutWaveformYVec newWave (drGetWaveformXVec var))
           newWave
           )
      ) 
    

     

    • 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