aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/n3xx_bist
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-02-19 14:43:54 -0800
committerBrent Stapleton <brent.stapleton@ettus.com>2019-02-20 12:31:49 -0800
commitfa52c97c008a2d42af0d4faf9be837ff2bfe4ad3 (patch)
treed80b9c178692924f39186a264e9b13e46906f7d3 /mpm/python/n3xx_bist
parent694538f595408e646041fc1598a6fd9217239367 (diff)
downloaduhd-fa52c97c008a2d42af0d4faf9be837ff2bfe4ad3.tar.gz
uhd-fa52c97c008a2d42af0d4faf9be837ff2bfe4ad3.tar.bz2
uhd-fa52c97c008a2d42af0d4faf9be837ff2bfe4ad3.zip
mpm: n3xx: bist: Auto-load the AA image for the ddr3 BIST
When running $ n3xx_bist ddr3 The test will now load the AA image if the BIST fails, unless the user specifies $ n3xx_bist ddr3 -o skip_load_fpga=1 The rationale is that by default, the AA image is the only one that includes the DmaFIFO block.
Diffstat (limited to 'mpm/python/n3xx_bist')
-rwxr-xr-xmpm/python/n3xx_bist22
1 files changed, 22 insertions, 0 deletions
diff --git a/mpm/python/n3xx_bist b/mpm/python/n3xx_bist
index fab76e33a..a8bda66f5 100755
--- a/mpm/python/n3xx_bist
+++ b/mpm/python/n3xx_bist
@@ -136,6 +136,28 @@ class N3XXBIST(bist.UsrpBIST):
assert 'ddr3' in self.tests_to_run
if self.args.dry_run:
return True, {'throughput': 1250e6}
+ # First, run the BIST without modifications. It will fail if there is no
+ # DmaFIFO block.
+ result = bist.test_ddr3_with_usrp_probe()
+ # If it failed, but the user specified skip_load_fpga, we also return
+ # the current result.
+ if ('error_msg' not in result) \
+ or self.args.option.get('skip_load_fpga', False):
+ return result.get('throughput', 0) > 1000e3, result
+ # Otherwise, we load the AA FPGA image, because that's one image where
+ # we think the DmaFIFO block is actually instantiated.
+ self.reload_fpga_image = True
+ try:
+ bist.load_fpga_image(
+ 'AA',
+ self.device_args,
+ self.get_product_id(),
+ )
+ except Exception as ex:
+ return {
+ 'throughput': 0,
+ 'error_msg': "Failed to load AA image: {}".format(str(ex)),
+ }
result = bist.test_ddr3_with_usrp_probe()
return result.get('throughput', 0) > 1000e3, result