• 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. How to plot one signal versus another in ViVa (to get an...

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 125
  • Views 13601
  • 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

How to plot one signal versus another in ViVa (to get an eye diagram)

azde
azde over 10 years ago

The eye diagram tool is inadequate - it needs to make the x-axis the UI - unit interval, rather than time. 

So, I generate a waveform that is a sawtooth and rises from 0 to 1 in the period of the signal whose eye I'm interested in. (and falls back to 0 in 1 ns, effectively giving me a time base)

Now, I want to plot the DUT output against this sawtooth to get an eye.

How? The Y vs Y is not very helpful. (accessed through right click on the x-axis - generates junk)

Any help would be great.

Thanks!

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    Well, that worked for me - the issue is that you'll get a flyback drawn from the end of each period back to the beginning of the next - maybe that's why it is messy?

    Anyway, an alternative would be to use the code below. If I have a signal called "jitter", which has a period of 80n, then if I do:

    abChangeXAxis(v("jitter" ?result "tran") xval(v("jitter" ?result "tran"))/80n)

    and then use the Eye Diagram to produce an eye with a period of 1, it will effectively do what you want. The code will produce a waveform where the X-axis has been scaled to give UI as the time-axis, and then an eye diagram of that would do what you expect (although it's still reported as time). That could be addressed by doing:

    procedure(abWaveVsUI(wave period)
      let((newX yVec)
        newX=xval(wave)/period
        yVec=drGetWaveformYVec(newX)
        yVec->units="UI"
        yVec->name="UI"
        abChangeXAxis(wave newX)
      )
    )

    This alters the axis properties so that they now in units of UI (and the axis is called UI for completeness too).

    Anyway, here's the code for abChangeXAxis:

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

    Regards,

    Andrew.

    • 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