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.

ocean script - data print to file

Status
Not open for further replies.

jugemu1234

Newbie level 5
Joined
Jun 8, 2009
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,354
ocean script

Hi,

I am very new to SKILL or ocean script . I have problems with following script. Firstly I created this ocean.ocn by ADE>Session>Save ocean script... Then added some lines to output data to file. However it ends up outputing error after successful simulation but I do not know what is wrong with this then tried to figure out by myself but couldnt.

I am sure this would be easy thing to do for some people. Hope someone help me out at the earliest oppotunity.

Thanks in advance.

---------------------------------
ocnWaveformTool( 'awd )
simulator( 'spectre )
design( "/netlist")
resultsDir( "/MydfII/simulation/sim_osc2/spectre/schematic" )
path( "/multiplelib" )
modelFile(
'("active_thin.scs" "tt")
)
analysis('tran ?stop "1.1u" ?errpreset "conservative" ?write "spectre.ic"
?writefinal "spectre.fc" ?annotate "status" ?finalTimeOp t ?maxiters "5"
?threshold "0.0" ?detail "node" ?sort "name" )
desVar( "Lvar" 1 )
save( 'v "/net019" "/dvss!" "/dvdd!" )
temp( 27 )
out = outfile("results.txt" "a")
run()

results()
selectResults('tran)
outputs()
ocnPrint(?output out frequency(clip(VT("/net019"),1u,1.1u)) )

close(out)
 

A_Graham

Newbie level 3
Joined
Sep 8, 2009
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Ireland
Activity points
1,304
ocean script save data

The first thing you need to do is check that your expression frequency(clip(VT("/net019"),1u,1.1u)) is working correctly. Run the same simulation in Analog Design Environment (Analog Artist) and copy and paste it into the calculator to check it doesn't have any errors. I haven't used the "frequency" function in a while so you'll have to debug that using the calculator yourself.

If you know it is evaluating correctly, I suggest you do the following. Give frequency(clip(VT("/net019"),1u,1.1u)) a name for example freq1.

Take out your ocnPrint statement and put this in instead:

freq1 = frequency(clip(VT("/net019"),1u,1.1u))
fprintf(out "%f" freq1)
 

JoannesPaulus

Advanced Member level 3
Joined
Mar 19, 2008
Messages
773
Helped
235
Reputation
470
Reaction score
134
Trophy points
1,323
Location
USA
Activity points
5,006
oceanscript

you need to use openResults( "/MydfII/simulation/sim_osc2/spectre/schematic") nor results().

The rest seems OK.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top