01-28-2010 09:10 AM
Hi folks..a FPGA newbie here. I need to do a clock doubling in Spartan6 device (clkin is 256kHz). DCM wont work since this is below the min freq for the input. Any ideas?
Also, just for kicks when I tried to instatiate the DCM_SP module in my code, I got the compiler error "FALSE is not declared".TRUE, FALSE are used for some strap settings on the primitive. Any libraries that I need to declare to handle TRUE/FALSE (since there's no boolean keyword in verilog)??
01-28-2010 01:11 PM
01-28-2010 01:23 PM - edited 01-28-2010 01:28 PM
You can't use the S6 PLL because you are way outside of its range.
Even if you only use the DCM's DFS (CLKFXOUT only), you are still outside of the CLKIN_FREQ_FX and CLKOUT_FREQ_FX specs. You may have enough PVT margin that it could work in the lab or for a personal project, but I certainly wouldn't use it on any production designs.
Some have the appreciated the ideas in this article:http://www.pldworld.com/_xilinx/html/tip/sixeasypieces.htm
For future reference, you may find the instantiation templates in the Library Guide (e.g. spartan6_hdl.pdf) and the ProjNav Language Templates (Verilog -> Device Primitive Instantiation -> Spartan-6 -> Clock Components) useful.
01-31-2010 01:21 AM
The article mentions a potential duty cycle issue with the clock doubler circuit. If you want a clean duty cycle, you can probably put 2 of these circuits in series and put a toggle flop at the end to get a nice duty cycle.
Can regular synthesis etc. handle this kind of circuit or is it better to just instance and place the logic manually?
02-02-2010 04:44 AM
If you do not care much about the skew of your clocks, you could you try to doit with a delay line and an xor gate. If you are using vhdl or verilog you can easily infer a delay line by doing an 'and' of your clock with an IOB tied to a pull up.
I hope it helps.