Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
resources:eval:user-guides:ad-fmcdaq2-ebz:clocking [24 Aug 2017 07:44] – [fDAC = 1000 MSPS, fADC = 1000 MSPS] Lars-Peter Clausenresources:eval:user-guides:ad-fmcdaq2-ebz:clocking [12 Sep 2017 15:09] Lars-Peter Clausen
Line 1: Line 1:
 ====== AD-FMCDAQ2-EBZ Clocking ====== ====== AD-FMCDAQ2-EBZ Clocking ======
  
-The AD9523-1 is responsible for generating and distributing all clock signals used on the AD-FMCDAQ2-EBZ platform.+===== Overview =====
  
-The AD-FMCDAQ2-EBZ platform only uses the second PLL of the AD9523-1 with the reference for the PLL being sourced from a external 125 MHz crystal. The PLL2 VCO has a locking range of 2910 MHz to 3100 MHz, with the external reference being 125 MHz the nominal output frequency of the VCO is 3000 MHz.+The [[adi>AD9523-1]] is responsible for generating and distributing all clock signals used on the AD-FMCDAQ2-EBZ platform. 
 + 
 +The AD-FMCDAQ2-EBZ platform only uses the second PLL of the AD9523-1 with the reference for the PLL being sourced from a external 125 MHz crystal. The PLL2 VCO has a locking range of 2940 MHz to 3100 MHz, with the external reference being 125 MHz the nominal output frequency of the VCO is 3000 MHz.
  
 The output of the PLL VCO is down divided to the target frequencies in two steps. First it is divided by either 3, 4 or 5, which gives a frequency of 1000 MHz, 750 MHz or 600 MHz respectively. This is the master clock frequency for the data converter system and shared between the DAC and ADC data path, all generated clocks are based of this master clock. The output of the PLL VCO is down divided to the target frequencies in two steps. First it is divided by either 3, 4 or 5, which gives a frequency of 1000 MHz, 750 MHz or 600 MHz respectively. This is the master clock frequency for the data converter system and shared between the DAC and ADC data path, all generated clocks are based of this master clock.
Line 29: Line 31:
  
 ^ Clock ^ Frequency range ^ Comments ^ ^ Clock ^ Frequency range ^ Comments ^
-| PLL2 VCO | 3000 MHz | Tuning range of 2910 MHz to 3100 MHz |+| PLL2 VCO | 3000 MHz | Tuning range of 2940 MHz to 3100 MHz |
 | Master clock | 1000 MHz, 750 MHz, 600 MHz | PLL2 VCO divided by 3, 4 or 5 | | Master clock | 1000 MHz, 750 MHz, 600 MHz | PLL2 VCO divided by 3, 4 or 5 |
 | ADC converter clock | ≥ 312.5 MHz, ≤ 1000 MHz, Master clock / N<sub>ADC</sub> | | ADC converter clock | ≥ 312.5 MHz, ≤ 1000 MHz, Master clock / N<sub>ADC</sub> |
Line 46: Line 48:
 ^ Clock ^ Frequency ^ Divider setting ^ ^ Clock ^ Frequency ^ Divider setting ^
 | Master clock | 1000 MHz | 3 | | Master clock | 1000 MHz | 3 |
-| ADC converter clock | 1000 MHZ | 1 | +| ADC converter clock | 1000 MHz | 1 | 
-| ADC FPGA reference clock | 500 MHZ | 2 | +| ADC FPGA reference clock | 500 MHz | 2 | 
-| ADC SYSREF clock | 7.8125 MHZ | 128 | +| ADC SYSREF clock | 7.8125 MHz | 128 | 
-| ADC FPGA SYSREF clock | 7.8125 MHZ | 128 |+| ADC FPGA SYSREF clock | 7.8125 MHz | 128 |
 | ADC JESD204 lane rate | 10 Gbps |  | | ADC JESD204 lane rate | 10 Gbps |  |
