Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Chapter 6
Registers and Counters
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
• The common clock
• input triggers all
flip‐flops on the
positive edge of each
pulse
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Registers
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
FIGURE 6.2 Four‐bit register with parallel load
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Serial transfer from register A to register B
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Table 6.1 Serial‐Transfer Example
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Serial Adder
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
FIGURE 6.5 Serial adder
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Design of a Serial Adder
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Design of a Serial Adder
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
State Equations
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
FIGURE 6.6 Second form of serial adder
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Until Now
• Registers with parallel loading
• Shift registers
• Serial Inputs
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Universal Shift Register Continued…
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Universal Shift Register Block Diagram
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Table 6.3 Function Table for the Register of Fig. 6.7
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Universal Shift Register
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Counter Types
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Ripple Counter
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Table 6.4 Binary Count Sequence
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
4 bit Binary Up Counter Timing Diagram
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
T FF implementation
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
JK FF implementation
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
D FF implementation
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
BCD Counter
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
• A should toggle at every
clock input
• D is 0 as long as C or B is
0.
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
FIGURE 6.10 BCD ripple counter
• D is 0 as long as C or B is
0.
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
BCD Counter – Alternate implementation
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
• The BCD counter discussed previously was a decade counter, since it
counts from 0 to 9.
• To count in decimal from 0 to 99, we need a two‐decade counter. To
count from 0 to 999, we need a three‐decade counter.
• Multiple decade counters can be constructed by connecting BCD
counters in cascade, one for each decade.
• A three‐decade counter is shown in the figure above.
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Synchronous Counters
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Synchronous Binary Counter
• In a synchronous binary
counter, the flip‐flop in the
least significant position
is complemented with
every pulse
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Synchronous Binary Counter
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Synchronous Binary Counter
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
FIGURE 6.12 Four‐bit synchronous binary counter
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Synchronous Up Down Binary Counter
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Synchronous Up Down Binary Counter
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Synchronous Up Down Binary Counter
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
FIGURE 6.13
Four‐bit up–down
binary counter
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Synchronous BCD counter
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Table 6.5 State Table for BCD Counter
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Synchronous BCD counter
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Binary Counter with Parallel Load
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Table 6.6 Function Table for the Counter of Fig. 6.14
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Only 2 bit load circuit for analysis
Output states are currently 00
Load 01 into outputs
Make load = 1, Count =0.
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
Input to flip flops determines output on
next clock pulse
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
FIGURE 6.15 Two ways to achieve a BCD counter
using a counter with parallel load
• Detect sequence 1001 and make • Detect sequence 1010 and make
Load=1 Clear=1
• Inputs are all 0s which when loaded
into the circuit clear all outputs
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.
• End of Chapter 6
• End of Course
Digital Design: With an Introduction to the Verilog HDL, 5e Copyright ©2013 by Pearson Education, Inc.
M. Morris Mano • Michael D. Ciletti All rights reserved.