Академический Документы
Профессиональный Документы
Культура Документы
Lecture
21 of Engineering
KU College
Example (1 0 1) x (0 1 1) Again
Reorganizing example to follow hardware algorithm:
1
0
0
1
1
1
0
1
0
0
0
1
Clear C || A
Multipler0 = 1 => Add B
0
1
0
1
0
1
1
0
1
Addition
Shift Right (Zero-fill C)
Multipler1 = 1 => Add B
0
0
0
1
0
0
1
1
0
1
1
1
1
1
1
x
0
+
0
0
1
1
Lecture
21 of Engineering
KU College
Addition
Shift Right
Multipler2 = 0 => No Add, Shift
Right
2
n-1
Counter P
Register B
n
log2 n
Zero detect
G (Go)
Control
unit
out
Z
Qo
Parallel adder
n
Multiplier
Shift register A
4
Control signals
Lecture
21 of Engineering
KU College
Shift register Q
n
Product
OUT
3
Lecture
21 of Engineering
KU College
1
0
C 0, A 0
P n 1
Q0
A A + B,
C Cout
MUL1
C 0, C || A || Q sr C || A || Q,
P P1
Lecture
21 of Engineering
KU College
right shift is performed to capture the partial product and position the next bit
of the multiplier in Q0
Lecture
21 of Engineering
KU College
Microope ration
Control
Sign al Name
Register A :
A0
A A + B
C || A || Q sr C || A || Q
Initialize
Load
Shift_dec
IDLE G
MUL0 Q
MUL1
Register B:
B IN
Load_B
LOADB
Flip-Flop C:
C0
C C out
Clear_C
Load
IDLE G + MUL1
Register Q:
Q IN
C || A || Q sr C || A || Q
Load_Q
Shift_dec
LOADQ
Counter P:
P n1
P P1
Initialize
Shift_dec
Lecture
21 of Engineering
KU College
Contro l
Expression
Lecture
21 of Engineering
KU College
00
MUL0
01
MUL1
10
Lecture
21 of Engineering
KU College
1
9
Hardwired Control
Control Design Methods
The procedure from Chapter 6
Procedure specializations that use a single signal to
represent each state
Sequence Register and Decoder
Sequence register with encoded states, e.g., 00, 01, 10, 11.
Decoder outputs produce state signals, e.g., 0001, 0010,
0100, 1000.
One Flip-flop per State
Flip-flop outputs as state signals, e. g., 0001, 0010, 0100,
1000.
Lecture
21 of Engineering
KU College
10
Second, find
State Assignments (two bits required)
We will use two state bits to encode
the three state IDLE, MUL0, and MUL1.
Lecture
21 of Engineering
KU College
M0
IDLE
MUL0
MUL1
Unused
1
11
IDLE
IDLE
IDLE
IDLE
MUL0
MUL0
MUL0
MUL0
Input
G Z
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
Next State
M1 M0
0
0
0
0
1
1
1
1
Lecture
21 of Engineering
KU College
0
0
1
1
0
0
0
0
Current State
M1 M0
MUL1
MUL1
MUL1
MUL1
Unused
Unused
Unused
Unused
Input
G Z
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
Next State
M1 M0
0
0
0
0
d
d
d
d
1
0
1
0
d
d
d
d
12
Lecture
21 of Engineering
KU College
13
Lecture
21 of Engineering
KU College
14
Initialize
M0
D
C
Clear_C
DECODER
A0
0
1
2
A1
3
IDLE
MUL0
MUL1
Shift_dec
M1
D
C
Q0
Lecture
21 of Engineering
KU College
Load
15
Lecture
21 of Engineering
KU College
16
Entry
STATE
STATE
Exit
Lecture
21 of Engineering
KU College
Exit
17
Entry
Exit 0
Exit 1
Exit 0
Lecture
21 of Engineering
KU College
Exit 1
18
00
01
(Vector of Input
Conditions)
X 1, X 0
Lecture
21 of Engineering
KU College
10
DEMUX
Entry
EN
X1
A1
A0
X0
D2
Exit 0
Exit 1
Exit2
D3
Exit 3
D0
D1
19
Entry 2
Exit
Lecture
21 of Engineering
KU College
Entry 1
Entry 2
Exit
20
Entry
X
OUTPUT
Exit 1
Lecture
21 of Engineering
KU College
OUTPUT
Exit 1
21
START
IDLE
Initialize
4
C
MUL0
DEMUX
D0
EN
A0
D1
5
Clear _C
1 Q0
Load
D
C
MUL1
D
Clock
5
Shift_dec
C
2
Lecture
21 of Engineering
KU College
DEMUX
D0
EN
D1
A0
22
Lecture
21 of Engineering
KU College
23
Any solution that uses one state must combine all of the
operations listed into one state
The operations involving P are already done in a single
state, so are not a problem.
The right shift, however, depends on the result of the
conditional addition. So these two operations must be
combined!
Lecture
21 of Engineering
KU College
24
Lecture
21 of Engineering
KU College
IDLE
A
P
0
n 1
MUL
P
P1
sr Cout || (A + 0) || Q
00
01
sr Cout || (A +B) || Q
A || Q
Z || Q 0
sr Cout || (A + 0) || Q
10
11
A || Q
sr Cout || (A+B) || Q
25