Home > Community > Forums > Custom IC Design > OCEAN Parametric analysis

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 Parametric analysis 

Last post Tue, Jan 4 2011 6:20 AM by Andrew Beckett. 7 replies.
Started by Ueue 15 Feb 2010 01:39 PM. Topic has 7 replies and 6008 views
Page 1 of 1 (8 items)
Sort Posts:
  • Mon, Feb 15 2010 1:39 PM

    • Ueue
    • Top 200 Contributor
    • Joined on Wed, Mar 4 2009
    • Pisa, Pisa
    • Posts 41
    • Points 685
    OCEAN Parametric analysis Reply

    Dear all,

     

    I am running parametric analyses with an OCEAN script.

    It finishes and all the output variables are correctly evaluated.

    I calculate two variables L_opt and eff_opt, that are single values, not array and I try to write them in a file.

    Trying to write the data in the file OCEAN generates the following error:

    " *Error* fprintf/sprintf: format spec. incompatible with data - 100000000 "

     

    My script is:

    "

    ...

    fname="path/result.txt"

    fileOut=outfile(fname "w")

    ...

    paramAnalysis("L" ?start L1 ?stop L2 ?log NL)

    ...

    paramRun()

    ...

    ; calculation of p_out and p_in ...

    L_opt=xmax(p_out / (p_out + p_in) * 100)

    eff_opt=value((p_out / (p_out + p_in) * 100) L_opt)

    fprintf(fileOut "3.8f \t 3.8f \t \n", L_opt, eff_opt) 

     

    Thanks a lot,

    Stefano

    • Post Points: 20
  • Mon, Feb 15 2010 8:59 PM

    Re: OCEAN Parametric analysis Reply

    Hi Stefano,

    By the looks of the error message, something has ended up as an integer, but you're using %f in the fprintf statement to print it. Not really sure quite where the data is coming from, but that's my guess. If you're going to use %f, you could case the value to a float by using float(L_opt) or float(eff_opt) in the arguments to fprintf.

    Regards,

    Andrew.

    • Post Points: 20
  • Mon, Feb 15 2010 9:09 PM

    • Ueue
    • Top 200 Contributor
    • Joined on Wed, Mar 4 2009
    • Pisa, Pisa
    • Posts 41
    • Points 685
    Re: OCEAN Parametric analysis Reply

    Hi Andrew,

    Thanks for the reply. Since this parametric analysis is inside a while loop, I tried to simplify the problem studying a simpler script with only one parametric analysis. And surprise: it works! I tried also to put some printf before and inside the while cycle and the printf inside the while are not shown on the screen! The simulations are run in the while, but it seems that something of strange happens.

    So, I was thinking to use a script in another languange to call the OCEAN script, implementing the while cycle with this new languange.

    What do you think?

    Thanks a lot,

    Stefano

    • Post Points: 20
  • Mon, Feb 15 2010 9:13 PM

    Re: OCEAN Parametric analysis Reply

    Hi Stefano,

    I don't see why you should need to use a different language for the loop. It's almost certainly an error in the code of your loop, rather than a language bug.

    Perhaps  you can send the entire script (send it to me as a personal message if you don't want to post it on the forum)?

    Regards,

    Andrew.

    • Post Points: 20
  • Tue, Feb 16 2010 4:19 PM

    • Ueue
    • Top 200 Contributor
    • Joined on Wed, Mar 4 2009
    • Pisa, Pisa
    • Posts 41
    • Points 685
    Re: OCEAN Parametric analysis Reply

    Thanks a lot, Andrew!

    • Post Points: 20
  • Tue, Feb 16 2010 4:47 PM

    Re: OCEAN Parametric analysis Reply

    Stefano,

    No problem!

    In case anyone else is interested, the problem was caused by a parenthesis mismatch in the code.

    Regards,

    Andrew.

    • Post Points: 20
  • Thu, Oct 14 2010 1:58 AM

    • vivkr
    • Top 150 Contributor
    • Joined on Mon, Oct 12 2009
    • Posts 49
    • Points 860
    Re: ocnPrint *Error* fprintf/sprintf: format spec. incompatible with data - Reply

     Hi Andrew,

     I am experiencing the same sort of problem although I am not using any special OCEAN or SKILL script. I was trying to print out a signal to a text file to use it as a PWL source later on. As the number of significant digits used by the waveform calculator is limited to about 4 (despite my having changed this number under "Options->Significant Digits"), I decided to use ocnPrint through the CI.

     I try

    ocnPrint(?output "myOut.txt" ?precision 10 ?numberNotation 'none clip( i("I0:3" ?result "tran-tran" ?resultsDir "pathname") 2n 10n) )

     Note that the expression is simply copied from the calculator buffer. I get the following error message:

     *Error* fprintf/sprintf: format spec. incompatible with data - "Format is '%g', argument #1 is 170"

    I get the same problem if I try to print a voltage, and so it is not caused by the current not being saved with the correct port mapping or so. 

    I even tried to run it by directly invoking OCEAN in the terminal, and selecting the results with openResults(), selectResults() etc., but to no avail. I don't get an error message there, just an empty output file. Of course, when I run OCEAN in the terminal, I leave out the ?result and ?resultsDir parts, since they have been already taken care of with openResults() and selectResults().

     I am working with Cadence IC 6.1.4.

    Thanks,

    Vivek

    • Post Points: 20
  • Tue, Jan 4 2011 6:20 AM

    Re: ocnPrint *Error* fprintf/sprintf: format spec. incompatible with data - Reply

    Hi Vivek,

    If you still have this issue, please contact Cadence Customer Support and file a service request.

    Best Regards,

    Andrew.

    • Post Points: 5
Page 1 of 1 (8 items)
Sort Posts:
Started by Ueue at 15 Feb 2010 01:39 PM. Topic has 7 replies.