Professional Documents
Culture Documents
Digital System Design
Digital System Design
Kuruvilla Varghese
DESE
Indian Institute of Science
Kuruvilla Varghese
• Structure
• Design
• Timing analysis
Kuruvilla Varghese
1
Synchronous Counter 3
Output Waveform 4
CLK tco
PS 0 1 2 3
Kuruvilla Varghese
2
Detailed and Next Level 5
D Q D Q D Q
Q2 Q1 Q0
CK CK CK
AR AR AR
CLK
RST
NS
Next D
PS
State
CK Q
Logic AR
CLK
RST
Kuruvilla Varghese
NS
UP-DN/ Next D
State PS
CK Q
Logic AR
Clock
Reset
Kuruvilla Varghese
3
Mod - 6 Counter with input UP-DN/ 7
Asynchronous 8
NS
Next D
PS
State 001
CK Q
Logic AR 011
010
CLK
RST
Kuruvilla Varghese
4
Asynchronous 9
• Yes
• Unbalanced Path delays
• Races
• Difficult to design / control
• Fast
Kuruvilla Varghese
Maximum Frequency 10
NS
Next
D PS
State
CK Q
Logic
AR Min Clock period / Max frequency
Tclk(min) > tco(max) + tcomb(max)
Clock
Reset
+ ts(max)
fmax < 1 / Tclk(min)
CLK
tco tcomb
slack = Tclk(min)– (tco(max) +
PS tcomb(max) + ts(max))
th ts th
5
Max Frequency / Hold time Violation 11
Kuruvilla Varghese
Kuruvilla Varghese
6
Number of Paths 13
D Q D Q
Comb
CK CK
CLK
Kuruvilla Varghese
7
Setup, Hold Times with skew 15
2 ns
D’ D
D Q
CLK CK
2 ns 1 ns
ts th
CLK
2 ns
D
ts’ 4 ns
th’ -1 ns
D’
Kuruvilla Varghese
• Most often, setup and hold times of flip-flops or registers with respect to a
pin or output of another register need to be analyzed.
• When there is a delay t in the path to D input, the setup time with respect to
new reference point D' is increased by t and hold time is decreased by t.
• In this case, hold time can take a negative value. A hold time of –t means
that at point D’, the data can be removed or changed t time before the active
clock edge.
• Note: Setup time is defined as time before clock, data has to be setup. So,
for setup time positive value is going backward from clock edge, and
negative value means it is forward from clock edge. For hold time reverse
case applies.
Kuruvilla Varghese
8
Setup, Hold Times with skew 17
D D Q
3 ns
CLK’ CK
2 ns 1 ns
ts th
CLK
3 ns
D
-1 ns
ts’
th’ 4 ns
CLK’
Kuruvilla Varghese
Kuruvilla Varghese
9
Flat Design: 60 Seconds Timer 19
7 Seg 7 Seg
LED LED
BCD- BCD-
7 Seg 7 Seg
BCD Mod 6
Clock Divider Counter Counter
POR
Kuruvilla Varghese
Design Issues 20
• Accuracy
– Clock Frequency
• Area
– Clock frequency, Divider
– BCD, Mod-6 or Mod-60 counter ?
• Timing
– Max frequency – Divider
• Electrical Specifications
– 7 Segment LED driving
Kuruvilla Varghese
10
CPU Specifications 21
CPU Design 22
Kuruvilla Varghese
11
Top-down Design 23
Kuruvilla Varghese
CPU Level 0 24
CLK RD/
RST WR/
CPU
INTR A15:0
D7:0
Kuruvilla Varghese
12
CPU Level 1 25
CLK
Kuruvilla Varghese
CPU Level 1 26
• Data Path
– Registers, Combinational Circuit
• Controller
– Finite State Machine (FSM)
– Registers, Combinational Circuit
Kuruvilla Varghese
13
Datapath 27
Controller 28
14
CPU Level 2: Registers 29
CLK
Kuruvilla Varghese
15
CPU Level 2: Registers 31
D Q D7:0
RA_E
RA_L
CLK CK
0
D Q D7:0
1
RA_L RA_E
CLK CK
16
Program Counter 33
Program Counter 34
Kuruvilla Varghese
17
CPU Level 2: Program Counter 35
D7:0
PC-RST
PC-INT
PC_L0
CLK PCS(0)
PC-IS
PC-IS
+1
PC_L PC_L
CLK PC(1) CLK PC(0)
From SP
AD-S PC-OS
A15:0 PC-E
D7:0
Kuruvilla Varghese
• 3, 8-bit Registers
• 2, 8-bit 4 to 1 Multiplexers
• 1, 16 bit Incrementer
• 1, 16-bit 2 to 1 Multiplexers
• 1, 8-bit 2 to 1 Multiplexers
• 8 Tri-state gates
Kuruvilla Varghese
18
Design 37
• Flat Design
• Top-down design
• Bottom-up Design
• Functionality
• Timing
• Electrical Characteristics
• Power Dissipation
Kuruvilla Varghese
Controller 38
CLK
Kuruvilla Varghese
19
Controller 39
Controller 40
Kuruvilla Varghese
20
Controller Timing 41
CLK
RA_E, TR1_L
RB_E, TR2_L
AL_E, RA_L
Kuruvilla Varghese
Controller 42
Kuruvilla Varghese
21
Counter 43
NS Outputs
Inputs Next
D
PS Output
State
CK Q Logic
Logic AR
Clock
Reset
Kuruvilla Varghese
Output Logic 44
Pr State Outputs
Q1 Q0 RA_E TR1_L RB_E TR2_L AL_E RA_L
0 0 1 1 0 0 0 0
0 1 0 0 1 1 0 0
1 0 0 0 0 0 1 1
Output = F (PS)
Kuruvilla Varghese
22
Controller Timing 45
CLK
RA_E, TR1_L
RB_E, TR2_L
AL_E, RA_L
Kuruvilla Varghese
Generic ? 46
CLK
RA_E, TR1_L
RB_E, TR2_L
AL_E, RA_L
• Yes
RA_E = Q1/Q0/ + Q1Q0/ RB_E = Q1 EXOR Q0
Kuruvilla Varghese
23
State Assignment 47
NS Outputs
Inputs Next
D
PS Output
State
CK Q Logic
Logic AR
Clock
Reset
Kuruvilla Varghese
Generic ? 48
Kuruvilla Varghese
24
FSM Idea 49
Kuruvilla Varghese
Moore / Mealy 50
Kuruvilla Varghese
25
FSM: 3 Blocks view 51
Inputs NS Outputs
Next
D PS Output
State
CK Q Logic
Logic AR
Clock
Reset
NS = f (PS, Inputs)
Moore Outputs = f (PS)
Mealy Outputs = f (PS, Inputs)
Kuruvilla Varghese
Outputs
Inputs
NS PS
Logic D
CK Q
AR
Clock
Reset
Kuruvilla Varghese
26
2 blocks 53
• If, you look at the diagram of FSM with 3 blocks, you can
see both Next State Logic and output logic use Present
State and Inputs to generate its output
• Hence we could view the FSM with 2 blocks where one
block is both logic combined
• Such a view is useful for timing analysis and HDL coding
Kuruvilla Varghese
Maximum Frequency 54
Outputs
Inputs
NS D
PS Tclk(min) > max (tcq(max) +
Logic CK Q tNSL(max) + ts(min),
AR
tcq(max) + tOL(max))
Clock
Reset
fmax < 1 / Tclk
CLK tcq tNSL
PS
slack = Tclk – (tcq(max) +
th ts th tNSL(max) + ts(min))
NS
tcq + tOL
tcq(min) + tNSL(min) > th(max)
Outputs
Kuruvilla Varghese
27
Timing 55
Kuruvilla Varghese
Controller Design 56
• Control Algorithm
– When one try to implement a control algorithm using an FSM one
need to decide sequence of steps for various input combinations, and
the output at each step. This can be a textual description followed
with a waveform
– Aim of the design is to come out with the truth tables of NSL and
OL. This couldn’t be done easily from textual description and/or
waveform to truth tables
– Hence, we use a graphical tool called state diagram (like flow chart)
to visualize the sequence of states, their transition based on inputs,
and various outputs produced at each state.
Kuruvilla Varghese
28
State Diagram 57
• State Diagram
– States: Oval / Circle
– Transitions: Arrows
– Outputs: Output signal in a block associated with states
• Designing FSM
– Designing NSL, OL
– State Assignment
Kuruvilla Varghese
Inputs NS Outputs
Next
D PS Output
State
CK Q Logic
Logic AR
Clock
Reset
NS = f (PS, Inputs)
Moore Outputs = f (PS)
Mealy Outputs = f (PS, Inputs)
Kuruvilla Varghese
29
State Diagram: States, Transition 59
State Conditional
S0 Transition
S0
en en/
Unconditional
Transition
S1 S2
S1
en/
S0
en Conditional
Transition
S1
Kuruvilla Varghese
en/
Moore Outputs
S0 rd/ = 1, latch = 0
en
en/
Mealy Outputs
S1
rd/ = 0, latch = 1
S0 rd/ = 0, latch = en
en
S1 rd/ = 1, latch = 0
Kuruvilla Varghese
30
State Diagram: Example 61
start/
power_on
S0 prst = 0, shadct = 0,
mcmuld = 0, sel = 0
start
max/
S2 prst = 0, shadct = 1,
mcmuld = 0, sel = r0
Kuruvilla Varghese
31
Output Table 63
0 1 1 0 1 0
1 0 0 1 0 r0
• State diagram has all the information for Next state table
and Output Table
• If a state diagram is designed and coded the tools can
generate the tables and optimize it to implement it
Kuruvilla Varghese
32
ADC Controller 65
• Scenario
– Data Acquisition System
– ADC interfaced to Host processor
– Per sample interrupt costly for the host processor
– A temporary storage of samples
– A controller to control ADC and storage
– When storage is near full, interrupt the host
Kuruvilla Varghese
ADC Controller 66
ADC
Host interface
aclk
ain data data
soc eoc hrd/
intr
start
Temporary storage ??
Controller
Kuruvilla Varghese
33
Temporary storage 67
• DPRAM
– Random access is not required
– Only one way data flow
– Complex for the application, costly
• FIFO
– Simple to use (No address bus)
– Enough for the application
Kuruvilla Varghese
Block Schematic 68
Data path
ADC
Host interface
FIFO
aclk
ain data din dout data
frd/
soc eoc hrd/
fwr/ ¾ full
intr
start
Controller
clk soc
rst fwr/
start
eoc
Kuruvilla Varghese
34
Assumptions 69
Kuruvilla Varghese
Timing Diagram 70
start
soc
eoc
fwr/
Kuruvilla Varghese
35
fwr/ Timing 71
Kuruvilla Varghese
Controller
Kuruvilla Varghese
36
Complete Timing Diagram 73
soc
eoc
fwr/
crst
wtim
Kuruvilla Varghese
Control Algorithm 74
Kuruvilla Varghese
37
State Diagram 75
start/
rst
soc = 0, fwr/ = 1
S0 crst = ‘1’
eoc
soc = 0, fwr/ = 1
S2 crst = ‘1’
eoc/
Kuruvilla Varghese
Kuruvilla Varghese
38
Finite State Machine (FSM) 77
Inputs NS Outputs
Next
State D PS Output
CK Q Logic
Logic AR
Clock
Reset
NS = f (PS, Inputs)
Moore Outputs = f (PS)
Mealy Output = f (PS, Inputs)
Kuruvilla Varghese
39
Output Table 79
Methodology 80
1. Specifications
2. Block schematic (Blocks, Signals)
– Data path, Controller(s)
3. System Timing Diagram
4. Sub-system Identification
5. Update Timing Diagram
6. Data path design (Various Levels)
7. Controller Algorithm
8. State Diagram
Kuruvilla Varghese
40
Methodology 81
Methodology 82
Kuruvilla Varghese
41
Power on Reset 83
Outputs
Inputs NS
Next
Sync D PS Output
Reset
State
CK Q Logic
Logic AR
Clock
Async Reset
Kuruvilla Varghese
42
FSM: Minimum Clock frequency 85
CLK
IN1
IN2
IN3
CLK’
Kuruvilla Varghese
Kuruvilla Varghese
43
Stretching the pulse 87
IN
CLK1
IN’
CLK2
Kuruvilla Varghese
Timing Pulse
CLK1
CLK2
Kuruvilla Varghese
44
Stretching the pulse 89
IN
CLK1
IN’
CLK2
Kuruvilla Varghese
Pulse Stretcher 90
sdet
I D Q D Q D Q
CK CK CK
det
AR AR AR
rst
clk
det
clk
sdet
Kuruvilla Varghese
45
Pulse Stretcher 91
Kuruvilla Varghese
Pulse detection 92
Kuruvilla Varghese
46
Pulse to toggle 93
I
D Q
CK
P
AR
Kuruvilla Varghese
Level to pulse 94
I I1 I2 I3
D Q D Q D Q
CK CK CK
clk2
I2
clk2
l2 .l3/
l2/.l3
l2 xor l3
Kuruvilla Varghese
47
Pulse Transfer 95
Xor
I I1 I2 l3
D Q D Q D Q D Q
CK CK CK
P CK
clk2
Kuruvilla Varghese
D Q D Q
Comb
CK CK
CLK
48
Second Register clocked by CLK/? 97
49
Second Register clocked by CLK/? 99
Kuruvilla Varghese
S1 soc = 1
start
S2 soc = 0
S2 soc = 0
Kuruvilla Varghese
50
Moore / Mealy Output 101
clk
start
states S0 S0 S1 S2
Moore
soc
S0 S0 S2
Mealy states
soc
Kuruvilla Varghese
Kuruvilla Varghese
51
FSM: Mealy Output 103
Synchr
onous
i1 O1: Mealy Output Sub-system
i2
FSM
clk O2: Mealy Output
Synchr
onous
Sub-system
Kuruvilla Varghese
CLK
Kuruvilla Varghese
52
Control of Sequential Circuits 105
FSM / Reg /
en (RA_L)
Contr- Counter /
oller Seq Ckt
clk
Kuruvilla Varghese
D Q D7:0
RA_E
RA_L CLK’
CK
CLK
CLK
RA_L
CLK’
1 2
Kuruvilla Varghese
53
Clock Gating 107
Kuruvilla Varghese
0
D Q D7:0
1
RA_L RA_E
CLK CK
CLK
RA-L
Kuruvilla Varghese
54
Re-circulating Buffer 109
Kuruvilla Varghese
+1 1
d q
count
0 q
en
clk clk
rst
reset
55
VHDL Code 111
Kuruvilla Varghese
+1
q count
en d
q
1
din
load
clk
clk rst
rst
Kuruvilla Varghese
56
VHDL Code 113
0
D Q D7:0
1
RA_L RA_E
CLK CK
CLK
RA-L
Kuruvilla Varghese
57
Clock Gating 115
D Q D7:0
RA_E
RA_L CLK’
CK
CLK
CLK
RA_L
CLK’
1 2
Kuruvilla Varghese
D Q D7:0
RA_E
RA_L CLK’
CK
CLK
CLK
RA-L
CLK’
1 2
Kuruvilla Varghese
58
Clock Gating for Low Power 117
D Q D7:0
RA_L CLK1
D Q
CK RA_E
CLK2
CK
CLK
CLK
RA_L
CLK1
CLK2
Kuruvilla Varghese
Kuruvilla Varghese
59
Finite State Machine (FSM) 119
Outputs
Inputs NS
Next
State D PS Output
Logic CK Q Logic
AR
Clock
Reset
Kuruvilla Varghese
Outputs
Inputs
NS D PS
Logic
CK Q
AR
Clock
Reset
Kuruvilla Varghese
60
State Diagram Optimization 121
Kuruvilla Varghese
Kuruvilla Varghese
61
State Diagram Optimization 123
• In Next State Table look for same next states, Then out of these
next states, select the states for which input conditions are same.
• Or, look for same next states’ with same input conditions in one
shot
• Now, for these states check if outputs (for Mealy both input
conditions and outputs) are same
• Select the states where the outputs (with inputs for mealy) are
same
• These states are equivalent
Kuruvilla Varghese
wr = 1 000 011 en = 1
010
clk
en
Note: Glitch could occur
wr either on ‘en’ or ‘wr’
Kuruvilla Varghese
62
Output Races (Glitches) 125
Kuruvilla Varghese
Kuruvilla Varghese
63
Output Registering 127
State FFs
Outputs Output FFs
Inputs Next NS D Q
D PS Output
State CK Q Logic
Logic AR CK AR
Reg
Clock Outputs
Reset
clk
en
en®
(valid output) ld
ld®
Kuruvilla Varghese
Reg
Outputs Outputs
Inputs D
Logic NS Q
CK AR PS
Clock
Reset
Kuruvilla Varghese
64
Selection of Flip-Flops 129
PS NS D J K T
0 0 0 0 X 0
0 1 1 1 X 1
1 0 0 X 1 1
1 1 1 X 0 0
Kuruvilla Varghese
• Number of states = s
• Number of flip-flops = n = log 2 s
• Number of possible ways to do the state assignment?
P(2n, s)
• e.g. s =17 n = 5 (Minimize Area)
P(2n, s) = 32! / (32-17)!
= 32 x 31 x … x 18 x 17 x 16 = 2.5…. x 1044
• NSL Minimization
• OL Minimization
Kuruvilla Varghese
65
NSL Optimization 131
Kuruvilla Varghese
Kuruvilla Varghese
66
NSL Minimization 133
1 1 0 0 1 0 1 0 1
1 1 0 0 1 1 1 0 1
Kuruvilla Varghese
67
OL Minimization 135
1 1 0 0 1 0 1 0 1
1 1 0 0 1 1 1 0 1
Kuruvilla Varghese
OL Minimization 136
68
Fault Tolerance: Unused States 137
• Number of states = s
• Number of flip-flops = n = log 2 s
• Unused states 2n – s
• s = 5, n = 3
• Unused states = 23 – 5 = 3
Kuruvilla Varghese
000
110
100
001 111
011
010
Kuruvilla Varghese
69
Unused States 139
Kuruvilla Varghese
Kuruvilla Varghese
70
Unused States 141
x x 1 1 0 0 0 0 0
x x x 1 0 1 X(1) X(0) X(1)
101 101
Kuruvilla Varghese
x x 1 1 0 0 0 0 0
x x x 1 0 1 X(1) X(1) X(0)
x x x 1 1 0 X(1) X(1) X(1)
x x x 1 1 1 X(1) X(0) X(1)
101 110 111 101
Kuruvilla Varghese
71
Unused States: Fault Tolerance 143
101
000
110
100
001 111
011
010
Kuruvilla Varghese
Kuruvilla Varghese
72
Unused states 145
Kuruvilla Varghese
Kuruvilla Varghese
73
Finite State Machine (FSM) 147
Outputs
Inputs NS
Next
State D PS Output
Logic CK Q Logic
AR
Clock
Reset
Kuruvilla Varghese
Kuruvilla Varghese
74
Output decoding from Next State 149
D Q
Output Outputs
Logic CK
AR
Inputs Next NS
State D PS
Logic CK Q
AR
Clock
Reset
Kuruvilla Varghese
Outputs
Inputs NS
Next
State D PS Output
Logic CK Q Logic
AR
Clock
Reset
Kuruvilla Varghese
75
Output decoding from Next State 151
Kuruvilla Varghese
NS
Inputs D
Next Outputs
State
CK Q
Logic
AR PS
Clock
Reset
Output delay = t cq
Kuruvilla Varghese
76
Encoding Output in state bits 153
Outputs
States
WR/ EN
S0 0 1
S1 1 0
S2 1 1
S3 0 0
Q1 Q0
Outputs
States
WR/ EN
S0 0 1
S1 1 0
S2 1 1
S3 1 0
Q1 Q0
For states S1 and S3 outputs are same and hence one extra bit is
needed for state variables.
Kuruvilla Varghese
77
Encoding Output in state bits 155
Outputs Extra
States
WR/ EN bit
S0 0 1 0
S1 1 0 0
S2 1 1 0
S3 1 0 1
Q2 Q1 Q0
Adding the extra bit makes unique pattern and state variables can
be used as outputs.
Kuruvilla Varghese
Kuruvilla Varghese
78
Encoding Output in state bits 157
Kuruvilla Varghese
D Q
ts: Setup time: Minimum time
input must be valid before
CLK the active clock edge
th: Hold time: Minimum time
input must be valid after the
CLK
active clock edge
D ts tco: Propagation delay for
th input to appear at the output
Q from active
tco clock edge
Kuruvilla Varghese
79
Metastability 159
Kuruvilla Varghese
Kuruvilla Varghese
80
Dataptah 161
D Q D Q
Comb
CLK CLK
clk
Kuruvilla Varghese
outputs
inputs
NS
Flip
Logic
Flops PS
clock
reset
Kuruvilla Varghese
81
Metastability in Sequential Circuits 163
D Q D Q
Comb
CLK CLK
clk
Kuruvilla Varghese
inputs D Q D Q
Comb
CLK CLK
clk
inputs outputs
NS PS
Flip
Logic
Flops
clock
reset
Kuruvilla Varghese
82
Asynchronous Inputs 165
Kuruvilla Varghese
ainp D Q D Q
Comb
CLK CLK
clk
Synchronizer Sequential Circuit
CLK
D
tco
Q
83
Single Stage Synchronizer 167
Kuruvilla Varghese
Kuruvilla Varghese
84
Single Stage Synchronizer 169
ainp D Q D Q
Comb
CLK CLK
clk
Synchronizer Sequential Circuit
Kuruvilla Varghese
Kuruvilla Varghese
85
Double Stage Synchronizer 171
ainp D Q D Q D Q
Comb
CLK CLK CLK
clk
• tr = tclk – ts
• Latency of two clock period
Kuruvilla Varghese
• If tr to be increased further ?
• We need to then increase tclk, but then the system throughput
would come down
• So, let us keep the system clock at same frequency and reduce the
clock of synchronizer, by dividing the system clock
• Multiple cycle synchronizer
Kuruvilla Varghese
86
Multiple Cycle Synchronizer 173
ainp
D Q D Q D Q
Comb
CLK CLK CLK
Mod-n clk
Counter
• tr = n .tclk – ts
• Latency = 2 . n . tclk
• n = 2 or 3
Kuruvilla Varghese
ainp D Q D Q D Q D Q
Comb
CLK CLK CLK CLK
Mod-n
Counter
clk
87
Cascaded Synchronizer 175
ainp
D Q D Q D Q D Q
Comb
CLK CLK CLK CLK
clk
Kuruvilla Varghese
EN/ EN/
00 00
01 EN 10 EN
11 01
Kuruvilla Varghese
88
Asynchronous Inputs to FSM 177
00 EN/
EN EN/ 00
01 10 EN
11 01
Kuruvilla Varghese
D Q
CK
clock AR
reset
Kuruvilla Varghese
89
Reset Recovery Time (tREC, tRR) 179
Kuruvilla Varghese
rst To asynch
resets of
POR D Q D Q FFs
CK CK
clk
Kuruvilla Varghese
90
Asynchronous Reset 181
rst/ To async
resets of
FFs
POR D Q D Q
CK CK
clk
Kuruvilla Varghese
182
Kuruvilla Varghese
DESE
Indian Institute of Science
Kuruvilla Varghese
91
Multiplier: Algorithm 183
Multiplicand 1 0 1 1 x
Multiplier 1 1 0 1
------------------
Partial products 1 0 1 1
0 0 0 0
1 0 1 1
1 0 1 1
-----------------------------
1 0 0 0 1 1 1 1
-----------------------------
Kuruvilla Varghese
92
Resources 185
Kuruvilla Varghese
mc7:0
clk Multiplier: Data Path 186
rst MCND REG
load
md7:0 r15:8
ADD
0 r15:8 su8:0
sel 0 1 ml7:0
s0
s8:1
clk
clk L.PROD / MULT rst
prst H. PROD REG REG load
shift shift
r15:8 r7:0
93
Counter 187
clk
prst count2:0 Decoder max
Counter
shift
Kuruvilla Varghese
Controller 188
clk prst
rst load
Controller
start shift
r(0) sel
max done
Kuruvilla Varghese
94
Multiplicand Register (MCND) 189
Kuruvilla Varghese
Kuruvilla Varghese
95
L. PRODUCT / MULT Register 191
Kuruvilla Varghese
Counter 192
-- Counter
counter: process (clk, prst)
count
begin
+1 if (prst = '1') then
D
count count <= (others => '0');
Q elsif (clk'event and clk = '1') then
if (shift = '1') then
shift count <= count + 1;
clk CK end if;
prst AR end if;
end process;
Kuruvilla Varghese
96
FSM: 3 Blocks view 193
Inputs NS Outputs
Next
D PS Output
State
CK Q Logic
Logic AR
Clock
Reset
NS = f (PS, Inputs)
Moore Outputs = f (PS)
Mealy Outputs = f (PS, Inputs)
Kuruvilla Varghese
Outputs
Inputs
NS PS
Logic D
CK Q
AR
Clock
Reset
Kuruvilla Varghese
97
State Diagram 195
power_on
start/
prst = 1, shift = 0,
S0 load = 0, sel = 0,
done = 0
start
start
start/
max max/
S2 prst = 0, shift = 1,
load = 0, sel = r(0),
done = 0
Kuruvilla Varghese
mc7:0
clk Multiplier: Data Path 196
rst MCND REG
load
md7:0 r15:8
ADD
0 r15:8 su8:0
sel 0 1 ml7:0
s0
s8:1
clk
clk L.PROD / MULT rst
prst H. PROD REG REG load
shift shift
r15:8 r7:0
98
Multiplier: VHDL Code 197
Kuruvilla Varghese
Kuruvilla Varghese
99
Multiplier: VHDL Code 199
Kuruvilla Varghese
100
Multiplier: VHDL Code 201
Kuruvilla Varghese
prst = 1, shift = 0,
S0 load = 0, sel = 0,
done = 0
start
start
start/
max max/
S2 prst = 0, shift = 1,
load = 0, sel = r(0),
done = 0
Kuruvilla Varghese
101
Multiplier: VHDL Code version 2 203
Kuruvilla Varghese
Kuruvilla Varghese
102
Xilink Spartan 6 Atlys Board 205
Kuruvilla Varghese
206
Kuruvilla Varghese
103
Input/Output 207
VDD
prod(15:8) ml(3:0)
0
7 LEDs
prod(7:0)
1
0.125 Hz
27:0 start
15
CLK DIV
VDD
50
Mhz
Kuruvilla Varghese
Kuruvilla Varghese
104
Extra VHDL Code 209
Kuruvilla Varghese
Kuruvilla Varghese
105
State Diagram 211
power_on
start/
prst = 0, shift = 0,
S0 load = 0, sel = 0,
done = 0
start/
start
start
max max/
S2 prst = 0, shift = 1,
load = 0, sel = r(0),
done = 0
Kuruvilla Varghese
106