126
omputer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Embed Size (px)

Citation preview

Page 1: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Computer Architecture I: Digital Design

Dr. Robert D. Kent

Logic DesignSequential Circuits

Part I

Page 2: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential 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

Page 3: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Goals

• Previously, we studied Combinational circuits, or networks.

– These are time independent because the inputs, once provided, immediately establish what the outputs will be.

Page 4: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 5: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 6: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 7: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 8: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 9: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 10: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Goals

• The basic logic element is called the Flip-Flop circuit.

Page 11: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Goals

• The basic logic element is called the Flip-Flop circuit.

• We will study first a primitive element - the basic bi-stable element.

Page 12: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 13: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 14: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 15: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Basic Bi-stable Element

• The basic bi-stable element is a simple device characterized by

– no inputs !!!

– Two outputs.

Page 16: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 17: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 18: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 19: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 20: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 21: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 22: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 23: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 24: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 25: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Latches

Page 26: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Latches

• A Flip-Flop is a bistable device that permits both probing of its current state (value) and modification of the state.

Page 27: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 28: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 29: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 30: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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).

Page 31: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

SR Latch

Page 32: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 33: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 34: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 35: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 36: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’.

Page 37: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 38: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 39: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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!

Page 40: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 41: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 42: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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!

Page 43: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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!

Page 44: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 45: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 46: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 47: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 48: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 49: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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!

Page 50: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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!

Page 51: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’ )

Page 52: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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 +’

Page 53: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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 +’

Page 54: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 55: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

S’R’ Latch

Page 56: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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 +’

Page 57: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 58: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 59: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 60: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 61: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 62: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

D Flip-Flop

Page 63: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 64: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 65: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 66: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 67: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 68: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 69: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

JK Flip-Flop

Page 70: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 71: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 72: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 73: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 74: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 75: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 76: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 77: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Timing Considerations

Page 78: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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:

Page 79: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 80: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 81: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 82: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 83: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 84: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

State Tables and Diagrams

Page 85: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 86: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 87: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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)

Page 88: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 89: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 90: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 91: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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 ‘/’.

Page 92: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Characteristic Equations

Page 93: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 94: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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).

Page 95: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 96: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 97: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 98: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Gated Latches

Page 99: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 100: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Gated SR Latch

Page 101: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 102: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 103: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 104: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 105: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 106: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 107: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 108: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 109: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 110: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Gated D Latch

Page 111: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Gated D Latch

• We previously considered this circuit. See earlier notes.

(Enable)

Clk

D

Q

Q’

Page 112: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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)

Page 113: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Master-Slave Flip-Flops

Page 114: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 115: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Master-Slave SR Flip-Flop

Page 116: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.

Page 117: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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’

Page 118: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 119: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 120: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

Registers

Page 121: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 122: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 123: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 124: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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

Page 125: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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)

Page 126: Computer Architecture I: Digital Design Dr. Robert D. Kent Logic Design Sequential Circuits Part I

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.