Electronic – Outputting a clock signal from an FPGA

7segmentdisplayfpga

Referring to question here: Click here, I'd like to use the 16 channel LED driver to run my 7-segment displays. I'm using a Spartan 6 LX9 FPGA to implement a 16-bit microprocessor that will take care of it all.

The development board I'm using is pretty barebone and has an onboard 100MHz clock, or perhaps I should say oscillator. What I was planning to do is slow it down to perhaps a few megahertz, then output it via a GPIO to the LED drivers and synchronize it that way with a separate verilog module.

My question is, do I have to take special care when trying to output a clock through a GPIO? Perhaps use a particular pin? I'm given to understand that the clock input is supposed to be through a predefined pin. The clock could be slower, as it doesn't really need to be too fast.

Here's the online user manual to the development board (pretty basic): Click here.

EDIT: More information:

I'm concerned about clock skew. The chip I'm looking at writes at every positive clock edge. What I plan to do is to divide up the clock and send it out to the chip, while the FPGA also uses the same signal to synchronize and send data to the chip serially. Timing seems to be pretty tight. A slow enough clock might be the answer though.

Best Answer

You can use any GPIO pin you want for output. It doesn't matter if it's balanced clock or arbitrary data.

Also, output at units of MHz shouldn't give you any trouble.


In sequential logic, there is a trend to use as little of clocks as possible. This is because clocks are very often the most important signals, as many others depend on them.

I'll try to depict here the issue of propagation delay, as projected to the thing called clock skew. Imagine you have two clocks, one derived from the other:

__/--\__/--\__/--\__/--     <- original clock
___/-----\_____/-----\      <- clock divided by 2

Note that the clock below is delayed by 1 character (that would be one flip-flop delay, which is minuscule.) It's just greatly exaggerated in the ASCII art.

But, in a black-boxed FPGA design you don't have to worry about that. It's all taken care of for you. All those worst-case timing issues are taken into account in the form of maximum clock frequency, that the design can run at.