【深入理解计算机系统】 四:顺序逻辑电路

5.1. The Clock

The circuits implemented only with simple digital gates such as NAND, AND, OR, inverters, etc., are combinational circuits meaning that once a combination of values is set at the inputs, the output is either zero or one depending on it's truth table. The time it takes for the circuit to react to a change in the inputs is almost negligible (although designers care much about reducing it!).

Another way to look at this property of the combinational circuits is that if the value of the inputs changes, they output forgets its value immediately to adapt to the new result. In other words, the circuit does not remember the previous input combinations once it changes. This is an acceptable behaviour for some systems, but totally inappropriate for others.

Consider the following example. You are about to cross a street with a traffic light for the cars, and another one for pedestrians. The light is green for the cars, and you must press a button to request the car light to turn red, and the pedestrian light to turn green. The traffic light will not change until you press the button. Now let us assume that we use a combinational circuit to detect you pressing the button. Suppose it is a circuit that produces a one on its output if the button is pressed, and a zero if it is not pressed. With this functionality, you must keep pressing the button to cross the intersection. Depressing the button is a change in the input of your combinational circuit, and therefore, it will produce a change in the output. The light does not change.

This behaviour is not acceptable for this system. We want the system to remember that we pressed the button. In other words, the digital circuit should detect a change in an input signal, produce an output, and even though the input change again, maintain the value of the output in time. This is precisely the behaviour of the sequential digital circuits

A sequential digital circuit is a system in which, under certain conditions, the value of the outputs change depending on the inputs, or they remain unchanged (they are remembered) over time.

The behaviour of these new circuits is clearly more complex than the combinational circuits. The system works in two modes: either ignoring changes in the input values and remembering the last result; or paying attention to these inputs and adjusting the output accordingly. How do these circuits select between these two modes of operation?

The signal that forces a sequential circuit to behave in one of the two modes is generically known as the clock. Thus, every sequential circuit has a signal called the clock that signals when to pay attention to the value of the inputs and change the output, and when to ignore the inputs and maintain the value of the output.

The clock signal used in digital circuits is typically a square signal like the one shown in the following figure.

Clock signal used by sequential circuits


 Note

When representing signals that evolve over time, we will assume always that time flows from left to right. So, the evolution of a digital signal over time will be a horizontal line with two levels, high and low. This representation is used frequently with sequential circuits.


The most important properties of this signal are:

  • Over time, the value of this signal oscillates from a high level to a low level.
  • The transitions from high to low levels, and vice versa, occur almost instantaneously and are called falling edge and rising edge respectively.
  • The period of a clock, usually represented by  
    LaTeX: T
    , is the time it takes the signal to make a full transition (that is, from low to high, and back to low). The frequency of a clock, usually represented by 
    LaTeX: f
    f, is the inverse of its period, that is
    LaTeX: f=\frac{1}{T}
    The frequency of a clock signal can be seen also as the speed at which it switches between high and low values. If a digital circuit is operating with a 5 Ghz clock, it means the signal is making 
    LaTeX: 5\ast10^9
     full transitions (from low to high and back to low) per second.

The following figure shows a generic representation of a sequential circuit.

Generic sequential circuit with the clock as additional input

The behaviour is this new type of circuits is as follows:

  • At a certain instant marked by the clock, the circuit behaves as a regular combinational circuit and the outputs take the value derived from the inputs. We will call this instance evaluation time.
  • At any other times, the value of the inputs are ignored, and the outputs remain with the values calculated in the previous instant. We will call this instance memory time.

This last step is why we say that sequential circuits are those that have memory, as they can remember the values that occurred at a previous instance. Since the clock is a periodic signal, we then can assume that a sequential circuit is continuously changing from evaluation time to memory time at a pace defined by the clock signal.

As you can see, this type of circuit is the one needed to control the traffic light in the previous example. If a pedestrian pushes the button, the circuit can store and remember that value so that the light will then change to stop the cars and allow the crossing.

5.1.1. Level-Sensitive Sequential Circuits

But when exactly is a sequential circuit paying attention to its inputs or simply remembering the last value of the outputs? Currently there are two types of sequential circuits: those sensitive to a level; and those sensitive to an edge. Those sensitive to a level can be further sub-divided into those sensitive to a high level and those sensitive to a low level.

A high level sensitive sequential circuit is one in which the evaluation time occurs when the clock is at a high level. At any other time, the outputs are fixed to the values of the previous evaluation time.

Conversely, a low level sensitive sequential circuit is one in which the evaluation time occurs when the clock is at a low level. At any other time, the outputs are fixed to the values of the previous evaluation time.

The following figure shows the evaluation and memory periods for level sensitive sequential circuits and the convention to represent their clock signal (the presence or absence of a circle in the clock input).

Stages of the Level Sensitive Clock

Review questions for 5.1.1 Level-Sensitive Sequential Circuits

5.1.2. Edge-Sensitive Sequential Circuits

The second type of sequential circuits are those that have a much shorter evaluation time. Instead of using the time the clock is either high or low, they evaluate the inputs when the clock makes a transition. In other words, the inputs are only considered when the clock is in a raising edge, or in a falling edge. As in the case of the level sensitive circuits, there are two types, those sensitive to a raising edge, and those sensitive to a falling edge.

The following figure show the evolution and memory periods for edge sensitive sequential circuits and the convention to represent the clock signal (see the circle in the clock input for the falling edge sensitive sequential circuit).

Stages of the Edge Sensitive Clock

Review questions for 5.1.2 Edge-Sensitive Sequential Circuits 

5.1.3. Summary of Sensitivity in Sequential Circuits

The following figure shows the behaviour of the four types of sequential circuits depending on their sensitivity. The output value is the same value of the input.

Behaviour of sequential circuits depending on their sensitivity

You may also download this figure as a PDF file

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值