--- Quote Start ---
Here's how I test clocks;
1) Create a basic design where an LED blinks at about 1 Hz. If the board has more than one clock, then assign an LED (or two) to each clock.
2) Create a JTAG-to-Avalon-MM design with a clock-counting register block. The clock counter component contains several counters each clocked by an external source. The counters each have an enable input. The enable input comes from an Avalon control register, and is synchronized to each of the respective clock domains. You pulse the enable signal using JTAG commands, and then read out the counter values.
The counter value for the Avalon clock is your reference clock count, eg., lets say I used a 50MHz on-board oscillator for the Avalon clock, the assumption is that that oscillator is exactly 50MHz.
Read the counts in the other counters, and scale them from count to MHz using the reference count.
This is very handy for checking that your PLLs and transceiver clocks are operating at the right frequencies.
Cheers,
Dave
--- Quote End ---
Thanks Dave. I will try this soon.
By now, I am playing with the SignalTap Analyzer to test clocks by relative comparison. Again, my purpose is to have a synchronous clock for dual-board designs. So, I assign clock like this. The design on the board#1(with the SMA clock output) has input clock assigned to an FPGA pin. This clock is also assigned to the output clock. The design on the board#2 (with the SMA clock input) uses the SMA input clock as the reference.
And something strange happened I don't understand. I use Sinaltap to capture the input clock and output clock in design#1, they are identical. In the board#2, for comparison purpose, I tap the external input clock (coming from board#1 via SMA connectors). and a local clock signal with exactly same frequency (100MHz). But the external input clock is strange, not stable, having too many bit 1s and only 1 bit 0 in a period, while the expected clock should have a duty cycle of 50% (like 1111000011110000).
If anyone has experienced something similar, please share your solution? Or if the quality of SMA cables can be the reason?
Thank you.