Why Does My Ring Oscillator System Not Oscillate?

Click For Summary

Discussion Overview

The discussion revolves around the behavior of a ring oscillator system constructed using logic gates, specifically a NAND gate and a NOT gate. Participants explore why the system does not oscillate as expected, considering factors such as initial conditions, propagation delays, and potential race conditions. The scope includes theoretical reasoning and practical implications for digital logic simulation.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes their setup of a ring oscillator and expresses confusion about why it does not oscillate, noting that both gates output 0 initially and then switch to 1 after a delay.
  • Another participant introduces a scenario with two inverters, explaining that if both start high, they can reach a stable state, but may exhibit brief oscillations if driven by an external signal.
  • A participant reflects on the need for initial conditions in simulations, reiterating their previous analysis and correcting a mistake regarding the inputs and outputs of the gates.
  • One participant identifies the situation as a classic race condition, suggesting that differences in inverter characteristics could prevent oscillation and lead to glitches instead.
  • A later reply expresses disappointment about the limitations of the simulation tool in resolving the issue, acknowledging the feedback received.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the oscillation behavior of the system. There are multiple competing views regarding the impact of initial conditions, propagation delays, and race conditions on the expected behavior of the oscillator.

Contextual Notes

Participants mention the need for realistic differences between components to observe oscillation, indicating that idealized simulations may not accurately reflect real-world behavior. The discussion highlights the importance of initial conditions and the potential for glitches during startup.

littlebilly91
Messages
21
Reaction score
0
I am doing a discrete event simulation of logic gates and I have come upon a problem. I have set up a system similar to a ring oscillator. I understand that this system should not oscillate, but after thinking about it, I'm not sure why not. The system has one input, 1 fed into a NAND gate. The NAND feeds into a NOT and the not feeds back into the original NAND. This is similar to an even number of NOTs so it shouldn't oscillate, but any time I analyze it step by step it seems like it still would. Here is my thinking:

At time 0:
Both gates output a 0.
The NAND sees a 1 from the output and a 0 from the NOT gate
The NOT sees a 0 from the NAND
Both the NAND and the NOT will switch to 1 after a propagation delay.

After one delay:
Both gates output a 1.
The NAND sees a 1 from the output and a 1 from the NOT gate
The NOT sees a 1 from the NAND
Both the NAND and the NOT will switch to 0 after another propagation delay.

repeat forever...

I assumed the delays are the same, is that where the mistake lies? The digital logic class I am in is solely focused on the logic so I don't really know any different.
 
Engineering news on Phys.org
Suppose you had two inverters with each output feeding the input of the other.

Start at one input and assume it is high.
Its output will be low and so will the input it is connected to.

So the second output will be high, which is OK because it is connected to the first input which we assumed was high.

So, this is a stable state.

Such setups tend to be unstable, though, and may give brief bursts of oscillation ("ringing") if it is driven by another signal.

If you connect a resistor across one of the inverters (from input to output) , and a capacitor in series with either output to input connection, then you will possibly get oscillation. This is a common and useful oscillator.
 
Right, it makes sense to think about it like that, but to actually simulate it, I need an initial condition. I had previously been considering all gates to initially be at 0. But this seems to give rise to the problem I stated earlier:


At time 0:
Both gates output a 0.
The NAND sees a 1 from the input and a 0 from the NOT gate
The NOT sees a 0 from the NAND
Both the NAND and the NOT will switch to 1 after a propagation delay.

After one delay:
Both gates output a 1.
The NAND sees a 1 from the input and a 1 from the NOT gate
The NOT sees a 1 from the NAND
Both the NAND and the NOT will switch to 0 after another propagation delay.

mistyped it a bit the first time (had output instead of input) Sorry.
 
It looks like a classic race condition.

If both inverters start off with their inputs low and there are pull-up resistors, one of them will get to the "high" level before the other because of small differences in the inverters.

When it does, it will send its output low and force the input of the other inverter to abandon its race upwards and go low.

So, there will be no oscillation, but a couple of glitches on startup.

Unfortunately, simulators do have perfectly matched components, so it would be necessary to deliberately add a resistor or two to produce a realistic difference between components.
 
Hmmm... that is interesting. I was hoping to be able to resolve this in my simulation. I guess I won't be able to. I am just doing a simple logic sim, and it's not really fit to handle things like this. Thanks for the feedback. PF never let's me down!
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 41 ·
2
Replies
41
Views
8K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 49 ·
2
Replies
49
Views
4K
  • · Replies 6 ·
Replies
6
Views
8K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 8 ·
Replies
8
Views
6K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 10 ·
Replies
10
Views
5K
  • · Replies 12 ·
Replies
12
Views
2K