CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Sequential Logic

Ring Counter: Initialization via Synchronous Load

MediumLogic CircuitBuild

Fully synchronous designs avoid asynchronous resets to prevent timing violations. A ring counter acting as a control state machine must initialize its one-hot sequence exactly at a clock edge rather than immediately upon a control signal assertion.

The circuit is a 4-bit ring counter with a synchronous LOAD signal. When LOAD is 1, the next rising clock edge forces the outputs Q3, Q2, Q1, and Q0 to the binary value 1000. When LOAD is 0, the next rising clock edge shifts the bits right, with Q0 feeding back into Q3.

| LOAD | Current Q3 | Current Q2 | Current Q1 | Current Q0 | Next Q3 | Next Q2 | Next Q1 | Next Q0 | |--------|--------------|--------------|--------------|--------------|-----------|-----------|-----------|-----------| | 1 | X | X | X | X | 1 | 0 | 0 | 0 | | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 |

Constraints

  • Use exactly four D flip-flops for state storage.
  • Do not use the asynchronous preset or clear pins on the flip-flops.
  • Use 2:1 multiplexers on the D inputs to select between the fixed initialization value and the ring counter feedback.

Topics

MultiplexersSynchronous LogicCounters

Solve this problem

Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.

This problem is part of Codiode Pro. The statement above is free to read.

Sign in to solveSee what Pro unlocks

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Related problems

  • 3-bit Ripple Counter from Toggle Flip-FlopsEasy
  • D Latch from a 2:1 MUXEasy
  • 2-bit Ring CounterEasy
  • T Flip-Flop from a D Flip-FlopEasy
  • Handshake Deadlock Due to Early ResetHard
  • Reconvergence of Individually Synchronized BitsHard
  • Debug: Asynchronous Clear GlitchHard
  • Clock Gate Enable Crossing DomainsHard

Browse all problems · Learning tracks