Electronic – External clock with Arty Z7 FPGA development board

fpgaxilinxzynq

I have a digital audio source that is basically I2S. I need to run the FPGA at the exact clock as the I2S provides. I've got four such inputs required, but I am assuming that the clocks are the same.

Is there an input on the Arty Z7 board that works as an external clock? If not, is there a dev board for zynq that does? Any pointers to how to configure that in the vhdl?

Update: maximum sample rate is 384Khz. maximum bits per channel is 32. maximum channels is two. Consequently, maximum clock is 24MHz. Max z7 clock is ~100Mhz? I do not believe that this is a high enough multiple to avoid clock inaccuracies on the output (but would be happy to be wrong). This is an audiophile application and avoiding jitter is very important.

Best Answer

Yes, there are pins available on the Arty Z7 that can be used as native clock inputs to the PL fabric. Page 9 of the schematic shows the pin names in each of the banks of the PL used in the design. This Xilinx Forums question about SRCC and MRCC pins gets to the necessary information: the pins labeled SRCC and MRCC are clock input capable pins, some of which are routed directly to user-facing pins on the Arty Z7.

Since you're after external IO, you'll probably use the PMOD or Arduino headers on the Arty Z7. The PMOD pins are prefixed with JA and JB while the Arduino headers use the prefix CK_IO. Assuming single-ended clock inputs for your I2S-like implementation, you have these pins available:

  • IO_L11P_T1_SRCC_13/U7 - CK_IO29
  • IO_L13P_T2_MRCC_13/Y7 - CK_IO37
  • IO_L14P_T2_SRCC_13/Y9 - CK_IO41
  • IO_L12P_T1_MRCC_34/U18 - JA3_P

Of course, other boards will have similar IO features. Depending on your FPGA fabric, processor, and IO needs, a different board will be an option.

For more details from Xilinx, see:

  • UG472 (v1.14) July 30, 2018 section "Clock-Capable Inputs" pg 30 and onward, explaining how to use these inputs
  • UG475 (v1.18) July 16, 2019 "Table 1-12: 7-Series FPGAs Pin Definitions (Cont’d), Other Pins" pg 30-31 providing the definitions for the pin name abbreviations

As for configuring this in VHDL, you'll be using this as one of the clock domains in your design. Your pin assignment constraints will need to place the input clock pin in the correct location given the above information and your choice of how you're connecting. As for the design, it will depend on whether or not your clock input and output rates are constant or dynamic and continuous or discontinuous. If you're looking for the most flexibility, I would suggest having a constant-clock resampler/custom-DSP running on one of the board clocks with FIFOs to/from the different precise and ratio-frequency IO domains.