Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

[SOLVED] Ocean scripting: saving outputs of parametric analysis to a file

Status
Not open for further replies.

Aksh Chordia

Newbie
Joined
Oct 20, 2020
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
44
Hi there,
I am new to the forum as well as this field.

I am not able to find a solution to get the outputs for phase noise in an oscillator at different frequencies along with the input parameters.

I am varying 7 parameters with specific values in each run of phase noise for an oscillator circuit using the parametric analysis method.

At each specific set of 7 parameters, I am plotting the phase noise vs frequency graph ranging from 10Hz to 1M Hz.



I want to have the output preferably in .out/csv/.m format (so that I can easily import them to Matlab)

The output contains an array of phase noise values for a particular set of design parameters at a given frequency, all the values of design parameters (in separate rows/columns) used for that particular run. This whole set varies with different frequencies.

My current ocean script looks like this, I am not able to figure out how to achieve the objective.

Code:
simulator( 'spectre )

design( "/home/chordia.2/simulation/oscillator/spectre/schematic/netlist/netlist")

resultsDir( "/home/chordia.2/simulation/oscillator/spectre/schematic" )

modelFile(

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/mm180_bjt_v121.lib.scs" "tt_bip")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/mm180_mimcap_v101.lib.scs" "mimcaps_typ")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/mm180_reg18bpw_v123.lib.scs" "tt")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/mm180_reg33bpw_v123.lib.scs" "tt")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/mm180_res_v141.lib.scs" "res_typ")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/mm180_lvt18_v113.lib.scs" "tt")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/mm180_lvt33_v113.lib.scs" "tt")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/mm180_reg18_v124.lib.scs" "tt")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/mm180_reg33_v114.lib.scs" "tt")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/mm180_zvt18_v121.lib.scs" "tt")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/mm180_zvt33_v113.lib.scs" "tt")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/core_rf_v2d4.lib.scs" "tt")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/io_rf_v2d3.lib.scs" "tt")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/l_slcr20k_rf_v2d3.lib.scs" "typ")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/mimcapm_rf_v2d3.lib.scs" "typ")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/pad_rf_v2d3.lib.scs" "typ")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/rnhr_rf_v2d4.lib.scs" "typ")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/rnnpo_rf_v2d4.lib.scs" "typ")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/rnppo_rf_v2d4.lib.scs" "typ")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/vardiop_rf_v2d3.lib.scs" "typ")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/varmis_18_rf_v2d3.lib.scs" "typ")

'("/home/UMC_PDK/G-9FD-MIXED_MODE_RFCMOS18-1.8V_3.3V-1P6M-MMC_UM180FDKMFC00000OA-FDK-Ver.A02_PB/UM180FDKMFC00000OA_A02_DESIGNKIT/UM180FDKMFC00000OA_A02_PB/UMC_18_CMOS/../Models/Spectre/mm180_diode_v113.mdl.scs" "")

)

analysis('pnoise ?relharmnum "" ?start "10" ?stop "1M"

?p "/net13" ?n "/net4" ?oprobe "" ?noisetype "timeaverage"

?noiseout list("usb") ?noisetypeUI "" ?ppv "" )

analysis('pss ?engine "Harmonic Balance" ?flexbalance "yes" ?oversamplefactor ""

?fund "2.4G" ?harms "5" ?errpreset "conservative" ?tstab "600n"

?oscana t ?p "/net13" ?n "/net4" ?oscic "lin"

?oscmethod "" ?step "" ?write "" ?writefinal ""

?swapfile "" ?checkpss "" ?ppv "" ?backtracking "" )

desVar( "C" 1e-12 )

desVar( "L" 4.35e-9 )

desVar( "NL" 4.56e-06 )

desVar( "NR" 4.56e-06 )

desVar( "NT" 4.56e-06 )

desVar( "PL" 4.56e-06 )

desVar( "PR" 4.56e-06 )

envOption(

'analysisOrder list("pss" "pnoise")

)

temp( 27 )

paramAnalysis("NL" ?values '(4.839e-06 4.839e-06 4.839e-06 4.839e-06 4.839e-06 4.839e-06 4.839e-06 4.2786e-06 ) ?sweepType 'paramset

paramAnalysis("NR" ?values '(4.8293e-06 4.8293e-06 4.8293e-06 4.8293e-06 4.8293e-06 4.8293e-06 4.2926e-06 4.8293e-06 ) ?sweepType 'paramset

paramAnalysis("NT" ?values '(4.8258e-06 4.8258e-06 4.8258e-06 4.8258e-06 4.8258e-06 4.2794e-06 4.8258e-06 4.8258e-06 ) ?sweepType 'paramset

paramAnalysis("PL" ?values '(4.2742e-06 4.2742e-06 4.2742e-06 4.2742e-06 4.8416e-06 4.2742e-06 4.2742e-06 4.2742e-06 ) ?sweepType 'paramset

paramAnalysis("PR" ?values '(4.8365e-06 4.8365e-06 4.8365e-06 4.2799e-06 4.8365e-06 4.8365e-06 4.8365e-06 4.8365e-06 ) ?sweepType 'paramset

paramAnalysis("L" ?values '(4.6432e-09 4.6432e-09 4.1827e-09 4.6432e-09 4.6432e-09 4.6432e-09 4.6432e-09 4.6432e-09 ) ?sweepType 'paramset

paramAnalysis("C" ?values '(9.4464e-13 1.058e-12 9.4464e-13 9.4464e-13 9.4464e-13 9.4464e-13 9.4464e-13 9.4464e-13 ) ?sweepType 'paramset

)))))))

out=outfile("./scripting_test_output.out","w")

paramRun()

phase\ noise = rfOutputNoise("dBc/Hz" ?result "pnoise")

plot( phase\ noise ?expr '( "phase noise" ) )
 
Last edited by a moderator:

Dominik Przyborowski

Advanced Member level 3
Joined
Jun 6, 2013
Messages
928
Helped
423
Reputation
848
Reaction score
414
Trophy points
1,343
Location
Norway
Activity points
6,937
Try following way:
Code:
x=outfile("results" "w")     
a=myFunction()
fprintf(x "comment if needed %L\n" a)
close(x)
 

Aksh Chordia

Newbie
Joined
Oct 20, 2020
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
44
Try following way:
Code:
x=outfile("results" "w")   
a=myFunction()
fprintf(x "comment if needed %L\n" a)
close(x)
The issue is I am now able to understand how to access the family of curves [using script]
Here, a set of values for parametric analysis which varies per simulation.

If I get to know how to access them and what are the members, I understand that I can get to print them individually using the fprintf statement
So, the basic question is what would be the myFunction()?
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top