rtl hardware design by p. chu chapter 81. 1. overview on sequential circuits 2. synchronous circuits...
TRANSCRIPT
![Page 1: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/1.jpg)
Chapter 8 1
Sequential Circuit Design: Principle
RTL Hardware Design by P. Chu
![Page 2: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/2.jpg)
Chapter 8 2
1. Overview on sequential circuits2. Synchronous circuits3. Danger of synthesizing asynchronous circuit 4. Inference of basic memory elements5. Simple design examples6. Timing analysis7. Alternative one-segment coding style8. Use of variable for sequential circuit
RTL Hardware Design by P. Chu
Outline
![Page 3: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/3.jpg)
Chapter 8 3
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
RTL Hardware Design by P. Chu
1. Overview on sequential circuit
![Page 4: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/4.jpg)
Chapter 8 4RTL Hardware Design by P. Chu
D latch: level sensitive D FF: edge sensitive
![Page 5: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/5.jpg)
Chapter 8 5RTL Hardware Design by P. Chu
![Page 6: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/6.jpg)
Chapter 8 6RTL Hardware Design by P. Chu
Problem wit D latch:Can the two D latches swap data?
![Page 7: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/7.jpg)
Chapter 8 7RTL Hardware Design by P. Chu
Timing of a D FF:◦ Clock-to-q delay◦ Constraint: setup time and hold time
![Page 8: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/8.jpg)
Chapter 8 8
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
RTL Hardware Design by P. Chu
Synch vs asynch circuits
![Page 9: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/9.jpg)
Chapter 8 9
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
2. Synchronous circuit
![Page 10: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/10.jpg)
Chapter 8 10RTL Hardware Design by P. Chu
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 has no effects as long as the state_next is stabled at the sampling edge
![Page 11: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/11.jpg)
Chapter 8 11RTL Hardware Design by P. Chu
![Page 12: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/12.jpg)
Chapter 8 12
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
RTL Hardware Design by P. Chu
Sync circuit and EDA
![Page 13: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/13.jpg)
Chapter 8 13
Not formally defined, Just for coding Three types:
◦ “Regular” sequential circuit ◦ “Random” sequential circuit (FSM)◦ “Combined” sequential circuit (FSM with a Data
path, FSMD)
RTL Hardware Design by P. Chu
Types of sync circuits
![Page 14: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/14.jpg)
Chapter 8 14
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
RTL Hardware Design by P. Chu
3. Danger of synthesizing asynchronous circuit
![Page 15: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/15.jpg)
Chapter 8 15RTL Hardware Design by P. Chu
E.g., a D latchfrom scratch
![Page 16: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/16.jpg)
Chapter 8 16RTL Hardware Design by P. Chu
![Page 17: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/17.jpg)
Chapter 8 17
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
RTL Hardware Design by P. Chu
4. Inference of basic memory elements
![Page 18: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/18.jpg)
Chapter 8 18RTL Hardware Design by P. Chu
D Latch • No else branch • D latch will be
inferred
![Page 19: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/19.jpg)
Chapter 8 19RTL Hardware Design by P. Chu
Pos edge-triggered D FF
• No else branch • Note the
sensitivity list
![Page 20: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/20.jpg)
Chapter 8 20RTL Hardware Design by P. Chu
Neg edge-triggered D FF
![Page 21: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/21.jpg)
Chapter 8 21RTL Hardware Design by P. Chu
D FF with async reset
• No else branch • Note the
sensitivity list
![Page 22: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/22.jpg)
Chapter 8 22RTL Hardware Design by P. Chu
Register
• Multiple D FFs with same clock and reset
![Page 23: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/23.jpg)
Chapter 8 23RTL Hardware Design by P. Chu
5. Simple design examples
Follow the block diagram◦ Register◦ Next-state logic (combinational circuit)◦ Output logic (combinational circuit)
![Page 24: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/24.jpg)
Chapter 8 24RTL Hardware Design by P. Chu
D FF with sync enable
Note that the en is controlled by clock Note the sensitivity list
![Page 25: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/25.jpg)
Chapter 8 25RTL Hardware Design by P. Chu
![Page 26: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/26.jpg)
Chapter 8 26RTL Hardware Design by P. Chu
![Page 27: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/27.jpg)
Chapter 8 27RTL Hardware Design by P. Chu
T FF
![Page 28: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/28.jpg)
Chapter 8 28RTL Hardware Design by P. Chu
![Page 29: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/29.jpg)
Chapter 8 29RTL Hardware Design by P. Chu
![Page 30: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/30.jpg)
Chapter 8 30RTL Hardware Design by P. Chu
Free-running shift register
![Page 31: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/31.jpg)
Chapter 8 31RTL Hardware Design by P. Chu
![Page 32: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/32.jpg)
Chapter 8 32RTL Hardware Design by P. Chu
![Page 33: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/33.jpg)
Chapter 8 33RTL Hardware Design by P. Chu
![Page 34: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/34.jpg)
Chapter 8 34RTL Hardware Design by P. Chu
Universal shift register 4 ops: parallel load, shift right, shift left, pause
![Page 35: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/35.jpg)
Chapter 8 35RTL Hardware Design by P. Chu
![Page 36: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/36.jpg)
Chapter 8 36RTL Hardware Design by P. Chu
![Page 37: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/37.jpg)
Chapter 8 37RTL Hardware Design by P. Chu
Arbitrary sequence counter
![Page 38: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/38.jpg)
Chapter 8 38RTL Hardware Design by P. Chu
![Page 39: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/39.jpg)
Chapter 8 39RTL Hardware Design by P. Chu
Free-running binary counter Count in binary sequence With a max_pulse output: asserted when
counter is in “11…11” state
![Page 40: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/40.jpg)
Chapter 8 40RTL Hardware Design by P. Chu
![Page 41: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/41.jpg)
Chapter 8 41RTL Hardware Design by P. Chu
Wrapped around automatically Poor practice:
![Page 42: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/42.jpg)
Chapter 8 42RTL Hardware Design by P. Chu
Binary counter with bells & whistles
![Page 43: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/43.jpg)
Chapter 8 43RTL Hardware Design by P. Chu
![Page 44: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/44.jpg)
Chapter 8 44RTL Hardware Design by P. Chu
Decade (mod-10) counter
![Page 45: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/45.jpg)
Chapter 8 45RTL Hardware Design by P. Chu
![Page 46: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/46.jpg)
Chapter 8 46RTL Hardware Design by P. Chu
Programmable mod-m counter
![Page 47: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/47.jpg)
Chapter 8 47RTL Hardware Design by P. Chu
![Page 48: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/48.jpg)
Chapter 8 48RTL Hardware Design by P. Chu
![Page 49: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/49.jpg)
Chapter 8 49RTL Hardware Design by P. Chu
![Page 50: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/50.jpg)
Chapter 8 50
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
6. Timing analysis
![Page 51: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/51.jpg)
Chapter 8 51RTL Hardware Design by P. Chu
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 52: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/52.jpg)
Chapter 8 52RTL Hardware Design by P. Chu
Setup time violation and maximal clock rate
![Page 53: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/53.jpg)
Chapter 8 53RTL Hardware Design by P. Chu
![Page 54: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/54.jpg)
Chapter 8 54RTL Hardware Design by P. Chu
E.g., shift register; let Tcq=1.0ns Tsetup=0.5ns
![Page 55: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/55.jpg)
Chapter 8 55RTL Hardware Design by P. Chu
E.g., Binary counter; let Tcq=1.0ns Tsetup=0.5ns
![Page 56: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/56.jpg)
Chapter 8 56RTL Hardware Design by P. Chu
![Page 57: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/57.jpg)
Chapter 8 57RTL Hardware Design by P. Chu
Hold time violation
![Page 58: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/58.jpg)
Chapter 8 58RTL Hardware Design by P. Chu
![Page 59: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/59.jpg)
Chapter 8 59RTL Hardware Design by P. Chu
Output delay
![Page 60: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/60.jpg)
Chapter 8 60
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
RTL Hardware Design by P. Chu
7. Alternative one-segment coding style
![Page 61: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/61.jpg)
Chapter 8 61RTL Hardware Design by P. Chu
D FF with sync enable
![Page 62: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/62.jpg)
Chapter 8 62RTL Hardware Design by P. Chu
![Page 63: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/63.jpg)
Chapter 8 63RTL Hardware Design by P. Chu
![Page 64: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/64.jpg)
Chapter 8 64RTL Hardware Design by P. Chu
• Interpretation: any left-hand-side signal within the clk’event and clik=‘1’ branch infers a D FF
![Page 65: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/65.jpg)
Chapter 8 65RTL Hardware Design by P. Chu
T FF
![Page 66: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/66.jpg)
Chapter 8 66RTL Hardware Design by P. Chu
![Page 67: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/67.jpg)
Chapter 8 67RTL Hardware Design by P. Chu
![Page 68: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/68.jpg)
Chapter 8 68RTL Hardware Design by P. Chu
![Page 69: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/69.jpg)
Chapter 8 69RTL Hardware Design by P. Chu
Binary counter with bells & whistles
![Page 70: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/70.jpg)
Chapter 8 70RTL Hardware Design by P. Chu
![Page 71: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/71.jpg)
Chapter 8 71RTL Hardware Design by P. Chu
![Page 72: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/72.jpg)
Chapter 8 72RTL Hardware Design by P. Chu
Free-running binary counter Count in binary sequence With a max_pulse output: asserted when
counter is in “11…11” state
![Page 73: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/73.jpg)
Chapter 8 73RTL Hardware Design by P. Chu
![Page 74: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/74.jpg)
Chapter 8 74RTL Hardware Design by P. Chu
![Page 75: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/75.jpg)
Chapter 8 75RTL Hardware Design by P. Chu
![Page 76: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/76.jpg)
Chapter 8 76RTL Hardware Design by P. Chu
![Page 77: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/77.jpg)
Chapter 8 77RTL Hardware Design by P. Chu
Programmable mod-m counter
![Page 78: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/78.jpg)
Chapter 8 78RTL Hardware Design by P. Chu
![Page 79: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/79.jpg)
Chapter 8 79RTL Hardware Design by P. Chu
![Page 80: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/80.jpg)
Chapter 8 80RTL Hardware Design by P. Chu
![Page 81: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/81.jpg)
Chapter 8 81RTL Hardware Design by P. Chu
![Page 82: RTL Hardware Design by P. Chu Chapter 81. 1. Overview on sequential circuits 2. Synchronous circuits 3. Danger of synthesizing asynchronous circuit 4](https://reader036.vdocuments.us/reader036/viewer/2022062517/56649f035503460f94c17562/html5/thumbnails/82.jpg)
Chapter 8 82
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
RTL Hardware Design by P. Chu