-| DAC converter clock | 1000 MHZ | 1 | +| DAC converter clock | 1000 MHz | 1 | 
-| DAC FPGA reference clock | 500 MHZ | 2 | +| DAC FPGA reference clock | 500 MHz | 2 | 
-| DAC SYSREF clock | 7.8125 MHZ | 128 | +| DAC SYSREF clock | 7.8125 MHz | 128 | 
-| DAC FPGA SYSREF clock | 7.8125 MHZ | 128 |+| DAC FPGA SYSREF clock | 7.8125 MHz | 128 |
 | DAC JESD204 lane rate | 10 Gbps |  | | DAC JESD204 lane rate | 10 Gbps |  |
  
Line 63: Line 65:
 ^ Clock ^ Frequency ^ Divider setting ^ ^ Clock ^ Frequency ^ Divider setting ^
 | Master clock | 750 MHz | 4 | | Master clock | 750 MHz | 4 |
-| ADC converter clock | 375 MHZ | 2 | +| ADC converter clock | 375 MHz | 2 | 
-| ADC FPGA reference clock | 187.5 MHZ | 4 | +| ADC FPGA reference clock | 187.5 MHz | 4 | 
-| ADC SYSREF clock | 2.9296875 MHZ | 256 | +| ADC SYSREF clock | 2.9296875 MHz | 256 | 
-| ADC FPGA SYSREF clock | 2.9296875 MHZ | 256 |+| ADC FPGA SYSREF clock | 2.9296875 MHz | 256 |
 | ADC JESD204 lane rate | 3.75 Gbps |  | | ADC JESD204 lane rate | 3.75 Gbps |  |
