RTL Studio Open IDE

Clock Generators

16-Bit DDS Phase Accumulator — L2 Upgrade

16-bit DDS phase accumulator with dual phase output, freeze, and stretch control.

About this block

Simulate it in the Verilog IDE

Mediumverilogsimsyn

16-Bit DDS Phase Accumulator — L2 Upgrade is a Verilog reference block in the Clock Generators catalog. Clock dividers, gating, and clock distribution helpers. Marked Medium: more state or a wider datapath, still one workspace in the IDE.

This IP core implements a 16-bit Direct Digital Synthesis (DDS) phase accumulator with dual-phase output capabilities.

It is designed for high-performance FPGA and ASIC implementations, supporting advanced waveform synthesis through precise control of phase accumulation timing.

The design includes features such as Clock Enable, Freeze, and Stretch modes, and has been fully verified using Icarus Verilog.

  1. phase_out: The current accumulated phase value.
  2. phase_out_dual: The phase value plus the current offset, enabling phase-shifted waveform generation.
  1. Choose Open in IDE. RTL Studio loads the packaged workspace for 16-Bit DDS Phase Accumulator — L2 Upgrade.
  2. Read the Verilog module in the editor. The catalog line for this block: 16-bit DDS phase accumulator with dual phase output, freeze, and stretch control.
  3. Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
  4. Run Yosys in the same IDE for a generic netlist. Sky130 liberty mapping is a separate Pro library option.

RTL Studio is the Verilog simulator and IDE around this block: Slang lint, Verilator, VCD waveforms, and Yosys, in the browser. Simulation guide · Yosys guide.

Features

  • 16-Bit Precision: Full 16-bit phase resolution for accurate frequency generation.
  • Dual-Phase Output: Simultaneous generation of main phase and phase-shifted output.
  • Flexible Control Modes:

- Clock Enable (ce): Gates the accumulation logic. Accumulation only occurs when ce is high. - Freeze (freeze): Holds the current phase value constant, stopping accumulation. - Stretch (stretch): Delays the accumulation by one clock cycle, effectively halving the update rate when asserted.

  • Reset: Active-low asynchronous reset (rst_n) initializes both phase registers to zero.

Ports

Port NameDirectionWidthDescription
clkInput1Clock input
rst_nInput1Active-low reset
ceInput1Clock enable (accumulation gated when low)
freezeInput1Freeze phase output (holds value when high)
stretchInput1Stretch accumulation cycle (delays update by 1 cycle)
phase_offsetInput[15:0]Phase increment value
phase_outOutput[15:0]Current phase accumulator value
phase_out_dualOutput[15:0]Dual phase output (phase + offset)

Verification

The testbench covers the following scenarios:

  • TC1: Reset to zero
  • TC2: Normal accumulation
  • TC3: Freeze mode
  • TC4: Dual phase output
  • TC5: Stretch cycle
  • TC6: Clock enable low

Expected Simulation Output:

More in Clock Generators

All Clock Generators blocks