CSC258H1 Lecture Notes - Asynchronous Circuit, Shift Register, Sequential Circuits

31 views2 pages
Published on 20 Apr 2013
School
UTSG
Department
Computer Science
Course
CSC258H1
Professor
Page:
of 2
SEQUENTIAL CIRCUIT DESIGN
Circuits using flip-flops
Example #1: Shift registers
o A series of D flip-flops can store a multi-bit value (such as a 16-bit int)
o Data can be shifted into this register 1 bit at a time, over 16 clock
cycles
o Ex. 4-bit shift register used to store 1011 then 0000
Read from Q3 to Q0
Example #2: Load registers
o One can also load a register’s values all at once, by feeding signals to
each flip-flop
Ex. a 4-bit load register
o To control when this register is allowed to load its values, we
introduce the D flip-flop with enable
o Truth table
EN
D
0
0
0
0
0
0
1
1
0
1
0
0
0
1
1
1
1
0
0
0
1
0
1
0
1
1
0
1
1
1
1
1
o Implementing the register with these special D flip-flops will now
maintain values in the register until overwritten by setting EN high
Example 3: Counters
o Consider the T flip-flop
Output is inverted when input T is high
o What happens when a series of T flip-fliops are connected together
in sequence
o More interesting
Connect the output of one flip-flop to the clock input of the next
o This is a 4-bit ripple counter
Which is an example of an asynchronous circuit
Timing isn’t quite synchronized with the rising clock pulse
Cheap to implement, but unreliable for timing
o This is a synchronous counter, with a slight delay
Could be synchronized even more by having each AND gate
combine outputs of all previous flip-flops
o Counters are often implemented with a parallel load and clear inputs
Loading a counter value is used for countdowns
Designing with flip-flops
o Counters and registers are examples of how flip-flops can implement
useful circuits that store values
o Sequential circuits are the basis for memory, instruction processing,
and any other operation that requires the circuit to remember past
data values.
o These past data values are also called the states of the circuit.
o Sequential circuits use combinational logic to determine what the
next state of the system should be, based on the past state and the
current input values.
State example: counters
o With counters, each state is the current number that is stored in the
counter
o On each clock tick, the circuit transitions from one state to the next,
based on the inputs
o State tables help to illustrate how the states of the circuit change
with various input values
Transitions are understood to take place on the clock ticks
Can also be represented with flip-flop values, instead of state
labels. Note: flip-flop values are both inputs and outputs of the
circuit
State Prev.
F1
F2
F3
Write
State Next
Zero
0
0
0
0
Zero
Zero
0
0
0
1
One
One
0
0
1
0
One
One
0
0
1
1
Two
Two
0
1
0
0
Two
Two
0
1
0
1
Three
Three
0
1
1
0
Three
Three
0
1
1
1
Four
Four
1
0
0
0
Four
Four
1
0
0
1
Five
Five
1
0
1
0
Five
Five
1
0
1
1
Six
Six
1
1
0
0
Six
Six
1
1
0
1
Seven
Seven
1
1
1
0
Seven
Seven
1
1
1
1
Zero

Document Summary

Example #1: shift registers: a series of d flip-flops can store a multi-bit value (such as a 16-bit int, data can be shifted into this register 1 bit at a time, over 16 clock cycles, ex. 4-bit shift register used to store 1011 then 0000. Read from q3 to q0: implementing the register with these special d flip-flops will now maintain values in the register until overwritten by setting en high. Example 3: counters: consider the t flip-flop. Output is inverted when input t is high: what happens when a series of t flip-fliops are connected together in sequence, more interesting. Connect the output of one flip-flop to the clock input of the next. Example #2: load registers: one can also load a register"s values all at once, by feeding signals to each flip-flop. Ex. a 4-bit load register: this is a 4-bit ripple counter. Which is an example of an asynchronous circuit.