Electronic – Why edge triggering is preferred over level triggering

clockleveltrigger

I am trying to understand why edge triggering is preferred over level triggering. In my book it is not explained clearly. After searching online I came to know that edge triggering is insensitive to glitches whereas level triggering is sensitive. What does it mean?

Also I am not able to understand the following:
"If the clock is level sensitive, the new \$Q_n\$ can rush through the logic network and change the output. To avoid this we need an short pulse to capture the output and hold it constant. But such short pulse is not easy to create, hence we go for edge triggering. The feedback problem is solved because there's insufficient time for the new output to race back to the input within duration of a single rising edge"

I did not understand why the output would not rush in level triggering and why we need a short pulse to hold the output.

Secondly, the feedback problem, since the level triggering duration is long as compared to the edge triggering, in the case of the former, the output would be fed back again to the input and it will keep doing this as long as the clock is active. What is the feedback problem?

But how will it be solved in edge triggering? If the time for falling or rising is very short, how will the output be able to propagate through all gates? Is it like, once edge triggering is applied the output will be propagate through all gates and next inputs will be considered only at the next clock edge ?

Best Answer

Although an edge is a well-defined moment in time, it is not true to say that level-triggering also does not have a well-defined moment in time. It does. There is a well-defined moment in time when the level of the clock falls, the inputs to the clocked circuit are sampled, and further changes in inputs are no longer admitted.

The issue with level triggering is that while the clock level is high, inputs change the outputs. In circuits that have feedback (the outputs are connected back to the inputs) level triggering causes chaos, because the level is wide enough (half a clock cycle) that the output can feed back to the inputs within the same period.

So by the time the well-defined moment occurs when the clock falls and every device is supposed to snapshot and hold it state until the next level, chaos has already occurred and the circuits are in unpredictable states. This is unacceptable. In sequential circuits, we want the outputs produced in clock period \$t\$ to only come into consideration for computing the states of clock period \$t + 1\$. We also want the nice property that we can slow down the clock, and not have the sequential circuit break. In level triggering, slowing down the clock works against us. The more we slow down the clock, the more time we allow for unrestricted feedback.

The first obvious solution which suggests itself to shorten the level to the point that it is impossible for unwanted feedback to occur (and to keep the "on" level short, even if we arbitrarily slow down the clock period). Suppose that we pulse the clock from 0 to 1 and back to 0 very quickly, so that the clocked devices accept their inputs, but the outputs do not have enough time to race through the feedback loop to change those inputs. The problem with this is that narrow pulses are unreliable, and basically require a response that may be several orders of magnitude faster than the clock frequency. We might find that we need a pulse that is a nanosecond wide, even though the system runs at only 1 Mhz. So then we have the problem of distributing clean, sharp, sufficiently tall nanosecond-wide pulses over a bus designed for 1 Mhz.

The next logical step, then, is to have the devices generate the narrow pulse for themselves as the time derivative of the clock edge. As the clock transitions from one level to another, devices themselves can internally generate a short pulse which causes the inputs to be sampled. We do not have to distribute that pulse itself through the clock bus.

And so you can basically consider it all to be level-triggered in the end. Edge triggering is a trick to allow devices to create a very fine level trigger which is faster than all external feedback loops, allowing devices to accept inputs quickly, and then close off the entrance in time before their changing outputs will change the values of the inputs.


We can also make an analogy between the "enable" signal (level triggered clock) and a door on a craft which holds air pressure. Level triggering is like opening a door, allowing air to escape. However, we can build an air lock which consists of two (or more) doors, which are not open simultaneously. This is what happens if we split the level clock into multiple phases.

The simplest example of this is the master-slave flip-flop. This consists of two level-triggered D flip flops cascaded together. But the clock signal is inverted, so the input of one is enabled while the other is disabled and vice versa. This is like an air lock door. As a whole, the flip flop is never open so that the signal can freely pass through. If we have feedback from the output of the flip-flop back to the input, there is no issue because it crosses to a different clock phase. The end result is that the master-slave flip-flop exhibits edge-triggered behavior! It's useful to study the master-slave flip-flop because it has something to say about the relationship between level and edge triggering.