May 3, 2012 #1 S spman Advanced Member level 4 Joined Aug 15, 2010 Messages 113 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,296 Activity points 2,061 Hi friends, What is problem in this design? The Clk net isn't detected in clock domains (constraint). Code: module top(InputClk, OutputClk, ...); input InputClk; output OutputClk; wire ClkToDCM; wire ClkToBUFG; wire Clk; IBUFG IBUFG_Ins(.I(InputClk), .O(ClkToDCM)); DCM DCM_Ins(.CLKIN(ClkToDCM), .CLKFX(ClkToBUFG)); BUFG BUFG_Ins(.I(ClkToBUFG), .O(Clk)); assign OutputClk = Clk; always @(posedge Clk) begin //state machine ... end UCF : Code: INST DCM_Ins CLKFX_MULTIPLY = 3; INST DCM_Ins CLKFX_DIVIDE = 1; INST DCM_Ins CLK_FEEDBACK = NONE; I checked the design in FPGA Editor. The Clk isn't trimmed. It is routed to all CLBs. My FPGA is Spartan3.
Hi friends, What is problem in this design? The Clk net isn't detected in clock domains (constraint). Code: module top(InputClk, OutputClk, ...); input InputClk; output OutputClk; wire ClkToDCM; wire ClkToBUFG; wire Clk; IBUFG IBUFG_Ins(.I(InputClk), .O(ClkToDCM)); DCM DCM_Ins(.CLKIN(ClkToDCM), .CLKFX(ClkToBUFG)); BUFG BUFG_Ins(.I(ClkToBUFG), .O(Clk)); assign OutputClk = Clk; always @(posedge Clk) begin //state machine ... end UCF : Code: INST DCM_Ins CLKFX_MULTIPLY = 3; INST DCM_Ins CLKFX_DIVIDE = 1; INST DCM_Ins CLK_FEEDBACK = NONE; I checked the design in FPGA Editor. The Clk isn't trimmed. It is routed to all CLBs. My FPGA is Spartan3.
May 3, 2012 #2 G gongdori Full Member level 2 Joined Mar 7, 2012 Messages 133 Helped 21 Reputation 42 Reaction score 19 Trophy points 1,298 Activity points 2,035 Is the feedback port in DCM connected? Also, DCM has reset requirement, I think...
May 3, 2012 #3 S spman Advanced Member level 4 Joined Aug 15, 2010 Messages 113 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,296 Activity points 2,061 gongdori said: Is the feedback port in DCM connected? Click to expand... No! according to XAPP462 "The feedback input is required unless the Digital Frequency Synthesis outputs, CLKFX or CLKFX180, are used stand-alone."
gongdori said: Is the feedback port in DCM connected? Click to expand... No! according to XAPP462 "The feedback input is required unless the Digital Frequency Synthesis outputs, CLKFX or CLKFX180, are used stand-alone."
May 3, 2012 #4 G gongdori Full Member level 2 Joined Mar 7, 2012 Messages 133 Helped 21 Reputation 42 Reaction score 19 Trophy points 1,298 Activity points 2,035 Oh, I see. I didn't know that CLKFB is not needed when only CLKFX or CLKFX180 are used. Is it the issue with real hardware or simulation? If hardware, do you reset DCM after the input clock gets stabilized?
Oh, I see. I didn't know that CLKFB is not needed when only CLKFX or CLKFX180 are used. Is it the issue with real hardware or simulation? If hardware, do you reset DCM after the input clock gets stabilized?
May 4, 2012 #5 S spman Advanced Member level 4 Joined Aug 15, 2010 Messages 113 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,296 Activity points 2,061 This problelem appears when i use DCM. Even in this simple design : Code: module counter(InputClk, ResetL, Dir, Out); input InputClk, ResetL, Dir; output [3:0] Out; reg [3:0] Out; wire ClkToDCM, ClkToBUFG, Clk; IBUFG IBUFG_Ins(.I(InputClk), .O(ClkToDCM)); DCM DCM_Ins(.CLKIN(ClkToDCM), .CLK0(ClkToBUFG), .CLKFB(Clk)); BUFG BUFG_Ins(.I(ClkToBUFG), .O(Clk)); always @(posedge Clk or negedge ResetL) if (!ResetL) Out <= 0; else if (Dir) Out <= Out + 1; else Out <= Out - 1; endmodule
This problelem appears when i use DCM. Even in this simple design : Code: module counter(InputClk, ResetL, Dir, Out); input InputClk, ResetL, Dir; output [3:0] Out; reg [3:0] Out; wire ClkToDCM, ClkToBUFG, Clk; IBUFG IBUFG_Ins(.I(InputClk), .O(ClkToDCM)); DCM DCM_Ins(.CLKIN(ClkToDCM), .CLK0(ClkToBUFG), .CLKFB(Clk)); BUFG BUFG_Ins(.I(ClkToBUFG), .O(Clk)); always @(posedge Clk or negedge ResetL) if (!ResetL) Out <= 0; else if (Dir) Out <= Out + 1; else Out <= Out - 1; endmodule
May 4, 2012 #6 G gongdori Full Member level 2 Joined Mar 7, 2012 Messages 133 Helped 21 Reputation 42 Reaction score 19 Trophy points 1,298 Activity points 2,035 So, it is an actual problem with the hardware, right? Do you reset the DCM?
May 4, 2012 #7 S spman Advanced Member level 4 Joined Aug 15, 2010 Messages 113 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,296 Activity points 2,061 gongdori said: So, it is an actual problem with the hardware, right? Click to expand... No. The design works correctly after implementation. gongdori said: Do you reset the DCM? Click to expand... No, i don't
gongdori said: So, it is an actual problem with the hardware, right? Click to expand... No. The design works correctly after implementation. gongdori said: Do you reset the DCM? Click to expand... No, i don't