• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC Design
  3. OCEAN Parametric analysis

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 126
  • Views 14924
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

OCEAN Parametric analysis

Ueue
Ueue over 15 years ago

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

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ueue
    Ueue over 15 years ago

    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

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ueue
    Ueue over 15 years ago

    Thanks a lot, Andrew!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Stefano,

    No problem!

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

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • vivkr
    vivkr over 14 years ago

     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

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    Hi Vivek,

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

    Best Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information