Professional Documents
Culture Documents
Chap 06
Chap 06
Transfers
Registers
Control Signals
Control Inputs
Status Signals
Control
Datapath Data
Outputs
Unit
Control Data
Outputs Inputs
input/output logic
Register Transfer Operations
K1: R2 R1 n
R1 R2
where K1 is a control
signal generated in control
unit. Clock
Logical Groupings:
• Transfer - move data from one register to another
• Arithmetic - perform arithmetic on data in registers
• Logic – perform bit manipulation on data in registers
• Shift - shift data in registers
Not
Example Microoperations
2, or destination.
Symbolic Description
Designation
Let R1 = 10101010,
and R2 = 11110000
Then after the operation, R0 becomes:
R0 Operation
01010101 R0 R1
11111010 R0 R1 R2
10100000 R0 R1 R2
01011010 R0 R1 R2
X Å1 = X
X Å0=X
Shift Microoperations
Symbolic Description
Let R2 = 11001001 Designation
becomes: R1 Operation
10010010 R1 ¬ sl R2
01100100 R1 ¬ sr R2
Note: These shifts "zero fill". Sometimes a separate flip-flop is used to provide the data
K
R2 2
K The quad 2-to-1 Mux selects
1
between the two registers
Load
n S
0 n
MUX R0
n
1
R1
Shift Registers
Shift Registers move data laterally within the register toward
its MSB or LSB position – in both directions.
In the simplest case, the shift register is simply a set of
D flip-flops connected in a row like this:
In A B C Out
DQ DQ DQ DQ
4-Bit Shift
Register
CP
Data input, In, is called a serial input or the shift right input.
Data output, Out, is often called the serial output.
The vector (A, B, C, Out) is called the parallel output.
Shift Register with Parallel Load
Shift Load Operation
0 0 No change (Hold)
0 1 Load parallel data
1 X Shift down from Q0 to Q3
Shift: Q sl Q
Shift
SHR 4
Shift . Load: Q D
Load
Q0
SI
Q1
D0
D1 Q2
Bidirectional Shift Register with Parallel Load
S1 S0 Register Operation
0 0 No change (Hold)
0 1 Shift down
1 0 Shift up
1 1 Parallel Load
Clock
S1.S0: Q sl Q
S1
SHR 4
Mode S1
S1.S0: Q sr Q
S0
Mode S0 Q0
S1.S0: Q D
LSI
Left Serial Input
Q1
D0
D1 Q2
Counters
Counters are sequential circuits which "count" through
a specific state sequence. They can count up, count
down, or count through other fixed sequences. Two
distinct types are in common usage:
Binary Ripple Counters
• Clock connected to the flip-flop clock input on the LSB bit flip-
flop
• For all other bits, a flip-flop output is connected to the clock
input, thus circuit is not truly synchronous!
• Output change is delayed more for each bit toward the MSB.
• Favored because of low power consumption
Synchronous Counters
• Clock is directly connected to the flip-flop clock inputs
• Logic is used to implement the desired state sequencing
Ripple Counter
of A, A complements
Clock
• The clock input for flip- CR
Complements Q2, 0 to 1
Synchronous Counters (continued)
Internal details => Incrementer
D Q0
Internal Logic Count enable EN
C
• XOR complements each bit
• AND chain causes complement
D Q1
of a bit if all bits toward LSB
C
from it equal 1
Count Enable
• Forces all outputs of AND D Q2
Carry Out
• Added as part of incrementer D Q3
• Connect to Count Enable of C
EN
Carry chain
• series of AND gates through which the Q1
carry “ripples” C1
• Yields long path delays
• Called serial gating
Q2
Replace AND carry chain with ANDs => C2
in parallel
• Reduces path delays Q3
• Called parallel gating C3
CTR 4
• Like carry lookahead EN Q0
• Lookahead can be used on COs Q1
Q2
and ENs to prevent long paths in Q3
large counters CO CO
D 0 D Q 0
and Count = 1
The resulting function table:
D 2 D Q 2
1 X Load D C
Carry
Output CO
Clock
Register Cell Design
Register A Specification:
• Data input: B
• Control inputs (CX, CY)
• Control input combinations (0,0), (0,1) (1,0)
• Register transfers:
• CX: A ← B v A
• CY :A ← B + A
• Hold state: (0,0)
Example 1: Register Cell Design (continued)
Load Control
Load = CX + CY
Since all control combinations appear as if
encoded (0,0), (0,1), (1,0) can use multiplexer
without encoder:
S1 = CX
S0 = CY
D0 = Ai Hold A
D1 = Ai ← Bi + Ai CY = 1
D2 = Ai ← Bi v Ai CX = 1
Note that the decoder part of the 3-input
multiplexer can be shared between bits if desired
Example 1 Again
State Table:
Hold Ai v Bi Ai + Bi
CX = 0 CX = 1 CX = 1 CY = 1 CY = 1
Ai CY = 0 Bi = 0 Bi = 1 Bi = 0 Bi = 1
0 0 0 1 0 1
1 1 1 1 1 0
• Four variables give a total of 16 state table entries
• By using:
Combinations of variable names and values
Don’t care conditions (for CX = CY = 1)
only 8 entries are required to represent the 16 entries
Example 1 Again (continued)
K-map - Use variable ordering CX, CY, Ai Bi and
assume a D flip-flop
Di Ai
0 0 1 1
0 1 0 1
CY
X X X X
CX
0 1 1 1
Bi
Example 1 Again (continued)
The resulting SOP equation:
Di = CX Bi + CY Ai Bi + Ai Bi + CY Ai
Using factoring and DeMorgan’s law:
Di = CX Bi + Ai (CY Bi) + Ai(CY Bi )
Di = CX Bi + Ai + (CY Bi)
The gate input cost per cell = 2 + 8 + 2 + 2 = 14
The gate input cost per cell for the previous
version is:
Per cell: 19
Multiplexer connected to
each register input
produces a very flexible
transfer structure
There can be three distinct registers
as source, so can simultaneously do
any three register transfers
Mux = 2 AND gates + 1 OR gate
Total = 9 gates
Register Transfer Using Single Bus
Select Load
Register transfer S1 S0 L2 L1 L0
R0 R2 1 0 0 0 1
R0R1, R2 R1 0 1 0 0 1
impossible.
Multiplexer Bus