OcnPrint Problem

Discussion in 'Cadence' started by p4ul$3n, Oct 4, 2006.

  1. p4ul$3n

    p4ul$3n Guest

    Hello!

    I got a great problem with ocnPrint(),
    I am just a beginner with using skill and ocean
    so what my problem is:

    I try to write a procedure, that writes out the result of the last made
    simulation into my home directory, i have tried a lot of sollutions
    postet, but nothing worked really.
    So maybe someone can help me
    What my procedure does now is not very much, it reads out the results
    from the .res file in the cadence file structure. But i need the X-Axis
    scale too.
    So i tried ocnPrint => my problem
    or is there a file somewhere, where all the simulation points of the
    X-Axis stands(like the .res file for the Y-Axes)?

    So if someone knows a way ocnprint can work, or a file where i can read
    out the X.Axis scale, please help me...

    Best Regards,
    Manuel
     
    p4ul$3n, Oct 4, 2006
    #1
  2. If you wouldn't mind, then post the lines of code that you don't get
    running.
    Do you need to scale the x-axis also?
    What is the .res file in Cadence structure?
    Are you using spectre stand-alone or in Freeway (I see you are from
    Infineon :))
    use getData() to get a waveform
    => (setq tmp1 (getData "node" ?result "tran-tran" ?resultsDir
    "./psf"))

    scale the x-axis using a function
    => (setq tmp2 (sabScaleXVec tmp1 0.5))

    plot the waveform
    => (plot tmp2)

    or, use the ocnPrint to a file
    => (ocnPrint ?output "resultfile" tmp2)

    --
    Svenn


    /* sabScaleXVec.il
    Author Svenn Bjerkem
    Lang SKILL
    Date Sep 18, 2006

    Example use:
    (setq tmp1 (sabScaleXVec (getData "" ?result "" ?resultsDir "") 0.5))
    Causes all x-values to be multiplied by 0.5
    */
    (procedure (sabScaleXVec waveform factor)
    (cond
    ((drIsWaveform waveform)
    (let (oldXvec newXvec xlen xval newwave)
    (setq oldXvec (drGetWaveformXVec waveform))
    (setq xlen (drVectorLength oldXvec))
    (setq newXvec (drCreateVec 'double xlen))
    (for index 0 (sub1 xlen)
    (setq xval (drGetElem oldXvec index))
    (setq xval (times xval factor))
    (drSetElem newXvec index xval))
    (putpropq newXvec (list 'sabScaleXVec (getq oldXvec
    expression) factor) xScale)
    (setq newwave (drCreateWaveform newXvec (drGetWaveformYVec
    waveform)))
    (putpropq newwave (getq waveform plotStyle) plotStyle)
    (putpropq newwave (getq waveform plotStyle) xScale)
    newwave))
    ((famIsFamily waveform)
    (famMap 'sabScaleXVec waveform factor))
    ((numberp waveform)
    (times waveform factor))
    (t
    (error "sabScaleXVec - can't handle %L\n" waveform))
    ))
     
    Svenn Bjerkem, Oct 5, 2006
    #2
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.