Академический Документы
Профессиональный Документы
Культура Документы
CHAPTER VII-1
CHAPTER VII
SEQUENTIAL SYSTEMS
CHAPTER VII
SEQUENTIAL SYSTEMS - LATCHES & REGISTERS
Reading Material:
Ch. 7 of Wakerly
Latches and Registers in eBook
SEQUENTIAL SYST.
INTRODUCTION
SEQUENTIAL SYSTEMS
SEQUENTIAL SYSTEMS
-INTRODUCTION
Logistics:
Exam 2 on next Tuesday (March 10)
Will cover the following chapters from the ebook:
Number Systems -- SM, DRC, RC,
Arithmetic addition, subtraction,
Building Blocks combinational circuits,
and Latches and Registers -- sequential circuits
Homework #5 is posted and due Sunday(3/8) at 11:55 pm
Assembly Language
Instruction Set
Memory
Datapath
Controller
Storage
Functional Units
State Machines
Building Blocks
Gates
andStructures/Design
Wire
TaxonomySwitches
of Computing
hierarchy
SEQUENTIAL SYST.
SEQUENTIAL SYSTEMS
INTRODUCTION
So
far...
So far we have dealt only
with combinational logic
where the output is formed
from the current input.
SEQUENTIAL SYSTEMS
-INTRODUCTION
Input
Combinational Output
Logic
Sequential systems
Sequential systems extend the idea of combinational logic by including a
system state, or in other words memory, to our system.
This allows our system to perform operations that build on past
operations in a sequential manner (i.e. one after another).
Timing diagrams will be needed to analyze the operation of many
sequential systems.
SEQUENTIAL SYST.
Mealy machine
Sequential system where
Input
Moore machine
Sequential system where
output depends only on
current state.
SEQUENTIAL SYSTEMS
-INTRODUCTION
Sequential System
Combinational
Logic
Output
Memory
(state)
Input
Sequential System
Combinational
Logic
Memory
(state)
Output
Latches and flip-flops are the basic building blocks of most sequential
circuits.
STORING BITS
STORING A BIT
SEQUENTIAL SYSTEMS
-INTRODUCTION
-MEALY & MOORE
Since there are propagation delays in real components, this time delay can
be used to store information.
For instance, the following buffer has a propagation delay of t p d .
A
F
tpd
Timin
g
Diagra
m
A
F
STORING BITS
FEEDBACK LOOPS
SEQUENTIAL SYSTEMS
SEQUENTIAL SYSTEMS
STORING BITS
-STORING A BIT
0
tpd
2 tpd
2 tpd
1
tpd
STORING BITS
FEEDBACK LOOPS
SEQUENTIAL SYSTEMS
STORING BITS
-STORING A BIT
Analog
analysis of
circuit
How do we get the bit we want to store into the feedback loop?
LATCHES
LATCHES
-CONSTRUCTING A LATCH
-SR LATCH -NAND GATES
-MIXED LOGIC EQUIV.
S (set)
S R Q Q
1 0 1 0
0 0 1 0 (after S = 1, R =
0)
0 1 0 1
0 0 0 1 (after S = 0, R =
1)
1 1 0 0 (invalid)
R.M. Dansereau; v.1.0
S R Q Q
0
Q Q
0
1
1
1
0
1
0 1
1 0
0 0
Recall:
A
B
NOR
0 0
0 1
1 0
1 1
1
0
0
0
LATCHES
R (reset)
CLK
S (set)
LATCHES
-CONSTRUCTING A LATCH
-SR LATCH -NAND GATES
-MIXED LOGIC EQUIV.
Recall:
A B
NAND
0
0
0
1
1
0
1
1
1
0
0
0
CLK S R Q Q
CLK S R Q Q
0
1
1
1
1
X
0
0
1
1
X
0
1
0
1
Q
Q
0
1
0
Q
Q
1
0
0
Action
No Change/Hold
No Change/Hold
Reset
Set
(invalid)
0 X X Q Q
1 1 0 1 0
1 0 0 1 0
1 0 1 0 1
1 0 0 0 1
1 1 1 0 0
(after S = 1, R = 0)
(after S = 0, R = 1)
(invalid)
LATCHES
-D LATCH (WITH TG)
-NAND PRIMITIVES
-CONSTRUCTING A LATCH
NAND gates can also be used to create a latch, this time an SR latch.
S R Q Q
1 0 0 1
Q
1 1 0 1 (after S = 1, R =
0)
0 1 1 0
1 1 1 0 (after S = 0, R =
Q
R (reset)
1)
0 0 1 1 (invalid)
Recall:
A B
NAND
0
0
1
0
1
1
1
0
1
Notice that this latch is level-sensitive.
1
1
0
S
(set)
LATCHES
LATCHES
LATCHES
-SR LATCH -NAND GATES
-MIXED LOGIC EQUIV.
-SR LATCH -NOR GATES
CLK
This control line makes it possible to decide when the inputs S and R
are allowed to change the state of the latch.
LATCHES
D LATCH (WITH SR LATCH)
LATCHES
-MIXED LOGIC EQUIV.
-SR LATCH -NOR GATES
-SR LATCH W/ CONTROL
CLK
R
Note that as long as CLK = 1 , that the latch will change according to
the value of D .
R.M. Dansereau; v.1.0
LATCHES
TIMING DIAGRAMS
LATCHES
-SR LATCH -NOR GATES
-SR LATCH W/ CONTROL
-D LATCH
Timing diagrams allow you to see how a sequential system changes with
time using different inputs.
For instance, a timing diagram for a D latch might look like the
following.
CLK
D
Q
Q
Time
STORING BITS
SEQUENTIAL SYSTEMS
LOADING A BIT
SEQUENTIAL SYSTEMS
STORING BITS
-STORING A BIT
-FEEDBACK LOOPS
To store a bit, we need a way of loading an input bit into the structure and
making/breaking the connection in the feedback look.
One way of breaking connections is to use transmission gates.
S1
A
S2
TG
TG
Q
Q
0 and S 2
= 1 and S 2 =
= 1 , A gets
LATCHES
STORING BITS
-STORING A BIT
-FEEDBACK LOOPS
-LOADING A BIT
C
(Enable)
TG
D
TG
If D changes while C = 1,
then Q will change as well.
Q
Q
The control line C might be derived from the clock signal, or a signal
from the controller/sequencer in the microprocessor.
R.M. Dansereau; v.1.0
LATCHES
TRANSPARENCY (1)
LATCHES
-SR LATCH W/ CONTROL
-D LATCH
-TIMING DIAGRAMS
Enable
IN
Transparen
t Latch
Enable
OUT
Q
Q
Note:
Transparen
t
LATCHES
TRANSPARENCY (2)
SEQUENTIAL SYSTEMS
LATCHES
-D LATCH
-TIMING DIAGRAMS
-TRANSPARENCY
IN
When Enable = 0,
input disconnected and
stored bit outputed.
Transparen
t Latch
OUT
When Enable = 1,
latch acts like wire.
Enable
Stored
bit
IN
OUT
0
IN
OUT
1
LATCH EXAMPLE
PROBLEMS W/ TRANSPARENCY
LATCHES
-D LATCH
-TIMING DIAGRAMS
-TRANSPARENCY
This is a problem if the input of a latch depends on the output of the same
latch.
Example: Design a system that flips a stored bit whenever Enable goes
high.
LATCH EXAMPLE
PROBLEMS W/ TRANSPARENCY
LATCHES
LATCH EXAMPLE
-PROB W/TRANSPARENCY
B
Enable
Enable
A
B
This is
LATCH EXAMPLE
ELIMINATING TRANSPARENCY
LATCHES
LATCH EXAMPLE
-PROB W/TRANSPARENCY
stored bit whenever Enable goes high. This design now uses a master
and a slave transparent latches to separate the input from the output.
Master
Transparen
t Latch
Transparen
t Latch
Enable
Enable
Slave
LATCH EXAMPLE
SEQUENTIAL SYSTEMS
LATCHES
LATCH EXAMPLE
-PROB W/TRANSPARENCY
-ELIMIN. TRANSPARENCY
TIMING DIAGRAM
Enable
Enable
Enable
A
B
C
R.M. Dansereau; v.1.0
Transparen
t Latch
B
Enable
LATCH EXAMPLE
LATCH BEHAVIOUR
SEQUENTIAL SYSTEMS
LATCH EXAMPLE
-PROB W/TRANSPARENCY
-ELIMIN. TRANSPARENCY
-TIMING DIAGRAM
The behaviour of the master and the slave transparent latches can be
thought of as follows.
Enable = 1
bit
A
Enable = 0
bit
A
FLIP-FLOPS
LATCH EXAMPLE
-ELIMIN. TRANSPARENCY
-TIMING DIAGRAM
-LATCH BEHAVIOUR
Transparen
t Latch
Transparen
t Latch
Enable
Enable
OUT
IN
OUT
Enable
FLIP-FLOPS
EDGE TRIGGERED
LATCH EXAMPLE
FLIP-FLOPS
-SINGLE BIT STORAGE
Transparen
t Latch
Transparen
t Latch
Enable
Enable
OUT
Transparen
t Latch
Transparen
t Latch
Enable
Enable
OUT
FLIP-FLOPS
LATCH EXAMPLE
FLIP-FLOPS
-SINGLE BIT STORAGE
-EDGE TRIGGERED
The output C, which is also the bit stored, appears to change on the
negative edge of the Enable transitions.
IN
A
Enable
Enable
A
B
C
Transparen
t Latch
Enable
Transparen
t Latch
B
Enable
OUT
C
FLIP-FLOPS
FLIP-FLOPS
-SINGLE BIT STORAGE
-EDGE TRIGGERED
-NEG. EDGE TRIGGERED
The output C, which is also the bit stored, appears to change on the
positive edge of the Enable transitions.
IN
A
Enable
Enable
A
B
C
Transparen
t Latch
Enable
Transparen
t Latch
B
Enable
OUT
C
FLIP-FLOPS
NON-IDEAL W/ DUAL-PHASE
FLIP-FLOPS
-EDGE TRIGGERED
-NEG. EDGE TRIGGERED
-POS. EDGE TRIGGERED
In reality, an
Propagation
delays shift
the outputs and
skew transitions
Notice that Enable /Enable are replaced with 1 /2 , which are nonoverlapping phases (normally generated from a dual-phase clock).
R.M. Dansereau; v.1.0
FLIP-FLOPS
DUAL-PHASE ENABLE
FLIP-FLOPS
-NEG. EDGE TRIGGERED
-POS. EDGE TRIGGERED
-NON-IDEAL W/DUAL-
Transparen
t Latch
Transparen
t Latch
OUT
IN
1-bit
flip-flop
OUT
1 2
If the master has not latched, the slave sees the input transparently!!!
REGISTERS
Assembly Language
Instruction Set
Memory
Datapath
Controller
Storage
Functional
Units
State
Machines
Building Blocks
Gates
Switches and Wire
FLIP-FLOPS
-POS. EDGE TRIGGERED
-NON-IDEAL W/DUAL-
-DUAL-PHASE ENABLE
REGISTERS
A0
1-bit
flip-flop
D0
A1
1 2
1-bit
flip-flop
D1
FLIP-FLOPS
-POS. EDGE TRIGGERED
-NON-IDEAL W/DUAL-
-DUAL-PHASE ENABLE
1 2
An 1
1-bit
flip-flop
1 2
1 2
Dn 1
REGISTERS
FLIP-FLOPS
REGISTERS
-REGISTERS F/FLIP-FLOPS
Transparen
t Latch
Transparen
t Latch
OUT
REGISTERS
FLIP-FLOPS
REGISTERS
-REGISTERS F/FLIP-FLOPS
-READ/WRITE CONTROL
IN
Transparen
t Latch
Transparen
t Latch
OUT
Read/Write
When Read/Write = 0, the output is feed back into the master latch.
When Read/Write = 1, the input is feed into the master latch.
R.M. Dansereau; v.1.0
REGISTERS
FLIP-FLOPS
REGISTERS
-REGISTERS F/FLIP-FLOPS
-READ/WRITE CONTROL
Transparen
t Latch
Transparen
t Latch
OUT
Read/Write
What problems might exist with this design?
One issue might be that both latch enables are 0 when R/W
= 0.
R.M. Dansereau; v.1.0