Docsity

Synchronous Sequential Circuits - Lecture Notes | ENGIN 112, Study notes of Engineering

Partial preview of the text

Download Synchronous Sequential Circuits - Lecture Notes | ENGIN 112 and more Study notes Engineering in PDF only on Docsity!

College of Engineering University of Massachusetts Amherst

ENGIN 112

Introduction to Electrical and

Computer Engineering

Fall 2008

Discussion A

9. Synchronous Sequential Circuits

1

2 I. Enable for Combinational Circuits (1) Combinational circuits are often provided with an enable input to further control circuit operations. For example, consider the 3 × 8 line decoder shown last week:

  • Suppose we add an enable variable w as input to each of the AND gates.
  • Then: when w=1 , the decoder is enabled, and the output is as shown in the figure. But when w=0, all outputs are zero.

4 II. Synchronous Sequential Circuits

  • Sequential circuits are those in which part of the circuit’s output is fed back to form part of the circuit’s input.
  • The feedback path necessarily includes some delay (so the same signal is not simultaneously at the input and output) and data storage registers ( memory elements ). Combinational circuit Memory element Data input Data output

5

  • Synchronous sequential circuits have an associated clock that allows for data transfer into or out of the memory elements only at discrete points in time. So, the circuit performs computations on the data at times that are determined by the clock.
  • As in any circuit, the output of a sequential circuit is a function of the inputs; but the introduction of timing and feedback into the circuit operation both expands the types of operations the circuit can perform and complicates the circuit description and analysis.
  • In particular: in describing the action of a sequential circuit (that is, the output that is generated at any given time), we need to consider both the data input to the circuit and the state (that is, the binary information being stored) of the memory elements.

7

  • First: We will look at the memory elements that can store 1 bit. (1) Latches: A latch is a storage element whose operation is controlled by the clock level – that is, either high voltage (“1”) or low voltage (“0”). 1 0
  • Latches are simple circuits consisting of coupled NAND or NOR gates. We’ll look at a few different examples. (i) SR Latch: First, note that for a two-input NOR gate, if one input is set at 1 then the output is 0, no matter what the other input is. For a NAND gate, if one input is set at 0 then the output is 1 no matter what the other input is. 1 x 0 0 1 x
  • Consider this circuit: R Q S Q’
  • Say that we set S=1, R=0. Then and Q = 1 and Q’ = 0. This is called the set state. Note that after the set state is established and we revert back to the standard inputs S=0, R=0, the outputs remain in the set state. That is: In the set state, the value Q = 1 is stored as long as S=0, R=0.
  • Now say that we set S=0, R=1. Then and Q = 0 and Q’=1. This is called the reset state. Note that after the reset state is established and we revert back to the standard inputs S=0, R=0, the outputs remain in the reset state. That is: In the reset state, the value Q = 0 is stored as long as S=0, R=0. The bit stored by this latch is the value Q. When the latch is acting as a storage element, the inputs R and S are both 0. The stored value of Q is set by temporarily changing either R or S (but not both) to 1.

10

  • A latch can be supplied with an enable input that controls when the state can be set or reset. Consider the circuit: S R EN (enable)
  • When EN=0 : The inputs X and Y into the S’R’ latch are both 1, meaning that the state (Q,Q’) will not change no matter what we set as the values of S and R (that is: latch operation is disabled ).
  • When EN=1 : Note that S=1,R=0 produces X=0,Y=1, which in the S’R’ latch stage generates the set state Q=1,Q’=0 ; S=0,R=1 produces X=1,Y=0, which in the S’R’ latch stage generates the reset state Q=0,Q’=1 ; and when S=0,R=0 produces X=1,Y=1, which maintains the latch in whatever state it is. So: this overall circuit acts like an SR latch when EN=1 – that is, it is an SR latch with enable. X Y R S Q Q’

11

  • Note that there is one problem with an SR latch: We cannot allow the inputs S=1,R=1 when the latch is enabled. ( Why: S=1,R=1,EN=1 gives X=0,Y=0 which in turn produces Q=1,Q’=1 , which can’t be true – the state is actually indeterminate.)
  • A simple way to make sure that we never go into this disallowed state is to modify the SR latch with enable into a D latch: D EN X Y
  • In this circuit: D=1 generates the set state ( Q=1 ) and D=0 generates the reset state ( Q=0 ) when EN=1 – that is, when the latch is enabled it sets Q=D. When EN=0 the latch maintains whatever state it is in. R S Q Q’

13 D latch D EN D latch D EN Q Q’


Example: Consider the connection of D latches shown below, along with their enable pulses: X EN2 EN A EN EN Say that A=0, and tha t X=1 initially – then Q is set to 1 when EN1 becomes 1. We want to store this value. But before EN1 goes to zero and saves the bit Q=1, EN2 goes to 1 and X is reset to 0 – this in turn causes Q to be reset to 0.


14

  • A flip-flop is a memory storage device that is designed so that state transitions can only happen at the positive edge or negative edge of a clock pulse, rather than during the whole time that the pulse is high. This lets us synchronize the timing so that we don’t have inadvertent state transitions. Positive pulse edge Negative pulse edge
  • Flip-flops an be constructed from D latches and logic gates. The most commonly used is the D flip-flop , which has the following implementation: time
  • Block symbol for D flip-flop: D flip-flop _D

CLK_ The “>” indicates a dynamic input - this denotes that the flip-flop acts only during clock transitions The bubble indicates that the dynamic input acts on negative pulse edges It is also possible to build a D flip-flop that whose dynamic input is triggered by positive clock transitions - this has block symbol: D flip-flop D CLK No bubble - indicates that dynamic input acts on positive pulse edges

17

  • Positive edge triggered D flip-flop: R S Q Q’ R S R S D CLK

T flip-flop: Consider the T flip-flop circuit: D flip-flop _D

CLK T_ Characteristic equation: Q(t+1) = D = T’Q(t) + T[Q(t)]’ T Q(t+1) 0 Q(t) 1 [Q(t)]’ Characteristic table:

JK flip-flop: Now consider the JK flip-flop circuit: D flip-flop _D

CLK_

J

K

Characteristic equation: Q(t+1) = D = J[Q(t)]’ + K’Q(t)