Home > Community > Forums > Custom IC SKILL > Plotting Y vs Y with OCEAN

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: *

 Plotting Y vs Y with OCEAN 

Last post Wed, Mar 12 2014 11:09 AM by Andrew Beckett. 5 replies.
Started by kitmonisit 25 Jun 2013 02:04 AM. Topic has 5 replies and 865 views
Page 1 of 1 (6 items)
Sort Posts:
  • Tue, Jun 25 2013 2:04 AM

    Plotting Y vs Y with OCEAN Reply
    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.
    Filed under:
    • Post Points: 20
  • Tue, Jun 25 2013 6:06 AM

    Re: Plotting Y vs Y with OCEAN Reply

    Try adding:

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

    to alter the license checkout order for ViVA.

    Regards,

    Andrew.

    • Post Points: 35
  • Tue, Jun 25 2013 7:23 AM

    Re: Plotting Y vs Y with OCEAN Reply

    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..." 

    • Post Points: 20
  • Tue, Jun 25 2013 1:44 PM

    Re: Plotting Y vs Y with OCEAN Reply

    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.

    • Post Points: 5
  • Wed, Mar 12 2014 12:28 AM

    • huoyunjie
    • Not Ranked
    • Joined on Tue, Mar 11 2014
    • beijing, Beijing
    • Posts 1
    • Points 20
    Re: Plotting Y vs Y with OCEAN Reply
    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?
    • Post Points: 20
  • Wed, Mar 12 2014 11:09 AM

    Re: Plotting Y vs Y with OCEAN Reply

    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
           )
      ) 
    

     

    • Post Points: 5
Page 1 of 1 (6 items)
Sort Posts:
Started by kitmonisit at 25 Jun 2013 02:04 AM. Topic has 5 replies.