Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay •...
Transcript of Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay •...
![Page 1: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/1.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 1
Sequential Circuit Design:
Principle
![Page 2: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/2.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 2
Outline
1. Overview on sequential circuits
2. Synchronous circuits
3. Danger of synthesizing async circuit
4. Inference of basic memory elements
5. Simple design examples
6. Timing analysis
7. Alternative one-segment coding style
8. Use of variable for sequential circuit
![Page 3: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/3.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 3
1. Overview on sequential circuit
• Combinational vs sequential circuit
– Sequential circuit: output is a function of
current input and state (memory)
• Basic memory elements
– D latch
– D FF (Flip-Flop)
– RAM
• Synchronous vs asynchronous circuit
![Page 4: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/4.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 4
• D latch: level sensitive
• D FF: edge sensitive
![Page 5: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/5.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 5
![Page 6: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/6.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 6
• Problem wit D latch:
Can the two D latches swap data?
![Page 7: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/7.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 7
• Timing of a D FF:
– Clock-to-q delay
– Constraint: setup time and hold time
![Page 8: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/8.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 8
Synch vs asynch circuits
• Globally synchronous circuit: all memory
elements (D FFs) controlled (synchronized)
by a common global clock signal
• Globally asynchronous but locally
synchronous circuit (GALS).
• Globally asynchronous circuit
– Use D FF but not a global clock
– Use no clock signal
![Page 9: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/9.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 9
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
![Page 10: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/10.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 10
• Basic block diagram– State register (memory elements)
– Next-state logic (combinational circuit)
– Output logic (combinational circuit)
• 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 have no effect as long as the state_nextis stable at the sampling edge
![Page 11: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/11.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 11
![Page 12: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/12.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 12
Sync circuit and EDA
• Synthesis: reduce to combinational circuit
synthesis
• Timing analysis: involve only a single closed
feedback loop (others reduce to
combinational circuit analysis)
• Simulation: support “cycle-based simulation”
• Testing: can facilitate scan-chain
![Page 13: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/13.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 13
Types of sync circuits
• Not formally defined, Just for coding
• Three types:
– “Regular” sequential circuit
– “Random” sequential circuit (FSM)
– “Combined” sequential circuit (FSM with a
Data path, FSMD)
![Page 14: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/14.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 14
3. Danger of synthesizing
asynchronous circuits
• D Latch/DFF
– Are combinational circuits with feedback loop
– Design is different from normal combinational
circuits (it is delay-sensitive)
– Should not be synthesized from scratch
– Should use pre-designed cells from device
library
![Page 15: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/15.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 15
E.g., a D latch
from scratch
library library library library ieee;use use use use ieee.std_logic_1164.allallallall;entity entity entity entity dlatch isisisis
port port port port (c: inininin std_logic;d: in in in in std_logic;q: out out out out std_logic);
end end end end dlatch;architecture architecture architecture architecture demo_arch of of of of dlatch isisisis
signal signal signal signal q_latch: std_logicstd_logicstd_logicstd_logic;;;;beginbeginbeginbegin
process process process process (c, d)beginbeginbeginbegin
if if if if (c=‘1’) thenthenthenthenq_latch <= d;
elseelseelseelseq_latch <= q_latch;
end ifend ifend ifend if;end process;end process;end process;end process;q <= q_latch;
end end end end demo_arch;
![Page 16: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/16.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 16
Initial values
1
10
11
0
![Page 17: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/17.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 17
T=t0
1
00
11
0
![Page 18: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/18.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 18
T=t1
1
00
10
1
![Page 19: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/19.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 19
T=t2
1
01
00
1
![Page 20: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/20.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 20
T=t3
1
00
10
1
![Page 21: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/21.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 21
4. Inference of basic memory
elements
• VHDL code should be clear so that the
pre-designed cells can be inferred
• VHDL code
– D Latch
– Positive edge-triggered D FF
– Negative edge-triggered D FF
– D FF with asynchronous reset
![Page 22: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/22.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 22
D Latch • No else branch
• D latch will be
inferred
![Page 23: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/23.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 23
Pos edge-triggered
D FF
• No else branch
• Note the
sensitivity list
![Page 24: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/24.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 24
• Neg edge-triggered D FF
![Page 25: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/25.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 25
D FF with async
reset
• No else branch
• Note the
sensitivity list
![Page 26: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/26.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 26
Register
• Multiple D FFs
with same clock
and reset
![Page 27: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/27.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 27
5. Simple design examples
• Follow the block diagram
– Register
– Next-state logic (combinational circuit)
– Output logic (combinational circuit)
![Page 28: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/28.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 28
D FF with sync enable
• Note that the en is controlled by clock
• Note the sensitivity list
![Page 29: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/29.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 29
![Page 30: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/30.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 30
![Page 31: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/31.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 31
T FF
![Page 32: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/32.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 32
![Page 33: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/33.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 33
![Page 34: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/34.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 34
Free-running shift register
![Page 35: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/35.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 35
![Page 36: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/36.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 36
![Page 37: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/37.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 37
![Page 38: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/38.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 38
Universal shift register
• 4 ops: parallel load, shift right, shift left, pause
![Page 39: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/39.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 39
![Page 40: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/40.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 40
![Page 41: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/41.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 41
Arbitrary sequence counter
![Page 42: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/42.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 42
![Page 43: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/43.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 43
Free-running binary counter
• Count in binary sequence
• With a max_pulse output: asserted when
counter is in “11…11” state
![Page 44: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/44.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 44
![Page 45: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/45.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 45
• Wrapped around automatically
• Poor practice:
![Page 46: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/46.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 46
Binary counter with bells & whistles
![Page 47: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/47.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 47
![Page 48: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/48.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 48
Decade (mod-10) counter
![Page 49: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/49.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 49
![Page 50: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/50.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 50
Programmable mod-m counter
![Page 51: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/51.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 51
![Page 52: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/52.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 52
![Page 53: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/53.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 53
![Page 54: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/54.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 54
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
![Page 55: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/55.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 55
• state_next must satisfy the constraint
• Must consider effect of – state_reg: can be controlled
– synchronized external input (from a subsystem of same clock)
– unsynchronized external input
• Approach– First 2: adjust clock rate to prevent violation
– Last: use “synchronization circuit” to resolve violation
![Page 56: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/56.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 56
• Setup time violation and maximal clock rate
![Page 57: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/57.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 57
![Page 58: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/58.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 58
• E.g., shift register; let Tcq=1.0ns Tsetup=0.5ns
![Page 59: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/59.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 59
• E.g., Binary counter; let Tcq=1.0ns Tsetup=0.5ns
![Page 60: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/60.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 60
![Page 61: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/61.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 61
• Hold time violation
![Page 62: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/62.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 62
![Page 63: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/63.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 63
Output delay
![Page 64: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/64.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 64
Input Timing of Systems
![Page 65: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/65.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 65
7. Alternative one-segment
coding style
• Combine register and next-state
logic/output logic in the same process
• May appear compact for certain simple
circuit
• But it can be error-prone
![Page 66: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/66.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 66
D FF with sync enable
![Page 67: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/67.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 67
![Page 68: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/68.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 68
![Page 69: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/69.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 69
• Interpretation: any left-hand-side signal within
the clk’event and clk=‘1’ branch infers a D FF
![Page 70: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/70.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 70
T FF
![Page 71: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/71.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 71
![Page 72: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/72.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 72
![Page 73: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/73.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 73
![Page 74: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/74.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 74
Binary counter with bells & whistles
![Page 75: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/75.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 75
![Page 76: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/76.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 76
![Page 77: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/77.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 77
Free-running binary counter
• Count in binary sequence
• With a max_pulse output: asserted when
counter is in “11…11” state
![Page 78: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/78.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 78
![Page 79: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/79.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 79
![Page 80: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/80.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 80
![Page 81: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/81.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 81
![Page 82: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/82.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 82
![Page 83: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/83.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 83
Programmable mod-m counter
![Page 84: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/84.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 84
![Page 85: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/85.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 85
![Page 86: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/86.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 86
![Page 87: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/87.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 87
![Page 88: Sequential Circuit Design: Principle · 2010-01-29 · –characterized by propagation delay • Sequential circuit: –Has to satisfy setup/hold time constraint –Characterized](https://reader033.fdocuments.in/reader033/viewer/2022050116/5f4d32151584651d7736e337/html5/thumbnails/88.jpg)
RTL Hardware Design
by P. Chu
Chapter 8 88
• 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
• Two-segment code is preferred