Hspice - to find slope

Status
Not open for further replies.

sapnak8

Newbie level 4
Joined
Mar 9, 2010
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
jaipur
Activity points
1,328
hello
i am making a circuit of VCO. In this i got the frequency for various control voltages with the help of .measure command.
for this i did transient analysis now i have a data in .mt0 file i.e. for various control voltages i have a different frequencis.now i want to find the slope of F vs V curve with the help of hspice command.
means i want to extract a differnce between two freq (f2-f1 /v2-v1) in my mt0 file

this is my spice program without netlist
vc_vgeneric1 vdd gnd dc vdd
vc_vgeneric2 vctrl gnd ctrl

.param vdd=1.8v
.lib "18um_model12" cmos_models
.tran 1n 100n sweep ctrl '0.35*vdd' '0.9*vdd' '0.0001*vdd'
.MEAS TRAN Th1 WHEN V(vout)='0.5*vdd' CROSS=1
.MEAS TRAN Th3 WHEN V(vout)='0.5*vdd' CROSS=3
.measure freq param = "1/(th3-th1)"

.plot tran v(vout)
.option accurate
.option post

.probe
.end
pls help me out from this data i want to extract the slope
 

One way to do this is using the .ALTER command to run a simulation for each V you want (see the HSPICE User Guide: **broken link removed**).
The results will be extracted to a file and you can take the slope with a spreadsheet software or by making a script in perl, python, ....
 

this .alter comman is not working in this case
i have a different frequencies for various control voltages in my .mt0 file n i can extreact those with the help of perl file but i want to find the slope also in my .mt0 file.i want to know that wht changes sholuld be done in my program so that i can get slope in .mt0 file. which command i should use
 

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