Docsity

Lecture #27: Counters in Sequential Logic Design, Slides of Digital Logic Design and Programming

Partial preview of the text

Download Lecture #27: Counters in Sequential Logic Design and more Slides Digital Logic Design and Programming in PDF only on Docsity!

Sequential Logic Design

Lecture

  • Agenda
    1. Counters
  • Announcements
    1. HW #12 due.
  • Counters
    • special name of any clocked sequential circuit whose state diagram is a circle
    • there are many types of counters, each suited for particular applications
  • Toggle Flop
    • a D-Flip-Flop can product a "Divide-by-2" effect by feeding back Qn to D
    • this topology is also called a "Toggle Flop"
  • Ripple Counter
    • Cascaded Toggle Flops can be used to form rippled counter
    • there is no Next State Logic
    • this is slower than a straight binary counter due to waiting for the "ripple"
    • this is good for low power, low speed applications
  • Shift Register
    • a chain of D-Flip-Flops that pass data to one another
    • this is good for "pipelining"
    • also good for Serial-to-Parallel conversion
    • for n-flip-flops, the data is present at the final state after n clocks
  • Ring Counter
    • feeding the output of a shift register back to the input creates a "ring counter"
    • also called a "One Hot"
    • The first flip-flop needs to reset to 1, while the others reset to 0
    • for n flip-flops, there will be n counts
  • Linear Feedback Shift Register (LFSR) Counter
    • all of the counters based off of shift registers give far less states than the 2 n^ counts that are possible
    • a LFSR counter is based off of the theory of finite fields - created by French Mathematician Evariste Galois (1811-1832)
    • for each size of shift register, a feedback equation is given which is the sum modulo 2 of a certain set of output bits
    • this equation produces the input to the shift register
    • this type of counter can produce 2n^ -1 counts, nearly the maximum possible
  • Linear Feedback Shift Register (LFSR) Counter
    • the feedback equations are listed in Table 8.26 of the textbook
    • It is defined that bits always shift from Xn-1 to X 0 (or Q 0 to Qn-1 ) as we defined the shift register previously
    • they each use XOR gates (sum modulo 2) of particular bits in the register chain

ex)

n Feedback Equation 2 X2 = X1 โŠ• X 3 X3 = X1 โŠ• X 4 X4 = X1 โŠ• X 5 X5 = X2 โŠ• X 6 X6 = X1 โŠ• X 7 X7 = X3 โŠ• X 8 X8 = X4 โŠ• X3 โŠ• X2 โŠ• X : : : :