G
Gernot Koch
Guest
Hi, <p>I've tried to understand exactly which clocks a DCM will phase align when I do external or internal feedback by the book. I've read every bit of documentation I could find, but came out empty-handed. So maybe someone out there can help me out... <p>This is the structure I have for internal feedback: <p>module int_fb(clki, clko); <BR>
&nbsp;&nbsp;input clki; <BR>
&nbsp;&nbsp;output clko; <BR>
&nbsp;&nbsp;wire clki_buf, clk_fb, clk_2x; <BR>
&nbsp;&nbsp;assign clko = clk_fb; <BR>
&nbsp;&nbsp;IBUFG ibufg0(.I(clki), .o(clki_buf)); <BR>
&nbsp;&nbsp;DCM dcm0(.CLKIN(clki_buf), .CLKFB(clk_fb), .CLK2X(clk_2x)); <BR>
&nbsp;&nbsp;BUFG bufg0(.I(clk_2x), .O(clk_fb)); <BR>
endmodule <p>Which wires are phase-aligned clocks here? <p>External feedback: <p>module ext_fb(clki, clkfb, clko); <BR>
&nbsp;&nbsp;input clki, clkfb; <BR>
&nbsp;&nbsp;output clko; <BR>
&nbsp;&nbsp;wire clki_buf, clk2x, clkfb_buf; <BR>
&nbsp;&nbsp;IBUFG ibufg0(.I(clki), .O(clki_buf)); <BR>
&nbsp;&nbsp;IBUFG ibufg1(.I(clkfb), .O(clkfb_buf)); <BR>
&nbsp;&nbsp;DCM dcm0(.CLKIN(clki_buf), .CLKFB(clkfb_buf), .CLK2X(clk2x)); <BR>
&nbsp;&nbsp;OBUF obuf0(.I(clk2x), .O(clko)); <BR>
endmodule <p>clko is connected to clkfb outside the FPGA. <BR>
I've omitted reset and locks for simplicity. <p>Again, which wires are phase-aligned clocks here? <p>Also related: what does the DESKEW_ADJUST attribute do? The documentation I found says only how you set it, but not what it does... <p>Thanks, <BR>
Gernot
&nbsp;&nbsp;input clki; <BR>
&nbsp;&nbsp;output clko; <BR>
&nbsp;&nbsp;wire clki_buf, clk_fb, clk_2x; <BR>
&nbsp;&nbsp;assign clko = clk_fb; <BR>
&nbsp;&nbsp;IBUFG ibufg0(.I(clki), .o(clki_buf)); <BR>
&nbsp;&nbsp;DCM dcm0(.CLKIN(clki_buf), .CLKFB(clk_fb), .CLK2X(clk_2x)); <BR>
&nbsp;&nbsp;BUFG bufg0(.I(clk_2x), .O(clk_fb)); <BR>
endmodule <p>Which wires are phase-aligned clocks here? <p>External feedback: <p>module ext_fb(clki, clkfb, clko); <BR>
&nbsp;&nbsp;input clki, clkfb; <BR>
&nbsp;&nbsp;output clko; <BR>
&nbsp;&nbsp;wire clki_buf, clk2x, clkfb_buf; <BR>
&nbsp;&nbsp;IBUFG ibufg0(.I(clki), .O(clki_buf)); <BR>
&nbsp;&nbsp;IBUFG ibufg1(.I(clkfb), .O(clkfb_buf)); <BR>
&nbsp;&nbsp;DCM dcm0(.CLKIN(clki_buf), .CLKFB(clkfb_buf), .CLK2X(clk2x)); <BR>
&nbsp;&nbsp;OBUF obuf0(.I(clk2x), .O(clko)); <BR>
endmodule <p>clko is connected to clkfb outside the FPGA. <BR>
I've omitted reset and locks for simplicity. <p>Again, which wires are phase-aligned clocks here? <p>Also related: what does the DESKEW_ADJUST attribute do? The documentation I found says only how you set it, but not what it does... <p>Thanks, <BR>
Gernot