diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-02-19 14:20:24 -0800 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-02-20 12:32:14 -0800 |
commit | 829c170d7b498eab9f56f9b062449e1425773342 (patch) | |
tree | 92df230911eb2574f7d391467b56fb4e683e25ed | |
parent | 999304cecca30e8c3860d6919cdd9b7f4eada1e2 (diff) | |
download | uhd-829c170d7b498eab9f56f9b062449e1425773342.tar.gz uhd-829c170d7b498eab9f56f9b062449e1425773342.tar.bz2 uhd-829c170d7b498eab9f56f9b062449e1425773342.zip |
mpm: n3xx: BIST: Improve DDR3 BIST to check for DmaFIFO
The capability to run the DDR3 BIST is built into the DmaFIFO RFNoC
block, which is not always available. This change performs a quick check
before for its existence before retrieving the throughput values, and
thus can provide a better error message in that case.
-rw-r--r-- | mpm/python/usrp_mpm/bist.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/mpm/python/usrp_mpm/bist.py b/mpm/python/usrp_mpm/bist.py index b16fefa35..dc57f2a0c 100644 --- a/mpm/python/usrp_mpm/bist.py +++ b/mpm/python/usrp_mpm/bist.py @@ -273,7 +273,6 @@ def test_ddr3_with_usrp_probe(): reporting a good throughput. This is a bit of a roundabout way of testing the DDR3, but it uses existing software and also tests the RFNoC pathways. """ - result = {} ddr3_bist_executor = 'uhd_usrp_probe --args addr=127.0.0.1' try: output = subprocess.check_output( @@ -285,14 +284,19 @@ def test_ddr3_with_usrp_probe(): # Don't throw errors from uhd_usrp_probe output = ex.output output = output.decode("utf-8") + if re.search(r"DmaFIFO", output) is None: + return { + 'error_msg': "DmaFIFO block not enabled. Cannot execute DDR3 BIST!", + 'throughput': 0, + } mobj = re.search(r"Throughput: (?P<thrup>[0-9.]+)\s?MB", output) if mobj is not None: - result['throughput'] = float(mobj.group('thrup')) * 1000 + return {'throughput': float(mobj.group('thrup')) * 1000} else: - result['throughput'] = 0 - result['error_msg'] = result.get('error_msg', '') + \ - "\n\nFailed match throughput regex!" - return result + return { + 'throughput': 0, + 'error_msg': "Failed match throughput regex!", + } def get_gpsd_tpv_result(): |