aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Jepson <daniel.jepson@ni.com>2017-12-13 12:55:52 -0600
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:05:58 -0800
commitcb44bccd1ef4c052ca5ba886ebfa76c5f79524cd (patch)
treeaa02a172e1810298be0dddba0fa58250c3f04964
parentd5e44fe6e4ceb626d00e9e0ab2caa6f98e6aca3b (diff)
downloaduhd-cb44bccd1ef4c052ca5ba886ebfa76c5f79524cd.tar.gz
uhd-cb44bccd1ef4c052ca5ba886ebfa76c5f79524cd.tar.bz2
uhd-cb44bccd1ef4c052ca5ba886ebfa76c5f79524cd.zip
mpm: tdc: compensate for the trace delay differences between daughterboards
Reviewed-By: Martin Braun <martin.braun@ettus.com>
-rw-r--r--mpm/python/usrp_mpm/cores/tdc_sync.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/mpm/python/usrp_mpm/cores/tdc_sync.py b/mpm/python/usrp_mpm/cores/tdc_sync.py
index 6b3cdd686..6ce579e16 100644
--- a/mpm/python/usrp_mpm/cores/tdc_sync.py
+++ b/mpm/python/usrp_mpm/cores/tdc_sync.py
@@ -98,6 +98,7 @@ class ClockSynchronizer(object):
):
self._iface = regs_iface
self.log = get_logger("Sync-{}".format(slot_idx))
+ self.slot_idx = slot_idx
self.peek32 = lambda addr: self._iface.peek32(addr + offset)
self.poke32 = lambda addr, data: self._iface.poke32(addr + offset, data)
self.lmk = lmk
@@ -226,7 +227,13 @@ class ClockSynchronizer(object):
# TEMP CODE for homogenous rate sync only! Heterogenous rate sync requires an
# identical target value for all devices.
target = 1.0/self.ref_clk_freq + (1.0/self.radio_clk_freq)*3.5
- self.target_values = [target,]
+ # The radio clock traces on the motherboard are 69 ps longer for Daughterboard B
+ # than Daughterboard A. We want both of these clocks to align at the converters
+ # on each board, so adjust the target value for DB B. This is an N3xx series
+ # peculiarity and will not apply to other motherboards.
+ trace_delay_offset = {0: 0.0e-12,
+ 1: 69.0e-12}[self.slot_idx]
+ self.target_values = [target + trace_delay_offset,]
# Run the initial value through the oracle to determine the adjustments to make.
coarse_steps_required, dac_word_delta, distance_to_target = self.oracle(