Skip to content

Commit

Permalink
mpm: n3xx: BIST: Improve DDR3 BIST to check for DmaFIFO
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mbr0wn authored and brentstapleton committed Feb 20, 2019
1 parent 564a106 commit 694538f
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions mpm/python/usrp_mpm/bist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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():
Expand Down

0 comments on commit 694538f

Please sign in to comment.