• 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/Calculator expressions and their units

Stats

  • Locked Locked
  • Replies 12
  • Subscribers 126
  • Views 11951
  • 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/Calculator expressions and their units

MicheleA
MicheleA over 13 years ago

Hi all,

I know it's not advised to put more than one questions per post, however I hope I'll structure this such that there won't be no confusion.

Main Topic

I am defining some expressions I would like to assess in my designs. To this end, I use the calculator in conjunction with some "ocean" script...Actually I just write expressions and define variables on a plain text file, but the idea is to expand on that with plotting functions and maybe output to file.

So let's say I have an AC sim. I then define some curves as follows:

 

twoPi = 44.0/7.0

vtank = VF("/tank_pos")-VF("/tank_neg")

itank = IF("/Vgen/MINUS")

icap = IF("/Cprobe/PLUS")

icapfix = IF("/Cfprobe/PLUS")

iind = IF("/Lprobe/PLUS")

runfreq = xval(vtank)

Ytank = itank/vtank

Zcap = vtank/icap

Zcapfix = vtank/icapfix

Zind = vtank/iind

cap = 1/(-twoPi*runfreq*imag(Zcap))

 

Now, it all works good if I copy/paste these definitions in the CIW, then ask --> plot(cap)

The issue I have with this is that now the Y-axis shows "freq" units...

cap value in femtohertz?

I observed that runfreq, defined as xval, is still correct. But if I do 1/runfreq, what I get is something with units of 1/(1/Hz), instead of s.

So probably here's where it loses it. Anyways, I see two possibilities here:

 

  1. I am doing it wrong
  2. I am doing it right

 

If 1 holds, then what's the right approach for something like this?

If 2 holds, do I have a way of "forcing" units onto expressions?

--------------------------------------------------------------------------------------------- END ----------------------------------------------------------------------------------------- 

Side Topic

 I find it more comfortable to write my expressions in the text editor rather than inputting them in the output definition box of ADE or ADE-XL. Is there a way of having the environment read my definitions as a file, and then just output the final expressions? In the (simple) case at hand, I would have defined all expressions as above, and plot them either from the CIW or directly from the file...

 

Thanks for your help!!

 Michele

  • Cancel
Parents
  • MicheleA
    MicheleA over 13 years ago

    Hi Andrew,

    many thanks for your clarifications! Indeed even after clicking on the Edit button on the ADE XL Outputs pane it didn't seem to work. However, after reading your reply I tried again and I now see it updates the output labels if I change their name so it is working somehow.

    I keep getting an error in the CIW and I think it is probably connected with the somewhat fuzzy behaviour I observe. The message I get is:

    *Error*   Evaluating expression (ocnEval("/workspaces/[..]MonteCarlo:1_active/outputsScriptsDir/Q_calculations.ocn")). 

    INFO (ADEXL-2328): Following error occurred while re-evaluating output ocnMeasure_0 : 

    Error* load: error while loading file - "/workspaces/mancis/[..]MonteCarlo:1_active/outputsScriptsDir/Q_calculations.ocn" at line 7

    Now, the thing is...I've stripped the OCEAN file to the bare minimum...It has 6 lines only! There's no line 7!!

    Although I can't trace this to anything, I do believe this error to be at the root of some weird behaviour, like that although I scraped some variables/outputs from the script, the results pane still shows them, as well as showing "eval error" in the value box next to the OCEAN file itself.

    Here are the contents of my extremely elaborated script:

    axlAddOutputs('("test_out_lbl" "test_2_out_lbl"))

    test_out = 3245

    test_2_out = 4730

    test3 = 24

    axlOutputResult(test_out "test_out_lbl")

    axlOutputResult(8*test_2_out "test_2_out_lbl")

    axlOutputResult(8*test3 "test3") 

    And still there is some bug in it...I have also tried "direct labeling" thru axlOutputResult() in the last line and it works perfectly..Thanks again!

    Regards,

    Michele 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • MicheleA
    MicheleA over 13 years ago

    Hi Andrew,

    many thanks for your clarifications! Indeed even after clicking on the Edit button on the ADE XL Outputs pane it didn't seem to work. However, after reading your reply I tried again and I now see it updates the output labels if I change their name so it is working somehow.

    I keep getting an error in the CIW and I think it is probably connected with the somewhat fuzzy behaviour I observe. The message I get is:

    *Error*   Evaluating expression (ocnEval("/workspaces/[..]MonteCarlo:1_active/outputsScriptsDir/Q_calculations.ocn")). 

    INFO (ADEXL-2328): Following error occurred while re-evaluating output ocnMeasure_0 : 

    Error* load: error while loading file - "/workspaces/mancis/[..]MonteCarlo:1_active/outputsScriptsDir/Q_calculations.ocn" at line 7

    Now, the thing is...I've stripped the OCEAN file to the bare minimum...It has 6 lines only! There's no line 7!!

    Although I can't trace this to anything, I do believe this error to be at the root of some weird behaviour, like that although I scraped some variables/outputs from the script, the results pane still shows them, as well as showing "eval error" in the value box next to the OCEAN file itself.

    Here are the contents of my extremely elaborated script:

    axlAddOutputs('("test_out_lbl" "test_2_out_lbl"))

    test_out = 3245

    test_2_out = 4730

    test3 = 24

    axlOutputResult(test_out "test_out_lbl")

    axlOutputResult(8*test_2_out "test_2_out_lbl")

    axlOutputResult(8*test3 "test3") 

    And still there is some bug in it...I have also tried "direct labeling" thru axlOutputResult() in the last line and it works perfectly..Thanks again!

    Regards,

    Michele 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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