OCEAN print problem

Discussion in 'Cadence' started by Stephen, Aug 7, 2006.

  1. Stephen

    Stephen Guest

    Hey all,

    After my circuit has simulated in OCEAN, I am using the following code
    to obtain results in a file (there may be easier ways to do this, but
    bear with me here):

    ==================================================

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Calculate w ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    freq=frequency( v( "/V1" ) )

    w=2*3.141592654*freq

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Create a list of when the peaks of the sine wave occur in time ;
    ; Output this list to a file
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    biglist=root( deriv( v( "/V1" ) ) /w )

    myport=outfile("/egr/research/RFIC/zielstep/V1data")

    print( biglist myport)

    ==================================================

    The code works like a charm except when I go to gather the data. Most
    of it is missing! It completes for the first 2.6us (roughly) in the
    transcient analysis, then after that it does not give the remaining
    7.4us of data.

    Size should not be an issue, as it only take up 120K. Is this amount
    set in stone though? A nice round 120K does seem suspicious, but I
    can't find anything on that.

    If any of you OCEAN gurus out there can lend me a hand, I would
    appreciate it very much. Even a hint would be very helpful. Thank in
    advance for your time.
     
    Stephen, Aug 7, 2006
    #1
  2. I would try

    biglist=root( deriv( v( "/V1" ) ) /w )

    myport=outfile("/egr/research/RFIC/zielstep/V1data")

    foreach( element biglist
    fprintf( myport "%L\n" element )
    )

    close( myport )
     
    Bernd Fischer, Aug 7, 2006
    #2
  3. Stephen

    Stephen Guest

    I'm going to try that in an hour or so, once I get back to the lab.

    I don't know if it helps this problem or anything, but I tried printf
    instead of print and after a small delay (and with a much smaller set
    of numbers) it worked. But using print only gave me roughly a third of
    the numbers again - strange.

    I will let you know if that works soon, thanks!
     
    Stephen, Aug 7, 2006
    #3
  4. What I tried to explain here, I mean should be clear.
    I run a foreach loop over all collected elements in the biglist,
    printing every element in the list.
    Finally I close the out port, to make sure all data will be flushed to the file.

    Bernd
     
    Bernd Fischer, Aug 7, 2006
    #4
  5. Stephen

    Stephen Guest

    Genius! Not only did that work, but it formatted everything exactly
    the way I wanted it! Thank you very much!
     
    Stephen, Aug 7, 2006
    #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.