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

Sequence Counter Partial Specification

HardLogic CircuitBuild

Communication protocols and interleaved memory controllers often operate on partial timing specifications where valid data points occur only at specific intervals. The sequence generator must provide a 10-state cycle where the even-cycle states are strictly defined as 0, 2, 4, 6, and 8.

To minimize combinational logic overhead and standardize the interface, resolve the unspecified odd-cycle states by bridging the gaps with standard sequential integers: 1, 3, 5, 7, and 9. The resulting circuit operates as a standard mod-10 (BCD) counter. When rst is high, the counter must reset to 0.

| Cycle Type | Cycle Index | Q (Decimal) | Q (Binary) | |------------|-------------|---------------|--------------| | Reset | N/A | 0 | 0000 | | Even | 0 | 0 | 0000 | | Odd | 1 | 1 | 0001 | | Even | 2 | 2 | 0010 | | Odd | 3 | 3 | 0011 | | Even | 4 | 4 | 0100 | | Odd | 5 | 5 | 0101 | | Even | 6 | 6 | 0110 | | Odd | 7 | 7 | 0111 | | Even | 8 | 8 | 1000 | | Odd | 9 | 9 | 1001 | | Even | 10 | 0 | 0000 |

Constraints

  • Implement a synchronous 4-bit counter that wraps from 9 (1001) back to 0 (0000).
  • Use a synchronous active-high reset rst to force the state to 0.
  • Unused states (10 through 15) must not lock up the counter.

Topics

CountersState MachinesPartial Spec

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