Generate X versus Y plot with OCEAN or Skill (example Eyediagram)

Discussion in 'Cadence' started by Fritz Lange, May 14, 2004.

  1. Fritz Lange

    Fritz Lange Guest

    Hy,

    Does somebody know how to setup a X versus Y Plot in OCEAN or Skill?

    I want to generate a Eye diagram automatically
    For that I need to plot on the X-Axis a Sawtooth signal instead of the time
    axis

    I searched in the online help documents, but I found nothing.


    Thanks for any help


    Best regards

    Norman
     
    Fritz Lange, May 14, 2004
    #1
  2. Fritz Lange

    S. Badel Guest

    In the Waveform Window, setup the X-axis
    to another variable.
    I don't remember the exact menu commands
    right now but you shouldn't have trouble
    doing this.

    Using the waveform function you can certainly
    do this in skill (awe* functions i guess).

    stéphane
     
    S. Badel, May 14, 2004
    #2
  3. Hi Norman,

    The first thing to say is that there is an eyeDiagram function in IC50, based on
    some code I wrote a while back, which may do what you want.

    Secondly, to do an X versus Y in SKILL, you can use:

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

    Regards,

    Andrew.
     
    Andrew Beckett, May 14, 2004
    #3
  4. Fritz Lange

    Fritz Lange Guest

    Hi Andrew,

    Unfortunately I don't have the possibility to work with IC50.

    But your SKILL function is maybe the beginning of a solution to my problem.

    I works very well when I use normal waveform expressions like

    XPLOTVAL= v("/XOUT")
    YPLOTVAL=v("/SIGNALOUT")
    plot(abChangeXAxis(YPLOTVAL XPLOTVAL) )

    for example

    But when I try to use your procedure in combination with the clip function
    like

    XPLOTVAL= clip(v("/XOUT") 400n 1u)
    YPLOTVAL=clip(v("/SIGNALOUT") 400n 1u)
    plot(abChangeXAxis(YPLOTVAL XPLOTVAL) )

    it doesn't work anymore

    I tried to puzzle out how to fix your routine to get it working with the
    clip command, but I lack of the know-how in SKILL programming to do this in
    an acceptable time.

    To you have a clue?

    Best regards

    Norman
     
    Fritz Lange, May 17, 2004
    #4
  5. Hi Norman,

    Apologies for the delay on getting to this one - I'd just not had a chance to
    experiment.

    Anyway, for me it worked...

    I ran the following simulation:

    // eye diagram tester
    v1 (1 0) vsource type=sine freq=1M ampl=1 damp=10k
    v2 (2 0) vsource type=pulse rise=999n fall=1n width=0 period=1u
    r1 (1 0) resistor r=1k
    r2 (2 0) resistor r=1k

    tran1 tran stop=100u maxstep=10n

    And then did the following OCEAN script:

    load("abChangeXAxis.il")
    simulator('spectre)
    openResults("./eye.raw")
    selectResults("tran1-tran")
    c=abChangeXAxis(v("1") v("2"))
    plot(c)
    newWindow()
    d=clip(v("1") 40u 80u)
    e=clip(v("2") 40u 80u)
    f=abChangeXAxis(d e)
    plot(f)

    and everything worked OK (in IC446 too).

    Andrew.
     
    Andrew Beckett, Jun 3, 2004
    #5
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.