hbchens
Junior Member level 3
slove the problem
Today,I have simulated a single-ended differential amplifier with hspice.
I use one netlist file(i.e. one *.sp file) to multi-analysis ,so i make use of the "alter " sentence.
the netlist is as follows:
*differential single-ended amplifier test
.lib "E:\Hspice\model_csmc6\H06MIXDDCT02V21.LIB" TT
.subckt damp p n vdd vss vbias d2
m1 d1 p s1 s1 nmos l=1u w=2u
m2 d2 n s1 s1 nmos l=1u w=2u
m3 d1 d1 vdd vdd pmos l=1u w=2u
m4 d2 d1 vdd vdd pmos l=1u w=2u
m5 s1 vbias vss vss nmos l=1u w=2u
.ends
x1 p n vdd 0 vb out damp
*source
vdd vdd 0 5v
vb vb 0 1.5v
.alter
.connect p n
vdc p 0 2.5v
.dc vdc 0 5 1m
.alter
vsin p n dc=1 sin(0 10mv 1k 0 0 0)
vdc n 0 2.5v
.tran 1u 2m
.dc vsin -5 5 1m
.probe v(out)
.end
But i can not get the right curves.The analysis of the two .alter blocks affect each other,i think.because i got one tran and three dc analysis results.Moreover,the curves is not right in the results.
Are there syntax errores when i use the .alter ?
If i use one of the two .alter blocks separately,i will get the right results.
who can solve this problem??
thanks!!!!
Today,I have simulated a single-ended differential amplifier with hspice.
I use one netlist file(i.e. one *.sp file) to multi-analysis ,so i make use of the "alter " sentence.
the netlist is as follows:
*differential single-ended amplifier test
.lib "E:\Hspice\model_csmc6\H06MIXDDCT02V21.LIB" TT
.subckt damp p n vdd vss vbias d2
m1 d1 p s1 s1 nmos l=1u w=2u
m2 d2 n s1 s1 nmos l=1u w=2u
m3 d1 d1 vdd vdd pmos l=1u w=2u
m4 d2 d1 vdd vdd pmos l=1u w=2u
m5 s1 vbias vss vss nmos l=1u w=2u
.ends
x1 p n vdd 0 vb out damp
*source
vdd vdd 0 5v
vb vb 0 1.5v
.alter
.connect p n
vdc p 0 2.5v
.dc vdc 0 5 1m
.alter
vsin p n dc=1 sin(0 10mv 1k 0 0 0)
vdc n 0 2.5v
.tran 1u 2m
.dc vsin -5 5 1m
.probe v(out)
.end
But i can not get the right curves.The analysis of the two .alter blocks affect each other,i think.because i got one tran and three dc analysis results.Moreover,the curves is not right in the results.
Are there syntax errores when i use the .alter ?
If i use one of the two .alter blocks separately,i will get the right results.
who can solve this problem??
thanks!!!!