Codiode

Divide by Three with 50 Percent Duty Cycle

HardLogic CircuitBuildFree

High-speed communication interfaces and PLL feedback loops require precise clock scaling without introducing asymmetric phase distortion. Dividing a clock by an odd integer while maintaining a symmetric high and low time demands sub-cycle phase manipulation.

Construct a clock divider that receives an input clock clk and an active-high synchronous reset rst. The output clk_out must toggle at exactly one-third the frequency of clk with a 50 percent duty cycle.

To ensure consistent test behavior, the phase relationship is strictly defined. After rst is deasserted, the first rising edge of clk must drive clk_out high. The output must then remain high for exactly 1.5 clock cycles before transitioning low for 1.5 clock cycles.

rst clk clk_out Phase Sequence
1 0 0 Reset
1 1 0 Reset
0 0 0 Deassert Reset
0 1 1 Rising 1
0 0 1 Falling 1
0 1 1 Rising 2
0 0 0 Falling 2
0 1 0 Rising 3
0 0 0 Falling 3

Constraints

  • Use only standard logic gates and D flip-flops.
  • Derive the 50 percent duty cycle output by logically combining signals from both positive-edge and negative-edge triggered paths.
  • Do not use delay elements, buffers, or asynchronous logic to manipulate the duty cycle.

Topics

Sequential LogicClock DivisionDuty Cycle

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.

Free to solve. A Codiode account keeps your progress.

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.

Part of Clocking and Synchronization

Problem 9 of 85 in the Clocking and Synchronization track.

Related problems

Browse all problems · Digital logic design practice problems · Learning tracks

Solve this on a laptopSend yourself the link and continue there.