* ************************************************************************************** * Becareful power pow(x, y) * In spectre and LTSpice, y can be a float * In hspice (and spectre include files in spice format) - y is truncated to an integer * ************************************************************************************** tran tran stop=GTFINAL errpreset=moderate \ write=SEED.icc writefinal=SEED.fcc annotate=status maxiters=5 \ noisefmax=100e6 noiseseed=1 real gregclip( real x, real a) { return ((1.0+a+x)/2.0 * (1.0-sqrt(1.0 - 4.0*x/((1.0+a+x)*(1.0+a+x))))); } gregsweep.scs:MJCK (JCK PSS) bsource i=(10e-6 * gregclip(max(0.0, V(JCK, PSS)/0.1), 0.05)) gregsweep.scs:MSNK (IDN PSS) bsource i=(10e-6 * gregclip(max(0.0, V(IDN, PSS)/0.1), 0.05)) gregsweep.scs:MSNC (PCC IUP) bsource i=(10e-6 * gregclip(max(0.0, V(PCC, IUP)/0.1), 0.05)) gy_top.scs:real gregclip( real x, real a) { gy_top.scs:MSNK (IDN PSS) bsource i=(30e-6 * gregclip(max(0.0, V(IDN, PSS)/0.1), 0.05)) gy_top.scs:MSNC (PCC IUP) bsource i=(30e-6 * gregclip(max(0.0, V(PCC, IUP)/0.1), 0.05)) //**************************************************************************************** //* save options //**************************************************************************************** fileOptions options rawfmt=nutascii rawfile=SEED.nta saveOptions options save=lvlpub nestlvl=0 // save RCK CK80 CK160 CK800 vkp vkn \ // CKDDR D\<19\> D\<1\> D\<0\> \ // xs.xser.bdp xs.xser.bdp.bdn \ // LOCK QMP\<0\> \ // xp.fsti xp.fsto xp.pccv save vkp vkn TXP TXN \ xp.fsti xp.fsto xp.pccv \ VVDPLLA:p VVDPLLD:p VVDSERA:p VVDSERD:p VVDSERT:p \ xs.Xxser\/s19p xs.Xxser\/s19n \ xs.Xxser\/s15p xs.Xxser\/s15n \ xs.Xxser\/s11p xs.Xxser\/s11n \ xs.Xxser\/s7p xs.Xxser\/s7n \ xs.Xxser\/s3p xs.Xxser\/s3n //**************************************************************************************** //**************************************************************************************** //* analysis //**************************************************************************************** simuOptions options reltol=1e-3 vabstol=1e-6 iabstol=1e-12 \ temp=27 tnom=27 gmin=1e-12 rforce=1 \ maxnotes=5 maxwarns=5 digits=10 cols=80 pivrel=1e-3 \ sensfile=SEED.sns checklimitdest=file checklimitfile=SEED.chk \ dochecklimit=no checklimitdetails=no \ vabsshort=-1 rabsshort=-1 redefinedparams=error dcOp dc write=SEED.dcc maxiters=150 maxsteps=10000 annotate=status dcOpInfo info what=oppoint where=file file=SEED.opp nestlvl=2 tran tran stop=GTFINAL errpreset=moderate \ write=SEED.icc writefinal=SEED.fcc annotate=status maxiters=5 \ noisefmax=100e6 noiseseed=1 //**************************************************************************************** Saving Data Documentation spectreref-->Other_Simulation_Topics-->Output_Selections_(save) [p. 450] save X[:param] ... [depth=num] [sigtype=node|dev|subckt|all] [devtype=component_type] [subckt=subckt_master] [exclude=[wildcard_patterns_list]] [compression=no|yes] [ports=yes|no] [filter=none|rc] [probelvl=num] save 7 out OpAmp1.comp M1:currents D3:oppoint L1:1 R4:pwr save x*.*1 depth=3 save x*.*1 sigtype=subckt save *:c devtype=bjt save * subckt=inv save * exclude=[X1* X2*] save X1:A probelvl=3 save nA:currents probelvl=2 spectreuser-->Specifying_Output_for_Viewing-->Preparing_Out_for_Viewing how to set output format for nutascii ... how to set which file name Hello Dave, What kind of Nutmeg format do you mean? Ngspice uses SPICE3f5-raw output dataset format. XYCE simulator by Sandia also this format. It's described it XYCE reference manual in the Section 8 You can download this manual here: https://xyce.sandia.gov/downloads/_assets/documents/Reference_Guide.pdf I have also started development of command-line utility and Octave package that will allow to read SPICE-3f5 raw-ASCII and raw-Binary datasets. My tools are available here: https://github.com/ra3xdh/convraw It is based on It consists of two parts: 1. Convraw command-line utitluty. It allows to convert SPICE dataset into other file formats. CSV is available now. HDF5 will be added soon. 2. Spiceraw Octave package. It allows to read SPICE dataset directly into Octave. It will read the whole dataset into a matrix structure. My toolkit is licensed under GPL. All is written in C++. It allows to increase performance on running datasets reading in loops. --- Regards, Vadim Kuznetsov