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)
 

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)
 

oceanscript

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

The rest seems OK.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…