Clock and reset management

Clock tree

This is an overview of the clock distribution for Kiwi device. There are 3 clock sources:

  • Source 100 MHz for PCIe comes from mother board of PC
  • Source 100 MHz for DDR4 comes from oscilator on XEM8310 modules
  • Source 10 MHz and PPS comes from White Rabbit Switch(WRS)

WRS 10 MHz is reference for PLL LTC6951 to generate clock pairs (sysref 3.125 MHz and refclk 200 MHz) for Fast DAC AD9152 and FPGA. PLL LTC6951 requires a SYNC signal to align all outputs to input, I use WRS PPS and 10 MHz to generate this signal, then the outputs will be aligned to PPS.

reflck 200 MHz is is the source clock for all logics in fpga, PPS is reference for synchronization

clock system

Module RTL

Purpose of this module:

  • Manage the input clocks
  • Generate the resets for other RTL modules
  • Generate SYNC signal for clockchip on board Bread70

module overview

Port descriptions

Signals nameInterfaceDirInit statusDescription
fastdac_refclki_p/ncr_ext_crI200MHzinput of jesd refclk from clockchip
fastdac_sysref_p/ncr_ext_crI3.125MHzinput of jesd sysref from clockchip
fastdac_syncout_p/ncr_ext_crI-input of jesd syncout from receiver
ext_clk10_p/ncr_ext_crI10MHzinput of 10MHz from WRS
ext_clk100_p/ncr_ext_crI100MHzinput of 100MHz from clockchip
axil signalss_axilIO-standard axilite interface for r/w registers
s_axil_aclkClockI15MHzclock for axil interface
sys_reset_nResetI-system reset, active LOW
clk_ddr_axi_iClockI300MHzclock to generated from MMCM of DDR4
rst_ddr_axi_iResetI-reset synced to clk_ddr_axi_i
fastdac_gt_powergood_i-I-powergood indicator of jesd204B core
pps_i-I-PPS from WRS
lclk_iClockI-lclk domain of tdc module
rstn_axil_oResetO-Reset axil interface in others modules
rstn_ddr_axi_oResetO-Reset AXI interface of DDR4
fastdac_refclk_oClockO200MHzRefclk for QPLL in JESD204_PHY IP
fastdac_coreclk_oClockO200MHzClock for logic in 200MHz domain
fastdac_corerst_oResetO-Reset for fastdac core
fastdac_sysref_oClockO3.125MHzSysref for jesd204b core
fastdac_syncout_o-O-syncout for jesd204b core
clk10_oClockO10MHzclk10 SE (single-ended)
clk100_oClockO100MHzclk100 SE
sync_ltc_oClockO2ms HIGHSYNC signal for clockchip output alignment
tdc_rst_oResetO-Reset for tdc clock reset module
lrst_oResetO-Reset for tdc module in lclk domain
ttl_rstResetO-Reset for ttl_gate module
decoy_rstResetO-Reset for decoy module
gc_rst_oResetO-Reset for tdc module in clk200 domain
ddr_data_rstn_oResetO-Reset for ddr_data module

User parameters

ParameterValueDescription
C_S_Axil_Addr_Width10Address width of axil interface
C_S_Axil_Data_Width32Address width of axil interface

Axilite registers:

  • Base Address: 0x0001_2000
  • Offset address slv_reg(n) : 4*n

slv_reg0 - R/W Access - Trigger Control

BitsSignal nameHW WireAction/ValueDescription
31:2---Reserved 0
1clockchip_sync_oclockchip_syncPull LOW to HIGHSend trigger to generate SYNC signal for external clockchip
0fpga_turnkey_fastdac_rst_ofpga_turnkey_fastdac_rstPull HIGH to LOWReset fastdac core, active HIGH

slv_reg1 - R/W Access - Trigger Control

BitsSignal nameHW WireAction/ValueDescription
31:2---Reserved 0
1tdc_rst_otdc_rstPull HIGH to LOWReset tdc clock management, active HIGH
0lrst_olrst_iPull HIGH to LOWReset tdc module in lclk domain, active HIGH

slv_reg2 - R/W Access - Trigger Control

BitsSignal nameHW WireAction/ValueDescription
31:1---Reserved 0
0gc_rst_ogc_rstPull HIGH to LOWReset tdc module in clk200 domain, active HIGH

slv_reg3 - R/W Access - Trigger Control

BitsSignal nameHW WireAction/ValueDescription
31:1---Reserved 0
0ttl_rst_ottl_rstPull HIGH to LOWReset ttl module, active HIGH

slv_reg4 - R/W Access - Trigger Control

BitsSignal nameHW WireAction/ValueDescription
31:1---Reserved 0
0ddr_data_rstddr_data_rstPull HIGH to LOWReset ddr_data module, active HIGH

slv_reg5 - R/W Access - Trigger Control

BitsSignal nameHW WireAction/ValueDescription
31:1---Reserved 0
0decoy_rst_odecoy_rstPull HIGH to LOWReset decoy module, active HIGH

slv_reg6 - R/W Access - Trigger Control

BitsSignal nameHW WireAction/ValueDescription
31:1---Reserved 0
0ltc_sync_rst_oltc_sync_rstPull HIGH to LOWReset decoy module, active HIGH

Generate SYNC signal for clockchip

After receiving sync trigger command from OS, FPGA detects rising edge of PPS and start counting to generate a 2ms pulse for clockchip (minimum is 1ms). Order of commands:

  • Initialize clock chip : writing configuration registers
  • Reset the sync counter
  • Send the sync trigger
  • FGPA should return the SYNC pulse for clock chip, the outputs of clock chip should be aligned to reference clock
  • Each time there'a any change in configuration registers, new parameters is applied after SYNC

Note: This SYNC is different with SYNC on DDR