Outline: 1. Overview On Sequential Circuit
Outline: 1. Overview On Sequential Circuit
1. 2. 3. 4. 5. 6. 7. 8.
1
Overview on sequential circuits Synchronous circuits Danger of synthesizing asynchronous circuit Inference of basic memory elements Simple design examples Timing analysis Alternative one-segment coding style Use of variable for sequential circuit
RTL Hardware Design by P. Chu Chapter 8 2
Chapter 8
Chapter 8
Chapter 8
Timing of a D FF:
Clock-to-q delay Constraint: setup time and hold time
Chapter 8
Chapter 8
2. Synchronous circuit
One of the most difficult design aspects of a sequential circuit: How to satisfy the timing constraints The Big idea: Synchronous methodology
Group all D FFs together with a single clock: Synchronous methodology Only need to deal with the timing constraint of one memory element
RTL Hardware Design by P. Chu Chapter 8 9
Operation
At the rising edge of the clock, state_next sampled and stored into the register (and becomes the new value of state_reg The next-state logic determines the new value (new state_next) and the output logic generates the output At the rising edge of the clock, the new value of state_next sampled and stored into the register
Glitches has no effects as long as the state_next is stabled at the sampling edge
RTL Hardware Design by P. Chu Chapter 8 10
Chapter 8
13
Chapter 8
14
Chapter 8
15
Chapter 8
16
D Latch
No else branch D latch will be inferred
Chapter 8
17
Chapter 8
18
Neg edge-triggered D FF
Chapter 8
19
Chapter 8
20
Chapter 8
21
Chapter 8
22
Chapter 8
23
Chapter 8
24
Chapter 8
25
Chapter 8
26
T FF
Chapter 8
27
Chapter 8
28
Chapter 8
29
Chapter 8
30
Chapter 8
31
Chapter 8
32
Chapter 8
33
Chapter 8
34
Chapter 8
35
Chapter 8
36
Chapter 8
37
Chapter 8
38
Chapter 8
39
Chapter 8
40
Chapter 8
41
Chapter 8
42
Chapter 8
43
Chapter 8
44
Chapter 8
45
Chapter 8
46
Chapter 8
47
Chapter 8
48
6. Timing analysis
Combinational circuit:
characterized by propagation delay
Sequential circuit:
Has to satisfy setup/hold time constraint Characterized by maximal clock rate (e.g., 200 MHz counter, 2.4 GHz Pentium II) Setup time and clock-to-q delay of register and the propagation delay of next-state logic are embedded in clock rate
RTL Hardware Design by P. Chu Chapter 8 49 RTL Hardware Design by P. Chu Chapter 8 50
Approach
Chapter 8
51
Chapter 8
52
Chapter 8
53
Chapter 8
54
Chapter 8
55
Chapter 8
56
Chapter 8
57
Chapter 8
58
Output delay
Chapter 8
59
Chapter 8
60
10
Chapter 8
61
Chapter 8
62
Interpretation: any left-hand-side signal within the clkevent and clik=1 branch infers a D FF
RTL Hardware Design by P. Chu Chapter 8 63 RTL Hardware Design by P. Chu Chapter 8 64
T FF
Chapter 8
65
Chapter 8
66
11
Chapter 8
67
Chapter 8
68
Chapter 8
69
Chapter 8
70
Chapter 8
71
Chapter 8
72
12
Chapter 8
73
Chapter 8
74
Chapter 8
75
Chapter 8
76
Chapter 8
77
Chapter 8
78
13
Chapter 8
79
Chapter 8
80
Two-segment code
Separate memory segment from the rest Can be little cumbersome Has a clear mapping to hardware component
One-segment code
Mix memory segment and next-state logic / output logic Can sometimes be more compact No clear hardware mapping Error prone
14