Home > Community > Forums > Custom IC Design > How to plot my own data in cadence

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

 How to plot my own data in cadence 

Last post Wed, Mar 9 2011 5:38 PM by loon. 3 replies.
Started by loon 07 Mar 2011 01:52 PM. Topic has 3 replies and 3507 views
Page 1 of 1 (4 items)
Sort Posts:
  • Mon, Mar 7 2011 1:52 PM

    • loon
    • Not Ranked
    • Joined on Fri, Jan 7 2011
    • Posts 8
    • Points 175
    How to plot my own data in cadence Reply

    Hi all,

             Ocean has the function plot to plot  waveform object, but can not draw other data format, for

    example a array. Now I use ocean script to create a one dimension array and want to plot it. Does

    anyone have any clue about how to plot it in cadence. Thanks!

     

    Filed under: ,
    • Post Points: 20
  • Tue, Mar 8 2011 12:32 AM

    • Marc Heise
    • Top 100 Contributor
    • Joined on Mon, May 4 2009
    • Feldkirchen, Bavaria
    • Posts 77
    • Points 1,310
    Re: How to plot my own data in cadence Reply

     Hi,

     please check the documentation for   "getAsciiWave".  It was implemented a while ago.
     It reads a table from a file which you can plot.

    Regards,

    Marc

    • Post Points: 35
  • Tue, Mar 8 2011 7:40 AM

    Re: How to plot my own data in cadence Reply

     You could also use awvPlotList() to plot from lists of data. Or you could use the drCreateWaveform and drCreateVec functions to build your own waveform functions. Here's an example of doing that:

    /* abMakeWaveform.il

    Author A.D.Beckett
    Group Custom IC (UK), Cadence Design Systems Ltd.
    Language SKILL
    Date Jul 14, 1999
    Modified Dec 10, 2007
    By A.D.Beckett

    A simple function to throw together waveforms for
    test purposes. Usage:

    abMakeWaveform('cos linRg(1 100 1)) => o_waveObj

    Returns a waveform with x axis 1 to 100, in 1 steps, with y
    axis the value of the x.

    A more complex example:

    abMakeWaveform(lambda((x) x*sin(x)) linRg(-40 40 0.1))

    Can be plotted in OCEAN using plot(var).

    Also supports the first argument being a list of y values:

    abMakeWaveform('(5 6 7) '(1 2 3))

    Note the lists must be equal length.

    An optional third argument which is the data type may be supplied,
    e.g. 'double (default) 'single etc. Finally a fourth argument
    may be given if the x-axis wants to be a different type. For example
    for bar graphs:

    abMakeWaveform('(1 -2 4) '("NOM" "SLOW" "FAST") 'double 'string)

    ***************************************************

    SCCS Info: @(#) abMakeWaveform.il 12/10/07.13:48:06 1.4

    */


    /***************************************************************
    * *
    * The generic function takes a function object, or the name of *
    * a function (a symbol) and calls that function for *
    * each of the x values. This would be nice if it could be *
    * done as a method, but the problem is that you can only *
    * have a method specialised on user defined functions, not *
    * binary functions. *
    * *
    ***************************************************************/


    (defgeneric abMakeWaveform (func xvalues @optional (yDataType 'double)
    xDataType)
    (let (xVec yVec wave)
    (setq wave (drCreateEmptyWaveform))
    (unless xDataType (setq xDataType yDataType))
    (setq xVec (drCreateVec xDataType xvalues))
    (setq yVec (drCreateVec yDataType (mapcar func xvalues)))
    (drPutWaveformXVec wave xVec)
    (drPutWaveformYVec wave yVec)
    wave
    ))

    /****************************************************************
    * *
    * A method is defined to allow the first argument to be a list, *
    * and do something different there. *
    * *
    ****************************************************************/


    (defmethod abMakeWaveform ((yvalues list) xvalues @optional
    (yDataType 'double) xDataType)
    (let (xVec yVec wave)
    (when
    (and (listp xvalues) (equal (length xvalues) (length yvalues)))
    (setq wave (drCreateEmptyWaveform))
    (unless xDataType (setq xDataType yDataType))
    (setq xVec (drCreateVec xDataType xvalues))
    (setq yVec (drCreateVec yDataType yvalues))
    (drPutWaveformXVec wave xVec)
    (drPutWaveformYVec wave yVec)
    wave
    )
    ))

    Regards,

    Andrew.

    • Post Points: 5
  • Wed, Mar 9 2011 5:38 PM

    • loon
    • Not Ranked
    • Joined on Fri, Jan 7 2011
    • Posts 8
    • Points 175
    Re: How to plot my own data in cadence Reply

     Thanks you all. 

    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by loon at 07 Mar 2011 01:52 PM. Topic has 3 replies.