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

Edge Aligned Clock Divider

HardLogic CircuitBuild

Communication frames often need a local clock tick that synchronizes phase with an incoming data stream. Generating a slow enable tick aligned to an external synchronization signal ensures data is sampled exactly at the center of the bit period.

Construct a divide-by-8 counter that outputs a single-cycle pulse on tick every 8 clock cycles. The counter must synchronously reset its phase whenever the external sync pulse arrives.

  • When rst_n is 0, the internal counter resets to 0.
  • When sync is 1, the internal counter resets to 0 on the next clock edge.
  • Otherwise, the internal counter increments by 1 each clock cycle.
  • The tick output is 1 strictly when the internal counter equals 7, and 0 otherwise.

Constraints

  • Implement synchronous active-low reset logic for rst_n.
  • Reset the counter phase synchronously when sync is asserted.
  • Drive tick high for exactly one clock cycle per 8-cycle period.

Topics

CountersClockingState Machines

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