Main Content

PFD and Charge Pump Testbench

Generic test environment for phase/frequency detectors and charge pumps

  • PFD and Charge Pump Testbench block

Libraries:
Mixed-Signal Blockset / PLL / Measurements & Testbenches

Description

The PFD and Charge Pump Testbench block evaluates the behavioral model of a PFD and charge pump. A single stimulus generator determines whether the PFD is operating in the phase offset mode or frequency offset mode.

The PFD and Charge Pump Testbench block generates the stimulus to drive the device under test (DUT) from the Stimulus tab. The setup parameters for validating the DUT are defined in the Setup tab and the target validation metrics are defined in the Target Metrics tab.

The testbench measure PFD performance metrics such as deadband, linear rage, and timing impairments. It also measures charge pump performance metrics such as sensitivity, phase offset, and spur current.

Ports

Input

expand all

Measures the reference frequency of the PFD block.

Data Types: double

Measures the feedback frequency of the PFD block.

Data Types: double

Measures the output current of the Charge Pump block.

Data Types: double

Output

expand all

Provides reference frequency to the PFD to determine phase error.

Data Types: double

Provides feedback frequency to the PFD block.

Data Types: double

Parameters

expand all

Stimulus

Maximum phase excursion from phase offset, specified as a real positive scalar in degrees.

Programmatic Use

  • Use get_param(gcb,'PhaseSweep') to view the current value of Phase sweep.

  • Use set_param(gcb,'PhaseSweep',value) to set Phase sweep to a specific value.

Data Types: double

Relative phase value at the center of the phase sweep, specified as a real scalar in degrees.

Programmatic Use

  • Use get_param(gcb,'PhaseOffset') to view the current value of Phase offset.

  • Use set_param(gcb,'PhaseOffset',value) to set Phase offset to a specific value.

Data Types: double

Desired clock frequency for the reference counter output, specified as a real positive scalar in Hz.

Programmatic Use

  • Use get_param(gcb,'ClockFrequency') to view the current value of Clock frequency.

  • Use set_param(gcb,'ClockFrequency',value) to set Clock frequency to a specific value.

Data Types: double

The number of evenly spaced phase offsets in a sweep of phase offset, specified as a real positive scalar.

Programmatic Use

  • Use get_param(gcb,'NPhases') to view the current value of Number of phases in sweep.

  • Use set_param(gcb,'NPhases',value) to set Number of phases in sweep to a specific value.

Data Types: double

Duty cycle for the stimulus clock at both reference and feedback ports, specified as real positive scalar.

Programmatic Use

  • Use get_param(gcb,'DutyCycle') to view the current value of Duty cycle.

  • Use set_param(gcb,'NPhases',value) to set Duty cycle to a specific value.

Data Types: double

Setup

Select to plot the figures on the top of all other windows after simulation. By default, this option is selected.

Select to display the PFD metrics (Deadband, Linear Range, and Propagation delay) on the icon of the PFD and Charge Pump Testbench. By default, this option is selected.

Data Types: double

Select to display the Charge Pump metrics (Sensitivity, Phase offset, and Spur current) on the icon of the PFD and Charge Pump Testbench. By default, this option is selected.

Data Types: double

Switching threshold at the input of a charge pump, specified as a real scalar in V. It is the voltage at which the timing of rising and falling edges is measured.

Programmatic Use

  • Use get_param(gcb,'VSwitch') to view the current value of Logic Threshold.

  • Use set_param(gcb,'VSwitch',value) to set Logic Threshold to a specific value.

Data Types: double

Select to enable increased buffer size during simulation. This increases the buffer size of the Variable Pulse Delay and Logic Decision blocks inside the PFD and Charge Pump Testbench. By default, this option is deselected.

Number of samples of the input buffering available during simulation, specified as a positive integer scalar. This sets the Variable Pulse Delay and Logic Decision inside the PFD and Charge Pump Testbench.

Selecting different simulation solver or sampling strategies can change the number of input samples needed to produce an accurate output sample. Set the Buffer size to a large enough value so that the input buffer contains all the input samples required.

Dependencies

This parameter is only available when Enable increased buffer size option is selected in the Configuration tab.

Programmatic Use

  • Use get_param(gcb,'NBuffer') to view the current value of Buffer size.

  • Use set_param(gcb,'NBuffer',value) to set Buffer size to a specific value.

Target Metrics

PFD Metrics

Maximum acceptable size of reduced sensitivity region near zero phase offset, specified as a real nonnegative scalar in degrees. It refers to the size of the deadband region.

Programmatic Use

  • Use get_param(gcb,'TgtDeadband') to view the current value of Target deadband.

  • Use set_param(gcb,'TgtDeadband',value) to set Target deadband to a specific value.

Data Types: double

Maximum phase offset at which the output remains approximately equal to the input offset, specified as a real positive scalar in degrees.

Programmatic Use

  • Use get_param(gcb,'TgtRange') to view the current value of Target linear range.

  • Use set_param(gcb,'TgtRange',value) to set Target linear range to a specific value.

Data Types: double

Maximum acceptable delay from the input to output, specified as a real positive scalar in s.

Programmatic Use

  • Use get_param(gcb,'TgtPropDelay') to view the current value of Target propagation delay.

  • Use set_param(gcb,'TgtPropDelay',value) to set Target propagation delay to a specific value.

Data Types: double

Maximum acceptable 20% – 80% rise/fall time, specified as a real positive scalar in s.

Programmatic Use

  • Use get_param(gcb,'TgtRiseFall') to view the current value of Target rise/fall time.

  • Use set_param(gcb,'TgtRiseFall',value) to set Target rise/fall time to a specific value.

Data Types: double

Charge Pump Metrics

Maximum acceptable charge pump sensitivity, specified as a real positive scalar in A/°.

Programmatic Use

  • Use get_param(gcb,'TgtSensitivity') to view the current value of Target sensitivity.

  • Use set_param(gcb,'TgtSensitivity',value) to set Target sensitivity to a specific value.

Data Types: double

Maximum acceptable phase offset at the output of a charge pump, specified as a real positive scalar in degrees.

Programmatic Use

  • Use get_param(gcb,'TgtOffset') to view the current value of Target phase offset.

  • Use set_param(gcb,'TgtOffset',value) to set Target phase offset to a specific value.

Data Types: double

Magnitude of the output current of the charge pump at the reference frequency.

Programmatic Use

  • Use get_param(gcb,'TgtSpurCurrent') to view the current value of Target spur current.

  • Use set_param(gcb,'TgtSpurCurrent',value) to set Target spur current to a specific value.

Data Types: double

References

[1] Banerjee, Dean. PLL Performance, Simulation and Design. Indianapolis, IN: Dog Ear Publishing, 2006.

Version History

Introduced in R2019a

See Also

|