Repairing recovery and rollover logic

Mark Yourself Question

  1. Grab a piece of paper and try this problem yourself.
  2. When you're done, check the "I have answered this question" box below.
  3. View the solution and report whether you got it right or wrong.

A controller needs a synchronous three-bit modulo-6 counter with stored count CC and a registered pulse output PP. Both update on each rising clock edge. Use these requirements, in priority order:

  1. If synchronous reset R=1R=1, set the count to zero.
  2. Otherwise, if the pre-edge count is an unused state, 6 or 7, recover to zero even when enable E=0E=0.
  3. Otherwise, hold when E=0E=0.
  4. Otherwise, increment through 0,1,2,3,4,5,00,1,2,3,4,5,0.

After an edge, PP must be 1 for the following clock interval only if that edge performed an enabled transition from a valid count of 5 to zero without reset. Reset, recovery, and holding zero must produce P=0P=0.


A proposed design uses


Cnext={0,R=1,C,R=0 and E=0,(C+1) mod 6,R=0 and E=1,C_{\text{next}}= \begin{cases} 0,&R=1,\\ C,&R=0\text{ and }E=0,\\ (C+1)\bmod6,&R=0\text{ and }E=1, \end{cases}


and sets Pnext=1P_{\text{next}}=1 whenever Cnext=0C_{\text{next}}=0.


Identify the flaws and write corrected rules for both outputs using pre-edge inputs and state. Then give the corrected count and pulse after each independent test below. The rows are separate tests, not a sequence.


Pre-edge count

Reset RR

Enable EE

101

0

0

101

0

1

101

1

1

110

0

0

111

0

1

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Counters Questions: