Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help on Ocean scripting: run one analysis and use that results in another

Status
Not open for further replies.

circuitking

Full Member level 5
Joined
Jan 8, 2018
Messages
291
Helped
1
Reputation
2
Reaction score
1
Trophy points
18
Activity points
2,503
Hi, I know I need to learn ocean scripting but I just need a fix on this at the moment.

I want to run a simulation which has two analysis, but the second analysis gets one of it's desvar() value from the first. any ideas? Thanks in advance.
 

Can't help you with Ocean but used to do this a lot in
cdsSpice, never could get the hang of it in bare Spectre
or Ocean.

But basically I'd make up a simple data structure (for
example, verifying trim-in range of a laser trimmed op
amp, save the best trim code from each MC iteration
using APPEND.1 and PRINT.1 MCCNT TRIMVAR,
and for subsequent runs reuse that trim-code file by
OPEN.1, LOOP X FROM 1 to 50 BY 1, READ.1 dummy TRIMV(X)
and inside each core loop TRIMVAR=TRIMV(MCCNT).

I'd imagine there is similar file I/O in Ocean but back
when that was my tools set, never did find it.

You could also manually edit the setup stuff once you
have the data in hand, declare and populate an array
to hold it and then do the same per-iteration assignment
from the data array. Maybe a little Perl / Python / ???
script (or sed -e, even) could get you from a raw data
pile and a header / footer fixed file, to something that
drops in easy (or maybe you find the file I/O handle).
reading it back to
 

I did not follow the question. The design variable for your second analysis is a result of the first analysis?

If that is the case, then split your simulation into two different simulations and use calcVal.

If you have ADE-XL, it is the easiest. Set the variable in your second simulation as:
calcVal("simulation1_output_name" "name_of_the_test")

Alternatively, in your OCEAN script (never tried this):
desVar( "new_var" "calcVal(\"simulation1_output_name\" \"name_of_the_test\")" )

Make sure you don't miss the '\'.
 
I did not follow the question. The design variable for your second analysis is a result of the first analysis?

If that is the case, then split your simulation into two different simulations and use calcVal.

If you have ADE-XL, it is the easiest. Set the variable in your second simulation as:
calcVal("simulation1_output_name" "name_of_the_test")

Alternatively, in your OCEAN script (never tried this):
desVar( "new_var" "calcVal("simulation1_output_name" "name_of_the_test")" )

Make sure you don't miss the '\'.

Nice.Thanks vivekroy. Tried with ADE-XL, it does the job.

Also I found found this using the keywork "calcVal()" you mentioned.

https://community.cadence.com/caden.../adexl-making-dependent-tests/1351387#1351387

By the way, what is calcVal(), is it a calculator function? I don't think so, because I didn't find any function like that. I searched all relevant documents for it's syntax, description and usage but I didn't find any. In which document should I look for it?
 

Yeah, it is not a calculator function.

I think maybe the SKILL Language Reference Manual?

Or maybe in the SKILL API Finder which can be invoked from the Virtuoso CIW Window.
 

desVar( "new_var" "calcVal("simulation1_output_name" "name_of_the_test")" )

You wrote this "new_var" and in the link I gave, the author says "and that the design variable is a global variable which is used by the second test but not the first test".

I am not sure why he says that "it is not used in the first test" because I am using the same variable in both tests but, yeah, it is a global variable.
 

I don't like using calcVal in global variables. I always prefer using it in local variables. (Make sure to disable the global variables by unchecking the box next to the respective global variable)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top