From d2b9e6a04158a2aa709e1876b398387357186fe9 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 19 Feb 2019 14:43:54 -0800 Subject: 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. --- mpm/python/n3xx_bist | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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 -- cgit v1.2.3