gnucap-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnucap-devel] A follow up to a question from a while ago.


From: Thaddeus Meizelis
Subject: Re: [Gnucap-devel] A follow up to a question from a while ago.
Date: Tue, 19 Aug 2008 01:14:07 -0500

On Wednesday 15 August 2008, al davis wrote:
> On Wednesday 13 August 2008, Thaddeus Meizelis wrote:
> > I tested it with a couple of simulations and it seems to
> > work, so I will include this in my personal builds of Gnucap.
>
> Can you send test files that demonstrate that it is correct?
> The test files should be complete enough to test every line of
> code.  They will become part of the regression suite.

I must admit I didn't do extensive testing on it, just enough to tst
the diode into the three regions.  But, for what it is worth, here are
the essential parts of the circuit that I used:


* Diodetest --------------

.model MM5Z5V6ST1   D(Is=0.00000000000000002 Rs=0.05 N=1 Xti=3 Eg=1.11
Cjo=225p M=.5516
+              Vj=.75 Fc=.5 Bv=5 Ibv=5m)

* Circuit

D1 1 0 MM5Z5V6ST1
R1 2 1 1k
V1 2 0 vsource generator(1)

.PRINT DC V(V1) V(R1) V(D1) I(D1) geq(D1) region(D1)
.PRINT TRAN V(V1) V(R1) V(D1) I(D1) region(D1)
.DC -10 10 1
.TRAN 0 0.02 0.0001
.DC
* ------

I spent more time with the DC analysis than Transient and pushed V1 down
to -30 volts when I needed to test that part of the circuit.

I have used the diode in a schematic I was using for an analysis, but it
seemed to break during the the transient analysis (very backwards time
step.)  I don't know if it is my model or if it is something else (none
of the  diodes were in breakdown,) but if it is the model I'll let you
guys know.

>
> > Now for some questions.
> >
> > 1. What is the proper way of attaching one of the spice3f5
> > models? I tried to do an "attach ./dio.so" but it gave me a
> > message and didn't seem to replace the model.
>
> This message?
> ========
> D: already installed, replacing
> stashing as D:0
> d: already installed, replacing
> stashing as d:0
> ========
> It means it was successfully attached, and the old one stashed
> so you can still access it with the name "D:0".
>
> You get this message when a new one has the same name as one
> already loaded, stating that the new one hides the old one, and
> how to access the old one.

Here's what I did:

I put a "printf("Check flag\n");" in the builtin diode model in the
reverse bias code. I compiled it in. I ran it through the diode test.
Of course "Check flag" printed on the screen. Then I attached the
spice3f5 diode "dio.so" and ran the model again. The "Check flag"
printed on the screen which in my mind makes me thing the old builtin
diode is being used.

Which reminds me I had another question that I forgot to ask? How do the
trace commands (trace2,etc..) work? I was trying to find a switch or
something to turn those on but I couldn't (which is why I ended up using
printf..)

> > 3b. If not, since i picked up a lot of knowledge on diode
> > models, I could clean the "Yj" section in the diode. I could
> > comment sections. I could allow the user to configure which
> > model (HSpice, Spice2, Spice3, PSpice) and LEVEL he/she
> > wanted to use.
>
> A set of models that is exactly compatible with all of those is
> VERY useful.

If by a set of models that is compatible with all of thise you mean
something like the builtin MOS models where you have a seperate file per
model and one base, then that is what I will work on next. Maybe a
d_diodebase.model and a d_diode*model*.model for all the other diodes
I've read so far. I'll use the MOS models as a base.

Tad


reply via email to

[Prev in Thread] Current Thread [Next in Thread]