Accessing monte carlo data from ocean

Discussion in 'Cadence' started by Svenn Are Bjerkem, Nov 8, 2004.

  1. Hi,

    I wanted to write a function to extract the envelope of a monte carlo
    simulation.

    Pseudo code:
    Output of circuit is Y(f)
    Final table is ymax(f) maximum at a given freq
    Final table is ymin(f) minimum at a given freq

    for each run in montecarlo run
    for each frequency of run
    check if Y(f) < ymin(f) or Y(f) > ymax(f)
    store/replace ymin(f) or ymax(f) with Y(f) if true
    end
    end
    end

    After this run I am supposed to have two tables ymin(f) and ymax(f) that
    are waveforms describing the lowest and highest values at each frequency.

    My problem is that
    value(VF("/aol2_outp") 'montecarlo 1.0)
    returns a wave object and not a list because ocean also wants to return
    the temperature. With ocnPrint() I get some descriptive text at the
    beginning which I have to filter away.

    Is there somewhere an ocean command that will return a list like
    (f1 y1 f2 y2 f3 y3 ... fn yn)
    that I have overseen?
     
    Svenn Are Bjerkem, Nov 8, 2004
    #1
  2. Svenn Are Bjerkem

    fogh Guest

    You have a wave object and you want list. That is definitely doable. I gave you
    an example of this last 28 october, when you asked how to write a waveform to file.
    There are most likely other ways to do it, using only public functions. Look
    in the analog artist manual for "^dr" functions, and in the skill language user
    manual for list manipulation topics.
     
    fogh, Nov 8, 2004
    #2
  3. Svenn,

    Hopefully this code will help:

    /* abWaveToList.il

    Author A.D.Beckett
    Group Custom IC (UK), Cadence Design Systems Ltd.
    Language SKILL
    Date Nov 17, 2003
    Modified
    By

    Convert a waveform to a list

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

    SCCS Info: @(#) abWaveToList.il 11/17/03.15:08:15 1.1

    */

    /************************************************************************
    * *
    * (abWaveToList wave @key transpose) *
    * *
    * Take a waveform object, and return it as a list of xy pairs. Or *
    * if transpose is set, it returns a list of x values followed by a list *
    * of y values. *
    * *
    ************************************************************************/

    (procedure (abWaveToList wave @key transpose)
    (let (xList yList xyList len
    (xVec (drGetWaveformXVec wave))
    (yVec (drGetWaveformYVec wave))
    )
    (setq len (drVectorLength xVec))
    ;-----------------------------------------------------------------
    ; Return value of this if is the list
    ;-----------------------------------------------------------------
    (if transpose
    (progn
    (for i 0 (sub1 len)
    (setq xList (tconc xList (drGetElem xVec i)))
    (setq yList (tconc yList (drGetElem yVec i)))
    )
    (list (car xList) (car yList))
    )
    ; else
    (progn
    (for i 0 (sub1 len)
    (setq xyList (tconc xyList (list (drGetElem xVec i)
    (drGetElem yVec i))))
    )
    (car xyList)
    )
    ) ; if
    ) ; let
    ) ; procedure


    Regards,

    Andrew.
     
    Andrew Beckett, Nov 9, 2004
    #3
  4. Oops!! Made a complete fool out of myself there. Problem is that I
    changed employer between that date and now, and I left my stuff behind.
    Thanks for the reminder.
     
    Svenn Are Bjerkem, Nov 9, 2004
    #4
  5. Got up too early this morning, I think. First I understood last 28. Oct
    as 28. Oct. 2003, then I discover that I hadn't read the reply from fogh
    I got on 28. Oct 2004 when I tried to find it on groups.google.
     
    Svenn Are Bjerkem, Nov 9, 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.