06-12-2008 07:30 PM
06-13-2008 12:14 PM
06-13-2008 01:00 PM
You are correct, with a 50MHz Single-Cycle Timed Loop (SCTL), you can generate a 25MHz clock to your digital output pin (inverting the output on every 50MHz clock cycle). I am not aware of a way to directly wire an internal clock to a digital output pin in LV FPGA. However, there are two options to generate a 50MHz clock at your output pin:
1. Run your SCTL at 100MHz, use the same logic described above (invert output on every clock cycle)
2. Get creative with the HDL node
Option 1 may be difficult as it requires a faster clock source. Check your target documentation to see what your options are here. I don't believe your target supports LV FPGA derived clocks, but you may be able to use another source. Be aware that it is more difficult to meet timing when compiling for faster clock rates.
Option 2 requires you to write HDL code within the HDL node and configure the DIO in LV FPGA to correctly pass the signal. Disclaimer - this method bends some of the underlying assumptions of LV FPGA execution flow, but it will get the job done. Read on if you dare :). Your HDL code could either directly assign the 50 MHz clock input to an output, for example:
DigitalOut <= Clock50;
Or you could instantiate a Xilinx ODDR component (see Xilinx Spartan 3E documentation). The ODDR component has 2 inputs and will drive a new value to its output on every edge of a clock (rising and falling). Therefore, you can wire one input to a static '1', and the other to a static '0' to get a copy of the clock on the output pin.
In either case you wire the output of your HDL node directly to a LV FPGA Digital Output in a SCTL. You must set the # of synchronization registers on this Digital Output to zero. This will prevent LV FPGA from inserting a Flip-Flop between the output of your HDL node and the Digital Output pin.
Now you should have a copy of your 50MHz clock on your output pin.
Good luck!
-RB
06-13-2008 02:14 PM
06-13-2008 02:41 PM
06-13-2008 03:03 PM