aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/n3xx_bist
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-07-18 17:42:28 -0700
committerMartin Braun <martin.braun@ettus.com>2018-07-19 10:31:40 -0700
commit04064035f492bf2b15d57d1ba2b313ab87e36959 (patch)
treef9b9e2bae95059cd76c5dc618970043b55128046 /mpm/python/n3xx_bist
parentcb54b9b7e37545d2abaeba3840f4cfcdd549dc91 (diff)
downloaduhd-04064035f492bf2b15d57d1ba2b313ab87e36959.tar.gz
uhd-04064035f492bf2b15d57d1ba2b313ab87e36959.tar.bz2
uhd-04064035f492bf2b15d57d1ba2b313ab87e36959.zip
mpm: n3xx: bist: Add White Rabbit lock test
Diffstat (limited to 'mpm/python/n3xx_bist')
-rwxr-xr-xmpm/python/n3xx_bist33
1 files changed, 33 insertions, 0 deletions
diff --git a/mpm/python/n3xx_bist b/mpm/python/n3xx_bist
index 62f09a9b2..872eb490e 100755
--- a/mpm/python/n3xx_bist
+++ b/mpm/python/n3xx_bist
@@ -164,6 +164,9 @@ def filter_results_for_lv(results):
'cooling_device0': -1,
'cooling_device1': -1,
},
+ 'whiterabbit': {
+ 'lock_status': 0,
+ },
}
# OK now go and brush up the results:
def fixup_dict(result_dict, ref_dict):
@@ -772,6 +775,36 @@ class N3XXBIST(object):
}
return len(result) == 2, result
+ def bist_whiterabbit(self):
+ """
+ BIST for White Rabbit.
+ Description: Checks if the WR core can lock.
+
+ External Equipment: A WR source needs to be connected to SFP0.
+ """
+ assert 'whiterabbit' in self.tests_to_run
+ if self.args.dry_run:
+ return True, {'lock': True}
+ load_fpga_image('WX')
+ self.reload_fpga_image = True
+ from usrp_mpm.cores import WhiteRabbitRegsControl
+ from usrp_mpm.periph_manager.n3xx import n3xx
+ from usrp_mpm.periph_manager import n3xx_periphs
+ mb_regs = n3xx_periphs.MboardRegsControl(
+ n3xx.mboard_regs_label, self.log)
+ mb_regs.set_time_source('sfp0', 25e6)
+ wr_regs_control = WhiteRabbitRegsControl(
+ n3xx.wr_regs_label, self.log)
+ lock_status = poll_with_timeout(
+ lambda: wr_regs_control.get_time_lock_status(),
+ 40000, # Try for x ms... this number is set from a few benchtop tests
+ 1000, # Poll every... second! why not?
+ )
+ result = {
+ 'lock_status': int(lock_status),
+ }
+ return lock_status, result
+
def gpio_set_all(gpio_bank, value, gpio_size, ddr_mask):
"""Helper function for set gpio.