CDR_PhaseInterpCDR_LoopFilter

CDR_PhaseInterpCDR_LoopFilter : A digital loop filter for a phase-interpolating CDR

A digital loop filter for a phase-interpolating CDR processes the digital timing error information provided by the bang-bang phase detector and updates the digital code controlling the phase-domain DAC.

This digital loop filter model is described as an digital accumulator, which either increments or decrements its output code depending on whether the up or dn input is asserted.

module CDR_PhaseInterpCDR_LoopFilter (
    output reg [5:0] ctrl,      // output control code
    input up,                   // up signal
    input dn,                   // dn signal
    input clk                   // clock
);

initial ctrl = 6'b0;

always @(posedge clk) begin
    if (up & ~dn) begin
        ctrl = ctrl - 1;
    end
    else if (~up & dn) begin
        ctrl = ctrl + 1;
    end
end

endmodule

Input/Output Terminals

Name I/O Type Description
ctrl[5:0] output reg output control code
up input wire up signal
dn input wire dn signal
clk input wire clock