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

Divide by 3 with 50 Percent Duty Cycle

HardLogic CircuitBuild

Clock generation networks often require dividing a high-speed reference clock down to lower frequencies for peripheral buses. Achieving a perfect square wave with an odd division factor requires sub-cycle resolution to ensure timing margins remain symmetric.

The circuit takes a continuous input clock clk and an active-high asynchronous reset rst. It must produce an output clock clk_out whose frequency is exactly one-third of the input clk. The output clk_out must maintain exactly a 50 percent duty cycle: it must remain high for 1.5 input clock cycles and low for 1.5 input clock cycles.

| rst | clk Edge | clk_out | |-------|------------|-----------| | 1 | X | 0 | | 0 | Rising 1 | 0 | | 0 | Falling 1 | 0 | | 0 | Rising 2 | 1 | | 0 | Falling 2 | 1 | | 0 | Rising 3 | 1 | | 0 | Falling 3 | 0 |

Constraints

  • Use only standard D flip-flops and combinational logic gates.
  • Do not use delay elements or phase-locked loops.
  • Drive the clk_out output using pure combinational logic based on the internal flip-flop states.
  • The reset signal rst must asynchronously initialize the divider state to zero.

Topics

Flip-FlopsClockingDividers

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