eye diagram (Cadence 4.6)

Discussion in 'Cadence' started by Frank Nitsche, Mar 31, 2005.

  1. Hello everyone,

    can anyone help me to find a skill code for creation of an eye diagram
    out of transient waveforms or signals. I think it was a simple
    expression for the waveform calculator to generate an eye diagram but I
    can't remember.

    Best regards

    Frank Nitsche, Mar 31, 2005
    1. Advertisements

  2. I have some code for this. I'll post it here tomorrow. My code became the
    basis of the IC50 eyeDiagram function. I'm off home now, otherwise I'd do it

    Andrew Beckett, Mar 31, 2005
    1. Advertisements

  3. Here's the code.

    /* abEyePlot.il

    Author A.D.Beckett
    Group Custom IC (UK), Cadence Design Systems Ltd.
    Language SKILL
    Date Aug 07, 1998
    Modified A.D.Beckett
    By Jun 05, 2003

    The function eyePlot() does all the work. Note - this doesn't
    have a prefix, for convenience.

    Use abRegEyePlotSpecialFunction() to register the special function
    in 4.4.X, or abRegEyePlotSpecialFunction(t) to register it in 4.3.4

    Updated to correct problem with IC445 on HPUX 11.0

    Version 1.3 uses private famIsFamily() and famMap() functions
    to support families.

    Note that this code has been integrated in IC50 as eyeDiagram().


    SCCS Info: @(#) abEyePlot.il 10/03/03.16:25:29 1.3


    * *
    * (abCreateEyePlotForm) *
    * *
    * Create the form for the calculator function *
    * *

    (procedure (abCreateEyePlotForm)
    (let (start stop period)
    (setq start (ahiCreateStringField
    ?name 'start
    ?prompt "Start Time"
    ?value "0"
    (setq stop (ahiCreateStringField
    ?name 'stop
    ?prompt "Stop Time"
    ?value "0"
    (setq period (ahiCreateStringField
    ?name 'period
    ?prompt "Period"
    ?value ""
    (list (list start 0:0 180:20 90)
    (list stop 0:30 180:20 90)
    (list period 0:60 180:20 90)

    * *
    * (abEyePlotSpecialFunctionCB) *
    * *
    * The callback function which actually creates the special function *
    * *

    (procedure (abEyePlotSpecialFunctionCB)
    ?formSym 'abEyePlotForm
    ?formInitProc 'abCreateEyePlotForm
    ?formTitle "Eye Plot"
    ?formCallback "calSpecialFunctionInput( 'eyePlot '(start stop period))"

    * *
    * (abRegEyePlotSpecialFunction @optional in434?) *
    * *
    * Register the special function. Pass t as argument if you're *
    * using 4.3.4. 4.4.X doesn't need this. *
    * *

    (procedure (abRegEyePlotSpecialFunction @optional in434?)
    (when (and in434? (null (armGetCalc 'initialized)))
    (list "eyePlot" 'abEyePlotSpecialFunctionCB))

    * *
    * (eyePlot waveform period @optional (start 0) (stop 0) debug) *
    * *
    * Function which produces the eyePlot waveform. The waveform you're *
    * analysing is passed, together with the period, start time, and *
    * stop time. If start time is 0 or less, the start time of the waveform *
    * is used. Similarly, if the stop time is 0, the end time of the waveform *
    * is used. debug is a flag to print some debugging info. *
    * *
    * A single waveform is used to represent the results. It contains *
    * "invalid" values for X and Y (-1.7e37) to hide the "flyback". Artist *
    * doesn't plot these values. The flyback value was changed to -2.0e37 *
    * since IC445 on HPUX 11.0 shows the flyback with the old value (for some *
    * strange reason!) *

    (procedure (eyePlot waveform start stop period @optional debug)
    ; Handle ordinary waveform
    ((drIsWaveform waveform)
    (let (xVec yVec outXVec outYVec len startOfPeriod endOfPeriod time
    (invalidValue -2.0e37))
    (setq xVec (drGetWaveformXVec waveform))
    (setq yVec (drGetWaveformYVec waveform))
    (setq len (drVectorLength xVec))
    ; if no start given (start less or equal to 0), use first time point
    (when (leqp start 0)
    (setq start (drGetElem xVec 0)))
    ; if no stop given (stop less or equal to 0), use last time point
    (when (leqp stop 0)
    (setq stop (drGetElem xVec (sub1 len))))
    ; cast everything to floats, just to make sure
    (setq start (float start))
    (setq stop (float stop))
    (setq period (float period))
    (when debug
    (printf "Start time %g\nStop time %g\nPeriod %g\n"
    start stop period))
    (if (greaterp stop start)
    ; create the output vectors
    (setq outXVec (drCreateVec (drType xVec) len))
    (setq outYVec (drCreateVec (drType yVec) len))
    (setq startOfPeriod start)
    (setq endOfPeriod (plus start period))
    (for point 0 (sub1 len)
    (setq time (drGetElem xVec point))
    (when (and (geqp time start) (leqp time stop))
    (when (greaterp time endOfPeriod)
    (setq startOfPeriod endOfPeriod)
    (setq endOfPeriod (plus endOfPeriod period))
    (drAddElem outXVec invalidValue)
    (drAddElem outYVec invalidValue)
    (drAddElem outXVec (difference time startOfPeriod))
    (drAddElem outYVec (drGetElem yVec point))
    (drCreateWaveform outXVec outYVec)
    (error "Start time must be before stop time\n")
    ) ; waveform
    ; Handle family
    ((famIsFamily waveform)
    (famMap 'eyePlot waveform start stop period debug)
    ) ; family
    (error "eyePlot - can't handle %L\n" waveform)
    ) ; cond
    Andrew Beckett, Apr 7, 2005
  4. Note, I've not updated the comments. These functions are no longer private. I
    filed a PCR recently asking for them to be made public, and they'll be
    documented before too long.

    Andrew Beckett, Apr 7, 2005
  5. Thank you Andrew, it works in the best way.

    Best regards

    Frank Nitsche, Apr 11, 2005
  6. Frank Nitsche

    John Gianni Guest

    SKILL programmers please take note of Andrew's habits above!
    Follow Andrew's lead.

    a) Write your SKILL program.
    b) Run a SKILL Survey (now part of #900 SKILL Development Environment).
    c) If the survey points out private functions ... fix 'em!

    That is:
    Contact Cadence to begin the private function resolution process.

    - Ask to confirm the status of the function (as Andrew did above);
    - Ask for the function to be declared public (then documented);
    - Ask for an existing equivalent public function (if possible);
    - Ask for the source code to the function (if reasonable);
    - Ask for the FUNCTIONALITY required (if all else above fails).

    Using this private-function resolution process, out of about 5000
    private functions found in Customer code over the past 5 or so years,
    about 500 or so were entered into this process; and as of a year ago,
    only 12 (layerAnd, LayerOr, layerNot, etc. functions) were not resolved
    to the Customers' satisfaction. Today, even those 12 layerXXX functions
    were resolved (they were totally rewritten).

    Since this private function resolution process takes time (years in the
    case of the layerXXX booleans), the time to start the process is NOW.

    My recommendation for you TODAY!
    1. Run a completely automatic SKILL Survey of your IL code.
    - CIW->Tools->SKILL Development->SKILL Survey
    2. Save the wonderful INVENTORY results for your own needs.
    - misspelled, changed, deleted, dependency functions, etc.
    3. If any private functions result, start the resolution process.
    - This keeps your SKILL working longer & migrating easier to new s/w
    John Gianni, Apr 26, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.