Академический Документы
Профессиональный Документы
Культура Документы
Last lecture:
Digital circuits with feedback
Clocks
Flip-Flops
This Lecture:
Edge triggers
Registers
shift registers
counters
11/15/2004
Edge triggering
The last lecture ended with how a flip flop
could be designed by using two latches
which cascaded in a master-slave
relationship.
Another way of creating an edge triggered
flip flop is to use logic with feedback, as in
the following slide.
11/15/2004
Edge-Triggered Flip-Flops
More efficient solution: only 6 gates
sensitive to inputs only near edge of clock signal (not while high)
holds D' when
clock goes low
Clk=1
S
holds D when
clock goes low
D
11/15/2004
negative edge-triggered D
flip-flop (D-FF)
4-5 gate delays
must respect setup and hold time
constraints to successfully
capture input
characteristic equation
Q(t+1) = D
3
Edge-Triggered Flip-Flops
(contd)
Positive edge-triggered
Inputs sampled on rising edge; outputs change after rising edge
positive edge-triggered FF
Qpos'
Qneg
negative edge-triggered FF
Qneg'
11/15/2004
Timing Methodologies
As we have seen, there are several different ways
of designing a sequential logic circuit. In general,
each circuit will stick with a set of rules which are
designed to achieve consistently accurate results.
A set of rules for interconnecting components and
clocks are adopted which will guarantee proper
operation of system when strictly followed.
Approach depends on building blocks used for
memory elements. Edge-triggered flip-flops are
found in programmable logic devices
Many custom integrated circuits focus on levelsensitive latches
11/15/2004
11/15/2004
data
D Q
D Q
input
clock
clock
stable changing
data
clock
CLK
Qedge
D Q
G
Qlatch
CLK
transparent
(level-sensitive)
latch
11/15/2004
unclocked
latch
always
level-sensitive
latch
clock high
(Tsu/Th around falling
edge of clock)
master-slave
flip-flop
clock high
(Tsu/Th around falling
edge of clock)
negative
clock hi-to-lo transition propagation delay from falling edge
edge-triggered (Tsu/Th around falling
of clock
flip-flop
edge of clock)
11/15/2004
CLK
Tsu
Th
0.8 ns0.5 ns
Tsu
Th
0.8 ns 0.5 ns
Tw 1ns
all measurements are made from the clocking event that is,
the rising edge of the clock
11/15/2004
10
D Q
Q0
D Q
Q1
OUT
CLK
100
IN
Q0
Q1
CLK
11/15/2004
11
Tsu
4ns
Tsu
4ns
Tp
3ns
Q1
Tp
3ns
CLK
11/15/2004
timing constraints
guarantee proper
operation of
cascaded components
Th
2ns
Th
2ns
EE 42 fall
2004 lecture 32
12
Clock Skew
The problem
Correct behavior assumes next state of all storage elements
determined by all storage elements at the same time
This is difficult in high-performance systems because time for
clock to arrive at flip-flop is comparable to delays through logic
Effect of skew on cascaded flip-flops:
In
Q0
100
Q1
CLK1 is a delayed
version of CLK0
CLK0
CLK1
original state: IN = 0, Q0 = 1, Q1 = 1
due to skew, next state becomes: Q0 = 0, Q1 = 0, and not Q0 = 0, Q1 = 1
11/15/2004
13
Development of D-Flip-Flop
Historically J-K Flip Flop was popular but now never used
Similar to R-S but with 1-1 being used to toggle output (complement state)
Can always be implemented using D-FF
11/15/2004
14
Flip-Flop Features
Reset (set state to 0) R
Synchronous: Dnew = R' Dold (when next clock edge arrives)
Asynchronous: doesn't wait for clock, quick but dangerous
15
Registers
Collections of flip-flops with similar controls and logic
Stored values somehow related (e.g., form binary value)
Share clock, reset, and set lines
Similar logic at each stage
Examples
Shift registers
Counters
"0"
OUT1
OUT2
R S
D Q
OUT3
R S
D Q
R S
D Q
OUT4
R S
D Q
CLK
IN1
11/15/2004
IN2
IN3
IN4
16
Shift Register
Holds samples of input
Store last 4 input values in sequence
4-bit shift register:
OUT1
IN
D Q
D Q
OUT2
D Q
OUT3
OUT4
D Q
CLK
11/15/2004
17
parallel inputs
serial transmission
11/15/2004
18
Pattern Recognizer
Combinational function of input samples
In this case, recognizing the pattern 1001 on
the single input signal
OUT
OUT1
IN
D Q
OUT2
D Q
OUT3
D Q
OUT4
D Q
CLK
11/15/2004
19
Binary Counter
Logic between registers (not just multiplexer)
XOR decides when bit should be toggled
Always for low-order bit, only when first bit is true for
second bit, and so on
OUT1
D Q
OUT2
D Q
OUT3
D Q
OUT4
D Q
CLK
"1"
11/15/2004
20
Timing methodologies
Use of clocks
Cascaded FFs work because prop delays exceed hold times
Beware of clock skew
Basic registers
Shift registers
Pattern detectors
Counters
11/15/2004
21