diff options
author | Ashish Chaudhari <ashish@ettus.com> | 2015-03-12 10:24:33 -0700 |
---|---|---|
committer | Ashish Chaudhari <ashish@ettus.com> | 2015-03-12 10:24:33 -0700 |
commit | 5682321efa26bb97f5d0c37d8e9921fc11a9b923 (patch) | |
tree | 224e88034bb00bb91ab5c70f9160a0ac30e1c583 /host/lib/usrp/x300/x300_clock_ctrl.cpp | |
parent | 230cf5d76ac2417c36713e82bcd0fbe7986b7847 (diff) | |
download | uhd-5682321efa26bb97f5d0c37d8e9921fc11a9b923.tar.gz uhd-5682321efa26bb97f5d0c37d8e9921fc11a9b923.tar.bz2 uhd-5682321efa26bb97f5d0c37d8e9921fc11a9b923.zip |
x300: Timing changes for the new DAC data interface
- Switched DAC to DCI delay bypass mode because we
shift the DCI in the FPGA now
- Changed LMK control to add 900ps delay to DAC clocks
to be consistent with the radio_clk delay. The timing
analyzer is expecting the two clocks to have a 0 deg
phase diff.
Diffstat (limited to 'host/lib/usrp/x300/x300_clock_ctrl.cpp')
-rw-r--r-- | host/lib/usrp/x300/x300_clock_ctrl.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/host/lib/usrp/x300/x300_clock_ctrl.cpp b/host/lib/usrp/x300/x300_clock_ctrl.cpp index 247c10ac4..22eba3eb3 100644 --- a/host/lib/usrp/x300/x300_clock_ctrl.cpp +++ b/host/lib/usrp/x300/x300_clock_ctrl.cpp @@ -287,6 +287,8 @@ void set_master_clock_rate(double clock_rate) { this->write_regs(0); _lmk04816_regs.CLKout0_1_DIV = vco_div; _lmk04816_regs.CLKout0_ADLY_SEL = lmk04816_regs_t::CLKOUT0_ADLY_SEL_D_EV_X; + _lmk04816_regs.CLKout6_ADLY_SEL = lmk04816_regs_t::CLKOUT6_ADLY_SEL_D_BOTH; + _lmk04816_regs.CLKout7_ADLY_SEL = lmk04816_regs_t::CLKOUT7_ADLY_SEL_D_BOTH; this->write_regs(0); // Register 1 @@ -309,9 +311,12 @@ void set_master_clock_rate(double clock_rate) { _lmk04816_regs.CLKout1_TYPE = lmk04816_regs_t::CLKOUT1_TYPE_P_DOWN; //CPRI feedback clock, use LVDS _lmk04816_regs.CLKout2_TYPE = lmk04816_regs_t::CLKOUT2_TYPE_LVPECL_700MVPP; //DB_0_RX _lmk04816_regs.CLKout3_TYPE = lmk04816_regs_t::CLKOUT3_TYPE_LVPECL_700MVPP; //DB_1_RX - // Analog delay of 900ps to synchronize the radio clock with the source synchronous ADC clocks. + // Delay the FPGA_CLK by 900ps to ensure a safe ADC_SSCLK -> RADIO_CLK crossing. + // If the FPGA_CLK is delayed, we also need to delay the reference clocks going to the DAC + // because the data interface clock is generated from FPGA_CLK. // This delay may need to vary due to temperature. Tested and verified at room temperature only. _lmk04816_regs.CLKout0_1_ADLY = 0x10; + _lmk04816_regs.CLKout6_7_ADLY = _lmk04816_regs.CLKout0_1_ADLY; // Register 7 _lmk04816_regs.CLKout4_TYPE = lmk04816_regs_t::CLKOUT4_TYPE_LVPECL_700MVPP; //DB_1_TX |