The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design >> Mixed-Signal Design >> start up problem
https://designers-guide.org/forum/YaBB.pl?num=1158822677

Message started by trond on Sep 21st, 2006, 12:11am

Title: start up problem
Post by trond on Sep 21st, 2006, 12:11am

I am trying to simulate a ring oscillator using the 7404 but cannot get it to oscillate? Can anyone suggest how to start it up?


Code:
simulator lang=spectre
global 0
include "TTL7404.txt"

Vdd   (Vp 0)  vsource dc=5 type=dc
X1    (out5 out1 Vp) TTL7404
X2    (out1 out2 Vp) TTL7404
X3    (out2 out3 Vp) TTL7404
X4    (out3 out4 Vp) TTL7404
X5    (out4 out5 Vp) TTL7404

resp tran stop=50/1e6 skipdc=yes errpreset=conservative maxstep=1e-9
ic out5=5



Code:
.SUBCKT TTL7404 (1  5 11)
Q2 3 2 7 QA
Q3 6 3 4 QA
Q5 10 13 5 QC
D1 4 5 DA
D2 10 9 DA
D3 9 0 DA
RB1 11 12 4K
RC3 11 6 130
RC2 11 3 1.6K
RE2 7 0 1K
Q4 5 7 0 QB
RB5 11 13 4K
Q1 2 12 1 QC
.MODEL DA D RS=40 IS=1.0E-14
.MODEL QA NPN BF=20 BR=1 RB=70 RC=40 IS=1.0E-14 VA=50
.MODEL QB NPN BF=20 BR=0.2 RB=20 RC=12 IS=1.6E-14 VA=50
.MODEL QC NPN BF=20 BR=0.02 RB=500 RC=40 IS=1.0E-14 VA=50
.ENDS TTL7404


Regards,
Trond

Title: Re: start up problem
Post by loose-electron on Sep 21st, 2006, 12:34pm

Without looking at the details of what is there (as in running the simulation) you might want to "use intitial conditions on one inverter output so that you know where everything is at when it starts up.

Also, whats the propagation delay thru one of those gates and the forward gain thru it? Stuff a square wave thru the chain of inverters (Nand gates? not sure...) and see how it functions withthe loop opened up first.  

Title: Re: start up problem
Post by jbdavid on Sep 21st, 2006, 11:50pm

if you are Running this in spectre - you might want to actually use the spectre language the way you say you do..
or switch it to lang=spice

.. one reason I don't like spice language is that you cant connect by name and originally you could name your nets..
some people still number them which is quite confusing..

I've been reading NAMED net netlists for so long I don't even remember the order of bjt transistor pins..
verilog style
module ringosc (output electrical out1, inout electrical Gnd, Vcc);

ttl7404 inv1 (.in(out5), .out(out1), .gnd(Gnd), .Vcc(Vcc);
ttl7404 inv2 (.in(out1), .out(out2), .gnd(Gnd), .Vcc(Vcc);
ttl7404 inv3 (.in(out2), .out(out3), .gnd(Gnd), .Vcc(Vcc);
ttl7404 inv4 (.in(out3), .out(out4), .gnd(Gnd), .Vcc(Vcc);
ttl7404 inv5 (.in(out4), .out(out5), .gnd(Gnd), .Vcc(Vcc);

endmodule
Ah.. .. hm. in calculating the dc op - if out1 - 0 then out5= 0 and out1 = Vcc..
the only viable op point is all outputs at Vswitch
if, as jerry says, you force any one node to 0v the gate driving that node will sink a lot of current, but thats the one that will switch forst after the transient starts...

good luck

Title: Re: start up problem
Post by smlogan on Sep 26th, 2006, 8:30pm

Hi Trond,

A couple of thoughts ... all of which I have used successfuly with ring oscillators in Spectre...hence I'll pass them along in case they may be of interest.

For a transient analysis (not a periodic steady-state analysis), the basic objective is to force the devices in the ring to pass through their regions of high linear gain at an appropriate time to create the oscillation. Perhaps an obvious one to all is to ramp the power supply from its lowest (typically ground) to VDD as it would in an actual circuit environment. An alternative to this is to inject a significant impulse at an input node to an inverter to force it to pass through its high gain region. A disadvantage to these two techniques is that they require some additional settling and use "periodic" sources - even if the period is set to a very large value. Initializing nodes can be helpful - but only if it forces the inverter to enter its high gain regions or creates enough of a signal to move it in that direction.

An alternative to these techniques utilizes the numerical noise inherent in a simulation by reducing the timestep of the integration (Spectre's ?maxstep parameter or SPICE's equivalent). (I typically iterate the process until I get reliable start-up over various process and environmental conditions.) This has worked for me on a number of occasions. There is no need to use a periodic source in this case. This technique has the advantage that it can also be used in a periodic steady-state analysis (where a periodic source is not permitted).

A combination of these techniques might also be useful. I also add some finite supply and ground resistance and inductance (and bypass) to model the package substrate. These also tend to help as they cause VDD/VSS perturbations when current is drawn.

Other techniques are available for harmonic oscillators, but these are the few I've used for ring oscillators.

Good luck,

Shawn

Title: Re: start up problem
Post by Ken Kundert on Sep 26th, 2006, 10:23pm

Everything looks good in your circuit except for one thing. You need to include some capacitors in the circuit. Right now the inverters exhibit no delay and so cannot form an oscillator.

-Ken

Title: Re: start up problem
Post by loose-electron on Sep 27th, 2006, 8:52pm

Ideal bipolar transistors, with no C's....

OMG!

;D

Good call Ken!

Jerry

Title: Re: start up problem
Post by trond on Oct 6th, 2006, 3:14am

Thanks for your feedback smlogan.
Also, Ken you were spot on. I did forget the capacitors and now everything's fine.  ;)

Thanks

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.