Upload
neil-wadhams
View
217
Download
2
Tags:
Embed Size (px)
Citation preview
Computer Architecture I: Digital Design
Dr. Robert D. Kent
Logic DesignSequential Circuits
Part I
Review
• We have studied logic design in the contexts of Medium Scale Integration (MSI) of gate devices and programmable logic devices (PLD).
• We have studied the design of a number of specific, practical functional circuits with a view to re-using those circuits as components in MSI design.
Adders Subtractors Comparator Decoders Multiplexers
• We note the differing design approaches, or emphases, effected by differential layering of abstraction. (The same design issue arises in the context of software engineering as well.)
SSI: Boolean algebra / Simplification / Logic gates MSI: Interconnection networks / Iterative re-use / Components
Goals
• Previously, we studied Combinational circuits, or networks.
– These are time independent because the inputs, once provided, immediately establish what the outputs will be.
Goals
• Previously, we studied Combinational circuits, or networks.
– These are time independent because the inputs, once provided, immediately establish what the outputs will be.
• We now continue to consider Sequential Networks
– These are time dependent in that the initial values of the circuit outputs are used to provide input to the same circuit.
Goals
• Previously, we studied Combinational circuits, or networks.
– These are time independent because the inputs, once provided, immediately establish what the outputs will be.
• We now continue to consider Sequential Networks
– These are time dependent in that the initial values of the circuit outputs are used to provide input to the same circuit.
– This is called feedback.
Goals
• The properties of sequential networks yield the capability to design memory circuits
– characterized by internal states and secondary states that describe the behaviour and values in a circuit before and after inputs are applied.
Goals
• The properties of sequential networks yield the capability to design memory circuits
– characterized by internal states and secondary states that describe the behaviour and values in a circuit before and after inputs are applied.
• There are two kinds of sequential networks
Goals
• The properties of sequential networks yield the capability to design memory circuits
– characterized by internal states and secondary states that describe the behaviour and values in a circuit before and after inputs are applied.
• There are two kinds of sequential networks
– Synchronous - behaviour is governed by the inputs only during specific discrete time intervals
Goals
• The properties of sequential networks yield the capability to design memory circuits
– characterized by internal states and secondary states that describe the behaviour and values in a circuit before and after inputs are applied.
• There are two kinds of sequential networks
– Synchronous - behaviour is governed by the inputs only during specific discrete time intervals
– Asynchronous - behaviour is governed by the inputs immediately as they are applied
Goals
• The basic logic element is called the Flip-Flop circuit.
Goals
• The basic logic element is called the Flip-Flop circuit.
• We will study first a primitive element - the basic bi-stable element.
Goals
• The basic logic element is called the Flip-Flop circuit.
• We will study first a primitive element - the basic bi-stable element.
– ... then study Latches.
Goals
• The basic logic element is called the Flip-Flop circuit.
• We will study first a primitive element - the basic bi-stable element.
– ... then study Latches.
– ... then proceed to Flip-Flops and Gated Latches/Flip-Flops.
Goals
• The basic logic element is called the Flip-Flop circuit.
• We will study first a primitive element - the basic bi-stable element.
– ... then study Latches.
– ... then proceed to Flip-Flops and Gated Latches/Flip-Flops.
• Finally, we will establish an MSI based model of a register and discuss how to construct load, read, shift and count capabilities into the register designs.
Basic Bi-stable Element
• The basic bi-stable element is a simple device characterized by
– no inputs !!!
– Two outputs.
Basic Bi-stable Element
• The basic bi-stable element is a simple device characterized by
– no inputs !!!
– Two outputs.
• This circuit has the representation:
Q
Q’
X X’
Y Y’
Basic Bi-stable Element
• The basic bi-stable element is a simple device characterized by
– no inputs !!!
– Two outputs.
• This circuit has the representation:
Trace: Starting from the top gate
1. If X = 0 then Q = X’ = 1
Q
Q’
X X’
Y Y’
Basic Bi-stable Element
• The basic bi-stable element is a simple device characterized by
– no inputs !!!
– Two outputs.
• This circuit has the representation:
Trace: Starting from the top gate
1. If X = 0 then Q = X’ = 1 2. Thus, Y = X’ = Q = 1 implies Q’ = Y’ = 0
Q
Q’
X X’
Y Y’
Basic Bi-stable Element
• The basic bi-stable element is a simple device characterized by
– no inputs !!!
– Two outputs.
• This circuit has the representation:
Trace: Starting from the top gate
1. If X = 0 then Q = X’ = 1 2. Thus, Y = X’ = Q = 1 implies Q’ = Y’ = 0
This is self-consistent, since X = Y’ = Q’.
Q
Q’
X X’
Y Y’
Basic Bi-stable Element
• The basic bi-stable element is a simple device characterized by
– no inputs !!!
– Two outputs.
• This circuit has the representation:
Trace: Starting from the top gate
1. If X = 0 then Q = X’ = 1 2. Thus, Y = X’ = Q = 1 implies Q’ = Y’ = 0
This is self-consistent, since X = Y’ = Q’.
The same self-consistency applies when X = 1 (Y = 0).Therefore, we say the state is stable.
Q
Q’
X X’
Y Y’
Basic Bi-stable Element
• The basic bi-stable element is a simple device characterized by
– no inputs !!!
– Two outputs.
• This circuit has the representation:
• The term bi-stable implies that there are two possible states
Q = 0 , Q’ = 1 and Q = 1 , Q’ = 0
Q
Q’
X X’
Y Y’
Basic Bi-stable Element
• The basic bi-stable element is a simple device characterized by
– no inputs !!!
– Two outputs.
• This circuit has the representation:
• The term bi-stable implies that there are two possible states
Q = 0 , Q’ = 1 and Q = 1 , Q’ = 0
– There is a third state that is technically possible, called the meta-stable state. This applies when the voltage signal values of X and Y (hence, Q and Q’) are precisely half way between their HI and LO values; however, these in-between states are typically short lived.
Q
Q’
X X’
Y Y’
Transition Voltage
Transition Voltage
Q
Q’
Smooth Signal Profile
Basic Bi-stable Element
• The basic bi-stable element is a simple device characterized by
– no inputs !!!
– Two outputs.
• This circuit has the representation:
• The term bi-stable implies that there are two possible states
Q = 0 , Q’ = 1 and Q = 1 , Q’ = 0
– There is a third state that is technically possible, called the meta-stable state. This applies when the voltage signal values of X and Y (hence, Q and Q’) are precisely half way between their HI and LO values; however, these in-between states are typically short lived.
Q
Q’
X X’
Y Y’
Transition Voltage
Transition Voltage
Q
Q’
Noisy Signal Profile
Basic Bi-stable Element
• The basic bi-stable element is a simple device characterized by
– no inputs !!!
– Two outputs.
• This circuit has the representation:
• Although the bi-stable element is worth studying for its simple properties, it is relatively useless as a computer circuit because
– its value cannot be changed from the “outside” - once power is applied its value is set (after a brief time period to achieve stability) and does not change henceforth.
Q
Q’
X X’
Y Y’
Latches
Latches
• A Flip-Flop is a bistable device that permits both probing of its current state (value) and modification of the state.
Latches
• A Flip-Flop is a bistable device that permits both probing of its current state (value) and modification of the state.
– Set the state - store a value 1 in the circuit; also called pre-setting the state.
Latches
• A Flip-Flop is a bistable device that permits both probing of its current state (value) and modification of the state.
– Set the state - store a value 1 in the circuit; also called pre-setting the state.
– Reset the state - store a value 0 in the circuit; also called clearing the state.
Latches
• A Flip-Flop is a bistable device that permits both probing of its current state (value) and modification of the state.
– Set the state - store a value 1 in the circuit; also called pre-setting the state.
– Reset the state - store a value 0 in the circuit; also called clearing the state.
• We will consider next a class of flip-flops called Latches.
Latches
• A Flip-Flop is a bistable device that permits both probing of its current state (value) and modification of the state.
– Set the state - store a value 1 in the circuit; also called pre-setting the state.
– Reset the state - store a value 0 in the circuit; also called clearing the state.
• We will consider next a class of flip-flops called Latches.
– Characterized by the fact that the timing of the output changes is not controlled (except possibly by an Enable, or Clock, signal).
SR Latch
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’R
S
Q
Q’
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
R
S
Q
Q’
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
RQ0’
Q0 S
Q
Q’
Q0 and Q0’ are the output signal values when the S and R inputs are applied - they are also applied as inputs to the nor gates.
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
R
S
Q
Q’
Once the nor gates have
stabilized the outputs, Q1 and Q1’ are then fed back as inputs.
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
R
S
Q
Q’
The nor gates must stabilize to a final output ,
Q2 and Q2’.
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
0 0 0 1
0
0
Q
Q’
1
0
0
1
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
0 0 0 1 0 1
0
0
Q
Q’
1
0
0
1
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
0 0 0 1 0 1 0 1
0
0
Q
Q’
1
0
0
1
Stable!
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
0 0 0 1 0 1 0 10 0 1 0
0
0
Q
Q’
0
1
1
0
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
0 0 0 1 0 1 0 10 0 1 0 1 0
0
0
Q
Q’
0
1
1
0
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
0 0 0 1 0 1 0 10 0 1 0 1 0 1 0
0
0
Q
Q’
0
1
1
0
Stable!
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
0 0 0 1 0 1 0 10 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1
1
0
Q
Q’
1
0
0 > 0
1 > 1
Stable!
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
0 0 0 1 0 1 0 10 0 1 0 1 0 1 0 0 1 0 1 0 1 0 10 1 1 0
1
0
Q
Q’
0
1
1
0
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
0 0 0 1 0 1 0 10 0 1 0 1 0 1 0 0 1 0 1 0 1 0 10 1 1 0 0 0
1
0
Q
Q’
0 > 0
1 > 0
1 > 0
0 > 0
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
0 0 0 1 0 1 0 10 0 1 0 1 0 1 0 0 1 0 1 0 1 0 10 1 1 0 0 0 0 1 *
Stable!
1
0
Q
Q’
0 > 0
1 > 0
1 > 0 > 0
0 > 0 > 1
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
0 0 0 1 0 1 0 10 0 1 0 1 0 1 0 0 1 0 1 0 1 0 10 1 1 0 0 0 0 1 *1 0 0 1
0
1
Q
Q’
1
0
0
1
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
0 0 0 1 0 1 0 10 0 1 0 1 0 1 0 0 1 0 1 0 1 0 10 1 1 0 0 0 0 1 *1 0 0 1 0 0
0
1
Q
Q’
1 > 0
0 > 0
0 > 0
1 > 0
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
0 0 0 1 0 1 0 10 0 1 0 1 0 1 0 0 1 0 1 0 1 0 10 1 1 0 0 0 0 1 *1 0 0 1 0 0 1 0 *
0
1
Q
Q’
1 > 0
0 > 0
0 > 0 > 1
1 > 0 > 0
Stable!
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
0 0 0 1 0 1 0 10 0 1 0 1 0 1 0 0 1 0 1 0 1 0 10 1 1 0 0 0 0 1 *1 0 0 1 0 0 1 0 *1 0 1 0 1 0 1 0
0
1
Q
Q’
0 > 0
1 > 1
1 > 1
0 > 0
Stable!
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table:
S R Q0 Q0’ Q1 Q1’ Q2 Q2’
0 0 0 1 0 1 0 10 0 1 0 1 0 1 0 0 1 0 1 0 1 0 10 1 1 0 0 0 0 1 *1 0 0 1 0 0 1 0 *1 0 1 0 1 0 1 01 1 x x 0 0 0 0
1
1
Q
Q’
x > 0
x > 0
x > 0
x > 0
Stable!
But not complementary!
( Q = Q’ )
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table: (Adapted)
S R Q0 Q0’ Q2 Q2’ Q+ Q+’
0 0 0 1 0 1 Q Q’ 0 0 1 0 1 0 Q Q’ 0 1 0 1 0 1 0 10 1 1 0 0 1 0 1 *1 0 0 1 1 0 1 0 *1 0 1 0 1 0 1 01 1 x x 0 0 Forbidden
R
S
Q+
Q +’
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table: (Adapted - Simplified)
S R Q+
0 0 Q0 1 0 1 0 1 1 1 (0) Forbidden
R
S
Q+
Q +’
SR Latch
• This circuit consists of two cross-coupled nor gates with
– two inputs, S and R, referred to as set and reset inputs
– two outputs, Q and Q’
• Truth table: (Adapted - Simplified)
S R Q+
0 0 Q0 1 0 1 0 1 1 1 (0) Forbidden
R
S
Q+
Q +’
S Q
R Q’
S Q
R Q
Two commonly used MSI symbols.
S’R’ Latch
S’R’ Latch
• This circuit consists of two cross-coupled nand gates with
– two complemented inputs, S’ and R’, referred to as set and reset inputs
– two outputs, Q+ and Q +’S’
R’
Q+
Q +’
S’R’ Latch
• This circuit consists of two cross-coupled nand gates with
– two complemented inputs, S’ and R’, referred to as set and reset inputs
– two outputs, Q+ and Q +’
• Truth table:
S’ R’ Q+
0 0 (1) Forbidden
0
0
Q+ = 1
Q +’ = 1
S’R’ Latch
• This circuit consists of two cross-coupled nand gates with
– two complemented inputs, S’ and R’, referred to as set and reset inputs
– two outputs, Q+ and Q +’
• Truth table:
S’ R’ Q+
0 0 (1) Forbidden0 1 1
S’ = 0
R’ = 1
Q+ = 1
Q +’ = 0
S’R’ Latch
• This circuit consists of two cross-coupled nand gates with
– two complemented inputs, S’ and R’, referred to as set and reset inputs
– two outputs, Q+ and Q +’
• Truth table:
S’ R’ Q+
0 0 (1) Forbidden0 1 1 1 0 0
S’ = 1
R’ = 0
Q+ = 0
Q +’ = 1
S’R’ Latch
• This circuit consists of two cross-coupled nand gates with
– two complemented inputs, S’ and R’, referred to as set and reset inputs
– two outputs, Q+ and Q +’
• Truth table:
S’ R’ Q+
0 0 (1) Forbidden0 1 1 1 0 0 1 1 Q
S’ = 1
R’ = 1
Q+ = Q
Q +’ = Q’
S’R’ Latch
• This circuit consists of two cross-coupled nand gates with
– two complemented inputs, S’ and R’, referred to as set and reset inputs
– two outputs, Q+ and Q +’
• Truth table:
S’ R’ Q+
0 0 (1**) 0 1 1 1 0 0 1 1 Q
S’
R’
Q+
Q +’
Two commonly used MSI symbols.
S Q
R Q’
S Q
R Q
D Flip-Flop
D Flip-Flop
• The D flip-flop overcomes the problem of the SR (S’R’) latch having forbidden states. It features a single input, D, and a control input, Clk, provided by the system clock, and produces outputs Q and Q’.
(Enable)
Clk
D
Q
Q’
D Flip-Flop• The D flip-flop overcomes the problem of the SR (S’R’) latch having forbidden states. It features a single input, D,
and a control input, Clk, provided by the system clock, and produces outputs Q and Q’.
– Note the SR latch sub-circuit element
(Enable)
Clk
D
Q
Q’
D Flip-Flop• The D flip-flop overcomes the problem of the SR (S’R’) latch having forbidden states. It features a single input, D, and a control input, Clk, provided by the system clock, and produces
outputs Q and Q’.
– Note the SR latch sub-circuit element
– The control input, Clk, controls a sub-circuit called a “gate”.
(Enable)
Clk
D
Q
Q’
D Flip-Flop• The D flip-flop overcomes the problem of the SR (S’R’) latch having forbidden states. It features a single input, D, and a control input, Clk, provided by the system clock, and produces outputs Q and Q’.
– Note the SR latch sub-circuit element
– The control input, Clk, controls a sub-circuit called a “gate”.
• Since D is the only input, the forbidden values, S = R = 1, never occur.
(Enable)
Clk
D
Q
Q’
D Flip-Flop• The D flip-flop overcomes the problem of the SR (S’R’) latch having forbidden states. It features a single input, D, and a control input, Clk, provided by the system clock, and produces outputs Q and Q’.
– Note the SR latch sub-circuit element
– The control input, Clk, controls a sub-circuit called a “gate”.
• Since D is the only input, the forbidden values, S = R = 1, never occur.
(Enable)
Clk
D
Q
Q’
0
0
0
When Clk = 0, it follows that:
S = R = 0
This implies no change of state:
Q+ = Q
D Flip-Flop• The D flip-flop overcomes the problem of the SR (S’R’) latch having forbidden states. It features a single input, D, and a control input, Clk, provided by the system clock, and produces outputs Q and Q’.
– Note the SR latch sub-circuit element
– The control input, Clk, controls a sub-circuit called a “gate”.
• Since D is the only input, the forbidden values, S = R = 1, never occur.
(Enable)
Clk
D
Q
Q’
D’
D
1
When Clk = 1, it follows that:
S = D and R = D’
Thus, the behaviour is:
D = S = 1 Q+ = 1
D = 0 (R = 1) Q+ = 0
JK Flip-Flop
JK Flip-Flop
• The basic JK flip-flop provides a solution to the problem of the SR latch with S=R=1 that produces forbidden output states.
JK Flip-Flop
• The basic JK flip-flop provides a solution to the problem of the SR latch with S=R=1 that produces forbidden output states.
• The JK flip-flop can be constructed from the gated SR latch by coupling additional feedback from the (Q, Q’) outputs into the J and K inputs.
J
Clk
K
Q
Q’
S QC QR
JK Flip-Flop
• The basic JK flip-flop provides a solution to the problem of the SR latch with S=R=1 that produces forbidden output states.
• The JK flip-flop can be constructed from the gated SR latch by coupling additional feedback from the (Q, Q’) outputs into the J and K inputs.
• With the clock disabled(C = 0) the SR latch retains the state (Q, Q’). J
Clk
K
Q
Q’
S QC QR
0
JK Flip-Flop
• The basic JK flip-flop provides a solution to the problem of the SR latch with S=R=1 that produces forbidden output states.
• The JK flip-flop can be constructed from the gated SR latch by coupling additional feedback from the (Q, Q’) outputs into the J and K inputs.
• With the clock enabled(C = 1) the SR latch produces outputs that depend on the J and Kinputs.
J
Clk
K
Q
Q’
S QC QR
1
JK Flip-Flop TRACE
• The JK flip-flop can be constructed from the gated SR latch by coupling additional feedback from the (Q, Q’) outputs into the J and K inputs. We denote the final output as Q+.
J
K
Q
Q’
This leads to the algebraic expression for the final output, labeled Q+, in terms of J, K and initial input Q:
Q+ = JQ’ + K’Q
META-STABLE !
J K Qin Qout
0 0 0 00 0 1 1
1 0 0 1 1 0 1 1 0 1 0 00 1 1 0
1 1 0 11 1 1 0
Actions:
J=K=0 Do nothing
J=1, K=0 Set Q=1
J=0, K=1 Reset Q=0
J=K=1 Complement Q = Q’
JK Flip-Flops – edge triggering
• The previous implementation of a JK flip-flop is considered unstable under certain circumstances. Utilizing an edge-triggered master-slave latch is used to produce a stable circuit.– Below is given a more typical JK using a master-slave approach
– WARNING: Tracing the logic may prove confusing as the actual circuits employ both leading-edge and trailing-edge gate elements in order to avoid forbidden states.
Q
Q
JK, D and T Flip-Flops
• JK flip-flops can be used to produce
– D flip-flops• Connect K to J using an inverter so they have different values
– T flip-flops• Sometimes called a complementer
• Connect J and K so they have the same values
– If J = K = 0, nothing happens (Q stays the same)– If J = K = 1, the complement of Q is outputted
• This illustrates, once again, the principle that common components can be used to achieve design goals in different ways.
Timing Considerations
Timing Considerations
• Real (physical) circuit elements take a finite time to respond to the stimulus of changing state (voltage).
• The behaviour of a logic device is characterized by the following times:
Timing Considerations
• Real (physical) circuit elements take a finite time to respond to the stimulus of changing state (voltage).
• The behaviour of a logic device is characterized by the following times:
– Propagation Delay
The time it takes to produce a change in anoutput signal based on the input signals.
S
R
Q
Q’
Tp,HL
Tp,LH
Timing Considerations
• Real (physical) circuit elements take a finite time to respond to the stimulus of changing state (voltage).
• The behaviour of a logic device is characterized by the following times:
– Propagation Delay
The time it takes to produce a change in anoutput signal based on the input signals.
S
R
Q
Q’
As the value of S begins to change, it is only when it has
reached a certain voltage level that the value of Q (Q’) begins
to change. S must be maintained at a
certain level for a minimum time period before Q can
stabilize.
Tp,HL
Tp,LH
Timing Considerations
• Real (physical) circuit elements take a finite time to respond to the stimulus of changing state (voltage).
• The behaviour of a logic device is characterized by the following times:
– Propagation Delay
– Minimum Pulse Width
The minimum amount oftime an input signal must be applied in order to produce a change in theoutput.
S
R
Q
Timing Considerations
• Real (physical) circuit elements take a finite time to respond to the stimulus of changing state (voltage).
• The behaviour of a logic device is characterized by the following times:
– Propagation Delay
– Minimum Pulse Width
– Setup Time - the minimum time the input signals must be held fixed before the latching action begins
Timing Considerations
• Real (physical) circuit elements take a finite time to respond to the stimulus of changing state (voltage).
• The behaviour of a logic device is characterized by the following times:
– Propagation Delay
– Minimum Pulse Width
– Setup Time - the minimum time the input signals must be held fixed before the latching action begins
– Hold Time - the minimum time the input signals must be held fixed until the latching action is completed
State Tables and Diagrams
State Tables and Diagrams
• Complex circuits are difficult to represent simply in a compact notation.– State tables are a form of truth tables where current values of flip-flop
outputs are used as inputs, along with other specified inputs, to determine outputs after a clock pulse.
State Tables and Diagrams
• Complex circuits are difficult to represent simply in a compact notation.– State diagrams are graphical representations of all possible transitions that
are described by a state table.
• Example: JK flip-flop Present State
Inputs Next state
Q(t) J K Q(t+1)
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
State Tables and Diagrams
• Complex circuits are difficult to represent simply in a compact notation.– State diagrams are graphical representations of all possible transitions that
are described by a state table.
• Example: JK flip-flop Present State
Inputs Next state
Q(t) J K Q(t+1)
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
0
1
Draw possible Q output states in circles (or
ellipses)
State Tables and Diagrams
• Complex circuits are difficult to represent simply in a compact notation.– State diagrams are graphical representations of all possible transitions that
are described by a state table.
• Example: JK flip-flop Present State
Inputs Next state
Q(t) J K Q(t+1)
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
0
1
00,01
State Tables and Diagrams
• Complex circuits are difficult to represent simply in a compact notation.– State diagrams are graphical representations of all possible transitions that
are described by a state table.
• Example: JK flip-flop Present State
Inputs Next state
Q(t) J K Q(t+1)
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
0
1
00,01
10,11
State Tables and Diagrams
• Complex circuits are difficult to represent simply in a compact notation.– State diagrams are graphical representations of all possible transitions that
are described by a state table.
• Example: JK flip-flop Present State
Inputs Next state
Q(t) J K Q(t+1)
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
0
1
00,01
00,10
10,11 01,11
State Tables and Diagrams
• Complex circuits are difficult to represent simply in a compact notation.– State diagrams are graphical representations of all possible transitions that
are described by a state table.
• Example: JK flip-flop Present State
Inputs Next state
Q(t) J K Q(t+1)
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
0
1
00,01
00,10
10,11 01,11
Draw transitions between output states. Allow for no change of value, as well as changes in value. Label each transition by the (list) of all JK inputs that effect
the transition.
If the inputs are themselves changed in transition, list the initial and final input
values separated by a slash ‘/’.
Characteristic Equations
Characteristic Equations
• Before proceeding, we stop briefly to recapitulate the various basic flip-flop circuits derived so far.
• Each circuit has an associated set of expressions that describe the outputs in terms of the inputs and the internal state at the time the circuit is enabled. These expressions are called the characteristic equations.
Characteristic Equations
S Q
C R Q’
SR flip-flop
Q+ = S + R’Q : (SR) = 0
Q+ refers to the output value after the next
clock interval, or Q(t+1).
Characteristic Equations
S Q
C R Q’
SR flip-flop D flip-flop
Q+ = S + R’Q : (SR) = 0 Q+ = D
D Q
C Q’
Characteristic Equations
J Q
C K Q’
S Q
C R Q’
SR flip-flop D flip-flop
JK flip-flop
Q+ = S + R’Q : (SR) = 0 Q+ = D
Q+ = JQ’ + K’Q
D Q
C Q’
Characteristic Equations
J Q
C K Q’
S Q
C R Q’
SR flip-flop D flip-flop
JK flip-flop T flip-flop
Q+ = S + R’Q : (SR) = 0 Q+ = D
Q+ = JQ’ + K’Q Q+ = TQ’ + T’Q
= T xorQ
D Q
C Q’
T Q
C Q’
Gated Latches
Gated Latches
• The concept of a gate, or a controlling element, is important in computer circuits.
• During the execution of a program only specific circuit elements should be active at a given time. These are often controlled using a strobe signal that provides a regular sequence of alternating voltage-HI (1) and voltage-LO (0) signals.
• Because of the regular nature of the signal sequence the strobe is called a “clock”.
• Thus, gate control is often achieved using a clock. Another type of control signal is called an “enable” signal.
Gated SR Latch
Gated SR Latch
• The SR latch is modified to a gated SR latch by applying a clock signal to the latch input.
S
(Enable) Clk
R
Q
Q’
Gated SR Latch
• The SR latch is modified to a gated SR latch by applying a clock signal to the latch input.
• This gives rise to the behaviour:
Clk = 0
S
(Enable) Clk
R
Q
Q’
0
Gated SR Latch
• The SR latch is modified to a gated SR latch by applying a clock signal to the latch input.
• This gives rise to the behaviour:
Clk = 0
S
(Enable) Clk
R
Q
Q’
1
1
0 Q’Q
Gated SR Latch
• The SR latch is modified to a gated SR latch by applying a clock signal to the latch input.
• This gives rise to the behaviour:
Clk = 0
S
(Enable) Clk
R
Q
Q’
1
1
0 Q’Q
Q
Q’
Gated SR Latch
• The SR latch is modified to a gated SR latch by applying a clock signal to the latch input.
• This gives rise to the behaviour:
Clk = 0
The outputs (Q, Q’)remain unchanged when the circuit is disabled.
The (Q,Q’) are stored in a stable manner.
S
(Enable) Clk
R
Q
Q’
1
1
0 Q’Q
Q
Q’
Gated SR Latch
• The SR latch is modified to a gated SR latch by applying a clock signal to the latch input.
• This gives rise to the behaviour:
Clk = 1
S
(Enable) Clk
R
Q
Q’
1
Gated SR Latch
• The SR latch is modified to a gated SR latch by applying a clock signal to the latch input.
• This gives rise to the behaviour:
Clk = 1
The first stage nandgates are activated by theClk signal to produce theoutputs (S’, R’).
S
(Enable) Clk
R
Q
Q’
S’
R’
1
Gated SR Latch
• The SR latch is modified to a gated SR latch by applying a clock signal to the latch input.
• This gives rise to the behaviour:
Clk = 1
The first stage nandgates are activated by theClk signal to produce theoutputs (S’, R’).
The remaining sub-circuit is just an S’R’ latch whose properties were discussed previously.
S
(Enable) Clk
R
Q
Q’
S’
R’
1
Gated SR Latch
• The SR latch is modified to a gated SR latch by applying a clock signal to the latch input.
• This gives rise to the behaviour:
Clk = 1
The first stage nandgates are activated by theClk signal to produce theoutputs (S’, R’).
The remaining sub-circuit is just an S’R’ latch whose properties were discussed previously.
S
(Enable) Clk
R
Q
Q’
S’
R’
1
The effect of the Clk input is to control the latch circuit. Changes
to (Q,Q’) may only occur when Clk=1 enables the circuit.
Gated D Latch
Gated D Latch
• We previously considered this circuit. See earlier notes.
(Enable)
Clk
D
Q
Q’
Gated D Latch
• We previously considered this circuit. See earlier notes.
• The MSI representationmay be given in two forms:
(Enable)
Clk
D
Q
Q’D QC Q’
D QC Q
(A)
(B)
Master-Slave Flip-Flops
Master-Slave Flip-Flops
• We have just considered the category of flip-flops called latches.
– Changes on the information input lines produce immediate responses on the output lines.
– This is called transparency.
• Now we consider the category of Master-Slave (pulse-triggered) flip-flop circuits.
– These circuits feature a control signal that enables one stage of a circuit while disabling a second stage, then the second stage is enabled while the first stage is disabled.
– This is called cascading of circuits.
Master-Slave SR Flip-Flop
Master-Slave SR Flip-Flop
• The SR flip-flop is adapted to the Master-Slave flip-flop by cascading two SR circuits with sequential enabling of each circuit by a Clk pulse.
Master-Slave SR Flip-Flop
• The SR flip-flop is adapted to the Master-Slave flip-flop by cascading two SR circuits with sequential enabling of each circuit by a Clk pulse.
S Q
C
R Q
S Q
C
R Q
QM
QM’
S
C
R
QS
QS’
Q
Q’
Master-Slave SR Flip-Flop
• The SR flip-flop is adapted to the Master-Slave flip-flop by cascading two SR circuits with sequential enabling of each circuit by a Clk pulse.
– When the clock is set, C = 1, the first stage gated SR latch is enabled, but the second stage is disabled.
S Q
C
R Q
S Q
C
R Q
QM
QM’
S
C
R
QS
QS’
Q
Q’
1 0
Master-Slave SR Flip-Flop
• The SR flip-flop is adapted to the Master-Slave flip-flop by cascading two SR circuits with sequential enabling of each circuit by a Clk pulse.
– When the clock is set, C = 1, the first stage gated SR latch is enabled, but the second stage is disabled.
– When the clock signal returns to C = 0, the first stage is disabled and the second stage is enabled.
S Q
C
R Q
S Q
C
R Q
QM
QM’
S
C
R
QS
QS’
Q
Q’
10
Registers
Registers
• A register is a collection of flip-flops taken as a single entity.
• Since flip-flops are memory units for single bits, then registers are the equivalent, multi-bit storage units.
– Since registers are comprised of a finite number, N, of flip-flops, the total number of 0 and 1 combinations is 2N.
– Each of these combinations is known as the content or state of the register.
• In addition to storage alone, registers may also have other capabilities associated with them.
– Clear, Load, Shift, Count
Registers
• A simple storage register based on the Master-Slave D flip-flop is constructed by chaining n of them as shown. The entire memory unit is controlled by the Clock (C) pulse.
D Q
C Q’
D Q
C Q’
Q0
Q0’
Q1
Q1’
D0
D1
C
D0 Q0 Q0’ D1 Q1 Q1’
. . .Dn-1 Qn-1 Q’n-1
C
Registers
• In a similar fashion, the Master-Slave T flip-flop is constructed by chaining n of them as shown, controlled by the clock (C) pulse.
T Q
C Q’
T Q
C Q’
Q0
Q0’
Q1
Q1’
T0
T1
C
T0 Q0 Q0’ T1 Q1 Q1’
. . .Tn-1 Qn-1 Q’n-1
C
Registers
• Thus, a register is a special multi-bit storage unit that is used to store data in a collective representation (eg. signed binary, BCD, and so on).
D0 Q0 Q0’ D1 Q1 Q1’
. . .Dn-1 Qn-1 Q’n-1
Enable
I0 I1
In-1
Clock Enable
N-bit Register
Q0 Q1
Qn-1
Stored Values
(Potential output)
Input Data
Registers
• We will discuss registers in more detail due to their importance in CPU design and in other places in a computer
• CPU registers used in the textbook (Mano):– PC :: Program counter
– IR :: Instruction register
– AR :: Address register
– DR :: Data register
– AC :: Accumulator
– INR :: Input buffer register
– OUTR :: Output buffer register
– SCR :: Sequence counter register (or just SC)
Summary
• We considered details and MSI views of:– Latches: SR , S’R’ , D
– Gated Latches: SR , D
– Master-Slave: SR , JK, D, T
• We also discussed the issue of timing and response as important behaviours that characterize and typify logic devices.
– Including propagation delay, minimum pulse width, set-up and hold times.
• We concluded by considering registers as conceptual extensions of the basic flip-flops.