lpc2138s
2012-02-02
.SUBCKT AD815 1 2 99 50 61
***** Input Stage
q1 50 41 4 qp1
q2 99 41 3 qn1
i1 99 4 1e-4
i2 3 50 1e-4
fni 99 2 vn2 1
fnn 99 1 vn2 0.1
*ibneg 2 99 10e-6
*ibpos 1 99 2e-6
cin1 4 88 1.4pf
cin2 2 88 1.4pf
q3 9 4 2 qn2
q4 10 3 2 qp2
rxxa 99 4 28k
rxxb 3 50 28k
VT1 99 9 0 ;ammeters for monitoring
VT2 50 10 0 ;current thru Q3, Q4
eos 41 1 poly(1) 43 88 5e-3 1
***** internal vnoise source
dn1 42 88 dnv
rn1 42 88 5e-3
vn1 42 88 0
hn1 43 88 vn1 1
rn2 43 88 1
***** internal inoise source
dn2 72 88 dniinv
rn3 72 88 50
vn2 72 88 0
hn2 73 88 vn2 1
rn4 73 88 1
***** internal reference
Eref 88 0 poly(2) 99 0 50 0 0 0.5 0.5
***** gain stage/dominant pole/clamp circuitry
f3 88 31 vt1 0.7e-4
f4 88 31 vt2 0.7e-4
dgain1 88 31 dy
dgain2 31 88 dy
egain1 28 88 31 88 143000
r3 28 29 5
c1 29 88 4500nf
vc1 99 45 3.65
vc2 46 50 3.65
dc1 29 45 dx
dc2 46 29 dx
***** pole at 100MHz
egain2 32 88 88 29 1
r4 32 44 0.001
c3 44 88 1500000p
***** buffer to output stage
gbuf 34 88 44 88 1e-2
re1 34 88 100
***** output stage
fo1 88 110 vcd 1
do1 110 111 dx
do2 112 110 dx
vi1 111 88 0
vi2 88 112 0
fsy 99 50 poly(2) vi1 vi2 5.61e-4 1 1
go3 60 99 99 34 0.385
go4 50 60 34 50 0.385
r03 60 99 2.6
r04 60 50 2.6
vcd 60 62 0
lo1 62 61 1e-10
ro2 61 88 1e9
do5 34 70 dx
do6 71 34 dx
vo1 70 60 0.45
vo2 60 71 0.45
.model dx d(is=1e-13 kf=1e-30 af=0)
.model dy d(is=26e-9 kf=1e-30 af=0)
.model dnv d(is=1e-15 kf=2e-15 af=0)
.model dniinv d(is=1e-15 kf=1e-19 af=0)
.model qn1 npn(bf=200 kf=1e-30 af=0)
.model qn2 npn(bf=200 kf=1e-30 af=0)
.model qp1 pnp(bf=200 kf=1e-30 af=0)
.model qp2 pnp(bf=200 kf=1e-30 af=0)
.ends ad815an
Error on line 0 : a$poly$e.x2.eos %vd %vd ( x2.41 netx2_1 ) a$poly$e.x2.eos
MIF-ERROR - unable to find definition of model a$poly$e.x2.eos
Model issue on line 0 : .model a$poly$e.x2.eos spice2poly coef = …
Unknown model type spice2poly - ignored
Error on line 0 : a$poly$e.x2.eref %vd %vd ( x2.88 0 ) a$poly$e.x2.eref
MIF-ERROR - unable to find definition of model a$poly$e.x2.eref
Model issue on line 0 : .model a$poly$e.x2.eref spice2poly coef = …
Unknown model type spice2poly - ignored
Error on line 0 : a$poly$f.x2.fsy %vnam %id ( netv2_1 netv1_2 ) a$poly$f.x2.fsy
MIF-ERROR - unable to find definition of model a$poly$f.x2.fsy
Model issue on line 0 : .model a$poly$f.x2.fsy spice2poly coef = …
Unknown model type spice2poly - ignored
Error on line 0 : a$poly$e.x1.eos %vd %vd ( x1.41 netx1_1 ) a$poly$e.x1.eos
MIF-ERROR - unable to find definition of model a$poly$e.x1.eos
Model issue on line 0 : .model a$poly$e.x1.eos spice2poly coef = …
Unknown model type spice2poly - ignored
Error on line 0 : a$poly$e.x1.eref %vd %vd ( x1.88 0 ) a$poly$e.x1.eref
MIF-ERROR - unable to find definition of model a$poly$e.x1.eref
Model issue on line 0 : .model a$poly$e.x1.eref spice2poly coef = …
Unknown model type spice2poly - ignored
Error on line 0 : a$poly$f.x1.fsy %vnam %id ( netv2_1 netv1_2 ) a$poly$f.x1.fsy
MIF-ERROR - unable to find definition of model a$poly$f.x1.fsy
Model issue on line 0 : .model a$poly$f.x1.fsy spice2poly coef = …
Unknown model type spice2poly - ignored
ASCII raw file
Reducing trtol to 1 for xspice 'A' devices
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
How can I do ? thanks.
Robert Larice
2012-02-02
These error messages want to express
the need for a "spice2poly" model,
which is part of xspice.
Thus you need a ngspice which has been configured
with -enable-xspice
Furthermore those xspice DLLs must be visible,
thus you might check your spinit file,
and check the paths which are mentioned there.
Robert
lpc2138s
2012-02-03
thanks.
it works.
Anton Kizilov
2012-09-02
2 rlar:
Hello there Robert. I have the same difficulties as lpc2138s had, but the only problem is that the other xspice models seems to be working - all, but not spice2poly. I've checked the path to the model and it is correct. Maybe there should be some kind of prefix like "A" (like prefix for the other xspice models)? Or maybe it is because I'm using precompiled Windows version and it has a bug?
Holger Vogt
2012-09-02
Please submit a 'small, but complete' input file showing your problem.
What ngspice version are you using?
Holger
Anton Kizilov
2012-09-06
This is where I've got a problem:
* LF 351 Macromodel * 1 = V+ Input Node, 5 = V- Input Mode * 9 = V+ Power Supply 11 = V- Power Supply * 14 = Output Node .subckt LF351 1 5 9 11 14 R1 3 0 1e+14 R2 3 4 1e+13 R3 4 0 1e+14 R4 6 0 1e+3 R5 12 0 75 R6 13 0 1e+3 R7 17 18 10e+3 R8 18 0 10e+3 R9 19 0 1e+3 I1 3 0 6.25e-11 I2 4 0 3.75e-11 C1 7 0 1.6061033e-5 C2 13 0 2.652582e-11 C3 3 4 1.4e-12 C4 17 18 1.591549e-12 C5 19 0 1.591549e-12 G1 0 6 18 0 199.5262 G2 0 6 (POLY(2)) (3,0) (4,0) 0 9.976312e-4 9.976312e-4 G3 0 12 7 0 0.013333 G4 0 13 3 4 0.001 G5 0 19 18 0 0 0.001 VB 6 7 DC 0 VA 12 14 DC 0 F1 8 9 (POLY(1)) VB -137.9343 1 F2 11 10 (POLY(1)) VB -137.9343 -1 F3 15 9 (POLY(1)) VA -0.02 1 F4 11 16 (POLY(1)) VA -0.02 -1 E1 17 0 13 0 2 VC 2 3 0.005 D3 7 8 DX D4 8 9 DX D5 10 7 DX D6 11 10 DX D7 7 9 DX D8 11 7 DX D9 14 15 DX D10 15 9 DX D11 16 14 DX D12 11 16 DX .model DX D(N = 0.001) .ends LF351
And this is what I see during application startup:
spinit found in c:\spice\share\ngspice\scripts\spinit ****** ** ngspice-24 : Circuit level simulation program ** The U. C. Berkeley CAD Group ** Copyright 1985-1994, Regents of the University of California. ** Please get your ngspice manual from http://ngspice.sourceforge.net/docs.html ** Please file your bug-reports at http://ngspice.sourceforge.net/bugrep.html ** Creation Date: Jan 30 2012 22:58:51 ******
Thanks for your reply Holger.
Anton Kizilov
2012-09-06
And as I've mentioned before, another Xspice code models are working just fine. For example, this part of the code works without a problem:
a1 [1] input_vector abridge1 [1] [2] dac1 a2 [2 3] 4 sigmult .model input_vector d_source(input_file = "mod_binary.txt") .model dac1 dac_bridge(out_low = 0.01e-3 out_high = 18.1e-3 out_undef = 0 + t_rise = 2e-6 t_fall = 2e-6) .model sigmult mult
Holger Vogt
2012-09-06
What is the error message you get?
Holger
Holger Vogt
2012-09-06
Your macro model has bugs:
at least
G5 0 19 18 0 0 0.001
is wrong.
If I take the model from
http://courses.ee.sun.ac.za/Electronics_365/Komponente/LF351.mod
everything is o.k. using the actual ngspice from git on Windows.
Holger
Anton Kizilov
2012-09-07
WTF!!! That was so stupid from me! I'm sorry about this. Thanks for helping me Holger.
Best regards!