-| DAC converter clock | 250 MHZ | 3 | +| DAC converter clock | 250 MHz | 3 | 
-| DAC FPGA reference clock | 125 MHZ | 6 | +| DAC FPGA reference clock | 125 MHz | 6 | 
-| DAC SYSREF clock | 1.953125 MHZ | 384 | +| DAC SYSREF clock | 1.953125 MHz | 384 | 
-| DAC FPGA SYSREF clock | 1.953125 MHZ | 384 |+| DAC FPGA SYSREF clock | 1.953125 MHz | 384 |
 | DAC JESD204 lane rate | 2.5 Gbps |  | | DAC JESD204 lane rate | 2.5 Gbps |  |
 +
 +===== Replacing the Crystal Oscillator =====
 +
 +The reference clock signal for the AD9523-1 PLL2 is on the AD-FMCDAQ2-EBZ provided by a crystal oscillator (XO). The default populated crystal oscillator has a output frequency of 125 MHz, this results in a nominal AD9523-1 VCO frequency of 3 GHz, all other clock signals are integer down-divided versions of the signal.
 +
 +Other VCO frequencies are possible by replacing the XO with a suitable replacement producing a different frequency. Replacing the XO might require changing the VCO feedback divider settings to produce a valid VCO frequency. The VCO frequency must be in the range of 2940 MHz to 3100 MHz.
 +
 +The reference frequency can optionally be divided by the R2 (1-32) or multiplied by 2 using the frequency doubler. The result of this is the PFD input frequency. The maximum PFD input frequency is 259 MHz. If the reference frequency exceeds this value the reference divider must be used to bring it into a valid range.
 +
 +''fPFD'' = ''fReference'' / ''R2'' * ''frequency_doubler''
 +
 +The VCO frequency is the PFD input frequency multiplied by the VCO feedback divider (N2).
 +
 +''fVCO'' = ''fPFD'' * ''N2''
 +
 +The feedback divider is the combination of two counters, the A and B counter. These are the settings that are programmed to the AD9523-1 configuration registers.
 +
 +''N2'' = ''4'' * ''B'' + ''A''
 +
 +Rearranging these formulas it is possible to compute the A and B counter settings from a know reference and a desired VCO frequency.
 +
 +''N2'' = ''fVCO'' / ''fPFD'' \\
 +''A'' = ''N2'' % ''4'' \\
 +''B'' = ''N2'' / ''4''
 +
 +==== Example: fXO = 122.88 MHz, fVCO = 2949.12 MHz ====
 +
 +In this example the frequency doubler is bypassed and the reference divider is set to 1. That means the PFD input frequency is equal to the reference frequency.
 +
 +''N2'' = ''fVCO'' / ''fPFD'' => ''N2'' = ''2949.12'' / ''122.88'' = ''24'' \\
 +''A'' = ''N2'' % ''4'' => ''A'' = ''24'' % ''4'' = ''0'' \\
 +''B'' = ''N2'' / ''4'' => ''B'' = ''24'' / ''4'' = ''6''
 +
 +^ Configuration Parameter ^ Setting ^
 +| PLL2 reference divider (R2) | 1 |
 +| PLL2 reference frequency doubler | Disabled |
 +| PLL2 feedback A divider | 0 |
 +| PLL2 feedback B divider | 6 |
 +
 +===== Modifying the Clock Configuration =====
 +
 +==== Linux ====
 +
 +On Linux the default clock configuration is supplied through the [[https://www.devicetree.org/|devicetree]].
 +
 +The devicetree file that is used for the AD-FMCDAQ2-EBZ and contains the clock configuration is called [[linux.github>xcomm_zynq?arch/arm/boot/dts/adi-daq2.dtsi|adi-daq2.dtsi]]. This file contains nodes for the [[linux.github>xcomm_zynq?arch/arm/boot/dts/adi-daq2.dtsi#L8|AD9523-1]], the [[linux.github>xcomm_zynq?arch/arm/boot/dts/adi-daq2.dtsi#L105|AD9144]] and the [[linux.github>xcomm_zynq?arch/arm/boot/dts/adi-daq2.dtsi#L120|AD9680]]. Each node contains properties that describe the hardware setup and provide default configuration parameters. For information on how to edit devicetree please see [[:resources:eval:user-guides:ad-fmcomms2-ebz:software:linux:zynq_tips_tricks#customizing_the_device_tree_on_the_target|Tips & Tricks - Customizing the device tree on the target]].
 +
 +To change the clocking configuration the properties of the AD9523-1 node can be modified. The following lists the most important properties for the AD-FMCDAQ2-EBZ and their corresponding hardware setting. The function of each of these settings and how to choose their value has been discussed above. For more information refer to the [[:resources:tools-software:linux-drivers:iio-pll:ad9523|AD9523-1 driver documenation]].
 +
 +^ Hardware configuration ^ Property name ^
 +| Frequency of the external VCXO | ''adi,vcxo-freq'' |
 +| PLL2 reference divider (R2) | ''adi,pll2-r2-div'' |
 +| PLL2 feedback A divider | ''adi,pll2-ndiv-a-cnt'' |
 +| PLL2 feedback B divider | ''adi,pll2-ndiv-b-cnt'' |
 +| PLL2 VCO output divider (M1) | ''adi,pll2-vco-diff-m1'' |
 +
 +Each clock output of the AD9523-1 has its own subnode in the devicetree. This subnode is used to select the configuration of the clock output. A clock output node is identified by its ''reg'' property which corresponds to the clock output channel number. E.g. the on the AD-FMCDAQ2-EBZ the ADC converter clock is sourced from output 13, so the node for the ADC converter clock has its ''reg'' property set to 13. For a list of all used clock outputs and their function see above.
 +
 +For changing the clocking configuration only two of the properties need to be changed, all other properties should remain at their default value.
 +
 +^ Hardware configuration ^ Property name ^
 +| Output divider | ''adi,channel-divider'' |
 +| Output phase | ''adi,divider-phase'' |
 +
 +**Example: Change the DAC converter clock divider to 4**
 +<code>
 + ad9523_0_c1:channel@1 {
 + reg = <1>;
 + adi,extended-name = "DAC_CLK";
 + adi,driver-mode = <3>;
 + adi,divider-phase = <1>;
 + adi,channel-divider = <4>;
 +// adi,output-dis;
 + };
 +</code>
 +
 +Based on the data output and input rates the converter drivers will automatically calculate the JESD204 lane rate and propagate the configuration to the JESD204 receiver and transmitter drivers. These drivers will update the high-speed transceiver configuration accordingly. This means no additional manual configuration is necessary to setup the JESD204 link.
 +
 +==== No-OS ====
resources/eval/user-guides/ad-fmcdaq2-ebz/clocking.txt · Last modified: 19 Jan 2018 10:14 by Alexandru Ardelean