Home > Community > Forums > Custom IC SKILL > Ocean Script Error

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

 Ocean Script Error 

Last post Mon, Jul 30 2012 11:59 AM by Andrew Beckett. 5 replies.
Started by Adam86 30 Jul 2012 08:17 AM. Topic has 5 replies and 1767 views
Page 1 of 1 (6 items)
Sort Posts:
  • Mon, Jul 30 2012 8:17 AM

    • Adam86
    • Not Ranked
    • Joined on Fri, Jul 27 2012
    • Nepean, Ontario
    • Posts 5
    • Points 100
    Ocean Script Error Reply

     When I try loading my ocean script below:

    ocnWaveformTool( 'wavescan )
    simulator( 'spectre )
    design(     "/home/aalsaafi/simulation/working17-7/spectre/schematic/netlist/netlist")
    resultsDir( "/home/aalsaafi/simulation/working17-7/spectre/schematic" )
    path( "/CMC/kits/IBM_PDK/cmrf8sf/relDM/Spectre/models" )
    modelFile(
        '("/CMC/kits/IBM_PDK/cmrf8sf/V1.6.2.4DM/Spectre/models/allModels.scs" "")
    )
    analysis('tran ?stop "10u"  ?errpreset "moderate"  )
    option(    'dochecklimit  "no"
    )
    saveOption( 'useprobes "yes" )
    saveOption( 'currents "selected" )
    temp( 27 )
    out=outfile( "/home/aalsaafi/simulation/working17-7/myResults.txt" "w")
    run()
    results()
    selectResult( 'tran )
    outputs()
    fprintf(out "%s\t%5.2f\t%10.2f\n" VT("(/Vout_tran")))
    close(out)

     simulation goes fine till it reaches the following error:

    *Error* fprint/sprint: format spec. incompatabile with data-nil

    <<<Stack Trace>>>

    fprintf(out "%s\t%5.2f\t%10.2f\n" VT("(/Vout_tran")))

     Has this error came across anyone?

     Thanks

    • Post Points: 20
  • Mon, Jul 30 2012 8:28 AM

    Re: Ocean Script Error Reply

    Several things wrong here:

    1. Almost certainly there's no node in the circuit called "(/Vout_tran" - you probably meant:
      VT("/Vout_tran")
      So it will be returning nil as the first argument after the format string to fprintf
    2. The fprintf is expecting three slots - a string, and two floating point numbers. You're only passing one VT() call, which will produce a waveform. So that's almost certainly not what you want.
    3. There are too many close parentheses on the fprintf line
    4. Maybe you just want to use ocnPrint(?output out VT("/Vout_tran"))

    Regards,

    Andrew.

    • Post Points: 20
  • Mon, Jul 30 2012 8:51 AM

    • Adam86
    • Not Ranked
    • Joined on Fri, Jul 27 2012
    • Nepean, Ontario
    • Posts 5
    • Points 100
    Re: Ocean Script Error Reply

    Thanks Andrew

    Now I get this error

    *Error* close: argument #1 should be an I/O port (type template ="p")-nil

    <<<Stack Trace >>>

    close(out)

     The purpose of writng that script is to be able to get the data into matlab

    • Post Points: 20
  • Mon, Jul 30 2012 9:11 AM

    Re: Ocean Script Error Reply

    I would expect that to happen if you don't have a node called Vout_tran - because VT("/Vout_tran") will produce nil, and then ocnPrint(?output .. nil) will write nothing.

    So you should check what outputs() gives - does it list the node you're expecting? Get the script to do:

    pprint(outputs())
    newline()

    Note there's also a spectre toolbox for Matlab available in the MMSIM hierarchy - this means you can directly read the simulation results using the cds_srr() function in Matlab.

    Regards,

    Andrew.

    • Post Points: 20
  • Mon, Jul 30 2012 10:14 AM

    • Adam86
    • Not Ranked
    • Joined on Fri, Jul 27 2012
    • Nepean, Ontario
    • Posts 5
    • Points 100
    Re: Ocean Script Error Reply

     Sorry for botheing..

     I get this error now:

    *Error* close: argument #1 should be an I/O port (type template ="p")-nil 

    <<<Stack Trace>>>

     I'm using Cadence 5.1.41

    • Post Points: 20
  • Mon, Jul 30 2012 11:59 AM

    Re: Ocean Script Error Reply

    Given that I can't see the current state of your script, it's rather hard to debug! I've no idea what you've actually changed it to. All that the error tells me is that you're passing nil to the close() function, and that's wrong - the variable shouldn't be nil..

    Regards,

    Andrew.

    • Post Points: 5
Page 1 of 1 (6 items)
Sort Posts:
Started by Adam86 at 30 Jul 2012 08:17 AM. Topic has 5 replies.